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=' Fence.x3d '/> |
6 | <meta name='description' content='This file draws the fence and door with lawn.'/> |
7 | <meta name='creator' content='Kok Keng Ng'/> |
8 | <meta name='created' content='20 September 2002'/> |
9 | <meta name='modified' content='20 October 2019'/> |
10 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/Savage/Buildings/PlayGround/Fence.x3d '/> |
11 | <meta name='generator' content='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
12 | <meta name='license' content='../../license.html'/> |
13 | </head> |
14 | <Scene> |
15 | <WorldInfo title='Fence.x3d'/> |
16 | <Transform DEF='FENCEBACKTX' translation='0 0 -8.75'> |
17 | |
18 | |
19 | <Transform translation='0 -0.5 0'> |
20 | |
21 | <Box size='2.5 0.1 0.1'/> |
22 | |
23 | <Material diffuseColor='0.8 0.5 0'/> |
24 |
<!-- ImageTexture
wood is a DEF node that has 1 USE node: USE_1 --> <ImageTexture DEF='wood' url=' "wood.jpg ![]() ![]() |
25 | </Appearance> |
26 | </Shape> |
27 | </Transform> |
28 | <Transform translation='0 -0.25 0'> |
29 | <Shape USE='FENCEbar'/> |
30 | </Transform> |
31 | <Transform> |
32 | <Shape USE='FENCEbar'/> |
33 | </Transform> |
34 | <Transform translation='0 0.25 0'> |
35 | <Shape USE='FENCEbar'/> |
36 | </Transform> |
37 | <Transform rotation='0 0 1 1.57' translation='1.25 -.20 0'> |
38 | |
39 | <Box size='1.3 0.15 0.15'/> |
40 | <Appearance> |
41 | <Material diffuseColor='0.8 0.5 0'/> |
42 | <ImageTexture USE='wood'/> |
43 | </Appearance> |
44 | </Shape> |
45 | </Transform> |
46 | <Transform rotation='0 0 1 1.57' translation='-1.25 -0.20 0'> |
47 | <Shape USE='FENCEleg'/> |
48 | </Transform> |
49 | </Group> |
50 | <Transform translation='2.5 0 0'> |
51 | <Group USE='FENCE1GP'/> |
52 | </Transform> |
53 | <Transform translation='-2.5 0 0'> |
54 | <Group USE='FENCE1GP'/> |
55 | </Transform> |
56 | <Transform translation='5 0 0'> |
57 | <Group USE='FENCE1GP'/> |
58 | </Transform> |
59 | <Transform translation='7.5 0 0'> |
60 | <Group USE='FENCE1GP'/> |
61 | </Transform> |
62 | <Transform translation='-5 0 0'> |
63 | <Group USE='FENCE1GP'/> |
64 | </Transform> |
65 | <Transform translation='-7.5 0 0'> |
66 | <Group USE='FENCE1GP'/> |
67 | </Transform> |
68 | </Group> |
69 | </Transform> |
70 | <Transform DEF='FENCERIGHTTX' rotation='0 1 0 1.57' translation='8.75 0 0'> |
71 | <Group USE='FENCEGP5'/> |
72 | </Transform> |
73 | <Transform DEF='FENCELEFTTX' rotation='0 1 0 1.57' translation='-8.75 0 0'> |
74 | <Group USE='FENCEGP5'/> |
75 | </Transform> |
76 | <Transform DEF='FENCEFRONTTX' translation='0 0 8.75'> |
77 | <Group> |
78 | <Transform translation='-2.5 0 0'> |
79 | <Group USE='FENCE1GP'/> |
80 | </Transform> |
81 | <Transform translation='2.5 0 0'> |
82 | <Group USE='FENCE1GP'/> |
83 | </Transform> |
84 | <Transform translation='5 0 0'> |
85 | <Group USE='FENCE1GP'/> |
86 | </Transform> |
87 | <Transform translation='-5 0 0'> |
88 | <Group USE='FENCE1GP'/> |
89 | </Transform> |
90 | <Transform translation='-7.5 0 0'> |
91 | <Group USE='FENCE1GP'/> |
92 | </Transform> |
93 | <Transform translation='7.5 0 0'> |
94 | <Group USE='FENCE1GP'/> |
95 | </Transform> |
96 | </Group> |
97 |
<!-- ROUTE information for FENCERightDoorTX node:
[from FENCERightDoorInterpolator.value_changed to set_rotation
]
-->
<Transform DEF='FENCERightDoorTX' center='0.6 0 0.05' translation='0.575 0 0.025'> |
98 | <Group DEF='FENCERightDoorGP'> |
99 |
<!-- Group
FENCEDoor1 is a DEF node that has 1 USE node: USE_1 -->
<Group DEF='FENCEDoor1'> |
100 | <Transform translation='0. -0.5 0'> |
101 | |
102 | <Box size='1 0.075 0.075'/> |
103 | <Appearance USE='FENCEApp'/> |
104 | </Shape> |
105 | </Transform> |
106 | <Transform DEF='FENCEDOORRIGHTLEGTX' rotation='0 0 1 1.57' translation='0.55 -.20 0'> |
107 |
<!-- Shape
FENCEDoorlegShape is a DEF node that has 1 USE node: USE_1 -->
<Shape DEF='FENCEDoorlegShape'> |
108 | <Box size='1.2 0.1 0.1'/> |
109 | <Appearance USE='FENCEApp'/> |
110 | </Shape> |
111 | </Transform> |
112 | <Transform translation='0 -0.2 0'> |
113 | <Shape USE='FENCEDoorbarShape'/> |
114 | </Transform> |
115 | <Transform translation='0 0.1 0'> |
116 | <Shape USE='FENCEDoorbarShape'/> |
117 | </Transform> |
118 | <Transform translation='0 0.35 0'> |
119 | <Shape USE='FENCEDoorbarShape'/> |
120 | </Transform> |
121 | <Transform DEF='FENCEDOORLEFTLEGTX' rotation='0 0 1 1.57' translation='-0.5 -.20 0'> |
122 | <Shape USE='FENCEDoorlegShape'/> |
123 | </Transform> |
124 | </Group> |
125 | <Group> |
126 | <Transform rotation='0 0 1 0.785' scale='1.2 1 1' translation='0.05 -0.1 -0.05'> |
127 | <Shape USE='FENCEDoorbarShape'/> |
128 | </Transform> |
129 | </Group> |
130 |
<!-- ROUTE information for FENCERightDoorSensor node:
[from touchTime to FENCEDoorTimer2.set_startTime
]
[from touchTime to DoorSound.set_startTime
]
-->
<TouchSensor DEF='FENCERightDoorSensor'/> |
131 | </Group> |
132 | </Transform> |
133 | <Transform> |
134 | <Group DEF='FENCELeftDoorGP'> |
135 |
<!-- ROUTE information for FENCELeftDoorTX node:
[from FENCELeftDoorInterpolator.value_changed to set_rotation
]
-->
<Transform DEF='FENCELeftDoorTX' center='-0.55 0 0.05' translation='-0.625 0 0.025'> |
136 | <Group USE='FENCEDoor1'/> |
137 | <Group> |
138 | <Transform rotation='0 0 1 -0.785' scale='1.2 1 1' translation='-0.05 -0.1 -0.05'> |
139 | <Shape USE='FENCEDoorbarShape'/> |
140 | </Transform> |
141 | </Group> |
142 |
<!-- ROUTE information for FENCELeftDoorSensor node:
[from touchTime to FENCEDoorTimer1.set_startTime
]
[from touchTime to DoorSound.set_startTime
]
-->
<TouchSensor DEF='FENCELeftDoorSensor'/> |
143 | </Transform> |
144 | </Group> |
145 | </Transform> |
146 |
<!-- ROUTE information for FENCEDoorTimer1 node:
[from FENCELeftDoorSensor.touchTime to set_startTime
]
[from fraction_changed to FENCELeftDoorInterpolator.set_fraction
]
-->
<TimeSensor DEF='FENCEDoorTimer1' cycleInterval='12'/> |
147 |
<!-- ROUTE information for FENCEDoorTimer2 node:
[from FENCERightDoorSensor.touchTime to set_startTime
]
[from fraction_changed to FENCERightDoorInterpolator.set_fraction
]
-->
<TimeSensor DEF='FENCEDoorTimer2' cycleInterval='15'/> |
148 |
<!-- ROUTE information for FENCELeftDoorInterpolator node:
[from FENCEDoorTimer1.fraction_changed to set_fraction
]
[from value_changed to FENCELeftDoorTX.set_rotation
]
-->
<OrientationInterpolator DEF='FENCELeftDoorInterpolator' key='0 0.25 0.75 1' keyValue='0 1 0 0 0 1 0 -1.57 0 1 0 -1.57 0 1 0 0'/> |
149 |
<!-- ROUTE information for FENCERightDoorInterpolator node:
[from FENCEDoorTimer2.fraction_changed to set_fraction
]
[from value_changed to FENCERightDoorTX.set_rotation
]
-->
<OrientationInterpolator DEF='FENCERightDoorInterpolator' key='0 0.25 0.75 1' keyValue='0 1 0 0.0 0 1 0 1.57 0 1 0 1.57 0 1 0 -0'/> |
150 | </Transform> |
151 | <Transform> |
152 | <Transform> |
153 | <Transform DEF='LAWN' translation='0 -0.8 0'> |
154 | <Transform scale='4 1 4' translation='-14 0.01 -14'> |
155 | <Shape> |
156 | <Appearance> |
157 |
<ImageTexture
url=' "grass1.jpg![]() ![]() |
158 | <TextureTransform scale='120 120'/> |
159 | </Appearance> |
160 | <ElevationGrid creaseAngle='0.785' xDimension='8' xSpacing='1.' zDimension='8' zSpacing='1.' height='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'/> |
161 | </Shape> |
162 | </Transform> |
163 | </Transform> |
164 | <Transform DEF='FLOORTX' translation='0 -0.876 0'> |
165 | <Shape DEF='FLOOR'> |
166 | <Box size='28 0.15 28'/> |
167 | <Appearance> |
168 | <Material ambientIntensity='0.245763' diffuseColor='0.336312 0.24807 0.201129' shininess='0.061224' specularColor='0.108805 0.098067 0.096807'/> |
169 | </Appearance> |
170 | </Shape> |
171 | </Transform> |
172 | </Transform> |
173 | </Transform> |
174 | <Transform> |
175 | <Sound direction='1 1 1' maxBack='100' maxFront='100' minBack='10' minFront='10'> |
176 |
<!-- ROUTE information for DoorSound node:
[from FENCELeftDoorSensor.touchTime to set_startTime
]
[from FENCERightDoorSensor.touchTime to set_startTime
]
-->
<AudioClip DEF='DoorSound' description='Door sound' url=' "Door.wav" "https://www.web3d.org/x3d/content/examples/Savage/Buildings/PlayGround/Door.wav" '/> |
177 | </Sound> |
178 | </Transform> |
179 | <Transform/> |
180 | <Viewpoint description='Front' orientation='1 0 0 -0.3' position='0 2 20'/> |
181 | <Viewpoint description='MainDoor' orientation='1 0 0 -1.57' position='0 3 8.75'/> |
182 | < ROUTE fromNode='FENCELeftDoorSensor' fromField='touchTime' toNode='FENCEDoorTimer1' toField='set_startTime'/> |
183 | < ROUTE fromNode='FENCEDoorTimer1' fromField='fraction_changed' toNode='FENCELeftDoorInterpolator' toField='set_fraction'/> |
184 | < ROUTE fromNode='FENCELeftDoorInterpolator' fromField='value_changed' toNode='FENCELeftDoorTX' toField='set_rotation'/> |
185 | < ROUTE fromNode='FENCERightDoorSensor' fromField='touchTime' toNode='FENCEDoorTimer2' toField='set_startTime'/> |
186 | < ROUTE fromNode='FENCEDoorTimer2' fromField='fraction_changed' toNode='FENCERightDoorInterpolator' toField='set_fraction'/> |
187 | < ROUTE fromNode='FENCERightDoorInterpolator' fromField='value_changed' toNode='FENCERightDoorTX' toField='set_rotation'/> |
188 | < ROUTE fromNode='FENCELeftDoorSensor' fromField='touchTime' toNode='DoorSound' toField='set_startTime'/> |
189 | < ROUTE fromNode='FENCERightDoorSensor' fromField='touchTime' toNode='DoorSound' toField='set_startTime'/> |
190 | </Scene> |
191 | </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.
FENCELeftDoorSensor
TouchSensor touchTime SFTime |
FENCEDoorTimer1
TimeSensor set_startTime SFTime |
then
|
FENCEDoorTimer1
TimeSensor fraction_changed SFFloat |
FENCELeftDoorInterpolator
OrientationInterpolator set_fraction SFFloat |
then
|
FENCELeftDoorInterpolator
OrientationInterpolator value_changed SFRotation |
FENCELeftDoorTX
Transform set_rotation SFRotation |
FENCELeftDoorSensor
TouchSensor touchTime SFTime |
DoorSound
AudioClip set_startTime SFTime |
FENCERightDoorSensor
TouchSensor touchTime SFTime |
FENCEDoorTimer2
TimeSensor set_startTime SFTime |
then
|
FENCEDoorTimer2
TimeSensor fraction_changed SFFloat |
FENCERightDoorInterpolator
OrientationInterpolator set_fraction SFFloat |
then
|
FENCERightDoorInterpolator
OrientationInterpolator value_changed SFRotation |
FENCERightDoorTX
Transform set_rotation SFRotation |
FENCERightDoorSensor
TouchSensor touchTime SFTime |
DoorSound
AudioClip set_startTime SFTime |
<!--
Color-coding 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.
-->