X3D Model Documentation: MultipleExplosionPrototype.x3d

  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='titlecontent='MultipleExplosionPrototype.x3d'/>
  6            <meta name='descriptioncontent='Simple prototype for a multiple explosion resulting from a tomahawk strike.'/>
  7            <meta name='creatorcontent='James Harney'/>
  8            <meta name='createdcontent='14 September 2001'/>
  9            <meta name='modifiedcontent='28 November 2019'/>
 10            <meta name='referencecontent='http://www.planetnine.com'/>
 11            <meta name='referencecontent='http://www.specialoperations.com/multimedia/sounds.html'/>
 12            <meta name='referencecontent=' See url "soundpermissions.html" for copyright info and use on missile1.au and exp03.au that are converted to missile1.wav and exp03.wav for use in this file/model '/>
 13            <meta name='accessRightscontent='soundpermissions.html'/>
 14            <meta name='referencecontent='explosion.png'/>
 15            <meta name='identifiercontent='https://savage.nps.edu/Savage/Weapons/Missiles/MultipleExplosionPrototype.x3d'/>
 16            <meta name='generatorcontent='X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit'/>
 17            <meta name='licensecontent='../../license.html'/>
 18       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top Index for DEF nodes: EXPCLOCK, EXPCLOCK1, EXPCLOCK2, EXPINTERP, EXPINTERP1, EXPINTERP2, EXPLOSION, explosion, EXPLOSION1, EXPLOSION2, EXPSHAPE, EXPSHAPE1, EXPSHAPE2, IMPACT, TimeFilter

