1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "https://www.web3d.org/specifications/x3d-3.2.dtd">
|
3 | <X3D profile='Immersive' version='3.2' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.2.xsd'> |
4 | <head> |
5 | <meta name='title' content=' FiftyCaliberGunFiring.x3d '/> |
6 | <meta name='description' content='Brazilian Naval Academy Training Ship 50cal firing against other Ship during night'/> |
7 | <meta name='creator' content='Claudio Coreixas'/> |
8 | <meta name='created' content='20 October 2009'/> |
9 | <meta name='modified' content='20 October 2019'/> |
10 | <meta name='reference' content='http://www.en.mar.mil.br'/> |
11 | <meta name='subject' content='ships'/> |
12 | <meta name='info' content='Headlight is off, lighting is controlled when shooting'/> |
13 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/PatrolCraftNavalAcademyBrazil/FiftyCaliberGunFiring.x3d '/> |
14 | <meta name='generator' content='X3D-Edit, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
15 | <meta name='license' content='../../license.html'/> |
16 | </head> |
17 | <Scene> |
18 | <Sound maxBack='100' maxFront='100'> |
19 | <AudioClip DEF='boat' description='ambient sound, licensed from http://www.1soundfx.com/infopage.php#license' loop='true' url=' "boatSoundedit.wav" "https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/PatrolCraftNavalAcademyBrazil/boatSoundedit.wav" '/> |
20 | </Sound> |
21 | <NavigationInfo headlight='false' type='"EXAMINE"'/> |
22 | <WorldInfo info='"an Butakov MOB scene"' title='Butakov'/> |
23 | <Background skyAngle='0.7 0' skyColor='0.478431 0.160784 1 0.701961 0.776471 1 0.380392 0.384314 1'/> |
24 | <Viewpoint description='top' orientation='1 0 0 -1.57' position='0 20 0'/> |
25 |
<!-- ROUTE information for MovementTimer node:
[from fraction_changed to MovetheShip.set_fraction
]
[from fraction_changed to SpinTheShip.set_fraction
]
[from fraction_changed to SpinTheShip2.set_fraction
]
-->
<TimeSensor DEF='MovementTimer' cycleInterval='60' loop='true'/> |
26 |
<!-- ROUTE information for spintTimer node:
[from fraction_changed to SpinTheShip3.set_fraction
]
-->
<TimeSensor DEF='spintTimer' cycleInterval='4' loop='true'/> |
27 |
<!-- ROUTE information for MovetheShip node:
[from MovementTimer.fraction_changed to set_fraction
]
[from value_changed to Ship3.translation
]
-->
<PositionInterpolator DEF='MovetheShip' key='0 0.0625 0.125 0.1875 0.25 0.3125 0.375 0.4375 0.5 0.5625 0.625 0.6875 0.75 0.8125 0.875 0.9375 1' keyValue='10.00 0.00 0.00 9.24 0.00 3.82 7.07 0.00 7.07 3.83 0.00 9.24 0.01 0.00 10.00 -3.82 0.00 9.24 -7.06 0.00 7.08 -9.23 0.00 3.84 -10.00 0.00 0.02 -9.25 0.00 -3.81 -7.09 0.00 -7.06 -3.85 0.00 -9.23 -0.02 0.00 -10.00 3.80 0.00 -9.25 7.05 0.00 -7.09 9.23 0.00 -3.85 10.00 0.00 0.00'/> |
28 | < ROUTE fromNode='MovementTimer' fromField='fraction_changed' toNode='MovetheShip' toField='set_fraction'/> |
29 |
<!-- ROUTE information for SpinTheShip node:
[from MovementTimer.fraction_changed to set_fraction
]
[from value_changed to Ship.rotation
]
-->
<OrientationInterpolator DEF='SpinTheShip' key='0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1' keyValue='1 0 0 0 1 0 0 -0.2 1 0 0 -0.1 1 0 0 -0.05 1 0 0 -0 1 0 0 -0.06 1 0 0 -0.07 1 0 0 -0.1 1 0 0 -0.12 1 0 0 -0.18 1 0 0 0'/> |
30 | < ROUTE fromNode='MovementTimer' fromField='fraction_changed' toNode='SpinTheShip' toField='set_fraction'/> |
31 |
<!-- ROUTE information for SpinTheShip2 node:
[from MovementTimer.fraction_changed to set_fraction
]
[from value_changed to Ship2.rotation
]
-->
<OrientationInterpolator DEF='SpinTheShip2' key='0 0.25 0.5 0.75 1' keyValue='0 1 0 -1.57 0 1 0 -3.14 0 1 0 -4.71 0 1 0 0 0 1 0 -1.57'/> |
32 | < ROUTE fromNode='MovementTimer' fromField='fraction_changed' toNode='SpinTheShip2' toField='set_fraction'/> |
33 |
<!-- ROUTE information for SpinTheShip3 node:
[from spintTimer.fraction_changed to set_fraction
]
[from value_changed to Ship4.rotation
]
-->
<OrientationInterpolator DEF='SpinTheShip3' key='0 0.5 1' keyValue='0 0 1 -0.05 0 0 1 0.05 0 0 1 -0.05'/> |
34 | < ROUTE fromNode='spintTimer' fromField='fraction_changed' toNode='SpinTheShip3' toField='set_fraction'/> |
35 |
<!-- ROUTE information for Ship3 node:
[from MovetheShip.value_changed to translation
]
-->
<Transform DEF='Ship3'> |
36 | < ROUTE fromNode='MovetheShip' fromField='value_changed' toNode='Ship3' toField='translation'/> |
37 | <Viewpoint description='top Moving' orientation='1 0 0 -1.57079' position='0 3 0'/> |
38 |
<!-- ROUTE information for Ship2 node:
[from SpinTheShip2.value_changed to rotation
]
-->
<Transform DEF='Ship2'> |
39 | < ROUTE fromNode='SpinTheShip2' fromField='value_changed' toNode='Ship2' toField='rotation'/> |
40 | <Viewpoint description='Stern' orientation='0 1 0 -1.57' position='-3 0.5 0'/> |
41 | <Viewpoint description='bow' orientation='0 1 0 1.57' position='3 0.5 0'/> |
42 | <Viewpoint description='bow Close' orientation='0 1 0 1.57' position='1 0.3 0'/> |
43 | <Viewpoint description='stbd Bow' orientation='-0.3162 0.9487 0 0.8117' position='1 0.5 1'/> |
44 | <Viewpoint description='stbd Bridge Outside' orientation='0 0.6247 0 0.8179' position='0.5 0.2 0.6'/> |
45 | <Viewpoint description='port Bow' orientation='0 0.9487 0 2.3299' position='1.5 0.5 -1.5'/> |
46 | <Viewpoint description='stbd Quarter' orientation='-0.3162 -0.9487 0 0.8117' position='-1.5 0.25 1.5'/> |
47 | <Viewpoint description='port Quarter' orientation='0 -0.9487 0 2.3299' position='-1.5 0.25 -1.5'/> |
48 |
<!-- ROUTE information for Ship node:
[from SpinTheShip.value_changed to rotation
]
-->
<Transform DEF='Ship'> |
49 | < ROUTE fromNode='SpinTheShip' fromField='value_changed' toNode='Ship' toField='rotation'/> |
50 | <Viewpoint description='StbRudder' orientation='0 1 0 -1.57' position='-0.9 -0.1 0.14'/> |
51 |
<!-- ROUTE information for Ship4 node:
[from SpinTheShip3.value_changed to rotation
]
-->
<Transform DEF='Ship4'> |
52 | <Viewpoint description='.50 caliber gun' orientation='0 1 0 1.57' position='-0.05 0.28 0'/> |
53 | <Viewpoint description='Bridge' fieldOfView='0.43' orientation='0 -0.9935 0 1.57079' position='0.14 0.27 0'/> |
54 | <Viewpoint description='Radar' fieldOfView='0.45' orientation='-0.1888 -0.982 0 1.57079' position='-0.6 0.5 0'/> |
55 | < ROUTE fromNode='SpinTheShip3' fromField='value_changed' toNode='Ship4' toField='rotation'/> |
56 | <Transform translation='-0.23 2.5 0'> |
57 |
<!-- ROUTE information for gunLight node:
[from Converter.SFFloat_Yout to intensity
]
-->
<SpotLight DEF='gunLight' beamWidth='0.05' color='0.721569 0.066667 0' cutOffAngle='0.03' direction='0 -1 0' radius='5'/> |
58 | </Transform> |
59 | <Transform scale='0.15 0.15 0.15'> |
60 | <Transform translation='-1.8 2.5 0'> |
61 | <Inline DEF='CoordinateAxes' url=' "CoordinateAxes.x3d" "../../Basic/course/CoordinateAxes.x3d" "../../../Savage/Tools/Authoring/CoordinateAxes.x3d" "https://www.web3d.org/x3d/content/examples/Basic/course/CoordinateAxes.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.x3d" "CoordinateAxes.wrl" "../../Basic/course/CoordinateAxes.wrl" "../../../Savage/Tools/Authoring/CoordinateAxes.wrl" "https://www.web3d.org/x3d/content/examples/Basic/course/CoordinateAxes.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.wrl" '/> |
62 | <SpotLight DEF='gunLight2' beamWidth='0.5' color='0.721569 0.066667 0' cutOffAngle='0.6' direction='0 -1 0' radius='3'/> |
63 | </Transform> |
64 | <Transform translation='-.8 1.33 0'> |
65 | <Transform rotation='1 0 0 1.57'> |
66 |
<!-- ROUTE information for dimmerAmplitude node:
[from translation_changed to Converter.SFVec3fY_SFFloat
]
[from translation_changed to dimmerLightGunBox.translation
]
-->
<PlaneSensor DEF='dimmerAmplitude' description='click and drag to dimm Light' maxPosition='0 .1'/> |
67 |
<!-- ROUTE information for dimmerLightGunBox node:
[from dimmerAmplitude.translation_changed to translation
]
-->
<Transform DEF='dimmerLightGunBox'> |
68 | <Shape> |
69 | <Appearance> |
70 | <Material ambientIntensity='1' diffuseColor='1 0 0'/> |
71 | </Appearance> |
72 | <Box size='.03 0.03 0.03'/> |
73 | </Shape> |
74 | </Transform> |
75 |
<!-- ROUTE information for Converter node:
[from dimmerAmplitude.translation_changed to SFVec3fY_SFFloat
]
[from SFFloat_Yout to gunLight.intensity
]
-->
<Script DEF='Converter'> |
76 | <field name='SFVec3fY_SFFloat' type='SFVec3f' accessType='inputOnly'/> |
77 | <field name='SFFloat_Yout' type='SFFloat' accessType='outputOnly'/> |
<![CDATA[
ecmascript: // Author: Claudio Coreixas // Created: 19 November 2009 function SFVec3fY_SFFloat (value) { SFFloat_Yout = 30 * value[1]; }
]]>
|
|
79 | </Script> |
80 | < ROUTE fromNode='dimmerAmplitude' fromField='translation_changed' toNode='Converter' toField='SFVec3fY_SFFloat'/> |
81 | < ROUTE fromNode='dimmerAmplitude' fromField='translation_changed' toNode='dimmerLightGunBox' toField='translation'/> |
82 | < ROUTE fromNode='Converter' fromField='SFFloat_Yout' toNode='gunLight' toField='intensity'/> |
83 | </Transform> |
84 | </Transform> |
85 | <Transform translation='-.65 1.33 0'> |
86 | <Transform rotation='1 0 0 1.57'> |
87 |
<!-- ROUTE information for dimmerGeneralLightAmplitude node:
[from translation_changed to Converter2.SFVec3fY_SFFloat
]
[from translation_changed to dimmerGeneralLight.translation
]
-->
<PlaneSensor DEF='dimmerGeneralLightAmplitude' description='click and drag to dimm General Light' maxPosition='0 .1'/> |
88 |
<!-- ROUTE information for dimmerGeneralLight node:
[from dimmerGeneralLightAmplitude.translation_changed to translation
]
-->
<Transform DEF='dimmerGeneralLight'> |
89 | <Shape> |
90 | <Appearance> |
91 | <Material ambientIntensity='1' diffuseColor='1 0 0'/> |
92 | </Appearance> |
93 | <Box size='.03 0.03 0.03'/> |
94 | </Shape> |
95 | </Transform> |
96 | </Transform> |
97 | </Transform> |
98 | <Inline url=' "U11.x3d" "https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/PatrolCraftNavalAcademyBrazil/U11.x3d" '/> |
99 | </Transform> |
100 | </Transform> |
101 | </Transform> |
102 | </Transform> |
103 | </Transform> |
104 | <Transform scale='0.15 0.15 0.15'> |
105 | <Inline url=' "U11.x3d" "https://www.web3d.org/x3d/content/examples/Savage/ShipsMilitary/PatrolCraftNavalAcademyBrazil/U11.x3d" '/> |
106 | </Transform> |
107 | <Transform translation='0 -5 0'> |
108 | <Shape DEF='ocean'> |
109 | <Appearance> |
110 | <Material ambientIntensity='1' diffuseColor='0 0.219608 0.419608' shininess='1' transparency='0.16'/> |
111 | </Appearance> |
112 | <Box size='200 10 200' solid='false'/> |
113 | </Shape> |
114 | </Transform> |
115 |
<!-- ROUTE information for generalLight node:
[from Converter2.SFFloat_Yout to intensity
]
-->
<PointLight DEF='generalLight' intensity='0.05' location='0 30 -1'/> |
116 |
<!-- ROUTE information for Converter2 node:
[from dimmerGeneralLightAmplitude.translation_changed to SFVec3fY_SFFloat
]
[from SFFloat_Yout to generalLight.intensity
]
-->
<Script DEF='Converter2'> |
117 | <field name='SFVec3fY_SFFloat' type='SFVec3f' accessType='inputOnly'/> |
118 | <field name='SFFloat_Yout' type='SFFloat' accessType='outputOnly'/> |
<![CDATA[
ecmascript: // Author: Claudio Coreixas // Created: 19 November 2009 function SFVec3fY_SFFloat (value) { SFFloat_Yout = 10 * value[1]; }
]]>
|
|
120 | </Script> |
121 | < ROUTE fromNode='dimmerGeneralLightAmplitude' fromField='translation_changed' toNode='Converter2' toField='SFVec3fY_SFFloat'/> |
122 | < ROUTE fromNode='dimmerGeneralLightAmplitude' fromField='translation_changed' toNode='dimmerGeneralLight' toField='translation'/> |
123 | < ROUTE fromNode='Converter2' fromField='SFFloat_Yout' toNode='generalLight' toField='intensity'/> |
124 | </Scene> |
125 | </X3D> |
Event Graph ROUTE Table entries with 14 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.
MovementTimer
TimeSensor fraction_changed SFFloat |
MovetheShip
PositionInterpolator set_fraction SFFloat |
then
|
MovetheShip
PositionInterpolator value_changed SFVec3f |
Ship3
Transform translation SFVec3f |
||
MovementTimer
TimeSensor fraction_changed SFFloat |
SpinTheShip
OrientationInterpolator set_fraction SFFloat |
then
|
SpinTheShip
OrientationInterpolator value_changed SFRotation |
Ship
Transform rotation SFRotation |
||
MovementTimer
TimeSensor fraction_changed SFFloat |
SpinTheShip2
OrientationInterpolator set_fraction SFFloat |
then
|
SpinTheShip2
OrientationInterpolator value_changed SFRotation |
Ship2
Transform rotation SFRotation |
spintTimer
TimeSensor fraction_changed SFFloat |
SpinTheShip3
OrientationInterpolator set_fraction SFFloat |
then
|
SpinTheShip3
OrientationInterpolator value_changed SFRotation |
Ship4
Transform rotation SFRotation |
dimmerAmplitude
PlaneSensor translation_changed SFVec3f |
Converter
Script SFVec3fY_SFFloat SFVec3f |
then
|
Converter
Script SFFloat_Yout SFFloat |
gunLight
SpotLight intensity SFFloat |
dimmerAmplitude
PlaneSensor translation_changed SFVec3f |
dimmerLightGunBox
Transform translation SFVec3f |
dimmerGeneralLightAmplitude
PlaneSensor translation_changed SFVec3f |
Converter2
Script SFVec3fY_SFFloat SFVec3f |
then
|
Converter2
Script SFFloat_Yout SFFloat |
generalLight
PointLight intensity SFFloat |
dimmerGeneralLightAmplitude
PlaneSensor translation_changed SFVec3f |
dimmerGeneralLight
Transform translation SFVec3f |
<!--
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.
-->