1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
|
3 | <X3D profile='Immersive' version='3.3' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.3.xsd'> |
4 | <head> |
5 | <meta name='title' content='Doorway.x3d'/> |
6 | <meta name='description' content='The Doorway scene consists of four sliding stairs that lead forward along a path to a glowing white doorway.'/> |
7 | <meta name='creator' content='David R. Nadeau'/> |
8 | <meta name='translator' content='Don Brutzman'/> |
9 | <meta name='created' content='1 July 1998'/> |
10 | <meta name='translated' content='2 February 2014'/> |
11 | <meta name='modified' content='20 October 2019'/> |
12 | <meta name='reference' content='originals/doorway.wrl'/> |
13 | <meta name='reference' content='http://www.siggraph.org/s98'/> |
14 | <meta name='reference' content='http://www.siggraph.org/s98/conference/courses/18.html'/> |
15 | <meta name='reference' content='http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/slides/mt0383.htm'/> |
16 | <meta name='reference' content='http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/vrml97.htm'/> |
17 | <meta name='reference' content='https://www.web3d.org/x3d/content/examples/X3dResources.html'/> |
18 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Doorway.x3d'/> |
19 | <meta name='generator' content='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/> |
20 | <meta name='generator' content='X3D-Edit, https://savage.nps.edu/X3D-Edit'/> |
21 | <meta name='license' content='../license.html'/> |
22 | </head> |
23 | <Scene> |
24 | <!-- A ProximitySensor routes to four TimeSensors, one per sliding stair. Each stair's timer routes to a PositionInterpolator that outputs varying positions side-to-side along the X axis. The PositionInterpolator's positions are routed into translation fields for Transform nodes surrounding each stair. --> |
25 | <!-- By using different starting positions, the four stairs are made to slide back and forth in a pattern. --> |
26 | <!-- Things to experiment with: --> |
27 | <!-- Add sound! Perhaps the crackling of fire below and the grinding sliding sounds of the stone stairs. --> |
28 | <!-- Use a ScalarInterpolator to flicker the red light as if there is fire below. --> |
29 | <!-- Surround the doorway with an Anchor node that leads somewhere! --> |
30 | <!-- Place a ProximitySensor around the doorway. As you approach it, the ProximitySensor triggers an OrientationInterpolator which slowly rotates the door open. The open door reveals ... ! --> |
31 | <WorldInfo info='"Copyright (c) 1997, David R. Nadeau"' title='The Doorway'/> |
32 | <Viewpoint DEF='Entry' description='Entry view' position='0.0 3.1 10.0'/> |
33 | <NavigationInfo avatarSize='0.5 3.0 1.5' headlight='false' type='"WALK" "ANY"'/> |
34 |
<!-- ROUTE information for Proximity node:
[from enterTime to Stair1Timer.set_startTime
]
[from enterTime to Stair2Timer.set_startTime
]
[from enterTime to Stair3Timer.set_startTime
]
[from enterTime to Stair4Timer.set_startTime
]
-->
<ProximitySensor DEF='Proximity' size='10.0 10.0 50.0'/> |
35 | <Background skyAngle='1.47 1.67' skyColor='0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0'/> |
36 | <DirectionalLight ambientIntensity='0.5' color='0.0 0.3 1.0' direction='1.0 -1.0 -3.0'/> |
37 | <DirectionalLight ambientIntensity='0.3' color='1.0 0.0 0.0' direction='-1.0 2.5 -1.0'/> |
38 | <DirectionalLight color='1.0 0.0 0.0' direction='-1.0 2.5 -1.0'/> |
39 | <Transform translation='0.0 -0.5 8.0'> |
40 | <Shape> |
41 | <Appearance> |
42 | <TextureTransform scale='0.5 0.5'/> |
43 | <Material/> |
44 | <ImageTexture DEF='Granit' url=' "granit_g.jpg " "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/granit_g.jpg " '/> |
45 | </Appearance> |
46 | <Box size='4.0 0.4 16.0'/> |
47 | </Shape> |
48 | </Transform> |
49 |
<!-- ROUTE information for Stair1 node:
[from Stair1Path.value_changed to set_translation
]
-->
<Transform DEF='Stair1'> |
50 |
<!-- Inline
Stair is a DEF node that has 4 USE nodes: USE_1, USE_2, USE_3, USE_4 --> <Inline DEF='Stair' url=' "Tread.x3d" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Tread.x3d" "Tread.wrl" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Tread.wrl" '/> |
51 | </Transform> |
52 | <Transform translation='-1.0 0.5 -2.0'> |
53 |
<!-- ROUTE information for Stair2 node:
[from Stair2Path.value_changed to set_translation
]
-->
<Transform DEF='Stair2'> |
54 | <Inline USE='Stair'/> |
55 | </Transform> |
56 | </Transform> |
57 | <Transform translation='1.5 1.0 -4.0'> |
58 |
<!-- ROUTE information for Stair3 node:
[from Stair3Path.value_changed to set_translation
]
-->
<Transform DEF='Stair3'> |
59 | <Inline USE='Stair'/> |
60 | </Transform> |
61 | </Transform> |
62 | <Transform translation='0.0 1.5 -6.0'> |
63 |
<!-- ROUTE information for Stair4 node:
[from Stair4Path.value_changed to set_translation
]
-->
<Transform DEF='Stair4'> |
64 | <Inline USE='Stair'/> |
65 | </Transform> |
66 | </Transform> |
67 | <Transform translation='0.0 2.0 -8.0'> |
68 | <Inline USE='Stair'/> |
69 | </Transform> |
70 | <Transform scale='0.7 0.7 0.7' translation='0.0 2.0 -10.0'> |
71 | <Inline url=' "GlowDoor.x3d" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/GlowDoor.x3d" "GlowDoor.wrl" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/GlowDoor.wrl" '/> |
72 | </Transform> |
73 | <Transform rotation='0.0 0.0 1.0 0.785' translation='-2.0 6.0 -10.0'> |
74 | |
75 | <Appearance> |
76 | <Material ambientIntensity='0.0' diffuseColor='1.0 1.0 1.0' emissiveColor='0.4 0.4 0.4'/> |
77 | <ImageTexture url=' "marble_g.jpg " "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/marble_g.jpg " '/> |
78 | </Appearance> |
79 | <Box size='4.0 0.2 2.0'/> |
80 | </Shape> |
81 | <Transform translation='1.0 0.2 1.0'> |
82 | <Shape USE='ArchBox'/> |
83 | </Transform> |
84 | <Transform translation='2.0 0.4 2.0'> |
85 | <Shape USE='ArchBox'/> |
86 | </Transform> |
87 | </Transform> |
88 | <Transform rotation='0.0 0.0 1.0 -0.785' translation='2.0 6.0 -10.0'> |
89 | <Shape USE='ArchBox'/> |
90 | <Transform translation='-1.0 0.2 1.0'> |
91 | <Shape USE='ArchBox'/> |
92 | </Transform> |
93 | <Transform translation='-2.0 0.4 2.0'> |
94 | <Shape USE='ArchBox'/> |
95 | </Transform> |
96 | </Transform> |
97 |
<!-- ROUTE information for Stair1Timer node:
[from Proximity.enterTime to set_startTime
]
[from fraction_changed to Stair1Path.set_fraction
]
-->
<TimeSensor DEF='Stair1Timer' cycleInterval='4.0' loop='true'/> |
98 |
<!-- ROUTE information for Stair1Path node:
[from Stair1Timer.fraction_changed to set_fraction
]
[from value_changed to Stair1.set_translation
]
-->
<PositionInterpolator DEF='Stair1Path' key='0.0 0.25 0.5 0.75 1.0' keyValue='0.0 0.0 0.0 3.0 0.0 0.0 0.0 0.0 0.0 -3.0 0.0 0.0 0.0 0.0 0.0'/> |
99 | < ROUTE fromNode='Proximity' fromField='enterTime' toNode='Stair1Timer' toField='set_startTime'/> |
100 | < ROUTE fromNode='Stair1Timer' fromField='fraction_changed' toNode='Stair1Path' toField='set_fraction'/> |
101 | < ROUTE fromNode='Stair1Path' fromField='value_changed' toNode='Stair1' toField='set_translation'/> |
102 |
<!-- ROUTE information for Stair2Timer node:
[from Proximity.enterTime to set_startTime
]
[from fraction_changed to Stair2Path.set_fraction
]
-->
<TimeSensor DEF='Stair2Timer' cycleInterval='4.0' loop='true'/> |
103 |
<!-- ROUTE information for Stair2Path node:
[from Stair2Timer.fraction_changed to set_fraction
]
[from value_changed to Stair2.set_translation
]
-->
<PositionInterpolator DEF='Stair2Path' key='0.0 0.25 0.5 0.75 1.0' keyValue='3.0 0.0 0.0 0.0 0.0 0.0 -3.0 0.0 0.0 0.0 0.0 0.0 3.0 0.0 0.0'/> |
104 | < ROUTE fromNode='Proximity' fromField='enterTime' toNode='Stair2Timer' toField='set_startTime'/> |
105 | < ROUTE fromNode='Stair2Timer' fromField='fraction_changed' toNode='Stair2Path' toField='set_fraction'/> |
106 | < ROUTE fromNode='Stair2Path' fromField='value_changed' toNode='Stair2' toField='set_translation'/> |
107 |
<!-- ROUTE information for Stair3Timer node:
[from Proximity.enterTime to set_startTime
]
[from fraction_changed to Stair3Path.set_fraction
]
-->
<TimeSensor DEF='Stair3Timer' cycleInterval='4.0' loop='true'/> |
108 |
<!-- ROUTE information for Stair3Path node:
[from Stair3Timer.fraction_changed to set_fraction
]
[from value_changed to Stair3.set_translation
]
-->
<PositionInterpolator DEF='Stair3Path' key='0.0 0.25 0.5 0.75 1.0' keyValue='-3.0 0.0 0.0 0.0 0.0 0.0 3.0 0.0 0.0 0.0 0.0 0.0 -3.0 0.0 0.0'/> |
109 | < ROUTE fromNode='Proximity' fromField='enterTime' toNode='Stair3Timer' toField='set_startTime'/> |
110 | < ROUTE fromNode='Stair3Timer' fromField='fraction_changed' toNode='Stair3Path' toField='set_fraction'/> |
111 | < ROUTE fromNode='Stair3Path' fromField='value_changed' toNode='Stair3' toField='set_translation'/> |
112 |
<!-- ROUTE information for Stair4Timer node:
[from Proximity.enterTime to set_startTime
]
[from fraction_changed to Stair4Path.set_fraction
]
-->
<TimeSensor DEF='Stair4Timer' cycleInterval='4.0' loop='true'/> |
113 |
<!-- ROUTE information for Stair4Path node:
[from Stair4Timer.fraction_changed to set_fraction
]
[from value_changed to Stair4.set_translation
]
-->
<PositionInterpolator DEF='Stair4Path' key='0.0 0.25 0.5 0.75 1.0' keyValue='0.0 0.0 0.0 -3.0 0.0 0.0 0.0 0.0 0.0 3.0 0.0 0.0 0.0 0.0 0.0'/> |
114 | < ROUTE fromNode='Proximity' fromField='enterTime' toNode='Stair4Timer' toField='set_startTime'/> |
115 | < ROUTE fromNode='Stair4Timer' fromField='fraction_changed' toNode='Stair4Path' toField='set_fraction'/> |
116 | < ROUTE fromNode='Stair4Path' fromField='value_changed' toNode='Stair4' toField='set_translation'/> |
117 | </Scene> |
118 | </X3D> |
Event Graph ROUTE Table entries with 12 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.
<!--
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. -->