X3D Model Documentation: test_binding5.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2 
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
  3  <X3D profile='Immersive' version='3.0 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.0.xsd'>
  4       <head>
  5            <meta name='titlecontent='test_binding5.x3d'/>
  6            <meta name='MovingImagecontent='test-binding5-movie.mpg'/>
  7            <meta name='referencecontent='http://www.nist.gov/vrml.html'/>
  8            <meta name='referencecontent='http://www.itl.nist.gov/div897/ctg/vrml/vrml.html'/>
  9            <meta name='creatorcontent='http://www.itl.nist.gov/div897/ctg/vrml/members.html'/>
 10            <meta name='disclaimercontent='This file was provided by the National Institute of Standards and Technology, and is part of the X3D Conformance Test Suite, available at http://www.nist.gov/vrml.html The information contained within this file is provided for use in establishing conformance to the ISO VRML97 Specification. Conformance to this test does not imply recommendation or endorsement by the National Institute of Standards and Technology (NIST). This software can be redistributed and/or modified freely provided that any derivative works bear some notice that they are derived from it, and any modified versions bear some notice that they have been modified. '/>
 11            <meta name='referencecontent='Original NIST Conformance Testing Group, https://www.itl.nist.gov/div897/ctg/vrml'/>
 12            <meta name='referencecontent='Interactive Conformance Testing for VRML, Mary Brady and Lynn Rosenthal, NIST, created 8 September 2010 and updated 25 August 2016, https://www.nist.gov/itl/ssd/information-systems-group/interactive-conformance-testing-vrml'/>
 13            <meta name='infocontent='Correct definition and compliance of this conformance scene is maintained by the X3D Working Group, https://www.web3d.org/working-groups/x3d'/>
 14            <meta name='translatorcontent='Michael Kass NIST, Don Brutzman NPS'/>
 15            <meta name='translatedcontent='21 January 2001'/>
 16            <meta name='modifiedcontent='28 August 2023'/>
 17            <meta name='descriptioncontent='Test browser ability to dynamically activate and deactivate backgrounds. Three backgrounds are defined in the local coordinate system. The first one is active by default. After clicking on the text The test should send a false event to the first background and a true event to the second background. This should push the first background from the top of the stack and make background 2 the current active background. Then a true event is sent to the third background and a false event is sent to the second background. That should activate background number 3. The test catches the true events sent by each background. After a false event is sent to background number 3, then background number 1 should be activated by default, The test can be started by clicking on the text below the geometry.'/>
 18            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/test_binding5.x3d'/>
 19            <meta name='generatorcontent='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/>
 20            <meta name='generatorcontent='X3D-Edit 4.0, https://savage.nps.edu/X3D-Edit'/>
 21            <meta name='licensecontent='../../license.html'/>
 22       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top Index for DEF nodes: colors1, colors2, colors3, delay_timer2-3, delay_timer4, sky-back1, sky-back2, sky-back3, the-material1, the-material2, the-material3, the-material5, the-touch, the-view, timer1, timer2, timer3, timer4, timer5