Index for ProtoDeclare definition: TLAMEXPLOSION
-->
 19       <Scene>
 20            <WorldInfo title='MultipleExplosionPrototype.x3d'/>
 21            <ProtoDeclare name='TLAMEXPLOSION'>
 22                 <ProtoInterface>
 23                      <field name='STARTEXPLOSIONtype='SFBoolaccessType='inputOnly'/>
 24                      <field name='THETIMEtype='SFTimeaccessType='inputOnly'/>
 25                 </ProtoInterface>
 26                 <ProtoBody>
 27 
                    <!-- ROUTE information for EXPLOSION node:  [from EXPINTERP.value_changed to set_scale ] -->
                    <Transform DEF='EXPLOSIONscale='.001 .001 .001'>
 28                           <Shape>
 29                                <Sphere DEF='EXPSHAPEradius='25'/>
 30                                <Appearance>
 31                                     <!-- explosion.png is from the Pearl Harbor scene from www.planetnine.com. -->
 32 
                                   <!-- ImageTexture explosion is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
                                   <ImageTexture DEF='explosion'   url=' "explosion.png " "https://savage.nps.edu/Savage/Weapons/Missiles/explosion.png " '/>
 33                                </Appearance>
 34                           </Shape>
 35                           <!-- Script based on example 30.3 from VRML source book. Modified to create animations that have delayed start times from the same touch sensor. -->
 36 
                         <!-- ROUTE information for TimeFilter node:  [from startEventTime to EXPCLOCK.set_startTime ] [from startEventTime to EXPCLOCK1.set_startTime ] [from startEventTime to EXPCLOCK2.set_startTime ] [from startEventTime to IMPACT.set_startTime ] -->
                         <Script DEF='TimeFilter'>
 37                                <field name='setStarttype='SFBoolaccessType='inputOnly'/>
 38                                <field name='startEventTimetype='SFTimeaccessType='outputOnly'/>
 39                                <field name='InputTimetype='SFTimeaccessType='inputOnly'/>
 40                                <IS>
 41                                     <connect nodeField='setStartprotoField='STARTEXPLOSION'/>
 42                                     <connect nodeField='InputTimeprotoField='THETIME'/>
 43                                </IS>
  <![CDATA[
            
ecmascript:


function setStart ( value, InputTime ) {
                         
	startEventTime = InputTime + 28 ;
	
}

          
]]>
 45                           </Script>
 46                           <!-- Used with permission. See soundpermissions.html for details. -->
 47                           <Sound maxBack='50000maxFront='50000'>
 48 
                              <!-- AudioClip IMPACT is a DEF node that has 2 USE nodes: USE_1, USE_2
                              <!-- ROUTE information for IMPACT node:  [from TimeFilter.startEventTime to set_startTime ] -->
                              <AudioClip DEF='IMPACTdescription='Explosion'   url=' "EXP03.wav" "https://savage.nps.edu/Savage/Weapons/Missiles/EXP03.wav" '/>
 49                           </Sound>
 50 
                         <!-- ROUTE information for EXPLOSION1 node:  [from EXPINTERP.value_changed to set_scale ] -->
                         <Transform DEF='EXPLOSION1scale='.001 .001 .001translation='1 3 -10'>
 51                                <Shape>
 52                                     <Sphere DEF='EXPSHAPE1radius='15'/>
 53                                     <Appearance>
 54                                          <ImageTexture USE='explosion'/>
 55                                     </Appearance>
 56                                </Shape>
 57                                <!-- Script based on example 30.3 from VRML source book. Modified to create animations that have delayed start times from the same touch sensor. -->
 58                                <!-- Used with permission. See soundpermissions.html for details. -->
 59                                <Sound maxBack='50000maxFront='50000'>
 60                                     <AudioClip USE='IMPACT'/>
 61                                </Sound>
 62                           </Transform>
 63 
                         <!-- ROUTE information for EXPLOSION2 node:  [from EXPINTERP.value_changed to set_scale ] -->
                         <Transform DEF='EXPLOSION2scale='.001 .001 .001translation='-5 12 7'>
 64                                <Shape>
 65                                     <Sphere DEF='EXPSHAPE2radius='10'/>
 66                                     <Appearance>
 67                                          <!-- explosion.png is from the Pearl Harbor scene from www.planetnine.com. -->
 68                                          <ImageTexture USE='explosion'/>
 69                                     </Appearance>
 70                                </Shape>
 71                                <!-- Script based on example 30.3 from VRML source book. Modified to create animations that have delayed start times from the same touch sensor. -->
 72                                <!-- Used with permission. See soundpermissions.html for details. -->
 73                                <Sound maxBack='50000maxFront='50000'>
 74                                     <AudioClip USE='IMPACT'/>
 75                                </Sound>
 76                           </Transform>
 77                      </Transform>
 78 
                    <!-- ROUTE information for EXPCLOCK node:  [from TimeFilter.startEventTime to set_startTime ] [from fraction_changed to EXPINTERP.set_fraction ] [from fraction_changed to EXPINTERP1.set_fraction ] [from fraction_changed to EXPINTERP2.set_fraction ] -->
                    <TimeSensor DEF='EXPCLOCKcycleInterval='16'/>
 79 
                    <!-- ROUTE information for EXPCLOCK1 node:  [from TimeFilter.startEventTime to set_startTime ] -->
                    <TimeSensor DEF='EXPCLOCK1cycleInterval='16'/>
 80 
                    <!-- ROUTE information for EXPCLOCK2 node:  [from TimeFilter.startEventTime to set_startTime ] -->
                    <TimeSensor DEF='EXPCLOCK2cycleInterval='16'/>
 81 
                    <!-- ROUTE information for EXPINTERP node:  [from EXPCLOCK.fraction_changed to set_fraction ] [from value_changed to EXPLOSION.set_scale ] [from value_changed to EXPLOSION1.set_scale ] [from value_changed to EXPLOSION2.set_scale ] -->
                    <PositionInterpolator DEF='EXPINTERPkey='0 .25 .5 1keyValue='1 1 1 2.5 2.5 2.5 3 3 3 .01 .01 .01'/>
 82 
                    <!-- ROUTE information for EXPINTERP1 node:  [from EXPCLOCK.fraction_changed to set_fraction ] -->
                    <PositionInterpolator DEF='EXPINTERP1key='0 .2 .5 1keyValue='.05 .05 .05 2.5 2.5 2.5 3 3 3 .01 .01 .01'/>
 83 
                    <!-- ROUTE information for EXPINTERP2 node:  [from EXPCLOCK.fraction_changed to set_fraction ] -->
                    <PositionInterpolator DEF='EXPINTERP2key='0 .1 .5 1keyValue='.4 .4 .4 2.5 2.5 2.5 3 3 3 .01 .01 .01'/>
 84                      < ROUTE  fromNode='TimeFilter' fromField='startEventTime' toNode='EXPCLOCK' toField='set_startTime'/>
 85                      < ROUTE  fromNode='TimeFilter' fromField='startEventTime' toNode='EXPCLOCK1' toField='set_startTime'/>
 86                      < ROUTE  fromNode='TimeFilter' fromField='startEventTime' toNode='EXPCLOCK2' toField='set_startTime'/>
 87                      < ROUTE  fromNode='TimeFilter' fromField='startEventTime' toNode='IMPACT' toField='set_startTime'/>
 88                      < ROUTE  fromNode='EXPCLOCK' fromField='fraction_changed' toNode='EXPINTERP' toField='set_fraction'/>
 89                      < ROUTE  fromNode='EXPCLOCK' fromField='fraction_changed' toNode='EXPINTERP1' toField='set_fraction'/>
 90                      < ROUTE  fromNode='EXPCLOCK' fromField='fraction_changed' toNode='EXPINTERP2' toField='set_fraction'/>
 91                      < ROUTE  fromNode='EXPINTERP' fromField='value_changed' toNode='EXPLOSION' toField='set_scale'/>
 92                      < ROUTE  fromNode='EXPINTERP' fromField='value_changed' toNode='EXPLOSION1' toField='set_scale'/>
 93                      < ROUTE  fromNode='EXPINTERP' fromField='value_changed' toNode='EXPLOSION2' toField='set_scale'/>
 94                 </ProtoBody>
 95            </ProtoDeclare>
 96            <!-- ==================== -->
 97            <Background skyColor='0.604 0.753 0.804'/>
 98            <Anchor description='Missile Explosion Exampleparameter='"target=_blank"'   url=' "MissileExplosionExample.wrl" "../../Weapons/Missiles/MissileExplosionExample.wrl" "https://savage.nps.edu/Savage/Weapons/Missiles/MissileExplosionExample.wrl" "MissileExplosionExample.x3d" "../../Weapons/Missiles/MissileExplosionExample.x3d" "https://savage.nps.edu/Savage/Weapons/Missiles/MissileExplosionExample.x3d" '>
 99                 <Shape>
