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='duration.x3d'/> |
6 | <meta name='MovingImage' content='duration-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='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'/> |
12 | <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'/> |
13 | <meta name='translator' content='Michael Kass NIST, Don Brutzman NPS'/> |
14 | <meta name='translated' content='21 January 2001'/> |
15 | <meta name='modified' content='28 August 2023'/> |
16 | <meta name='description' content='Test duration_changed field. A world file with an AudioClip node is loaded, and the duration_changed field for for that AudioClip is displayed as Text at the top of the world. Clicking on the "phonograph" geometry with the pointing device loads a different URL, with a different sound file. The result should be, the Text should change from "duration_changed = 5" to "duration_changed = 10" when the geometry is clicked.'/> |
17 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/duration.x3d'/> |
18 | <meta name='generator' content='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/> |
19 | <meta name='generator' content='X3D-Edit 4.0, https://savage.nps.edu/X3D-Edit'/> |
20 | <meta name='license' content='../../license.html'/> |
21 | </head> |
22 | <Scene> |
23 | <WorldInfo title='duration.x3d'/> |
24 | <Viewpoint description='entry viewpoint' position='0 0 5'/> |
25 |
<!-- ROUTE information for PROX_SENSOR node:
[from position_changed to PITCH_FAST_TRANS.set_translation
]
[from orientation_changed to PITCH_FAST_TRANS.set_rotation
]
[from position_changed to SLOW_TRANS.set_translation
]
[from orientation_changed to SLOW_TRANS.set_rotation
]
[from position_changed to TEXT_TRANS.set_translation
]
[from orientation_changed to TEXT_TRANS.set_rotation
]
-->
<ProximitySensor DEF='PROX_SENSOR' size='1000 1000 1000'/> |
26 | <Sound> |
27 |
<!-- AudioClip
MYSOUND1 is a DEF node that has 1 USE node: USE_1
<!-- ROUTE information for MYSOUND1 node: [from isActive to SOUND_SCRIPT.colorPhonograph ] [from duration_changed to SOUND_SCRIPT.durationText ] --> <AudioClip DEF='MYSOUND1' description='loaded clip'/> |
28 | </Sound> |
29 | <Transform scale='0.5 0.5 0.5'> |
30 | <Transform translation='0 -2 0'> |
31 | <Shape> |
32 | <Appearance> |
33 |
<!-- Material
PHONOCOLOR is a DEF node that has 1 USE node: USE_1 --> <Material DEF='PHONOCOLOR'/> |
34 | </Appearance> |
35 | <Box size='3 1.5 3'/> |
36 | </Shape> |
37 | </Transform> |
38 | <Transform rotation='1 0 0 -2.5'> |
39 | <Shape> |
40 | <Appearance> |
41 | |
42 | </Appearance> |
43 | <Extrusion beginCap='false' creaseAngle='1.57' crossSection='1 0 0.92388 0.382683 0.707107 0.707106 0.382684 0.923879 1.26759e-006 1 -0.382682 0.92388 -0.707105 0.707108 -0.923879 0.382685 -1 2.53518e-006 -0.923881 -0.382681 -0.707109 -0.707105 -0.382687 -0.923878 -3.80277e-006 -1 0.38268 -0.923881 0.707104 -0.70711 0.923878 -0.382688 1 0' endCap='false' orientation='0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0' scale='2.2 2.2 1.8 1.8 1.4 1.4 1.2 1.2 1 1 0.8 0.8 0.6 0.6 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.2 0.2 0.0001 0.0001' solid='false' spine='0 -1.4 0 0 -1.22137 0 0 -1.01245 0 0 -0.819601 0 0 -0.626754 0 0 -0.401765 0 0 -0.204459 0 0 -0.0164327 0 0 0.176777 0 0 0.380511 0 0 0.578542 0 0 0.819601 0 0 0.996378 0 0 1.8 0 0 1.2 0'/> |
44 | </Shape> |
45 | </Transform> |
46 | </Transform> |
47 |
<!-- ROUTE information for PITCH_FAST_TRANS node:
[from PROX_SENSOR.position_changed to set_translation
]
[from PROX_SENSOR.orientation_changed to set_rotation
]
-->
<Transform DEF='PITCH_FAST_TRANS'> |
48 | <Transform translation='-3 1.5 -5'> |
49 | <Shape> |
50 | <Appearance> |
51 |
<!-- ROUTE information for FASTMATERIAL node:
[from FASTFLASH.value_changed to set_diffuseColor
]
-->
<Material DEF='FASTMATERIAL' ambientIntensity='1' diffuseColor='0 1 0'/> |
52 | </Appearance> |
53 | <Box DEF='FAST' size='1 1 0.1'/> |
54 | </Shape> |
55 | <Transform translation='-0.4 -0.1 0.2'> |
56 | <Shape> |
57 | <Appearance> |
58 | <Material ambientIntensity='1' diffuseColor='0 0 0'/> |
59 | </Appearance> |
60 | <Text string='"URL1"'> |
61 | <FontStyle size='0.4'/> |
62 | </Text> |
63 | </Shape> |
64 | </Transform> |
65 | </Transform> |
66 |
<!-- ROUTE information for TOUCHFAST node:
[from touchTime to SOUND_SCRIPT.oldUrl
]
[from touchTime to FASTTIMER.set_startTime
]
-->
<TouchSensor DEF='TOUCHFAST' description='touch for fast'/> |
67 |
<!-- ROUTE information for FASTTIMER node:
[from TOUCHFAST.touchTime to set_startTime
]
[from fraction_changed to FASTFLASH.set_fraction
]
-->
<TimeSensor DEF='FASTTIMER'/> |
68 |
<!-- ROUTE information for FASTFLASH node:
[from FASTTIMER.fraction_changed to set_fraction
]
[from value_changed to FASTMATERIAL.set_diffuseColor
]
-->
<ColorInterpolator DEF='FASTFLASH' key='0 0.5 1' keyValue='0 1 0 1 1 1 0 1 0'/> |
69 | </Transform> |
70 |
<!-- ROUTE information for TEXT_TRANS node:
[from PROX_SENSOR.position_changed to set_translation
]
[from PROX_SENSOR.orientation_changed to set_rotation
]
-->
<Transform DEF='TEXT_TRANS'> |
71 | <Transform translation='-2 1.5 -5'> |
72 | <Shape> |
73 | <Appearance> |
74 | <Material DEF='TEXTMATERIAL' diffuseColor='1 1 1'/> |
75 | </Appearance> |
76 | |
77 | <FontStyle size='0.4' style='BOLD'/> |
78 | </Text> |
79 | </Shape> |
80 | </Transform> |
81 | </Transform> |
82 |
<!-- ROUTE information for SLOW_TRANS node:
[from PROX_SENSOR.position_changed to set_translation
]
[from PROX_SENSOR.orientation_changed to set_rotation
]
-->
<Transform DEF='SLOW_TRANS'> |
83 | <Transform translation='3 1.5 -5'> |
84 | <Shape> |
85 | <Appearance> |
86 |
<!-- ROUTE information for SLOWMATERIAL node:
[from SLOWFLASH.value_changed to set_diffuseColor
]
-->
<Material DEF='SLOWMATERIAL' ambientIntensity='1' diffuseColor='1 0 0'/> |
87 | </Appearance> |
88 | <Box DEF='SLOW' size='1 1 0.1'/> |
89 | </Shape> |
90 | <Transform translation='-0.65 -0.1 0.2'> |
91 | <Shape> |
92 | <Appearance> |
93 | <Material ambientIntensity='1' diffuseColor='0 0 0'/> |
94 | </Appearance> |
95 | <Text string='"URL2"'> |
96 | <FontStyle size='0.4'/> |
97 | </Text> |
98 | </Shape> |
99 | </Transform> |
100 | </Transform> |
101 |
<!-- ROUTE information for TOUCHSLOW node:
[from touchTime to SOUND_SCRIPT.newUrl
]
[from touchTime to SLOWTIMER.set_startTime
]
-->
<TouchSensor DEF='TOUCHSLOW' description='touch for slow'/> |
102 |
<!-- ROUTE information for SLOWTIMER node:
[from TOUCHSLOW.touchTime to set_startTime
]
[from fraction_changed to SLOWFLASH.set_fraction
]
-->
<TimeSensor DEF='SLOWTIMER'/> |
103 |
<!-- ROUTE information for SLOWFLASH node:
[from SLOWTIMER.fraction_changed to set_fraction
]
[from value_changed to SLOWMATERIAL.set_diffuseColor
]
-->
<ColorInterpolator DEF='SLOWFLASH' key='0 0.5 1' keyValue='1 0 0 1 1 1 1 0 0'/> |
104 | </Transform> |
105 |
<!-- ROUTE information for SOUND_SCRIPT node:
[from TOUCHFAST.touchTime to oldUrl
]
[from TOUCHSLOW.touchTime to newUrl
]
[from MYSOUND1.isActive to colorPhonograph
]
[from MYSOUND1.duration_changed to durationText
]
-->
<Script DEF='SOUND_SCRIPT' directOutput='true' url=' "duration.js" "https://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/duration.js" '> |
106 | <field name='mySound1' type='SFNode' accessType='initializeOnly'> |
107 | <AudioClip USE='MYSOUND1'/> |
108 | </field> |
109 | <field name='myText' type='SFNode' accessType='initializeOnly'> |
110 | <Text USE='MYTEXT'/> |
111 | </field> |
112 | <field name='phonoColor' type='SFNode' accessType='initializeOnly'> |
113 | <Material USE='PHONOCOLOR'/> |
114 | </field> |
115 | <field name='hornColor' type='SFNode' accessType='initializeOnly'> |
116 | <Material USE='HORNCOLOR'/> |
117 | </field> |
118 | <field name='yellow' type='SFColor' value='0.75 0.75 0.00' accessType='initializeOnly'/> |
119 | <field name='white' type='SFColor' value='0.80 0.80 0.80' accessType='initializeOnly'/> |
120 | <field name='colorPhonograph' type='SFBool' accessType='inputOnly'/> |
121 | <field name='durationText' type='SFTime' accessType='inputOnly'/> |
122 | <field name='newUrl' type='SFTime' accessType='inputOnly'/> |
123 | <field name='oldUrl' type='SFTime' accessType='inputOnly'/> |
124 | </Script> |
125 | < ROUTE fromNode='TOUCHFAST' fromField='touchTime' toNode='SOUND_SCRIPT' toField='oldUrl'/> |
126 | < ROUTE fromNode='TOUCHSLOW' fromField='touchTime' toNode='SOUND_SCRIPT' toField='newUrl'/> |
127 | < ROUTE fromNode='PROX_SENSOR' fromField='position_changed' toNode='PITCH_FAST_TRANS' toField='set_translation'/> |
128 | < ROUTE fromNode='PROX_SENSOR' fromField='orientation_changed' toNode='PITCH_FAST_TRANS' toField='set_rotation'/> |
129 | < ROUTE fromNode='PROX_SENSOR' fromField='position_changed' toNode='SLOW_TRANS' toField='set_translation'/> |
130 | < ROUTE fromNode='PROX_SENSOR' fromField='orientation_changed' toNode='SLOW_TRANS' toField='set_rotation'/> |
131 | < ROUTE fromNode='PROX_SENSOR' fromField='position_changed' toNode='TEXT_TRANS' toField='set_translation'/> |
132 | < ROUTE fromNode='PROX_SENSOR' fromField='orientation_changed' toNode='TEXT_TRANS' toField='set_rotation'/> |
133 | < ROUTE fromNode='MYSOUND1' fromField='isActive' toNode='SOUND_SCRIPT' toField='colorPhonograph'/> |
134 | < ROUTE fromNode='TOUCHFAST' fromField='touchTime' toNode='FASTTIMER' toField='set_startTime'/> |
135 | < ROUTE fromNode='FASTTIMER' fromField='fraction_changed' toNode='FASTFLASH' toField='set_fraction'/> |
136 | < ROUTE fromNode='FASTFLASH' fromField='value_changed' toNode='FASTMATERIAL' toField='set_diffuseColor'/> |
137 | < ROUTE fromNode='TOUCHSLOW' fromField='touchTime' toNode='SLOWTIMER' toField='set_startTime'/> |
138 | < ROUTE fromNode='SLOWTIMER' fromField='fraction_changed' toNode='SLOWFLASH' toField='set_fraction'/> |
139 | < ROUTE fromNode='SLOWFLASH' fromField='value_changed' toNode='SLOWMATERIAL' toField='set_diffuseColor'/> |
140 | < ROUTE fromNode='MYSOUND1' fromField='duration_changed' toNode='SOUND_SCRIPT' toField='durationText'/> |
141 | </Scene> |
142 | </X3D> |
Event Graph ROUTE Table entries with 16 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.
TOUCHFAST
TouchSensor touchTime SFTime |
SOUND_SCRIPT
Script oldUrl SFTime |
|||||||||
TOUCHFAST
TouchSensor touchTime SFTime |
FASTTIMER
TimeSensor set_startTime SFTime |
then
|
FASTTIMER
TimeSensor fraction_changed SFFloat |
FASTFLASH
ColorInterpolator set_fraction SFFloat |
then
|
FASTFLASH
ColorInterpolator value_changed SFColor |
FASTMATERIAL
Material set_diffuseColor SFColor |
TOUCHSLOW
TouchSensor touchTime SFTime |
SOUND_SCRIPT
Script newUrl SFTime |
|||||||||
TOUCHSLOW
TouchSensor touchTime SFTime |
SLOWTIMER
TimeSensor set_startTime SFTime |
then
|
SLOWTIMER
TimeSensor fraction_changed SFFloat |
SLOWFLASH
ColorInterpolator set_fraction SFFloat |
then
|
SLOWFLASH
ColorInterpolator value_changed SFColor |
SLOWMATERIAL
Material set_diffuseColor SFColor |
PROX_SENSOR
ProximitySensor position_changed SFVec3f |
PITCH_FAST_TRANS
Transform set_translation SFVec3f |
|
PROX_SENSOR
ProximitySensor orientation_changed SFRotation |
PITCH_FAST_TRANS
Transform set_rotation SFRotation |
|
PROX_SENSOR
ProximitySensor position_changed SFVec3f |
SLOW_TRANS
Transform set_translation SFVec3f |
|
PROX_SENSOR
ProximitySensor orientation_changed SFRotation |
SLOW_TRANS
Transform set_rotation SFRotation |
|
PROX_SENSOR
ProximitySensor position_changed SFVec3f |
TEXT_TRANS
Transform set_translation SFVec3f |
|
PROX_SENSOR
ProximitySensor orientation_changed SFRotation |
TEXT_TRANS
Transform set_rotation SFRotation |
MYSOUND1
AudioClip isActive SFBool |
SOUND_SCRIPT
Script colorPhonograph SFBool |
|
MYSOUND1
AudioClip duration_changed SFTime |
SOUND_SCRIPT
Script durationText SFTime |
<!--
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. -->