Index for Viewpoint node: the-view
-->
 23       <Scene>
 24            <WorldInfo title='test_binding5.x3d'/>
 25            <NavigationInfo type='"EXAMINE" "WALK" "FLY" "ANY"'/>
 26            <Group>
 27                 <Viewpoint DEF='the-viewdescription='Front Viewposition='0 0 20'/>
 28            </Group>
 29            <Background DEF='sky-back1groundColor='0 0 0'   backUrl=' "sky1.jpg " "https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/sky1.jpg " '   bottomUrl=' "sky1.jpg " "https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/sky1.jpg " '   frontUrl=' "sky1.jpg " "https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/sky1.jpg " '   leftUrl=' "sky1.jpg " "https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/sky1.jpg " '   rightUrl=' "sky1.jpg " "https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/sky1.jpg " '   topUrl=' "sky1.jpg " "https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/sky1.jpg " '/>
 30 
 31 
 32            <Transform translation='0.5 7 0'>
 33                 <Shape>
 34                      <Appearance>
 35 
                         <!-- ROUTE information for the-material1 node:  [from colors1.value_changed to diffuseColor ] -->
                         <Material DEF='the-material1diffuseColor='0 0 1'/>
 36                      </Appearance>
 37                      <Text string='"Background 1 sending true Event"'>
 38                           <FontStyle justify='"MIDDLE" "MIDDLE"'/>
 39                      </Text>
 40                 </Shape>
 41            </Transform>
 42            <Transform translation='0.5 6 0'>
 43                 <Shape>
 44                      <Appearance>
 45 
                         <!-- ROUTE information for the-material2 node:  [from colors2.value_changed to diffuseColor ] -->
                         <Material DEF='the-material2diffuseColor='0 0 1'/>
 46                      </Appearance>
 47                      <Text string='"Background 2 sending true Event"'>
 48                           <FontStyle justify='"MIDDLE" "MIDDLE"'/>
 49                      </Text>
 50                 </Shape>
 51            </Transform>
 52            <Transform translation='0.5 5 0'>
 53                 <Shape>
 54                      <Appearance>
 55 
                         <!-- ROUTE information for the-material3 node:  [from colors3.value_changed to diffuseColor ] -->
                         <Material DEF='the-material3diffuseColor='0 0 1'/>
 56                      </Appearance>
 57                      <Text string='"Background 3 sending true Event"'>
 58                           <FontStyle justify='"MIDDLE" "MIDDLE"'/>
 59                      </Text>
 60                 </Shape>
 61            </Transform>
 62            <Transform scale='0.04 0.04 0.04translation='0.5 0 0'>
 63                 <Shape>
 64                      <Appearance>
 65                           <Material DEF='the-material5diffuseColor='1 0 0'/>
 66                      </Appearance>
 67                      <Text string='"CLICK HERE TO START"'>
 68                           <FontStyle justify='"MIDDLE" "MIDDLE"size='32style='BOLD'/>
 69                      </Text>
 70                 </Shape>
 71 
               <!-- ROUTE information for the-touch node:  [from touchTime to timer1.startTime ] [from touchTime to delay_timer2-3.time_in ] [from touchTime to delay_timer4.time_in ] -->
               <TouchSensor DEF='the-touchdescription='touch to activate'/>
 72            </Transform>
 73 
          <!-- ROUTE information for timer1 node:  [from the-touch.touchTime to startTime ] [from fraction_changed to colors1.set_fraction ] -->
          <TimeSensor DEF='timer1cycleInterval='5'/>
 74 
          <!-- ROUTE information for timer2 node:  [from delay_timer2-3.time_later to startTime ] [from isActive to sky-back2.set_bind ] -->
          <TimeSensor DEF='timer2cycleInterval='5'/>
 75 
          <!-- ROUTE information for timer3 node:  [from delay_timer2-3.time_later to startTime ] [from sky-back2.isBound to enabled ] [from fraction_changed to colors2.set_fraction ] -->
          <TimeSensor DEF='timer3cycleInterval='5enabled='false'/>
 76 
          <!-- ROUTE information for timer4 node:  [from delay_timer4.time_later to startTime ] [from isActive to sky-back3.set_bind ] -->
          <TimeSensor DEF='timer4cycleInterval='5'/>
 77 
          <!-- ROUTE information for timer5 node:  [from delay_timer4.time_later to startTime ] [from sky-back3.isBound to enabled ] [from fraction_changed to colors3.set_fraction ] -->
          <TimeSensor DEF='timer5cycleInterval='5enabled='false'/>
 78 
          <!-- ROUTE information for colors1 node:  [from timer1.fraction_changed to set_fraction ] [from value_changed to the-material1.diffuseColor ] -->
          <ColorInterpolator DEF='colors1key='0 0.25 0.5 0.75 0.85 1keyValue='1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1'/>
 79 
          <!-- ROUTE information for colors2 node:  [from timer3.fraction_changed to set_fraction ] [from value_changed to the-material2.diffuseColor ] -->
          <ColorInterpolator DEF='colors2key='0 0.25 0.5 0.75 0.85 1keyValue='1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1'/>
 80 
          <!-- ROUTE information for colors3 node:  [from timer5.fraction_changed to set_fraction ] [from value_changed to the-material3.diffuseColor ] -->
          <ColorInterpolator DEF='colors3key='0 0.25 0.5 0.75 0.85 1keyValue='1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1'/>
 81 
          <!-- ROUTE information for delay_timer2-3 node:  [from the-touch.touchTime to time_in ] [from time_later to timer2.startTime ] [from time_later to timer3.startTime ] -->
          <Script DEF='delay_timer2-3'>
 82                 <field name='time_intype='SFTimeaccessType='inputOnly'/>
 83                 <field name='time_latertype='SFTimeaccessType='outputOnly'/>
  <![CDATA[
      
ecmascript:
function time_in (the_value)
{
	time_later = the_value + 6;
}

    
]]>
 85            </Script>
 86 
          <!-- ROUTE information for delay_timer4 node:  [from the-touch.touchTime to time_in ] [from time_later to timer4.startTime ] [from time_later to timer5.startTime ] -->
          <Script DEF='delay_timer4'>
 87                 <field name='time_intype='SFTimeaccessType='inputOnly'/>
 88                 <field name='time_latertype='SFTimeaccessType='outputOnly'/>
  <![CDATA[
      
ecmascript:
function time_in (the_value)
{
	time_later = the_value + 10;
}

    
]]>
 90            </Script>
 91            < ROUTE  fromNode='the-touch' fromField='touchTime' toNode='timer1' toField='startTime'/>
 92            < ROUTE  fromNode='timer1' fromField='fraction_changed' toNode='colors1' toField='set_fraction'/>
 93            < ROUTE  fromNode='colors1' fromField='value_changed' toNode='the-material1' toField='diffuseColor'/>
 94            < ROUTE  fromNode='the-touch' fromField='touchTime' toNode='delay_timer2-3' toField='time_in'/>
 95            < ROUTE  fromNode='the-touch' fromField='touchTime' toNode='delay_timer4' toField='time_in'/>
 96            < ROUTE  fromNode='delay_timer2-3' fromField='time_later' toNode='timer2' toField='startTime'/>
 97            < ROUTE  fromNode='timer2' fromField='isActive' toNode='sky-back2' toField='set_bind'/>
 98            < ROUTE  fromNode='delay_timer2-3' fromField='time_later' toNode='timer3' toField='startTime'/>
 99            < ROUTE  fromNode='sky-back2' fromField='isBound' toNode='timer3' toField='enabled'/>