100                      <Text string='"MultipleExplosionPrototype" "is a prototype declaration file" "" "To see an example scene" "click on this text and view" "MultipleExplosionExample"'>
101                           <FontStyle justify='"MIDDLE" "MIDDLE"'/>
102                      </Text>
103                      <Appearance/>
104                 </Shape>
105            </Anchor>
106       </Scene>
107  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top Index for DEF nodes: EXPCLOCK, EXPCLOCK1, EXPCLOCK2, EXPINTERP, EXPINTERP1, EXPINTERP2, EXPLOSION, explosion, EXPLOSION1, EXPLOSION2, EXPSHAPE, EXPSHAPE1, EXPSHAPE2, IMPACT, TimeFilter

Index for ProtoDeclare definition: TLAMEXPLOSION
-->
X3D Tooltips element index: Anchor, Appearance, AudioClip, Background, connect, field, FontStyle, head, ImageTexture, IS, meta, PositionInterpolator, ProtoBody, ProtoDeclare, ProtoInterface, ROUTE, Scene, Script, Shape, Sound, Sphere, Text, TimeSensor, Transform, WorldInfo, X3D, plus documentation for accessType definitions, type definitions, XML data types, and field types

Event Graph ROUTE Table entries with 10 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.

EXPCLOCK1
TimeSensor
No ROUTE connection found for output events from this node. 

EXPCLOCK2
TimeSensor
No ROUTE connection found for output events from this node. 

TimeFilter
Script
startEventTime
SFTime

ROUTE
event to
(1)
EXPCLOCK
TimeSensor
set_startTime
SFTime
then
 
 
 
EXPCLOCK
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
EXPINTERP
PositionInterpolator
set_fraction
SFFloat
then
 
 
 
EXPINTERP
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
EXPLOSION
Transform
set_scale
SFVec3f
  then
 
 
 
EXPINTERP
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
EXPLOSION1
Transform
set_scale
SFVec3f
  then
 
 
 
EXPINTERP
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
EXPLOSION2
Transform
set_scale
SFVec3f
  then
 
 
 
EXPCLOCK
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
EXPINTERP1
PositionInterpolator
set_fraction
SFFloat
  then
 
 
 
EXPCLOCK
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
EXPINTERP2
PositionInterpolator
set_fraction
SFFloat
TimeFilter
Script
startEventTime
SFTime

ROUTE
event to
(1)
EXPCLOCK1
TimeSensor
set_startTime
SFTime
TimeFilter
Script
startEventTime
SFTime

ROUTE
event to
(1)
EXPCLOCK2
TimeSensor
set_startTime
SFTime
TimeFilter
Script
startEventTime
SFTime

ROUTE
event to
(1)
IMPACT
AudioClip
set_startTime
SFTime

line 98
Anchor
description='Missile Explosion Example' 
User-interaction hint for this node. 

Additional guidance on X3D animation can be found in the 10-Step Animation Design Process and Event Tracing hint sheets. Have fun with X3D! 😀

-->
<!-- Online at
https://savage.nps.edu/Savage/Weapons/Missiles/MultipleExplosionPrototypeIndex.html -->
<!-- Version control at
https://gitlab.nps.edu/Savage/Savage/Weapons/Missiles/MultipleExplosionPrototype.x3d -->

<!-- Color-coding legend: X3D terminology <X3dNode  DEF='idNamefield='value'/> matches XML terminology <XmlElement  DEF='idNameattribute='value'/>
(Light-blue background: event-based behavior node or statement) (Grey background inside box: inserted documentation) (Magenta background: X3D Extensibility)
    <ProtoDeclare name='ProtoName'> <field name='fieldName'/> </ProtoDeclare> -->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->