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='title' content='test_binding2.x3d'/> |
6 | <meta name='MovingImage' content='test-binding2-movie.mpg'/> |
7 | <meta name='reference' content='http://www.nist.gov/vrml.html'/> |
8 | <meta name='reference' content='http://www.itl.nist.gov/div897/ctg/vrml/vrml.html'/> |
9 | <meta name='creator' content='http://www.itl.nist.gov/div897/ctg/vrml/members.html'/> |
10 | <meta name='disclaimer' content='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='reference' content='Original NIST Conformance Testing Group, https://www.itl.nist.gov/div897/ctg/vrml'/> |
12 | <meta name='reference' content='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='info' content='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='translator' content='Michael Kass NIST, Don Brutzman NPS'/> |
15 | <meta name='translated' content='21 January 2001'/> |
16 | <meta name='modified' content='28 August 2023'/> |
17 | <meta name='description' content='This test addresses the ability of a background node to send true events when it is the currently binded background. Two backgrounds are defined in the local coordinate system. The first one is binded by default. The test then sends a false event to the first background and true event to the second background. This will make the second background the currently binded background. The first background should then start sending false events (via the is_Bound field). These events are caputure and use to start a timer. The test should generate a blue sky color image with some text flashing on it. The test can be started by clicking on the text displayed when the test is first started. PLEASE NOTE THAT THE SECOND BACKGROUND IS FORCED TO BE THE CURRENT BACKGROUND BY SENDING A true EVENT TO IT.'/> |
18 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/test_binding2.x3d'/> |
19 | <meta name='generator' content='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/> |
20 | <meta name='generator' content='X3D-Edit 4.0, https://savage.nps.edu/X3D-Edit'/> |
21 | <meta name='license' content='../../license.html'/> |
22 | </head> |
23 | <Scene> |
24 | <WorldInfo title='test_binding2.x3d'/> |
25 | <NavigationInfo type='"EXAMINE" "WALK" "FLY" "ANY"'/> |
26 | <Group> |
27 | <Viewpoint DEF='the-view' description='Front View' position='0 0 20'/> |
28 | </Group> |
29 | <Group> |
30 |
<!-- ROUTE information for sky-back1 node:
[from set_backfalse.value_out to set_bind
]
[from isBound to timer1.enabled
]
-->
<Background DEF='sky-back1' groundColor='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 " '/> |
31 |
<!-- ROUTE information for sky-back2 node:
[from set_backtrue.value_out to set_bind
]
-->
<Background DEF='sky-back2' groundColor='0 0 0' backUrl=' "sky2.png " "https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/sky2.png " ' bottomUrl=' "sky2.png " "https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/sky2.png " ' frontUrl=' "sky2.png " "https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/sky2.png " ' leftUrl=' "sky2.png " "https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/sky2.png " ' rightUrl=' "sky2.png " "https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/sky2.png " ' topUrl=' "sky2.png " "https://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Background/sky2.png " '/> |
32 | </Group> |
33 | <Transform translation='0.5 3 0'> |
34 | <Shape> |
35 | <Appearance> |
36 |
<!-- ROUTE information for the-material1 node:
[from colors1.value_changed to diffuseColor
]
-->
<Material DEF='the-material1' diffuseColor='0 0 1' emissiveColor='0 0 1'/> |
37 | </Appearance> |
38 | <Text string='"Background 1 sending false Event"'> |
39 | <FontStyle justify='"MIDDLE" "MIDDLE"'/> |
40 | </Text> |
41 | </Shape> |
42 | </Transform> |
43 | <Transform scale='0.04 0.04 0.04' translation='0.5 0 0'> |
44 | <Shape> |
45 | <Appearance> |
46 | <Material DEF='the-material5' diffuseColor='1 0 0'/> |
47 | </Appearance> |
48 | <Text string='"CLICK HERE TO START"'> |
49 | <FontStyle justify='"MIDDLE" "MIDDLE"' size='32' style='BOLD'/> |
50 | </Text> |
51 | </Shape> |
52 |
<!-- ROUTE information for the-touch node:
[from touchTime to set_backtrue.value_in
]
[from touchTime to set_backfalse.value_in
]
[from touchTime to timer1.startTime
]
-->
<TouchSensor DEF='the-touch' description='touch to activate'/> |
53 | </Transform> |
54 |
<!-- ROUTE information for timer1 node:
[from the-touch.touchTime to startTime
]
[from sky-back1.isBound to enabled
]
[from fraction_changed to colors1.set_fraction
]
-->
<TimeSensor DEF='timer1' cycleInterval='8' enabled='false'/> |
55 |
<!-- ROUTE information for colors1 node:
[from timer1.fraction_changed to set_fraction
]
[from value_changed to the-material1.diffuseColor
]
-->
<ColorInterpolator DEF='colors1' key='0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1' keyValue='1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0'/> |
56 |
<!-- ROUTE information for set_backtrue node:
[from the-touch.touchTime to value_in
]
[from value_out to sky-back2.set_bind
]
-->
<Script DEF='set_backtrue'> |
57 | <field name='value_in' type='SFTime' accessType='inputOnly'/> |
58 | <field name='value_out' type='SFBool' accessType='outputOnly'/> |
<![CDATA[
ecmascript: function value_in (the_value) { value_out = true; }
]]>
|
|
60 | </Script> |
61 |
<!-- ROUTE information for set_backfalse node:
[from the-touch.touchTime to value_in
]
[from value_out to sky-back1.set_bind
]
-->
<Script DEF='set_backfalse'> |
62 | <field name='value_in' type='SFTime' accessType='inputOnly'/> |
63 | <field name='value_out' type='SFBool' accessType='outputOnly'/> |
<![CDATA[
ecmascript: function value_in (the_value) { value_out = false; }
]]>
|
|
65 | </Script> |
66 | <Script DEF='convert'> |
67 | <field name='value_in' type='SFTime' accessType='inputOnly'/> |
68 | <field name='value_out' type='SFBool' accessType='outputOnly'/> |
<![CDATA[
ecmascript: function value_in (the_value) { value_out = !the_value; }
]]>
|
|
70 | </Script> |
71 | < ROUTE fromNode='the-touch' fromField='touchTime' toNode='set_backtrue' toField='value_in'/> |
72 | < ROUTE fromNode='the-touch' fromField='touchTime' toNode='set_backfalse' toField='value_in'/> |
73 | < ROUTE fromNode='set_backtrue' fromField='value_out' toNode='sky-back2' toField='set_bind'/> |
74 | < ROUTE fromNode='set_backfalse' fromField='value_out' toNode='sky-back1' toField='set_bind'/> |
75 | < ROUTE fromNode='the-touch' fromField='touchTime' toNode='timer1' toField='startTime'/> |
76 | < ROUTE fromNode='sky-back1' fromField='isBound' toNode='timer1' toField='enabled'/> |
77 | < ROUTE fromNode='timer1' fromField='fraction_changed' toNode='colors1' toField='set_fraction'/> |
78 | < ROUTE fromNode='colors1' fromField='value_changed' toNode='the-material1' toField='diffuseColor'/> |
79 | </Scene> |
80 | </X3D> |
Event Graph ROUTE Table entries with 8 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 |
set_backtrue
Script value_in SFTime |
then
|
set_backtrue
Script value_out SFBool |
sky-back2
Background set_bind SFBool |
||||||||||||||
the-touch
TouchSensor touchTime SFTime |
set_backfalse
Script value_in SFTime |
then
|
set_backfalse
Script value_out SFBool |
sky-back1
Background set_bind SFBool |
then
|
sky-back1
Background isBound SFBool |
timer1
TimeSensor enabled SFBool |
then
|
timer1
TimeSensor fraction_changed SFFloat |
colors1
ColorInterpolator set_fraction SFFloat |
then
|
colors1
ColorInterpolator value_changed SFColor |
the-material1
Material diffuseColor SFColor |
|||||
the-touch
TouchSensor touchTime SFTime |
timer1
TimeSensor startTime SFTime |
then
|
timer1
TimeSensor fraction_changed SFFloat |
colors1
ColorInterpolator set_fraction SFFloat |
then
|
colors1
ColorInterpolator value_changed SFColor |
the-material1
Material diffuseColor SFColor |
<!--
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)
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->