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=' ExplodingBuildingExample.x3d '/> |
6 | <meta name='description' content='A simple exploding structure, experimenting with the "Hello World" of explosions - click on the silver chimney to trigger the explosion. This prototype demonstrates a simplified and scalable approach for modeling explosions. Each chunk of geometry inside an Exploder prototype is given initial/final position/orientation. Intermediate heights for each polygon are at the same height as the distance traveled over ground.'/> |
7 | <meta name='creator' content='Don Brutzman'/> |
8 | <meta name='created' content='16 September 2002'/> |
9 | <meta name='modified' content='28 November 2019'/> |
10 | <meta name='reference' content='Exploding building schematic layout diagram:'/> |
11 | <meta name='Image' content=' ExplodingBuildingLayout.pdf '/> |
12 | <meta name='Image' content=' ExplodingBuildingSnapshots.pdf '/> |
13 |
<meta name='Image' content='ExplodingBuildingMontage.png'![]() |
14 | <meta name='MovingImage' content='ExplodingBuildingExampleVideo.mov'/> |
15 | <meta name='reference' content='ExplodingBuildingLargeExample.wrl'/> |
16 | <meta name='reference' content='Rotation calculations performed using the Dizzy utility from Vapour Technologies by James Smith.'/> |
17 | <meta name='reference' content='http://www.vapourtech.com'/> |
18 | <meta name='reference' content='DIS-Java-VRML Working Group'/> |
19 | <meta name='reference' content='https://www.web3d.org/WorkingGroups/vrtp/dis-java-vrml'/> |
20 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/Savage/Tools/Explosions/ExplodingBuildingExample.x3d '/> |
21 | <meta name='generator' content='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
22 | <meta name='license' content='../../license.html'/> |
23 | </head> |
24 | <Scene> |
25 | <WorldInfo title='ExplodingBuildingExample.x3d'/> |
26 | <ExternProtoDeclare name='Exploder' appinfo='Explode contained geometry through animation on demand' url=' "ExplodingBuildingPrototype.x3d#Exploder" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Explosions/ExplodingBuildingPrototype.x3d#Exploder" "ExplodingBuildingPrototype.wrl#Exploder" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Explosions/ExplodingBuildingPrototype.wrl#Exploder" '> |
27 |
<field name='geometry' type='SFNode' accessType='initializeOnly'
appinfo='geometry node, to be used inside a Shape'/> |
28 |
<field name='material' type='SFNode' accessType='initializeOnly'
appinfo='Material node for this geometry, to be used inside a Shape'/> |
29 |
<field name='initialPosition' type='SFVec3f' accessType='initializeOnly'
appinfo='starting point'/> |
30 |
<field name='finalPosition' type='SFVec3f' accessType='initializeOnly'
appinfo='finish point'/> |
31 |
<field name='initialOrientation' type='SFRotation' accessType='initializeOnly'
appinfo='starting point orientation'/> |
32 |
<field name='finalOrientation' type='SFRotation' accessType='initializeOnly'
appinfo='finish point orientation'/> |
33 |
<field name='set_fraction' type='SFFloat' accessType='inputOnly'
appinfo='animation input'/> |
34 | </ExternProtoDeclare> |
35 | <!-- Root Transform will be replaced by EspduTransfor when ready to network --> |
36 | <Transform DEF='RootEspduTransform'> |
37 | <Viewpoint description='Hello Exploding Building' orientation='1 0 0 -0.3' position='1 20 50'/> |
38 | <DirectionalLight direction='-0.57735 -0.57735 0.57735'/> |
39 | <Transform scale='10 10 10'> |
40 | <Inline DEF='CoordinateAxes' url=' "../../Tools/Authoring/CoordinateAxes.x3d" "../../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.x3d" "../../Tools/Authoring/CoordinateAxes.wrl" "../../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.wrl" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl" '/> |
41 | </Transform> |
42 | <Shape> |
43 | |
44 | <Appearance> |
45 |
<!-- Material
FloorMaterial is a DEF node that has 2 USE nodes: USE_1, USE_2 --> <Material DEF='FloorMaterial' diffuseColor='0 0.3 0.3' transparency='0.3'/> |
46 | </Appearance> |
47 | </Shape> |
48 |
<!-- ROUTE information for FirstFloorCeiling node:
[from ExplosionClock.fraction_changed to set_fraction
]
-->
<ProtoInstance name='Exploder' DEF='FirstFloorCeiling'> |
49 | <fieldValue name='geometry'> |
50 | <Box USE='Floor'/> |
51 | </fieldValue> |
52 | <fieldValue name='material'> |
53 | <Material USE='FloorMaterial'/> |
54 | </fieldValue> |
55 | <fieldValue name='initialPosition' value='0 3 0'/> |
56 | <fieldValue name='finalPosition' value='14 0.05 14'/> |
57 | <fieldValue name='finalOrientation' value='0.48 0 0.88 3.14'/> |
58 | </ProtoInstance> |
59 |
<!-- ROUTE information for FirstFloorWallEast node:
[from ExplosionClock.fraction_changed to set_fraction
]
-->
<ProtoInstance name='Exploder' DEF='FirstFloorWallEast'> |
60 | <fieldValue name='geometry'> |
61 | |
62 | </fieldValue> |
63 | <fieldValue name='material'> |
64 |
<!-- Material
FirstFloorWallMaterial is a DEF node that has 3 USE nodes: USE_1, USE_2, USE_3 --> <Material DEF='FirstFloorWallMaterial' diffuseColor='0.4 0.4 0' transparency='0.3'/> |
65 | </fieldValue> |
66 | <fieldValue name='initialPosition' value='0 1.5 3.95'/> |
67 | <fieldValue name='finalPosition' value='0 0.05 10'/> |
68 | <fieldValue name='finalOrientation' value='0.96 0.2 -0.19 1.61'/> |
69 | </ProtoInstance> |
70 |
<!-- ROUTE information for FirstFloorWallNorth node:
[from ExplosionClock.fraction_changed to set_fraction
]
-->
<ProtoInstance name='Exploder' DEF='FirstFloorWallNorth'> |
71 | <fieldValue name='geometry'> |
72 | |
73 | </fieldValue> |
74 | <fieldValue name='material'> |
75 | <Material USE='FirstFloorWallMaterial'/> |
76 | </fieldValue> |
77 | <fieldValue name='initialPosition' value='7 1.5 0'/> |
78 | <fieldValue name='finalPosition' value='15 0.05 2'/> |
79 | <fieldValue name='finalOrientation' value='0 0 1 -1.57'/> |
80 | </ProtoInstance> |
81 |
<!-- ROUTE information for FirstFloorWallWest node:
[from ExplosionClock.fraction_changed to set_fraction
]
-->
<ProtoInstance name='Exploder' DEF='FirstFloorWallWest'> |
82 | <fieldValue name='geometry'> |
83 | <Box USE='LongWall'/> |
84 | </fieldValue> |
85 | <fieldValue name='material'> |
86 | <Material USE='FirstFloorWallMaterial'/> |
87 | </fieldValue> |
88 | <fieldValue name='initialPosition' value='0 1.5 -3.95'/> |
89 | <fieldValue name='finalPosition' value='0 0.05 -12'/> |
90 | <fieldValue name='finalOrientation' value='0.96 0.2 -0.19 1.61'/> |
91 | </ProtoInstance> |
92 |
<!-- ROUTE information for FirstFloorWallSouth node:
[from ExplosionClock.fraction_changed to set_fraction
]
-->
<ProtoInstance name='Exploder' DEF='FirstFloorWallSouth'> |
93 | <fieldValue name='geometry'> |
94 | <Box USE='ShortWall'/> |
95 | </fieldValue> |
96 | <fieldValue name='material'> |
97 | <Material USE='FirstFloorWallMaterial'/> |
98 | </fieldValue> |
99 | <fieldValue name='initialPosition' value='-7 1.5 0'/> |
100 | <fieldValue name='finalPosition' value='-10 0.05 1'/> |
101 | <fieldValue name='finalOrientation' value='-0.32 -0.32 0.89 1.69'/> |
102 | </ProtoInstance> |
103 |
<!-- ROUTE information for SecondFloorCeiling node:
[from ExplosionClock.fraction_changed to set_fraction
]
-->
<ProtoInstance name='Exploder' DEF='SecondFloorCeiling'> |
104 | <fieldValue name='geometry'> |
105 | <Box USE='Floor'/> |
106 | </fieldValue> |
107 | <fieldValue name='material'> |
108 | <Material USE='FloorMaterial'/> |
109 | </fieldValue> |
110 | <fieldValue name='initialPosition' value='0 6 0'/> |
111 | <fieldValue name='finalPosition' value='-12 0.05 -10'/> |
112 | <fieldValue name='finalOrientation' value='0.84 0 0.54 3.14'/> |
113 | </ProtoInstance> |
114 |
<!-- ROUTE information for SecondFloorWallEast node:
[from ExplosionClock.fraction_changed to set_fraction
]
-->
<ProtoInstance name='Exploder' DEF='SecondFloorWallEast'> |
115 | <fieldValue name='geometry'> |
116 | <Box USE='LongWall'/> |
117 | </fieldValue> |
118 | <fieldValue name='material'> |
119 |
<!-- Material
SecondFloorWallMaterial is a DEF node that has 3 USE nodes: USE_1, USE_2, USE_3 --> <Material DEF='SecondFloorWallMaterial' diffuseColor='0.8 0.8 0' transparency='0.3'/> |
120 | </fieldValue> |
121 | <fieldValue name='initialPosition' value='0 4.5 3.95'/> |
122 | <fieldValue name='finalPosition' value='5 0.05 20'/> |
123 | <fieldValue name='finalOrientation' value='0.89 -0.32 0.32 1.69'/> |
124 | </ProtoInstance> |
125 |
<!-- ROUTE information for SecondFloorWallNorth node:
[from ExplosionClock.fraction_changed to set_fraction
]
-->
<ProtoInstance name='Exploder' DEF='SecondFloorWallNorth'> |
126 | <fieldValue name='geometry'> |
127 | <Box USE='ShortWall'/> |
128 | </fieldValue> |
129 | <fieldValue name='material'> |
130 | <Material USE='SecondFloorWallMaterial'/> |
131 | </fieldValue> |
132 | <fieldValue name='initialPosition' value='7 4.5 0'/> |
133 | <fieldValue name='finalPosition' value='22 0.05 -6'/> |
134 | <fieldValue name='finalOrientation' value='-0.32 -0.32 0.89 1.69'/> |
135 | </ProtoInstance> |
136 |
<!-- ROUTE information for SecondFloorWallWest node:
[from ExplosionClock.fraction_changed to set_fraction
]
-->
<ProtoInstance name='Exploder' DEF='SecondFloorWallWest'> |
137 | <fieldValue name='geometry'> |
138 | <Box USE='LongWall'/> |
139 | </fieldValue> |
140 | <fieldValue name='material'> |
141 | <Material USE='SecondFloorWallMaterial'/> |
142 | </fieldValue> |
143 | <fieldValue name='initialPosition' value='0 4.5 -3.95'/> |
144 | <fieldValue name='finalPosition' value='5 0.05 -19'/> |
145 | <fieldValue name='finalOrientation' value='0.96 0.2 -0.19 1.61'/> |
146 | </ProtoInstance> |
147 |
<!-- ROUTE information for SecondFloorWallSouth node:
[from ExplosionClock.fraction_changed to set_fraction
]
-->
<ProtoInstance name='Exploder' DEF='SecondFloorWallSouth'> |
148 | <fieldValue name='geometry'> |
149 | <Box USE='ShortWall'/> |
150 | </fieldValue> |
151 | <fieldValue name='material'> |
152 | <Material USE='SecondFloorWallMaterial'/> |
153 | </fieldValue> |
154 | <fieldValue name='initialPosition' value='-7 4.5 0'/> |
155 | <fieldValue name='finalPosition' value='-10 0.05 11'/> |
156 | <fieldValue name='finalOrientation' value='-0.28 0.28 -0.92 1.66'/> |
157 | </ProtoInstance> |
158 | <Group> |
159 |
<!-- ROUTE information for SmokeStack node:
[from ExplosionClock.fraction_changed to set_fraction
]
-->
<ProtoInstance name='Exploder' DEF='SmokeStack'> |
160 | <fieldValue name='geometry'> |
161 | <Cylinder bottom='false' height='9' radius='0.5'/> |
162 | </fieldValue> |
163 | <fieldValue name='material'> |
164 | <Material diffuseColor='0.4 0.4 0.4' shininess='0.8'/> |
165 | </fieldValue> |
166 | <fieldValue name='initialPosition' value='-4 4.51 2'/> |
167 | <fieldValue name='finalPosition' value='-15 0.4 2'/> |
168 | <fieldValue name='finalOrientation' value='0 0 1 1.57'/> |
169 | </ProtoInstance> |
170 |
<!-- ROUTE information for SmokeStackTouch node:
[from touchTime to ExplosionClock.set_startTime
]
-->
<TouchSensor DEF='SmokeStackTouch' description='touch to activate'/> |
171 | </Group> |
172 |
<!-- ROUTE information for ExplosionClock node:
[from SmokeStackTouch.touchTime to set_startTime
]
[from fraction_changed to FirstFloorCeiling.set_fraction
]
[from fraction_changed to FirstFloorWallEast.set_fraction
]
[from fraction_changed to FirstFloorWallNorth.set_fraction
]
[from fraction_changed to FirstFloorWallWest.set_fraction
]
[from fraction_changed to FirstFloorWallSouth.set_fraction
]
[from fraction_changed to SecondFloorCeiling.set_fraction
]
[from fraction_changed to SecondFloorWallEast.set_fraction
]
[from fraction_changed to SecondFloorWallNorth.set_fraction
]
[from fraction_changed to SecondFloorWallWest.set_fraction
]
[from fraction_changed to SecondFloorWallSouth.set_fraction
]
[from fraction_changed to SmokeStack.set_fraction
]
-->
<TimeSensor DEF='ExplosionClock'/> |
173 | </Transform> |
174 | < ROUTE fromNode='SmokeStackTouch' fromField='touchTime' toNode='ExplosionClock' toField='set_startTime'/> |
175 | <!-- Connect clock to animations --> |
176 | < ROUTE fromNode='ExplosionClock' fromField='fraction_changed' toNode='FirstFloorCeiling' toField='set_fraction'/> |
177 | < ROUTE fromNode='ExplosionClock' fromField='fraction_changed' toNode='FirstFloorWallEast' toField='set_fraction'/> |
178 | < ROUTE fromNode='ExplosionClock' fromField='fraction_changed' toNode='FirstFloorWallNorth' toField='set_fraction'/> |
179 | < ROUTE fromNode='ExplosionClock' fromField='fraction_changed' toNode='FirstFloorWallWest' toField='set_fraction'/> |
180 | < ROUTE fromNode='ExplosionClock' fromField='fraction_changed' toNode='FirstFloorWallSouth' toField='set_fraction'/> |
181 | < ROUTE fromNode='ExplosionClock' fromField='fraction_changed' toNode='SecondFloorCeiling' toField='set_fraction'/> |
182 | < ROUTE fromNode='ExplosionClock' fromField='fraction_changed' toNode='SecondFloorWallEast' toField='set_fraction'/> |
183 | < ROUTE fromNode='ExplosionClock' fromField='fraction_changed' toNode='SecondFloorWallNorth' toField='set_fraction'/> |
184 | < ROUTE fromNode='ExplosionClock' fromField='fraction_changed' toNode='SecondFloorWallWest' toField='set_fraction'/> |
185 | < ROUTE fromNode='ExplosionClock' fromField='fraction_changed' toNode='SecondFloorWallSouth' toField='set_fraction'/> |
186 | < ROUTE fromNode='ExplosionClock' fromField='fraction_changed' toNode='SmokeStack' toField='set_fraction'/> |
187 | </Scene> |
188 | </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.
SmokeStackTouch
TouchSensor touchTime SFTime |
ExplosionClock
TimeSensor set_startTime SFTime |
FirstFloorCeiling
ProtoInstance Exploder |
No direct ROUTE connection found for events to/from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
FirstFloorWallEast
ProtoInstance Exploder |
No direct ROUTE connection found for events to/from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
FirstFloorWallNorth
ProtoInstance Exploder |
No direct ROUTE connection found for events to/from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
FirstFloorWallSouth
ProtoInstance Exploder |
No direct ROUTE connection found for events to/from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
FirstFloorWallWest
ProtoInstance Exploder |
No direct ROUTE connection found for events to/from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
SecondFloorCeiling
ProtoInstance Exploder |
No direct ROUTE connection found for events to/from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
SecondFloorWallEast
ProtoInstance Exploder |
No direct ROUTE connection found for events to/from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
SecondFloorWallNorth
ProtoInstance Exploder |
No direct ROUTE connection found for events to/from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
SecondFloorWallSouth
ProtoInstance Exploder |
No direct ROUTE connection found for events to/from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
SecondFloorWallWest
ProtoInstance Exploder |
No direct ROUTE connection found for events to/from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
SmokeStack
ProtoInstance Exploder |
No direct ROUTE connection found for events to/from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
<!--
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)
<ProtoInstance name='ProtoName'>
<field
name='fieldName'/> </ProtoInstance>
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->