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='Trebuchet.x3d'/> |
6 | <meta name='description' content='Working model of a 14th century Trebuchet Catapult.'/> |
7 | <meta name='creator' content='LT Joe Roth'/> |
8 | <meta name='created' content='20 June 2001'/> |
9 | <meta name='modified' content='20 October 2019'/> |
10 | <meta name='version' content='7.8'/> |
11 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/Trebuchet.x3d'/> |
12 | <meta name='reference' content='http://trebuchet.com'/> |
13 | <meta name='reference' content='http://members.home.net/dimona'/> |
14 | <meta name='subject' content='trebuchet catapult Monty Python'/> |
15 | <meta name='reference' content='Permission granted for use of the VRML chicken I own a copy of Monty Python and the Holy Grail I have requested permission to use for non profit use. No response received. I will use the sound clips under "Fair Use" clause of the DMCA'/> |
16 | <meta name='reference' content='https://www.web3d.org/WorkingGroups/media/textures/nature/leaves_5.jpg.htm'/> |
17 | <meta name='reference' content='http://www.revemonde.net/UniversalMedia/textures/nature/leaves_5.jpg.htm'/> |
18 | <meta name='generator' content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/> |
19 | <meta name='license' content='../license.html'/> |
20 | </head> |
21 | <Scene> |
22 | <WorldInfo title='Trebuchet.x3d'/> |
23 | <Background groundAngle='1.309 1.570796' groundColor='0.1 0.1 0 0.4 0.25 0.2 0.6 0.6 0.6' skyAngle='1.309 1.57079' skyColor='0 0.2 0.7 0 0.5 1 1 1 1' backUrl=' "https://www.web3d.org/WorkingGroups/media/textures/panoramas/meadow_2_back.jpg " ' bottomUrl=' "https://www.web3d.org/WorkingGroups/media/textures/panoramas/meadow_2_bottom.jpg " ' frontUrl=' "https://www.web3d.org/WorkingGroups/media/textures/panoramas/meadow_2_front.jpg " ' leftUrl=' "https://www.web3d.org/WorkingGroups/media/textures/panoramas/meadow_2_left.jpg " ' rightUrl=' "https://www.web3d.org/WorkingGroups/media/textures/panoramas/meadow_2_right.jpg " ' topUrl=' "https://www.web3d.org/WorkingGroups/media/textures/panoramas/meadow_2_top.jpg " '/> |
24 | <Sound maxBack='1000' maxFront='1000'> |
25 | <AudioClip DEF='HolyGrail' description='HolyGrail' loop='true' url=' "holygral.mp3" "http://www.nps.navy.mil/code32/vrml/holygral.mp3" '/> |
26 | </Sound> |
27 | <Shape> |
28 | <Box size='10000 1 10000'/> |
29 | <Appearance> |
30 | <ImageTexture url=' "grass.jpg " "https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/grass.jpg " '/> |
31 | </Appearance> |
32 | </Shape> |
33 | <Transform rotation='0 1 0 1.57' scale='.5 .5 .5' translation='10.5 6.5 4.5'> |
34 | <Shape> |
35 | |
36 | <Material diffuseColor='1 0 0' emissiveColor='1 1 0'/> |
37 | </Appearance> |
38 | <Text string='"Click Sling to Select Projectile"'> |
39 | <FontStyle/> |
40 | </Text> |
41 | </Shape> |
42 | </Transform> |
43 | <Transform rotation='0 1 0 1.57' scale='.5 .5 .5' translation='11 5.5 6'> |
44 |
<!-- Switch
Weight is a DEF node that has 1 USE node: USE_1
<!-- ROUTE information for Weight node: [from WeightScript.whichchoice to whichChoice ] --> <Switch DEF='Weight' whichChoice='0'> |
45 | <Group> |
46 | <Shape> |
47 | <Appearance USE='TextAppearance'/> |
48 | <Text string='"Click Here to Change Counter Weight (50 lbs)"'/> |
49 | </Shape> |
50 | </Group> |
51 | <Group> |
52 | <Shape> |
53 | <Appearance USE='TextAppearance'/> |
54 | <Text string='"Click Here to Change Counter Weight (500 lbs)"'/> |
55 | </Shape> |
56 | </Group> |
57 | <Group> |
58 | <Shape> |
59 | <Appearance USE='TextAppearance'/> |
60 | <Text string='"Click Here to Change Counter Weight (1000 lbs)"'/> |
61 | </Shape> |
62 | </Group> |
63 | <Group> |
64 | <Shape> |
65 | <Appearance USE='TextAppearance'/> |
66 | <Text string='"Click Here to Change Counter Weight (10000 lbs)"'/> |
67 | </Shape> |
68 | </Group> |
69 | </Switch> |
70 |
<!-- TouchSensor
weightselector is a DEF node that has 1 USE node: USE_1
<!-- ROUTE information for weightselector node: [from isActive to WeightScript.set_boolean ] --> <TouchSensor DEF='weightselector' description='weight selector'/> |
71 | <Transform translation='8 0 0'> |
72 | <Shape> |
73 | <Box size='20 1 1'/> |
74 | <Appearance> |
75 | <Material transparency='1'/> |
76 | </Appearance> |
77 | </Shape> |
78 | </Transform> |
79 | </Transform> |
80 | <Transform rotation='0 1 0 1.57' translation='10 .5 4.5'> |
81 | |
82 | <Billboard> |
83 | <Shape> |
84 | <Appearance> |
85 | <Material diffuseColor='1 0 0'/> |
86 | </Appearance> |
87 | <Text string='"LAUNCH"'> |
88 | <FontStyle/> |
89 | </Text> |
90 | </Shape> |
91 | <Transform translation='2 .3 0'> |
92 | <Shape> |
93 | <Box size='5 1 1'/> |
94 | <Appearance> |
95 | <Material transparency='1'/> |
96 | </Appearance> |
97 | </Shape> |
98 | </Transform> |
99 |
<!-- ROUTE information for PigdogMonk node:
[from PigdogMonkScript.whichchoice to whichChoice
]
-->
<Switch DEF='PigdogMonk' whichChoice='-1'> |
100 | <Group> |
101 | <Sound maxBack='1000' maxFront='1000'> |
102 |
<!-- ROUTE information for PigDogSound node:
[from Launch.touchTime to set_startTime
]
-->
<AudioClip DEF='PigDogSound' description='PigDogSound' url=' "pigdog.wav" "http://www.nps.navy.mil/code32/vrml/pigdog.wav" '/> |
103 | </Sound> |
104 | </Group> |
105 | <Group> |
106 | <Sound maxBack='1000' maxFront='1000'> |
107 |
<!-- ROUTE information for MonkSound node:
[from Launch.touchTime to set_startTime
]
-->
<AudioClip DEF='MonkSound' description='MonkSound' url=' "monks.wav" "http://www.nps.navy.mil/code32/vrml/monks.wav" '/> |
108 | </Sound> |
109 | </Group> |
110 | </Switch> |
111 | </Billboard> |
112 |
<!-- ROUTE information for Launch node:
[from touchTime to clock.set_startTime
]
[from isActive to PigdogMonkScript.set_boolean
]
[from touchTime to PigDogSound.set_startTime
]
[from touchTime to MonkSound.set_startTime
]
-->
<TouchSensor DEF='Launch' description='launch!'/> |
113 | </Transform> |
114 | <Transform> |
115 |
<!-- Switch
projectilename is a DEF node that has 1 USE node: USE_1
<!-- ROUTE information for projectilename node: [from LauncheeScript.whichchoice to whichChoice ] --> <Switch DEF='projectilename' whichChoice='0'> |
116 | <Group> |
117 | <Shape> |
118 | <Appearance USE='TextAppearance'/> |
119 | <Text string='"Bowling Ball (10 lbs)"'> |
120 | <FontStyle size='.5'/> |
121 | </Text> |
122 | </Shape> |
123 | <Sound maxBack='1000' maxFront='1000' priority='1'> |
124 |
<!-- ROUTE information for HolyHandGrenadeSound node:
[from LauncheeChoice.touchTime to set_startTime
]
-->
<AudioClip DEF='HolyHandGrenadeSound' description='HolyHandGrenadeSound' url=' "grenade.wav" "http://www.nps.navy.mil/code32/vrml/grenade.wav" '/> |
125 | </Sound> |
126 | </Group> |
127 | <Group> |
128 | <Shape> |
129 | <Appearance USE='TextAppearance'/> |
130 | <Text string='"Cow (1000 lbs)"'> |
131 | <FontStyle size='.5'/> |
132 | </Text> |
133 | </Shape> |
134 | <Sound maxBack='1000' maxFront='1000'> |
135 |
<!-- ROUTE information for CowSound node:
[from LauncheeChoice.touchTime to set_startTime
]
-->
<AudioClip DEF='CowSound' description='CowSound' url=' "lavache.wav" "http://www.nps.navy.mil/code32/vrml/lavache.wav" '/> |
136 | </Sound> |
137 | </Group> |
138 | <Group> |
139 | <Shape> |
140 | <Appearance USE='TextAppearance'/> |
141 | <Text string='"Chicken (5 lbs)"'> |
142 | <FontStyle size='.5'/> |
143 | </Text> |
144 | </Shape> |
145 | <Sound maxBack='1000' maxFront='1000' priority='1'> |
146 |
<!-- ROUTE information for HamsterSound node:
[from LauncheeChoice.touchTime to set_startTime
]
-->
<AudioClip DEF='HamsterSound' description='HamsterSound' url=' "hamster.wav" "http://www.nps.navy.mil/code32/vrml/hamster.wav" '/> |
147 | </Sound> |
148 | </Group> |
149 | </Switch> |
150 | </Transform> |
151 | </Transform> |
152 | <Transform rotation='0 1 0 -1.67'> |
153 | <Transform DEF='aft' translation='5 5 15'> |
154 | <Transform translation='-2.5 -4.5 -2'> |
155 | <Transform USE='launch'/> |
156 | </Transform> |
157 | </Transform> |
158 | </Transform> |
159 | <Transform translation='0 3 0'> |
160 | |
161 | <Box size='25 1 1'/> |
162 | |
163 |
<!-- ImageTexture
woodTexture is a DEF node that has 1 USE node: USE_1 --> <ImageTexture DEF='woodTexture' url=' "wood.gif " "https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/wood.gif " '/> |
164 | </Appearance> |
165 | </Shape> |
166 |
<!-- Transform
angledsupport is a DEF node that has 1 USE node: USE_1 -->
<Transform DEF='angledsupport' rotation='0 0 1 1' translation='-5 10 0'> |
167 | <Shape USE='plank'/> |
168 | </Transform> |
169 |
<!-- Transform
angledsupport2 is a DEF node that has 1 USE node: USE_1 -->
<Transform DEF='angledsupport2' rotation='0 0 1 -1' translation='5 10 0'> |
170 | <Shape USE='plank'/> |
171 | </Transform> |
172 |
<!-- Transform
verticalsupport is a DEF node that has 1 USE node: USE_1 -->
<Transform DEF='verticalsupport' rotation='0 0 1 1.57' scale='.9 1 1' translation='0 11 0'> |
173 | <Shape USE='plank'/> |
174 | <!-- Main Verticle Support --> |
175 | </Transform> |
176 |
<!-- Transform
horizontalsupport is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
<Transform DEF='horizontalsupport' scale='.4 1 1' translation='0 10 0'> |
177 | <Shape USE='plank'/> |
178 | </Transform> |
179 | <Transform rotation='0 0 1 1.57' scale='.6 1 1' translation='0 5 10'> |
180 | <Transform rotation='0 1 0 .4'> |
181 | <Shape USE='plank'/> |
182 | </Transform> |
183 | </Transform> |
184 | |
185 | <Shape> |
186 | <Box size='5 5 .5'/> |
187 | <Appearance USE='wood'/> |
188 | </Shape> |
189 | </Transform> |
190 | <Transform rotation='1 0 0 -1.57' translation='0 0.6 2.5'> |
191 | <Transform rotation='0 0 1 1.57'> |
192 | <Shape> |
193 | <Extrusion beginCap='false' crossSection='1.0 -.38 .92 -.38 .71 -.71 .38 -.92 0.0 -1.0 -.38 -.92 -.71 -.71 -.92 -.38 -1.0 -.38 -1 -1.1 1 -1.1 1.0 -.38' endCap='false' solid='false' spine='0 6 0 0 -11 0'/> |
194 | <Appearance USE='wood'/> |
195 | </Shape> |
196 | </Transform> |
197 | </Transform> |
198 |
<!-- ROUTE information for flinger node:
[from flingerangles.value_changed to set_rotation
]
-->
<Transform DEF='flinger' center='7 0 0' rotation='0 0 1 .82' scale='.9 1 1' translation='-7 18 2.5'> |
199 | <Transform> |
200 | <Shape> |
201 | <Box size='35 1 1'/> |
202 | <Appearance USE='wood'/> |
203 | </Shape> |
204 | <Transform translation='7 0 0'> |
205 | <Shape> |
206 | <Box size='8 2 2'/> |
207 | <Appearance USE='wood'/> |
208 | </Shape> |
209 | </Transform> |
210 | </Transform> |
211 | <Transform rotation='1 0 0 1.57' scale='.2 .2 .2' translation='-15 -1 0'> |
212 | |
213 | <Appearance> |
214 | <Material specularColor='1 1 1'/> |
215 | </Appearance> |
216 | <Extrusion beginCap='false' convex='false' creaseAngle='1.57' crossSection='.90 0.00 0.81 -0.34 0.63 -0.63 0.34 -0.83 0.00 -.9 -0.34 -0.81 -0.63 -0.63 -0.81 -0.34 -.90 -0.00 -0.81 0.34 -0.63 0.63 -0.34 0.81 0.00 .90 0.38 0.81 0.63 0.63 0.81 0.34 .90 0.00' endCap='false' spine='2.00 0.0 0.00 1.85 0.0 0.77 1.41 0.0 1.41 0.77 0.0 1.85 0.00 0.0 2.00 -0.77 0.0 1.85 -1.41 0.0 1.41 -1.85 0.0 0.77 -2.00 0.0 0.00 -1.85 0.0 -0.77 -1.41 0.0 -1.41 -0.77 0.0 -1.85 0.00 0.0 -2.00 0.77 0.0 -1.85 1.41 0.0 -1.41 1.85 0.0 -0.77 2.00 0.0 0.00'/> |
217 | </Shape> |
218 | <Transform translation='1 0 2'> |
219 | <Shape> |
220 | |
221 | <ImageTexture USE='woodTexture'/> |
222 | </Appearance> |
223 | <Sphere radius='1.5'/> |
224 | </Shape> |
225 | <!-- knott --> |
226 | </Transform> |
227 | </Transform> |
228 | <!-- The Unicorn --> |
229 | <Transform rotation='0 0 1 1.2' scale='.2 .2 .2' translation='-18.3 0.3 0'> |
230 | <Shape> |
231 | <Cylinder height='10'/> |
232 | <Appearance> |
233 | <Material specularColor='1 1 1'/> |
234 | </Appearance> |
235 | </Shape> |
236 | <Transform translation='0 -2.5 0'> |
237 | <Shape USE='Torus'/> |
238 | <!-- The Unicorn --> |
239 | <Transform translation='-2 -0 0'> |
240 | <Shape> |
241 | <Sphere radius='1.5'/> |
242 | <Appearance USE='rope'/> |
243 | </Shape> |
244 | <!-- Knott --> |
245 | </Transform> |
246 | </Transform> |
247 | <Transform rotation='0 0 1 1.2' translation='15 55 -11'> |
248 | <Transform scale='5 5 5'> |
249 | <Shape> |
250 | <Appearance USE='rope'/> |
251 | <Extrusion beginCap='false' creaseAngle='0.76' crossSection='.100 0.00 0.092 -0.038 0.071 -0.071 0.038 -0.092 0.00 -.100 -0.038 -0.092 -0.071 -0.071 -0.092 -0.038 -.100 -0.00 -0.092 0.038 -0.071 0.071 -0.038 0.092 0.00 .100 0.038 0.092 0.071 0.071 0.092 0.038 .100 0.00' endCap='false' solid='false' spine='-15.2 1.4 2.2 -12 -.8 2.2'/> |
252 | </Shape> |
253 | </Transform> |
254 | </Transform> |
255 | </Transform> |
256 | <Transform rotation='1 0 0 -1.7' translation='-17 -4.5 0'> |
257 | <Transform scale='.2 .2 .2'> |
258 | <Shape USE='Torus'> |
259 | <!-- Knot --> |
260 | </Shape> |
261 | <Transform translation='-1 0 1.7'> |
262 | <Shape> |
263 | <Sphere radius='1.5'/> |
264 | <Appearance USE='rope'/> |
265 | </Shape> |
266 | </Transform> |
267 | </Transform> |
268 | </Transform> |
269 | <Transform DEF='RnS'> |
270 | <Transform DEF='ropes'> |
271 | <Transform rotation='0 0 1 -.82' translation='7 -26 -2.5'> |
272 | <Shape> |
273 | <Appearance USE='rope'/> |
274 | <Extrusion beginCap='false' creaseAngle='0.76' crossSection='.100 0.00 0.092 -0.038 0.071 -0.071 0.038 -0.092 0.00 -.100 -0.038 -0.092 -0.071 -0.071 -0.092 -0.038 -.100 -0.00 -0.092 0.038 -0.071 0.071 -0.038 0.092 0.00 .100 0.038 0.092 0.071 0.071 0.092 0.038 .100 0.00' endCap='false' solid='false' spine='-33 .9 2.5 -18.5 1.9 2.55'/> |
275 | </Shape> |
276 | <Shape> |
277 | <Appearance USE='rope'/> |
278 | <Extrusion beginCap='false' creaseAngle='0.76' crossSection='.100 0.00 0.092 -0.038 0.071 -0.071 0.038 -0.092 0.00 -.100 -0.038 -0.092 -0.071 -0.071 -0.092 -0.038 -.100 -0.00 -0.092 0.038 -0.071 0.071 -0.038 0.092 0.00 .100 0.038 0.092 0.071 0.071 0.092 0.038 .100 0.00' endCap='false' solid='false' spine='-35.7 -.8 2.5 -18.8 -.8 2.55'/> |
279 | </Shape> |
280 | </Transform> |
281 | </Transform> |
282 | <Transform DEF='sling' rotation='0 0 1 -.82' translation='-4 -15.3 0'> |
283 | <Transform> |
284 | <Transform rotation='0 1 0 -1.57' scale='1 1.3 1' translation='.5 0 -1'> |
285 | <Transform rotation='0 0 1 1.57'> |
286 | <Transform scale='.3 .3 .3'> |
287 | |
288 | |
289 | <Material transparency='.5'/> |
290 | </Appearance> |
291 | <Extrusion crossSection='0 0 0 5 .5 7 1 8 2 9 3 11 3.5 11.2 4 11 5 9 6 8 6.5 7 6.7 5 6.7 0 0 0' spine='0 0 0 .1 0 0'/> |
292 | </Shape> |
293 | <Transform scale='.3 .3 .3' translation='0 -3.5 11.5'> |
294 | <Shape USE='Torus'/> |
295 | <Transform translation='0 0 2'> |
296 | <Shape> |
297 | <Appearance USE='rope'/> |
298 | <Sphere radius='1.5'/> |
299 | </Shape> |
300 | </Transform> |
301 | </Transform> |
302 | </Transform> |
303 | <Transform scale='.3 .3 .3' translation='2 0 0'> |
304 | <Shape USE='halfsling'/> |
305 | <Transform scale='.3 .3 .3' translation='0 -3.5 11.3'> |
306 | <Shape USE='Torus'/> |
307 | <Transform translation='0 0 2'> |
308 | <Shape> |
309 | <Appearance USE='rope'/> |
310 | <Sphere radius='1.5'/> |
311 | </Shape> |
312 | </Transform> |
313 | </Transform> |
314 | </Transform> |
315 | <Transform translation='1 -1 0'> |
316 | <Shape> |
317 | <Extrusion beginCap='false' creaseAngle='0.785' crossSection='1.00 0.00 0.92 -0.38 0.71 -0.71 0.38 -0.92 0.00 -1.00 -0.38 -0.92 -0.71 -0.71 -0.92 -0.38 -1.00 -0.00' endCap='false' solid='false' spine='0 -1 0 0 1 0'/> |
318 | <Appearance USE='clear'/> |
319 | </Shape> |
320 | </Transform> |
321 | </Transform> |
322 |
<!-- TouchSensor
LauncheeChoice is a DEF node that has 1 USE node: USE_1
<!-- ROUTE information for LauncheeChoice node: [from touchTime to HolyHandGrenadeSound.set_startTime ] [from touchTime to CowSound.set_startTime ] [from touchTime to HamsterSound.set_startTime ] [from isActive to LauncheeScript.set_boolean ] --> <TouchSensor DEF='LauncheeChoice' description='launcher choice'/> |
323 | </Transform> |
324 |
<!-- ROUTE information for projectiletransform node:
[from invisiable.value_changed to set_scale
]
-->
<Transform DEF='projectiletransform' scale='.01 .01 .01'> |
325 |
<!-- Switch
projectile is a DEF node that has 1 USE node: USE_1
<!-- ROUTE information for projectile node: [from LauncheeScript.whichchoice to whichChoice ] --> <Switch DEF='projectile' whichChoice='0'> |
326 | <Group> |
327 | <Transform translation='0 .7 0'> |
328 | <Shape> |
329 | <Sphere radius='.7'/> |
330 | |
331 | <Material diffuseColor='0 0 0' specularColor='1 1 1'/> |
332 | </Appearance> |
333 | </Shape> |
334 | </Transform> |
335 | </Group> |
336 | <Group> |
337 | <Transform> |
338 | <Inline url=' "cow.wrl" "http://www.uoguelph.ca/~dchiu/cow.wrl" '/> |
339 | </Transform> |
340 | </Group> |
341 | <Group> |
342 | <Transform rotation='0 1 0 1.57' scale='.4 .4 .4' translation='0 .7 0'> |
343 | <Inline url=' "vrml_ginger.wrl" "http://home.inreach.com/ntamura/vrml/vrml_ginger.wrl" '/> |
344 | </Transform> |
345 | </Group> |
346 | </Switch> |
347 | </Transform> |
348 | </Transform> |
349 | </Transform> |
350 | </Transform> |
351 | </Transform> |
352 | <Transform rotation='1 0 0 1.57' translation='0 18 2.5'> |
353 | <Shape> |
354 | <Cylinder height='8' radius='.4'/> |
355 | <Appearance> |
356 | <Material diffuseColor='0 0 0' specularColor='1 1 1'/> |
357 | </Appearance> |
358 | </Shape> |
359 | <!-- Top Pivot --> |
360 | </Transform> |
361 |
<!-- ROUTE information for verticalweight node:
[from verticalweightpath.value_changed to set_translation
]
-->
<Transform DEF='verticalweight'> |
362 | <Transform translation='4 18 1.8'> |
363 | <Shape> |
364 | <Box size='1 10 .5'/> |
365 | <Appearance USE='wood'/> |
366 | </Shape> |
367 | </Transform> |
368 | <Transform translation='4 18 3.2'> |
369 | <Shape> |
370 | <Box size='1 10 .5'/> |
371 | <Appearance USE='wood'/> |
372 | </Shape> |
373 | </Transform> |
374 | <Transform translation='4 14 2.5'> |
375 | <!-- CounterWeight --> |
376 | <Shape> |
377 | <Cylinder height='4' radius='1.5'/> |
378 | <Appearance> |
379 | <Material diffuseColor='0 0 0' specularColor='1 1 1'/> |
380 | </Appearance> |
381 | </Shape> |
382 | </Transform> |
383 | <Transform rotation='1 0 0 1.57' translation='4 22 2.5'> |
384 | <Shape> |
385 | <Cylinder height='2.5' radius='.3'/> |
386 | <Appearance> |
387 | <Material diffuseColor='0 0 0' specularColor='1 1 1'/> |
388 | </Appearance> |
389 | </Shape> |
390 | </Transform> |
391 | </Transform> |
392 | <Transform rotation='0 0 1 1.57' scale='.2 .2 .2' translation='-11.5 -1 2'> |
393 | |
394 | <Shape USE='Torus'/> |
395 | <Transform rotation='1 0 0 -1.57' translation='0 0 7'> |
396 | <Shape> |
397 | <Cylinder height='10' radius='.7'/> |
398 | <Appearance> |
399 | <Material specularColor='1 1 1'/> |
400 | </Appearance> |
401 | </Shape> |
402 | </Transform> |
403 | </Transform> |
404 | <Transform translation='0 0 7'> |
405 | <Transform USE='screw'/> |
406 | </Transform> |
407 | <!-- Release Pin --> |
408 |
<!-- ROUTE information for Pin node:
[from pinpath.value_changed to set_translation
]
-->
<Transform DEF='Pin' rotation='1 0 0 -1.57' translation='0 0 -3'> |
409 | <Transform USE='screw'/> |
410 | </Transform> |
411 | </Transform> |
412 | <Transform translation='0 0 5'> |
413 | <Shape USE='plank'/> |
414 | <Transform USE='angledsupport'/> |
415 | <Transform USE='angledsupport2'/> |
416 | <Transform USE='verticalsupport'/> |
417 | <Transform USE='horizontalsupport'/> |
418 | <Transform rotation='0 1 0 1.57' scale='.6 1 1' translation='0 -11 -2.5'> |
419 | <Transform USE='horizontalsupport'/> |
420 | </Transform> |
421 | <Transform rotation='0 0 1 -1.57' scale='.6 1 1' translation='0 5 -10'> |
422 | <Transform rotation='0 1 0 .4'> |
423 | <Shape USE='plank'/> |
424 | </Transform> |
425 | </Transform> |
426 | <Transform translation='0 0 .6'> |
427 | <Transform USE='panel'/> |
428 | </Transform> |
429 | </Transform> |
430 | <Transform translation='10 -1 2.5'> |
431 | |
432 | <Box size='1 1 8'/> |
433 | <Appearance USE='wood'/> |
434 | </Shape> |
435 | <Transform rotation='1 0 0 1.57' translation='0 0 4.5'> |
436 | |
437 | <Cylinder radius='2'/> |
438 | <Appearance USE='wood'/> |
439 | </Shape> |
440 | |
441 | <Sphere radius='1.5'/> |
442 | <Appearance USE='black'/> |
443 | </Shape> |
444 | <Transform translation='0 .55 0'> |
445 | |
446 | <Sphere radius='1.5'/> |
447 | <Appearance USE='black'/> |
448 | </Shape> |
449 | </Transform> |
450 | </Transform> |
451 | <Transform rotation='1 0 0 1.57' translation='0 0 -4.5'> |
452 | <Shape USE='wheel'/> |
453 | <Shape USE='tracks'/> |
454 | <Transform translation='0 -.55 0'> |
455 | <Shape USE='hub'/> |
456 | </Transform> |
457 | </Transform> |
458 | </Transform> |
459 | <Transform translation='-10 -1 2.5'> |
460 | <Shape USE='Axle'/> |
461 | <Transform rotation='1 0 0 1.57' translation='0 0 4.5'> |
462 | <Shape USE='wheel'/> |
463 | <Shape USE='tracks'/> |
464 | <Transform translation='0 .55 0'> |
465 | <Shape USE='hub'/> |
466 | </Transform> |
467 | </Transform> |
468 | <Transform rotation='1 0 0 1.57' translation='0 0 -4.5'> |
469 | <Shape USE='wheel'/> |
470 | <Shape USE='tracks'/> |
471 | <Transform translation='0 -.55 0'> |
472 | <Shape USE='hub'/> |
473 | </Transform> |
474 | </Transform> |
475 | <Transform rotation='0 1 0 -.6' translation='0 100 400'> |
476 | <Transform translation='1 3 0'> |
477 | <Viewpoint description='Side'/> |
478 | </Transform> |
479 | <Transform USE='launch'/> |
480 | <Transform> |
481 | <TouchSensor USE='LauncheeChoice'/> |
482 | <Switch USE='projectilename'/> |
483 | <Transform translation='2.5 0 0'> |
484 | <Shape> |
485 | <Box size='5 .5 .5'/> |
486 | <Appearance> |
487 | <Material transparency='1'/> |
488 | </Appearance> |
489 | </Shape> |
490 | </Transform> |
491 | </Transform> |
492 | <Transform scale='.5 .5 .5' translation='0 -1 0'> |
493 | <TouchSensor USE='weightselector'/> |
494 | <Switch USE='Weight'/> |
495 | <Transform translation='8 0 0'> |
496 | <Shape> |
497 | <Box size='17 1 .5'/> |
498 | <Appearance> |
499 | <Material transparency='1'/> |
500 | </Appearance> |
501 | </Shape> |
502 | </Transform> |
503 | </Transform> |
504 | </Transform> |
505 |
<!-- ROUTE information for ProjectileTransform node:
[from Mover.value_changed to set_translation
]
[from Mover.transparent to set_scale
]
-->
<Transform DEF='ProjectileTransform' translation='14.25 1.25 0'> |
506 | <Switch USE='projectile'/> |
507 | <Transform rotation='0 1 0 1.57' translation='0 1 0'> |
508 | <Viewpoint description='Projectile Cam' position='0 0 15'/> |
509 | </Transform> |
510 | </Transform> |
511 | <Transform translation='20 2 0'> |
512 | <Transform DEF='Front' rotation='0 1 0 1.57'> |
513 | <Viewpoint description='Fore'/> |
514 | </Transform> |
515 | </Transform> |
516 | <Transform translation='-8 4 0'> |
517 | <Transform rotation='0 1 0 -1.57'> |
518 | <Viewpoint description='Aft'/> |
519 | </Transform> |
520 | </Transform> |
521 |
<!-- ROUTE information for WeightScript node:
[from weightselector.isActive to set_boolean
]
[from CounterWeight to Mover.set_MassCounterWeight
]
[from whichchoice to Weight.whichChoice
]
-->
<Script DEF='WeightScript'> |
522 | <field name='set_boolean' type='SFBool' accessType='inputOnly'/> |
523 | <field name='whichchoice' type='SFInt32' accessType='outputOnly'/> |
524 | <field name='CounterWeight' type='SFFloat' accessType='outputOnly'/> |
<![CDATA[
ecmascript: function initialize () { whichchoice =0; CounterWeight=100; } function set_boolean ( boolean_input, eventTime) { if ( boolean_input== false ) { return; } // ignore the unclick whichchoice = whichchoice +1; if (whichchoice == 0)CounterWeight=50.00; if (whichchoice == 1)CounterWeight=500.00; if (whichchoice == 2)CounterWeight=1000.00; if (whichchoice == 3)CounterWeight=10000.00; if ( whichchoice ==4 ) { whichchoice = 0; CounterWeight=50; } Browser.println ('CounterWeight ='+CounterWeight); }
]]>
|
|
526 | </Script> |
527 |
<!-- ROUTE information for LauncheeScript node:
[from LauncheeChoice.isActive to set_boolean
]
[from ProjectileWeight to Mover.set_MassProjectileWeight
]
[from whichchoice to projectile.whichChoice
]
[from whichchoice to projectilename.whichChoice
]
-->
<Script DEF='LauncheeScript'> |
528 | <field name='set_boolean' type='SFBool' accessType='inputOnly'/> |
529 | <field name='whichchoice' type='SFInt32' accessType='outputOnly'/> |
530 | <field name='ProjectileWeight' type='SFFloat' accessType='outputOnly'/> |
<![CDATA[
ecmascript: function set_boolean (boolean_input, eventTime) { if ( boolean_input== false ) { return; } // ignore unclick whichchoice = whichchoice +1; if (whichchoice == 0)ProjectileWeight=10.00; if (whichchoice == 1)ProjectileWeight=1000.00; if (whichchoice == 2)ProjectileWeight=5; if ( whichchoice ==3 ) { whichchoice = 0; ProjectileWeight=10.00; } Browser.println ('Projectile Weight'+ProjectileWeight); }
]]>
|
|
532 | </Script> |
533 |
<!-- ROUTE information for PigdogMonkScript node:
[from Launch.isActive to set_boolean
]
[from whichchoice to PigdogMonk.whichChoice
]
-->
<Script DEF='PigdogMonkScript'> |
534 | <field name='set_boolean' type='SFBool' accessType='inputOnly'/> |
535 | <field name='whichchoice' type='SFInt32' accessType='outputOnly'/> |
<![CDATA[
ecmascript: function set_boolean (boolean_input, eventTime) { if ( boolean_input== false ) { return; } // ignore unclick whichchoice = whichchoice +1; if ( whichchoice ==2 ) whichchoice = 0; }
]]>
|
|
537 | </Script> |
538 |
<!-- ROUTE information for Mover node:
[from WeightScript.CounterWeight to set_MassCounterWeight
]
[from LauncheeScript.ProjectileWeight to set_MassProjectileWeight
]
[from clock.fraction_changed to set_fraction
]
[from value_changed to ProjectileTransform.set_translation
]
[from transparent to ProjectileTransform.set_scale
]
-->
<Script DEF='Mover'> |
539 | <field name='set_fraction' type='SFFloat' accessType='inputOnly'/> |
540 | <field name='set_MassCounterWeight' type='SFFloat' accessType='inputOnly'/> |
541 | <field name='set_MassProjectileWeight' type='SFFloat' accessType='inputOnly'/> |
542 | <field name='MassCounterWeight' type='SFFloat' value='1' accessType='initializeOnly'/> |
543 | <field name='MassProjectileWeight' type='SFFloat' value='1' accessType='initializeOnly'/> |
544 | <field name='transparent' type='SFVec3f' accessType='outputOnly'/> |
545 | <field name='value_changed' type='SFVec3f' accessType='outputOnly'/> |
<![CDATA[
ecmascript: function initialize () { MassCounterWeight=100; MassProjectileWeight=10; Browser.println ('MassCounterWeight =' + MassCounterWeight); Browser.println ('MassProjectileWeight =' + MassProjectileWeight); } function set_MassProjectileWeight (value, timestamp) { MassProjectileWeight = value; Browser.println ('new MassProjectileWeight =' + MassProjectileWeight); } function set_MassCounterWeight (value2, timestamp) { MassCounterWeight = value2; Browser.println ('new MassCounterWeight =' + MassCounterWeight); } function set_fraction ( fraction, eventTime ) { var TrebuchetHeight=45; var Height =25; x = (2*(MassCounterWeight/MassProjectileWeight)*Height*fraction)-.5*TrebuchetHeight; // start at TrebuchetHeight and keep along z axis (z=zero) y = (MassCounterWeight/MassProjectileWeight)*Height*Math.sin(fraction*3.14); z = 0; transparent = new SFVec3f (1,1,1); if (y <1.5*TrebuchetHeight )if (x<TrebuchetHeight) { x=x-10; y=y+1; transparent = new SFVec3f(.01, .01, .01); } value_changed = new SFVec3f (x, y, z); Browser.println ('x=' + value_changed[0] + ' y=' + value_changed[1] + ' z=' + value_changed[2]); }
]]>
|
|
547 | </Script> |
548 | </Transform> |
549 | </Transform> |
550 |
<!-- ROUTE information for clock node:
[from Launch.touchTime to set_startTime
]
[from fraction_changed to invisiable.set_fraction
]
[from fraction_changed to Mover.set_fraction
]
[from fraction_changed to flingerangles.set_fraction
]
[from fraction_changed to verticalweightpath.set_fraction
]
[from fraction_changed to pinpath.set_fraction
]
-->
<TimeSensor DEF='clock' cycleInterval='10'/> |
551 |
<!-- ROUTE information for verticalweightpath node:
[from clock.fraction_changed to set_fraction
]
[from value_changed to verticalweight.set_translation
]
-->
<PositionInterpolator DEF='verticalweightpath' key='0 .1 .2 .2 .3 .9' keyValue='1.4 1.6 0 1. -8 0 -3.5 -12 0 -3.5 -12 0 1.2 -8 0 1.4 1.6 0'/> |
552 |
<!-- ROUTE information for flingerangles node:
[from clock.fraction_changed to set_fraction
]
[from value_changed to flinger.set_rotation
]
-->
<OrientationInterpolator DEF='flingerangles' key='0 .1 .2 .2 .3 .9' keyValue='0 0 1 .82 0 0 1 -.77 0 0 1 -1.57 0 0 1 -1.57 0 0 1 -.77 0 0 1 .82'/> |
553 |
<!-- ROUTE information for pinpath node:
[from clock.fraction_changed to set_fraction
]
[from value_changed to Pin.set_translation
]
-->
<PositionInterpolator DEF='pinpath' key='0 .01 .95 1' keyValue='0 0 -3 0 0 -10 0 0 -10 0 0 -3'/> |
554 | <OrientationInterpolator DEF='RnSAngels' key='0 .7 1' keyValue='0 0 1 0 0 0 1 -3.14 0 0 1 0'/> |
555 |
<!-- ROUTE information for invisiable node:
[from clock.fraction_changed to set_fraction
]
[from value_changed to projectiletransform.set_scale
]
-->
<PositionInterpolator DEF='invisiable' key='0 .2 .98 .99' keyValue='1 1 1 .01 .01 .01 .01 .01 .01 1 1 1'/> |
556 | < ROUTE fromNode='clock' fromField='fraction_changed' toNode='invisiable' toField='set_fraction'/> |
557 | < ROUTE fromNode='invisiable' fromField='value_changed' toNode='projectiletransform' toField='set_scale'/> |
558 | < ROUTE fromNode='WeightScript' fromField='CounterWeight' toNode='Mover' toField='set_MassCounterWeight'/> |
559 | < ROUTE fromNode='LauncheeScript' fromField='ProjectileWeight' toNode='Mover' toField='set_MassProjectileWeight'/> |
560 | < ROUTE fromNode='clock' fromField='fraction_changed' toNode='Mover' toField='set_fraction'/> |
561 | < ROUTE fromNode='Mover' fromField='value_changed' toNode='ProjectileTransform' toField='set_translation'/> |
562 | < ROUTE fromNode='Mover' fromField='transparent' toNode='ProjectileTransform' toField='set_scale'/> |
563 | < ROUTE fromNode='Launch' fromField='touchTime' toNode='clock' toField='set_startTime'/> |
564 | < ROUTE fromNode='Launch' fromField='isActive' toNode='PigdogMonkScript' toField='set_boolean'/> |
565 | < ROUTE fromNode='Launch' fromField='touchTime' toNode='PigDogSound' toField='set_startTime'/> |
566 | < ROUTE fromNode='Launch' fromField='touchTime' toNode='MonkSound' toField='set_startTime'/> |
567 | < ROUTE fromNode='PigdogMonkScript' fromField='whichchoice' toNode='PigdogMonk' toField='whichChoice'/> |
568 | < ROUTE fromNode='LauncheeChoice' fromField='touchTime' toNode='HolyHandGrenadeSound' toField='set_startTime'/> |
569 | < ROUTE fromNode='LauncheeChoice' fromField='touchTime' toNode='CowSound' toField='set_startTime'/> |
570 | < ROUTE fromNode='LauncheeChoice' fromField='touchTime' toNode='HamsterSound' toField='set_startTime'/> |
571 | < ROUTE fromNode='LauncheeChoice' fromField='isActive' toNode='LauncheeScript' toField='set_boolean'/> |
572 | < ROUTE fromNode='LauncheeScript' fromField='whichchoice' toNode='projectile' toField='whichChoice'/> |
573 | < ROUTE fromNode='LauncheeScript' fromField='whichchoice' toNode='projectilename' toField='whichChoice'/> |
574 | < ROUTE fromNode='weightselector' fromField='isActive' toNode='WeightScript' toField='set_boolean'/> |
575 | < ROUTE fromNode='WeightScript' fromField='whichchoice' toNode='Weight' toField='whichChoice'/> |
576 | < ROUTE fromNode='clock' fromField='fraction_changed' toNode='flingerangles' toField='set_fraction'/> |
577 | < ROUTE fromNode='flingerangles' fromField='value_changed' toNode='flinger' toField='set_rotation'/> |
578 | < ROUTE fromNode='clock' fromField='fraction_changed' toNode='verticalweightpath' toField='set_fraction'/> |
579 | < ROUTE fromNode='verticalweightpath' fromField='value_changed' toNode='verticalweight' toField='set_translation'/> |
580 | < ROUTE fromNode='clock' fromField='fraction_changed' toNode='pinpath' toField='set_fraction'/> |
581 | < ROUTE fromNode='pinpath' fromField='value_changed' toNode='Pin' toField='set_translation'/> |
582 | </Scene> |
583 | </X3D> |
Event Graph ROUTE Table entries with 26 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.
LauncheeChoice
TouchSensor touchTime SFTime |
HolyHandGrenadeSound
AudioClip set_startTime SFTime |
|||||||||
LauncheeChoice
TouchSensor touchTime SFTime |
CowSound
AudioClip set_startTime SFTime |
|||||||||
LauncheeChoice
TouchSensor touchTime SFTime |
HamsterSound
AudioClip set_startTime SFTime |
|||||||||
LauncheeChoice
TouchSensor isActive SFBool |
LauncheeScript
Script set_boolean SFBool |
then
|
LauncheeScript
Script ProjectileWeight SFFloat |
Mover
Script set_MassProjectileWeight SFFloat |
then
|
Mover
Script transparent SFVec3f |
ProjectileTransform
Transform set_scale SFVec3f |
|||
then
|
Mover
Script value_changed SFVec3f |
ProjectileTransform
Transform set_translation SFVec3f |
||||||||
then
|
LauncheeScript
Script whichchoice SFInt32 |
projectile
Switch whichChoice SFInt32 |
||||||||
then
|
LauncheeScript
Script whichchoice SFInt32 |
projectilename
Switch whichChoice SFInt32 |
weightselector
TouchSensor isActive SFBool |
WeightScript
Script set_boolean SFBool |
then
|
WeightScript
Script CounterWeight SFFloat |
Mover
Script set_MassCounterWeight SFFloat |
then
|
Mover
Script transparent SFVec3f |
ProjectileTransform
Transform set_scale SFVec3f |
|||
then
|
Mover
Script value_changed SFVec3f |
ProjectileTransform
Transform set_translation SFVec3f |
||||||||
then
|
WeightScript
Script whichchoice SFInt32 |
Weight
Switch whichChoice SFInt32 |
Mover
Script value_changed SFVec3f |
ProjectileTransform
Transform set_translation SFVec3f |
|
Mover
Script transparent SFVec3f |
ProjectileTransform
Transform set_scale SFVec3f |
WeightScript
Script CounterWeight SFFloat |
Mover
Script set_MassCounterWeight SFFloat |
then
|
Mover
Script transparent SFVec3f |
ProjectileTransform
Transform set_scale SFVec3f |
||
then
|
Mover
Script value_changed SFVec3f |
ProjectileTransform
Transform set_translation SFVec3f |
||||
WeightScript
Script whichchoice SFInt32 |
Weight
Switch whichChoice SFInt32 |
<!--
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. -->