100            < ROUTE  fromNode='timer3' fromField='fraction_changed' toNode='colors2' toField='set_fraction'/>
101            < ROUTE  fromNode='colors2' fromField='value_changed' toNode='the-material2' toField='diffuseColor'/>
102            < ROUTE  fromNode='delay_timer4' fromField='time_later' toNode='timer4' toField='startTime'/>
103            < ROUTE  fromNode='timer4' fromField='isActive' toNode='sky-back3' toField='set_bind'/>
104            < ROUTE  fromNode='delay_timer4' fromField='time_later' toNode='timer5' toField='startTime'/>
105            < ROUTE  fromNode='sky-back3' fromField='isBound' toNode='timer5' toField='enabled'/>
106            < ROUTE  fromNode='timer5' fromField='fraction_changed' toNode='colors3' toField='set_fraction'/>
107            < ROUTE  fromNode='colors3' fromField='value_changed' toNode='the-material3' toField='diffuseColor'/>
108       </Scene>
109  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top Index for DEF nodes: colors1, colors2, colors3, delay_timer2-3, delay_timer4, sky-back1, sky-back2, sky-back3, the-material1, the-material2, the-material3, the-material5, the-touch, the-view, timer1, timer2, timer3, timer4, timer5

Index for Viewpoint node: the-view
-->
X3D Tooltips element index: Appearance, Background, ColorInterpolator, field, FontStyle, Group, head, Material, meta, NavigationInfo, ROUTE, Scene, Script, Shape, Text, TimeSensor, TouchSensor, Transform, Viewpoint, WorldInfo, X3D, accessType and type, XML data types, field types

