[X3D-Public] Variant browser behavior

Espen Ottar espen.ottar at octaga.com
Wed Jun 9 02:01:23 PDT 2010


In Octaga this does not work because when "IntroFinished.set_boolean" 
receives a FALSE event it sends
a FALSE event out on the "IntroFinished.inputFalse" and thus the 
"Time.enabled" is always set to FALSE.

As i interpret the spec this is the correct behaviour.

To make it work, you could change:
<ROUTE fromNode='IntroFinished' fromField='inputFalse' toNode='Time' 
toField='enabled'/>
to
<ROUTE fromNode='IntroFinished' fromField='inputNegate' toNode='Time' 
toField='enabled'/>

-espen

On 08.06.2010 17:51, Alan Hudson wrote:
> Charles Lamb wrote:
>> I have created to the following set of nodes and routes to animate a 
>> scene
>> in which the viewpoint is moved when the scene is first loaded and, 
>> when the
>> viewpoint move is complete, an animation loop begins.  The animation 
>> driven
>> by the TimeSensor "Time" works as I expect it to when rendered by the 
>> Xj3D
>> Browser and the open source flux browser.  FreeWRL, BS Contact, and 
>> Octaga
>> do not seem to ever start the TimeSensor "Time".  Which behavior is 
>> correct?
>>
>>
>>
>> <ProximitySensor DEF='HereIAm' size='1000 1000 1000' enabled='true'/>
>>
>>
>> <!-- move to default viewpoint -->
>>
>> <TimeSensor DEF="PositionTime" cycleInterval="5" loop="false"/>
>>
>> <ROUTE fromNode="HereIAm" fromField="enterTime" toNode="PositionTime"
>> toField="startTime"/>
>>
>> <!-- start animation sequences -->
>>
>> <BooleanFilter DEF="IntroFinished"/>
>>
>> <TimeTrigger DEF="IntroStartTime"/>
>>
>> <TimeSensor DEF='Time' enabled='false' cycleInterval='8' loop='true'/>
>>
>> <ROUTE fromNode='PositionTime' fromField='isActive'
>> toNode='IntroFinished' toField='set_boolean'/>
>>
>> <ROUTE fromNode='IntroFinished' fromField='inputFalse'
>> toNode='IntroStartTime' toField='set_boolean'/>
>>
>> <ROUTE fromNode='IntroStartTime' fromField='triggerTime' toNode='Time'
>> toField='startTime'/>
>>
>> <ROUTE fromNode='IntroFinished' fromField='inputFalse' toNode='Time'
>> toField='enabled'/>
>>
>> <!-- end animation sequences-->
>>
>>
>
> This code depends on the browser implementing this language correctly. 
> You might try a simple test of routing a browsers enterTime from the 
> ProximitySensor to a script and print it.  Likely you will find 
> variences in how this is being implemented.
>
>
> ---
>
>
> A ProximitySensor node that surrounds the entire world has an 
> enterTime equal to the time that the world was entered and can be used 
> to start up animations or behaviours as soon as a world is loaded. A 
> ProximitySensor node with a box containing zero volume (i.e., any size 
> field element of 0.0) cannot generate events. This is equivalent to 
> setting the enabled field to FALSE.
>
> A ProximitySensor read from an X3D file shall generate isActive TRUE, 
> position_changed, orientation_changed and enterTime events if the 
> sensor is enabled and the viewer is inside the proximity region. A 
> ProximitySensor inserted into the transformation hierarchy shall 
> generate isActive TRUE, position_changed, orientation_changed and 
> enterTime events if the sensor is enabled and the viewer is inside the 
> proximity region. A ProximitySensor removed from the transformation 
> hierarchy shall generate isActive FALSE, position_changed, 
> orientation_changed and exitTime events if the sensor is enabled and 
> the viewer is inside the proximity region.
>

-- 
Espen Ottar
Development Manager
Octaga AS
mob: +47 90142207
http://www.octaga.com




More information about the X3D-Public mailing list