Event Graph ROUTE Table entries with 17 ROUTE connections total, showing X3D event-model relationships for this scene.

Each row shows an event cascade that may occur during a single timestamp interval between frame renderings, as part of the X3D execution model.

the-touch
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
timer1
TimeSensor
startTime
SFTime
then
 
 
 
timer1
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
colors1
ColorInterpolator
set_fraction
SFFloat
then
 
 
 
colors1
ColorInterpolator
value_changed
SFColor

ROUTE
event to
(3)
the-material1
Material
diffuseColor
SFColor
the-touch
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
delay_timer2-3
Script
time_in
SFTime
then
 
 
 
delay_timer2-3
Script
time_later
SFTime

ROUTE
event to
(2)
timer2
TimeSensor
startTime
SFTime
then
 
 
 
timer2
TimeSensor
isActive
SFBool

ROUTE
event to
(3)
sky-back2
Background
set_bind
SFBool
then
 
 
 
sky-back2
Background
isBound
SFBool

ROUTE
event to
(4)
timer3
TimeSensor
enabled
SFBool
then
 
 
 
timer3
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(5)
colors2
ColorInterpolator
set_fraction
SFFloat
then
 
 
 
colors2
ColorInterpolator
value_changed
SFColor

ROUTE
event to
(6)
the-material2
Material
diffuseColor
SFColor
  then
 
 
 
delay_timer2-3
Script
time_later
SFTime

ROUTE
event to
(2)
timer3
TimeSensor
startTime
SFTime
then
 
 
 
timer3
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(3)
colors2
ColorInterpolator
set_fraction
SFFloat
then
 
 
 
colors2
ColorInterpolator
value_changed
SFColor

ROUTE
event to
(4)
the-material2
Material
diffuseColor
SFColor
the-touch
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
delay_timer4
Script
time_in
SFTime
then
 
 
 
delay_timer4
Script
time_later
SFTime

ROUTE
event to
(2)
timer4
TimeSensor
startTime
SFTime
then
 
 
 
timer4
TimeSensor
isActive
SFBool

ROUTE
event to
(3)
sky-back3
Background
set_bind
SFBool
then
 
 
 
sky-back3
Background
isBound
SFBool

ROUTE
event to
(4)
timer5
TimeSensor
enabled
SFBool
then
 
 
 
timer5
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(5)
colors3
ColorInterpolator
set_fraction
SFFloat
then
 
 
 
colors3
ColorInterpolator
value_changed
SFColor

ROUTE
event to
(6)
the-material3
Material
diffuseColor
SFColor
  then
 
 
 
delay_timer4
Script
time_later
SFTime

ROUTE
event to
(2)
timer5
TimeSensor
startTime
SFTime
then
 
 
 
timer5
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(3)
colors3
ColorInterpolator
set_fraction
SFFloat
then
 
 
 
colors3
ColorInterpolator
value_changed
SFColor

ROUTE
event to
(4)
the-material3
Material
diffuseColor
SFColor

Additional guidance on X3D animation can be found in the 10-Step Animation Design Process and Event Tracing hint sheets. Have fun with X3D! 😀

-->
<!-- Online at
https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/test_binding5Index.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/test_binding5.x3d -->

<!-- Color legend: X3D terminology <X3dNode DEF='idName' field='value'/> matches XML terminology <XmlElement DEF='idName' attribute='value'/>
(Light-blue background: event-based behavior node or statement) (Grey background inside box: inserted documentation) (Magenta background: X3D Extensibility)
-->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->