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=' RifleM24Prototype.x3d '/> |
6 | <meta name='description' content='Prototype of M24 bolt-action sniper rifle used by the US Army.'/> |
7 | <meta name='creator' content='Etsuko Lippi'/> |
8 | <meta name='created' content='21 December 2001'/> |
9 | <meta name='modified' content='28 November 2019'/> |
10 | <meta name='reference' content=' https://www.fas.org/man/dod-101/sys/land/m14.htm '/> |
11 | <meta name='reference' content=' http://www.dentrinity.com/Topics/m24perfect.htm '/> |
12 | <meta name='reference' content=' http://www.empnet.com/imageworks/raj2.htm '/> |
13 | <meta name='reference' content=' http://www.thepocket.com/waveffects.htm '/> |
14 | <meta name='subject' content='M24 Rifle'/> |
15 | <meta name='Sound' content='RifleFire.wav from The Hollywood Edge, Military and Aircraft Collection PE-23, Track 28'/> |
16 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/Savage/Weapons/SmallArms/RifleM24Prototype.x3d '/> |
17 | <meta name='generator' content='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
18 | <meta name='license' content='../../license.html'/> |
19 | </head> |
20 | <Scene> |
21 | <WorldInfo title='RifleM24Prototype.x3d'/> |
22 | <ProtoDeclare name='RifleM24' appinfo='Rifle M24'> |
23 | <ProtoInterface> |
24 |
<field name='trigger' type='SFBool' accessType='inputOnly'
appinfo='input true to fire'/> |
25 |
<field name='fire' type='SFBool' accessType='outputOnly'
appinfo='output true when fired'/> |
26 |
<field name='animationStartTime' type='SFTime' accessType='inputOnly'
appinfo='trigger animation'/> |
27 | </ProtoInterface> |
28 | <ProtoBody> |
29 | <Group> |
30 | <Viewpoint description='M24 sniper rifle' position='-4 -.1 10'/> |
31 | <LOD range='100'> |
32 | <Group> |
33 | <Group DEF='Viewpoints'> |
34 | <!-- High Resolution --> |
35 | <Viewpoint description='M24 from ahead' orientation='0.009 .999 0.036 1.5266' position='4.1 0 .4'/> |
36 | <Viewpoint description='M24 left-over-the-shoulder view' orientation='-0.008 1 -0.015 4.6497' position='-12.2 -.8 -3'/> |
37 | <Viewpoint description='M24 right-over-the-shoulder view' orientation='-0.008 1 -0.015 4.6497' position='-13.2 -.7 1.8'/> |
38 | <Viewpoint description='M24 scope view' fieldOfView='0.099' orientation='0.003 -1 -0.015 1.5497' position='-7 .4 0'/> |
39 | </Group> |
40 | <Group DEF='High'> |
41 |
<!-- ROUTE information for ShootShockTransform node:
[from ShootShockInterpolator.value_changed to set_translation
]
-->
<Transform DEF='ShootShockTransform' scale='10 10 10'> |
42 |
<!-- ROUTE information for BulletTransform node:
[from TriggerInterpolator.value_changed to set_translation
]
-->
<Transform DEF='BulletTransform' rotation='0 0 1 -1.57' scale='0.8 1 0.8' translation='-0.64 0.0 0'> |
43 | <Shape> |
44 | <Appearance DEF='BulletColor'> |
45 | <Material ambientIntensity='0.1' diffuseColor='0.804 0.678 0' shininess='0.1' specularColor='0.85 0.85 0.85'/> |
46 | </Appearance> |
47 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.013 0.00494 0.01196 0.00923 0.00923 0.01196 0.00494 0.013 0.00 0.01196 -0.00494 0.00923 -0.00923 0.00494 -0.01196 0.00 -0.013 -0.00494 -0.01196 -0.00923 -0.00923 -0.01196 -0.00494 -0.013 -0.0 -0.01196 0.00494 -0.00923 0.00923 -0.00494 0.01196 0.00 0.013' scale='0.75 0.75 0.75 0.75 0.7 0.7 0.65 0.65 0.55 0.55 0.4 0.4 0.25 0.25 0.1 0.1' spine='0 0.125 0 0 0.13 0 0 0.135 0 0 0.165 0 0 0.17 0 0 0.175 0 0 0.18 0 0 0.185 0'/> |
48 | </Shape> |
49 | </Transform> |
50 | <Transform DEF='Barrel' rotation='0.58 -0.58 0.58 2.09'> |
51 | <Transform DEF='BarrelPoint' translation='0 -0.1 0'> |
52 | <Shape> |
53 | |
54 | <Material ambientIntensity='0.1' diffuseColor='0.5 0.5 0.5' shininess='0.8' specularColor='0.85 0.85 0.85'/> |
55 | </Appearance> |
56 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.013 0.00494 0.01196 0.00923 0.00923 0.01196 0.00494 0.013 0.00 0.01196 -0.00494 0.00923 -0.00923 0.00494 -0.01196 0.00 -0.013 -0.00494 -0.01196 -0.00923 -0.00923 -0.01196 -0.00494 -0.013 -0.0 -0.01196 0.00494 -0.00923 0.00923 -0.00494 0.01196 0.00 0.013 0.0 0.012 -0.00425 0.0109 -0.0085 0.0085 -0.0109 0.00425 -0.012 -0.0 -0.0109 -0.00425 -0.0085 -0.0085 -0.00425 -0.0109 0.0 -0.012 0.00425 -0.0109 .0085 -0.0085 0.0109 -0.00425 0.012 0.0 0.0109 0.00425 0.0085 0.0085 0.00425 0.0109 0.0 0.012' scale='0.9 0.9 0.55 0.55' spine='0 0 0 0 -0.005 0'/> |
57 | </Shape> |
58 | </Transform> |
59 |
<!-- ROUTE information for FlashTransform node:
[from FlashInterpolator.value_changed to set_translation
]
-->
<Transform DEF='FlashTransform' translation='0 0.15 0'> |
60 | <Transform DEF='Flame1' rotation='0 0 1 3.14' scale='0.02 0.12 0.02'> |
61 | <Shape> |
62 | <IndexedFaceSet coordIndex='0 1 2 -1 3 4 5 -1 6 7 8 -1'> |
63 | <Coordinate point='0.25 0.0 0.00 0.15 1.0 0.10 0.05 0.0 0.15 0.18 0.0 0.05 0.00 1.2 0.05 -0.10 0.0 0.05 -0.00 0.0 0.15 -0.13 0.8 0.10 -0.25 0.0 0.00'/> |
64 | <Color color='0.9 0.5 0.0 0.9 0.5 0 0.8 0.3 0.0 0.9 0.3 0 1.0 1.0 0.0 0.9 0.3 0 0.7 0.1 0.2 0.9 0.8 0 1.0 0.0 0.0'/> |
65 | </IndexedFaceSet> |
66 | </Shape> |
67 | </Transform> |
68 | <Transform DEF='Flame2' rotation='0.71 0 0.71 3.14' scale='0.02 0.1 0.02'> |
69 | <Shape> |
70 | <IndexedFaceSet coordIndex='0 1 2 -1 3 4 5 -1 6 7 8 -1'> |
71 | <Coordinate point='0.25 0.0 0.00 0.15 1.0 0.10 0.05 0.0 0.15 0.18 0.0 0.05 0.00 1.2 0.05 -0.10 0.0 0.05 -0.00 0.0 0.15 -0.13 0.8 0.10 -0.25 0.0 0.00'/> |
72 | <Color color='1.0 1.0 1.0 0.9 0.9 0.9 0.804 0.788 0.788 0.8 0.8 0.8 1.0 1.0 1.0 1.0 1.0 0.0 0.7 0.7 0.7 0.9 0.8 0.9 1.0 0.498 0'/> |
73 | </IndexedFaceSet> |
74 | </Shape> |
75 | </Transform> |
76 | <Transform DEF='Flame3' rotation='0.79 0 0.61 3.14' scale='0.02 0.1 0.02'> |
77 | <Shape> |
78 | <IndexedFaceSet coordIndex='0 1 2 -1 3 4 5 -1 6 7 8 -1'> |
79 | <Coordinate point='0.25 0.0 0.00 0.15 1.0 0.10 0.05 0.0 0.15 0.18 0.0 0.05 0.00 1.2 0.05 -0.10 0.0 0.05 -0.00 0.0 0.15 -0.13 0.8 0.10 -0.25 0.0 0.00'/> |
80 | <Color color='1.0 1.0 1.0 0.9 0.9 0.9 0.804 0.788 0.788 0.8 0.8 0.8 1.0 1.0 1.0 1.0 1.0 0.0 0.7 0.7 0.7 0.9 0.8 0.9 1.0 0.498 0'/> |
81 | </IndexedFaceSet> |
82 | </Shape> |
83 | </Transform> |
84 | </Transform> |
85 | <Transform DEF='BarrelFront' translation='0 -0.1 0'> |
86 | <Shape> |
87 | <Appearance USE='BarrelColor'/> |
88 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.013 0.00494 0.01196 0.00923 0.00923 0.01196 0.00494 0.013 0.00 0.01196 -0.00494 0.00923 -0.00923 0.00494 -0.01196 0.00 -0.013 -0.00494 -0.01196 -0.00923 -0.00923 -0.01196 -0.00494 -0.013 -0.0 -0.01196 0.00494 -0.00923 0.00923 -0.00494 0.01196 0.00 0.013 0.0 0.012 -0.00425 0.0109 -0.0085 0.0085 -0.0109 0.00425 -0.012 -0.0 -0.0109 -0.00425 -0.0085 -0.0085 -0.00425 -0.0109 0.0 -0.012 0.00425 -0.0109 .0085 -0.0085 0.0109 -0.00425 0.012 0.0 0.0109 0.00425 0.0085 0.0085 0.00425 0.0109 0.0 0.012' spine='0 0 0 0 0.05 0'/> |
89 | </Shape> |
90 | </Transform> |
91 | <Transform DEF='BarrelCenter'> |
92 | <Shape> |
93 | <Appearance USE='BarrelColor'/> |
94 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.013 0.00494 0.01196 0.008 0.008 0.01196 0.00494 0.013 0.00 0.01196 -0.00494 0.008 -0.008 0.00494 -0.01196 0.00 -0.013 -0.00494 -0.01196 -0.008 -0.008 -0.01196 -0.00494 -0.013 -0.0 -0.01196 0.00494 -0.008 0.008 -0.00494 0.01196 0.00 0.013 0.0 0.012 -0.00425 0.0109 -0.0085 0.0085 -0.0109 0.00425 -0.012 -0.0 -0.0109 -0.00425 -0.0085 -0.0085 -0.00425 -0.0109 0.0 -0.012 0.00425 -0.0109 .0085 -0.0085 0.0109 -0.00425 0.012 0.0 0.0109 0.00425 0.0085 0.0085 0.00425 0.0109 0.0 0.012' spine='0.0 -0.1 0.0 0.0 0.35 0.0'/> |
95 | </Shape> |
96 | </Transform> |
97 | <Transform DEF='BarrelBack' translation='0 0.42 0'> |
98 | <Shape> |
99 | <Appearance USE='BarrelColor'/> |
100 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.013 0.00494 0.01196 0.00923 0.00923 0.01196 0.00494 0.013 0.00 0.01196 -0.00494 0.00923 -0.00923 0.00494 -0.01196 0.00 -0.013 -0.00494 -0.01196 -0.00923 -0.00923 -0.01196 -0.00494 -0.013 -0.0 -0.01196 0.00494 -0.00923 0.00923 -0.00494 0.01196 0.00 0.013 0.0 0.012 -0.00425 0.0109 -0.0085 0.0085 -0.0109 0.00425 -0.012 -0.0 -0.0109 -0.00425 -0.0085 -0.0085 -0.00425 -0.0109 0.0 -0.012 0.00425 -0.0109 .0085 -0.0085 0.0109 -0.00425 0.012 0.0 0.0109 0.00425 0.0085 0.0085 0.00425 0.0109 0.0 0.012' spine='0 -0.07 0 0 0.05 0'/> |
101 | </Shape> |
102 | </Transform> |
103 | <Transform DEF='BarrelBulletLoad' rotation='0 1 0 1.3' translation='0 0.42 0'> |
104 | <Shape> |
105 | <Appearance USE='BarrelColor'/> |
106 | <Extrusion creaseAngle='1.57' crossSection='0.013 0.00 0.01196 -0.00494 0.00923 -0.00923 0.00494 -0.01196 0.00 -0.013 -0.00494 -0.01196 -0.00923 -0.00923 -0.01196 -0.00494 -0.013 -0.0 -0.01196 0.00494 -0.00923 0.00923 -0.00494 0.01196 0.00 0.013 0.0 0.012 -0.00425 0.0109 -0.0085 0.0085 -0.0109 0.00425 -0.012 -0.0 -0.0109 -0.00425 -0.0085 -0.0085 -0.00425 -0.0109 0.0 -0.012 0.00425 -0.0109 .0085 -0.0085 0.0109 -0.00425 0.012 0.0' spine='0 0.05 0 0 0.10 0'/> |
107 | </Shape> |
108 | </Transform> |
109 | <Transform DEF='BarrelBulletLoadEnd' translation='0 0.42 0'> |
110 | <Shape> |
111 | <Appearance USE='BarrelColor'/> |
112 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.013 0.00494 0.01196 0.00923 0.00923 0.01196 0.00494 0.013 0.00 0.01196 -0.00494 0.00923 -0.00923 0.00494 -0.01196 0.00 -0.013 -0.00494 -0.01196 -0.00923 -0.00923 -0.01196 -0.00494 -0.013 -0.0 -0.01196 0.00494 -0.00923 0.00923 -0.00494 0.01196 0.00 0.013 0.0 0.012 -0.00425 0.0109 -0.0085 0.0085 -0.0109 0.00425 -0.012 -0.0 -0.0109 -0.00425 -0.0085 -0.0085 -0.00425 -0.0109 0.0 -0.012 0.00425 -0.0109 .0085 -0.0085 0.0109 -0.00425 0.012 0.0 0.0109 0.00425 0.0085 0.0085 0.00425 0.0109 0.0 0.012' spine='0 0.10 0 0 0.123 0'/> |
113 | </Shape> |
114 | </Transform> |
115 | <Transform DEF='BarrelEnd' scale='0.9 1.1 0.9' translation='0 0.405 0'> |
116 | <Shape> |
117 |
<!-- Appearance
BarrelEndColor is a DEF node that has 1 USE node: USE_1 -->
<Appearance DEF='BarrelEndColor'> |
118 | <Material ambientIntensity='0.1' diffuseColor='0.85 0.85 0.85' shininess='0.8' specularColor='0.85 0.85 0.85'/> |
119 | </Appearance> |
120 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.013 0.00494 0.01196 0.00923 0.00923 0.01196 0.00494 0.013 0.00 0.01196 -0.00494 0.00923 -0.00923 0.00494 -0.01196 0.00 -0.013 -0.00494 -0.01196 -0.00923 -0.00923 -0.01196 -0.00494 -0.013 -0.0 -0.01196 0.00494 -0.00923 0.00923 -0.00494 0.01196 0.00 0.013' scale='1.0 1.0 1.0 1.0 0.8 0.8 0.8 0.8 0.6 0.6' spine='0 0.125 0 0 0.13 0 0 0.135 0 0 0.14 0 0 0.15 0'/> |
121 | </Shape> |
122 | </Transform> |
123 | </Transform> |
124 | <Transform DEF='BulletGuide' rotation='0 1 0 1.57' translation='0.08 0.02 0.011'> |
125 | <Shape> |
126 | <Appearance> |
127 | <Material diffuseColor='0.3 0.3 0.3'/> |
128 | </Appearance> |
129 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.006 0.001 0.0057 0.001 -0.0057 0.0 -0.006 -0.001 -0.0057 -0.001 0.0057 0.0 0.006' scale='0.8 0.8 1.5 1.0' spine='0.01 0.0 0.0 0.01 -0.01 0.0'/> |
130 | </Shape> |
131 | </Transform> |
132 | <Transform DEF='Telescope' rotation='0.58 -0.58 0.58 2.09' translation='0 -0.01 0'> |
133 | <Transform DEF='TelescopeLensFront' translation='0 0.36 -0.05'> |
134 | <Shape> |
135 | <Appearance> |
136 | <Material diffuseColor='0.0941 0.455 0.804' emissiveColor='0.0941 0.455 0.804' shininess='0.8' transparency='0.55'/> |
137 | </Appearance> |
138 | <Cylinder height='0.005' radius='0.02'/> |
139 | </Shape> |
140 | </Transform> |
141 | <Transform DEF='CircleLine' rotation='1 0 0 1.57' scale='0.0215 0.0215 0.015' translation='0 0.35 -0.05'> |
142 | <Shape> |
143 | <Appearance> |
144 | <Material diffuseColor='0.957 0.643 0.376' emissiveColor='0.957 0.643 0.376'/> |
145 | </Appearance> |
146 | <IndexedLineSet coordIndex='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 -1 60 61 -1 62 63 -1'> |
147 | <Coordinate point='0.0 1.0 0.0 0.105 0.995 0.0 0.208 0.978 0.0 0.309 0.951 0.0 0.407 0.914 0.0 0.500 0.866 0.0 0.588 0.809 0.0 0.669 0.743 0.0 0.743 0.669 0.0 0.809 0.588 0.0 0.866 0.500 0.0 0.914 0.407 0.0 0.951 0.309 0.0 0.978 0.208 0.0 0.995 0.105 0.0 1.0 0.0 0.0 0.995 -0.105 0.0 0.978 -0.208 0.0 0.951 -0.309 0.0 0.914 -0.407 0.0 0.866 -0.500 0.0 0.809 -0.588 0.0 0.743 -0.669 0.0 0.669 -0.743 0.0 0.588 -0.809 0.0 0.500 -0.866 0.0 0.407 -0.914 0.0 0.309 -0.951 0.0 0.208 -0.978 0.0 0.105 -0.995 0.0 0.0 -1.0 0.0 -0.105 -0.995 0.0 -0.208 -0.978 0.0 -0.309 -0.951 0.0 -0.407 -0.914 0.0 -0.500 -0.866 0.0 -0.588 -0.809 0.0 -0.669 -0.743 0.0 -0.743 -0.669 0.0 -0.809 -0.588 0.0 -0.866 -0.500 0.0 -0.914 -0.407 0.0 -0.951 -0.309 0.0 -0.978 -0.208 0.0 -0.995 -0.105 0.0 -1.0 -0.0 0.0 -0.995 0.105 0.0 -0.978 0.208 0.0 -0.951 0.309 0.0 -0.914 0.407 0.0 -0.866 0.500 0.0 -0.809 0.588 0.0 -0.743 0.669 0.0 -0.669 0.743 0.0 -0.588 0.809 0.0 -0.500 0.866 0.0 -0.407 0.914 0.0 -0.309 0.951 0.0 -0.208 0.978 0.0 -0.105 0.995 0.0 0 1 0 0 -1 0 1 0 0 -1 0 0'/> |
148 | </IndexedLineSet> |
149 | </Shape> |
150 | </Transform> |
151 | <Transform DEF='TelescopeLensForEye' translation='0 0.58 -0.05'> |
152 | <Shape> |
153 | <Appearance> |
154 | <Material diffuseColor='0.0941 0.455 0.804' transparency='0.5'/> |
155 | </Appearance> |
156 | <Cylinder height='0.005' radius='0.016'/> |
157 | </Shape> |
158 | </Transform> |
159 | <Transform DEF='TelescopeMain' translation='0 0.35 -0.05'> |
160 | <Shape> |
161 |
<!-- Appearance
TelescopeColor is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
<Appearance DEF='TelescopeColor'> |
162 | <Material diffuseColor='0.2 0.2 0.2'/> |
163 | </Appearance> |
164 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.013 0.00494 0.01196 0.00923 0.00923 0.01196 0.00494 0.013 0.00 0.01196 -0.00494 0.00923 -0.00923 0.00494 -0.01196 0.00 -0.013 -0.00494 -0.01196 -0.00923 -0.00923 -0.01196 -0.00494 -0.013 -0.0 -0.01196 0.00494 -0.00923 0.00923 -0.00494 0.01196 0.00 0.013 0.0 0.012 -0.00425 0.0109 -0.0085 0.0085 -0.0109 0.00425 -0.012 -0.0 -0.0109 -0.00425 -0.0085 -0.0085 -0.00425 -0.0109 0.0 -0.012 0.00425 -0.0109 .0085 -0.0085 0.0109 -0.00425 0.012 0.0 0.0109 0.00425 0.0085 0.0085 0.00425 0.0109 0.0 0.012' scale='1.7 1.7 1.7 1.7 1.4 1.4 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.2 1.2 1.35 1.35 1.35 1.35 1.35 1.35' spine='0 0 0 0 0.03 0 0 0.05 0 0 0.07 0 0 0.1 0 0 0.15 0 0 0.17 0 0 0.20 0 0 0.23 0 0 0.24 0 0 0.25 0'/> |
165 | </Shape> |
166 | </Transform> |
167 | <Transform DEF='TelescopeBeltFront' translation='0 0.45 -0.05'> |
168 | <Shape> |
169 | <Appearance USE='BarrelColor'/> |
170 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.013 0.00494 0.01196 0.00923 0.00923 0.01196 0.00494 0.013 0.00 0.01196 -0.00494 0.00923 -0.00923 0.00494 -0.01196 0.00 -0.013 -0.00494 -0.01196 -0.00923 -0.00923 -0.01196 -0.00494 -0.013 -0.0 -0.01196 0.00494 -0.00923 0.00923 -0.00494 0.01196 0.00 0.013 0.0 0.012 -0.00425 0.0109 -0.0085 0.0085 -0.0109 0.00425 -0.012 -0.0 -0.0109 -0.00425 -0.0085 -0.0085 -0.00425 -0.0109 0.0 -0.012 0.00425 -0.0109 .0085 -0.0085 0.0109 -0.00425 0.012 0.0 0.0109 0.00425 0.0085 0.0085 0.00425 0.0109 0.0 0.012' scale='1.15 1.15 1.15 1.15' spine='0 0 0 0 0.015 0'/> |
171 | </Shape> |
172 | </Transform> |
173 | <Transform DEF='TelescopeBeltBack' translation='0 0.52 -0.05'> |
174 | <Shape> |
175 | <Appearance USE='BarrelColor'/> |
176 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.013 0.00494 0.01196 0.00923 0.00923 0.01196 0.00494 0.013 0.00 0.01196 -0.00494 0.00923 -0.00923 0.00494 -0.01196 0.00 -0.013 -0.00494 -0.01196 -0.00923 -0.00923 -0.01196 -0.00494 -0.013 -0.0 -0.01196 0.00494 -0.00923 0.00923 -0.00494 0.01196 0.00 0.013 0.0 0.012 -0.00425 0.0109 -0.0085 0.0085 -0.0109 0.00425 -0.012 -0.0 -0.0109 -0.00425 -0.0085 -0.0085 -0.00425 -0.0109 0.0 -0.012 0.00425 -0.0109 .0085 -0.0085 0.0109 -0.00425 0.012 0.0 0.0109 0.00425 0.0085 0.0085 0.00425 0.0109 0.0 0.012' scale='1.2 1.2 1.2 1.2' spine='0 0 0 0 0.015 0'/> |
177 | </Shape> |
178 | </Transform> |
179 | <Transform DEF='TelescopeBoltFront' rotation='1 0 0 1.57' scale='0.65 0.8 0.65' translation='0 0.458 -0.0365'> |
180 | <Shape> |
181 | <Appearance USE='BarrelColor'/> |
182 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.013 0.00494 0.01196 0.00923 0.00923 0.01196 0.00494 0.013 0.00 0.01196 -0.00494 0.00923 -0.00923 0.00494 -0.01196 0.00 -0.013 -0.00494 -0.01196 -0.00923 -0.00923 -0.01196 -0.00494 -0.013 -0.0 -0.01196 0.00494 -0.00923 0.00923 -0.00494 0.01196 0.00 0.013' scale='1.2 1.2 1.2 1.2' spine='0 0 0 0 0.02 0'/> |
183 | </Shape> |
184 | </Transform> |
185 | <Transform DEF='TelescopeBoltBack' rotation='1 0 0 1.57' scale='0.65 0.8 0.65' translation='0 0.53 -0.0365'> |
186 | <Shape> |
187 | <Appearance USE='BarrelColor'/> |
188 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.013 0.00494 0.01196 0.00923 0.00923 0.01196 0.00494 0.013 0.00 0.01196 -0.00494 0.00923 -0.00923 0.00494 -0.01196 0.00 -0.013 -0.00494 -0.01196 -0.00923 -0.00923 -0.01196 -0.00494 -0.013 -0.0 -0.01196 0.00494 -0.00923 0.00923 -0.00494 0.01196 0.00 0.013' scale='1.2 1.2 1.2 1.2' spine='0 0 0 0 0.02 0'/> |
189 | </Shape> |
190 | </Transform> |
191 | <Transform DEF='AdjustmentLeft' rotation='0 0 1 1.57' translation='-0.013 0.49 -0.048'> |
192 | <Shape> |
193 |
<!-- Appearance
TelescopeAdjustmentColor is a DEF node that has 3 USE nodes: USE_1, USE_2, USE_3 -->
<Appearance DEF='TelescopeAdjustmentColor'> |
194 | <Material diffuseColor='0.1 0.1 0.1' emissiveColor='0.3 0.3 0.3' shininess='0.7' specularColor='0.1 0.1 0.1'/> |
195 | </Appearance> |
196 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.013 0.00494 0.01196 0.008 0.008 0.01196 0.00494 0.013 0.00 0.01196 -0.00494 0.008 -0.008 0.00494 -0.01196 0.00 -0.013 -0.00494 -0.01196 -0.008 -0.008 -0.01196 -0.00494 -0.013 -0.0 -0.01196 0.00494 -0.008 0.008 -0.00494 0.01196 0.00 0.013' scale='0.8 0.8 0.8 0.8' spine='0 0 0 0 0.01 0'/> |
197 | </Shape> |
198 | </Transform> |
199 | <Transform DEF='AdjustmentRight' rotation='0 0 1 1.57' translation='0.023 0.49 -0.048'> |
200 | <Shape> |
201 | <Appearance USE='TelescopeAdjustmentColor'/> |
202 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.013 0.00494 0.01196 0.008 0.008 0.01196 0.00494 0.013 0.00 0.01196 -0.00494 0.008 -0.008 0.00494 -0.01196 0.00 -0.013 -0.00494 -0.01196 -0.008 -0.008 -0.01196 -0.00494 -0.013 -0.0 -0.01196 0.00494 -0.008 0.008 -0.00494 0.01196 0.00 0.013' scale='0.8 0.8 0.8 0.8' spine='0 0 0 0 0.01 0'/> |
203 | </Shape> |
204 | </Transform> |
205 | <Transform DEF='AdjustmentTop' rotation='1 0 0 1.57' translation='0 0.49 -0.08'> |
206 | <Shape> |
207 | <Appearance USE='TelescopeAdjustmentColor'/> |
208 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.013 0.00494 0.01196 0.008 0.008 0.01196 0.00494 0.013 0.00 0.01196 -0.00494 0.008 -0.008 0.00494 -0.01196 0.00 -0.013 -0.00494 -0.01196 -0.008 -0.008 -0.01196 -0.00494 -0.013 -0.0 -0.01196 0.00494 -0.008 0.008 -0.00494 0.01196 0.00 0.013' scale='0.8 0.8 0.8 0.8' spine='0 0 0 0 0.01 0'/> |
209 | </Shape> |
210 | </Transform> |
211 | <Transform DEF='Adjustment' rotation='1 0 0 1.57' translation='0 0.49 -0.072'> |
212 | <Shape> |
213 | <Appearance USE='TelescopeAdjustmentColor'/> |
214 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.013 0.00494 0.01196 0.00923 0.00923 0.01196 0.00494 0.013 0.00 0.01196 -0.00494 0.00923 -0.00923 0.00494 -0.01196 0.00 -0.013 -0.00494 -0.01196 -0.00923 -0.00923 -0.01196 -0.00494 -0.013 -0.0 -0.01196 0.00494 -0.00923 0.00923 -0.00494 0.01196 0.00 0.013' scale='0.6 0.6 0.6 0.6' spine='0 0 0 0 0.005 0'/> |
215 | </Shape> |
216 | </Transform> |
217 | <Transform DEF='AdjustmentTele' rotation='1 0 0 1.57' translation='0 0.49 -0.067'> |
218 | <Shape> |
219 | <Appearance USE='TelescopeColor'/> |
220 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.013 0.00494 0.01196 0.00923 0.00923 0.01196 0.00494 0.013 0.00 0.01196 -0.00494 0.00923 -0.00923 0.00494 -0.01196 0.00 -0.013 -0.00494 -0.01196 -0.00923 -0.00923 -0.01196 -0.00494 -0.013 -0.0 -0.01196 0.00494 -0.00923 0.00923 -0.00494 0.01196 0.00 0.013' scale='0.6 0.6 0.6 0.6' spine='0 0 0 0 0.005 0'/> |
221 | </Shape> |
222 | </Transform> |
223 | </Transform> |
224 | <Transform DEF='HandRest' rotation='0.58 -0.58 0.58 2.09' scale='2 2 2' translation='-0.38 0.012 0'> |
225 | <Shape> |
226 |
<!-- Appearance
HandrestColor is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
<Appearance DEF='HandrestColor'> |
227 | <Material diffuseColor='0.3 0.3 0.3'/> |
228 | </Appearance> |
229 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.013 0.00494 0.01196 0.00923 0.00923 0.01196 0.00494 -0.01196 0.00494 -0.00923 0.00923 -0.00494 0.01196 0.00 0.013' scale='0.6 2.0 0.4 2.3' spine='0 -0.1 0 0.0 0.09 0.0'/> |
230 | </Shape> |
231 | </Transform> |
232 | <Transform DEF='Handle'> |
233 | <Transform DEF='HandleBody' rotation='0 0 1 -0.4' translation='-0.57 -0.0274 0.0'> |
234 | <Shape> |
235 | <Appearance USE='HandrestColor'/> |
236 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.021 0.0435 0.02 0.057 0.01 0.06 0.0 0.057 -0.01 0.0435 -0.02 0.0 -0.021 -0.0435 -0.02 -0.057 -0.01 -0.06 0.0 -0.057 0.01 -0.0435 0.02 0.0 0.021' scale='0.38 0.38 0.36 0.36 0.3 0.3 0.25 0.25 0.32 0.34' spine='-0.03 -0.09 0.0 -0.03 -0.05 0.0 -0.022 -0.025 0.0 -0.01 -0.01 0.0 0.02 0.01 0.0'/> |
237 | </Shape> |
238 | </Transform> |
239 | <Transform DEF='HandleEnd' rotation='0 0 1 0.385' translation='-0.648 -0.1168 0.0'> |
240 | <Shape> |
241 | <Appearance USE='BarrelEndColor'/> |
242 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.021 0.0435 0.02 0.057 0.01 0.06 0.0 0.057 -0.01 0.0435 -0.02 0.0 -0.021 -0.0435 -0.02 -0.057 -0.01 -0.06 0.0 -0.057 0.01 -0.0435 0.02 0.0 0.021' scale='0.37 0.37 0.38 0.38' spine='0.02 0.01 0.0 0.021 0.011 0.0'/> |
243 | </Shape> |
244 | </Transform> |
245 | </Transform> |
246 | <Transform DEF='Stack'> |
247 | <Transform DEF='StackBody' rotation='0.58 0.58 -0.58 2.09' translation='-0.7 -0.145 0'> |
248 | <Transform rotation='1 0 0 -0.25'> |
249 | <Shape> |
250 | <Appearance USE='TelescopeColor'/> |
251 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.06 0.01 0.057 0.02 0.0435 0.021 0.0 0.02 -0.0435 0.01 -0.057 0.0 -0.06 -0.01 -0.057 -0.02 -0.0435 -0.021 0.0 -0.02 0.0435 -0.01 0.057 0.0 0.06' scale='1.0 1.0 0.5 0.5 0.1 0.1' spine='0 -0.1 -0.09 0.0 0.1 -0.09 0.0 0.12 -0.09'/> |
252 | </Shape> |
253 | </Transform> |
254 | </Transform> |
255 | <Transform DEF='StackEnd' rotation='0.58 0.58 -0.58 2.09' translation='-0.918 -0.2015 0'> |
256 | <Transform rotation='1 0 0 -0.25'> |
257 | <Shape> |
258 |
<!-- Appearance
StackColor is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
<Appearance DEF='StackColor'> |
259 | <Material ambientIntensity='0.1' diffuseColor='0.85 0.85 0.85' shininess='0.8' specularColor='0.85 0.85 0.85'/> |
260 | </Appearance> |
261 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.06 0.01 0.057 0.02 0.0435 0.021 0.0 0.02 -0.0435 0.01 -0.057 0.0 -0.06 -0.01 -0.057 -0.02 -0.0435 -0.021 0.0 -0.02 0.0435 -0.01 0.057 0.0 0.06' scale='0.9 0.9 1.0 1.0' spine='0.0 0.119 -0.09 0.0 0.125 -0.09'/> |
262 | </Shape> |
263 | </Transform> |
264 | </Transform> |
265 | </Transform> |
266 | <Transform DEF='Trigger'> |
267 | <Transform DEF='TriggerGuard' translation='-0.54 -0.042 0'> |
268 | <Shape> |
269 | <Appearance USE='HandrestColor'/> |
270 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.006 0.001 0.0057 0.001 -0.0057 0.0 -0.006 -0.001 -0.0057 -0.001 0.0057 0.0 0.006' spine='-0.02 0.0 0.0 -0.028 -0.01 0.0 -0.03 -0.02 0.0 -0.021 -0.031 0.0 -0.006 -0.035 0.0 0.01 -0.033 0.0 0.02 -0.02 0.0 0.02 -0.01 0.0 0.021 0.0 0.0'/> |
271 | </Shape> |
272 | </Transform> |
273 | <Transform DEF='TriggerPin' translation='-0.565 -0.042 0'> |
274 | <Shape> |
275 | <Appearance USE='BarrelColor'/> |
276 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.006 0.001 0.0057 0.001 -0.0057 0.0 -0.006 -0.001 -0.0057 -0.001 0.0057 0.0 0.006' scale='1.5 1.0 1.0 1.0 0.8 0.8 0.7 0.7' spine='0.01 0.0 0.0 0.011 -0.01 0.0 0.015 -0.02 0.0 0.02 -0.025 0.0'/> |
277 | </Shape> |
278 | </Transform> |
279 | </Transform> |
280 | <Transform DEF='SafetyPin' scale='2.2 1.35 0.8' translation='-0.565 -0.008 0.0085'> |
281 | <Shape> |
282 | <Appearance USE='StackColor'/> |
283 | <Extrusion creaseAngle='1.57' crossSection='0.0 0.006 0.001 0.0057 0.001 -0.0057 0.0 -0.006 -0.001 -0.0057 -0.001 0.0057 0.0 0.006' scale='1.5 1.0 1.0 1.0 0.8 0.8 0.3 0.3' spine='0.01 0.0 0.0 0.01 -0.01 0.0 0.008 -0.02 0.0 0.006 -0.025 0.0'/> |
284 | </Shape> |
285 | </Transform> |
286 | <Transform DEF='Safety' scale='1.0 0.7 0.6' translation='-0.546 -0.04 0.009'> |
287 | <Shape> |
288 | <Appearance USE='StackColor'/> |
289 | <Sphere radius='0.008'/> |
290 | </Shape> |
291 | </Transform> |
292 | <Group> |
293 |
<!-- ROUTE information for TriggerScript node:
[from clockStartTime to Clock.set_startTime
]
[from clockStartTime to RifleFireSoundAudio.set_startTime
]
-->
<Script DEF='TriggerScript'> |
294 | <field name='trigger' type='SFBool' accessType='inputOnly'/> |
295 | <field name='fire' type='SFBool' accessType='outputOnly'/> |
296 | <field name='animationStartTime' type='SFTime' accessType='inputOnly'/> |
297 | <field name='clockStartTime' type='SFTime' accessType='outputOnly'/> |
298 | <IS> |
299 | <connect nodeField='trigger' protoField='trigger'/> |
300 | <connect nodeField='animationStartTime' protoField='animationStartTime'/> |
301 | </IS> |
<![CDATA[
ecmascript: function trigger(value, timeStamp) { //print ('trigger = ' + value); if (value == true) { fire = true; } else { fire = false; } //print ('fire = ' + fire); } function animationStartTime(time, timeStamp) { //print ('time = ' + time); if (fire == true) clockStartTime = time; }
]]>
|
|
303 | </Script> |
304 |
<!-- ROUTE information for Clock node:
[from TriggerScript.clockStartTime to set_startTime
]
[from fraction_changed to TriggerInterpolator.set_fraction
]
[from fraction_changed to FlashInterpolator.set_fraction
]
[from fraction_changed to ShootShockInterpolator.set_fraction
]
-->
<TimeSensor DEF='Clock' cycleInterval='0.5'/> |
305 | <Sound DEF='RifleFireSound'> |
306 |
<!-- ROUTE information for RifleFireSoundAudio node:
[from TriggerScript.clockStartTime to set_startTime
]
-->
<AudioClip DEF='RifleFireSoundAudio' description='Rifle fire' url=' "RifleFire.wav" "../../Weapons/SmallArms/RifleFire.wav" "https://www.web3d.org/x3d/content/examples/Savage/Weapons/SmallArms/RifleFire.wav" '/> |
307 | </Sound> |
308 |
<!-- ROUTE information for TriggerInterpolator node:
[from Clock.fraction_changed to set_fraction
]
[from value_changed to BulletTransform.set_translation
]
-->
<PositionInterpolator DEF='TriggerInterpolator' key='0.0 0.2 0.49 0.8 1.0' keyValue='-0.64 0.0 0.0 -0.40 0.0 0.0 1 0.0 0.0 2 0.0 0.0 51 0.0 0.0'/> |
309 |
<!-- ROUTE information for FlashInterpolator node:
[from Clock.fraction_changed to set_fraction
]
[from value_changed to FlashTransform.set_translation
]
-->
<PositionInterpolator DEF='FlashInterpolator' key='0.0 0.3 0.5 0.8 1.0' keyValue='0 0.13 0 0 -0.1 0 0 -0.1 0 0 0.15 0 0 0.13 0'/> |
310 |
<!-- ROUTE information for ShootShockInterpolator node:
[from Clock.fraction_changed to set_fraction
]
[from value_changed to ShootShockTransform.set_translation
]
-->
<PositionInterpolator DEF='ShootShockInterpolator' key='0.0 0.8 0.9 1.0' keyValue='-0.64 0.0 0.0 -0.70 0.0 0.0 -0.66 0.0 0.0 -0.62 0.0 0.0'/> |
311 | < ROUTE fromNode='TriggerScript' fromField='clockStartTime' toNode='Clock' toField='set_startTime'/> |
312 | < ROUTE fromNode='Clock' fromField='fraction_changed' toNode='TriggerInterpolator' toField='set_fraction'/> |
313 | < ROUTE fromNode='TriggerInterpolator' fromField='value_changed' toNode='BulletTransform' toField='set_translation'/> |
314 | <!-- Rifle Sound --> |
315 | < ROUTE fromNode='TriggerScript' fromField='clockStartTime' toNode='RifleFireSoundAudio' toField='set_startTime'/> |
316 | <!-- Flash animation --> |
317 | < ROUTE fromNode='Clock' fromField='fraction_changed' toNode='FlashInterpolator' toField='set_fraction'/> |
318 | < ROUTE fromNode='FlashInterpolator' fromField='value_changed' toNode='FlashTransform' toField='set_translation'/> |
319 | <!-- Shoot shock animation --> |
320 | < ROUTE fromNode='Clock' fromField='fraction_changed' toNode='ShootShockInterpolator' toField='set_fraction'/> |
321 | < ROUTE fromNode='ShootShockInterpolator' fromField='value_changed' toNode='ShootShockTransform' toField='set_translation'/> |
322 | </Group> |
323 | </Transform> |
324 | </Group> |
325 | </Group> |
326 | <WorldInfo info='"null node"'/> |
327 | </LOD> |
328 | </Group> |
329 | </ProtoBody> |
330 | </ProtoDeclare> |
331 | <!-- ==================== --> |
332 | <Background skyColor='0.604 0.753 0.804'/> |
333 | <Anchor description='RifleM24Example' parameter='"target=_blank"' url=' "RifleM24Example.x3d" "../../Weapons/SmallArms/RifleM24Example.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Weapons/SmallArms/RifleM24Example.x3d" "../../Weapons/SmallArms/RifleM24Example.wrl" "RifleM24Example.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Weapons/SmallArms/RifleM24Example.wrl" '> |
334 | <Shape> |
335 | <Text string='"RifleM24Prototype" "is a prototype definition file" "" "To see an example scene" "click on this text and view" "RifleM24Example"'> |
336 | <FontStyle justify='"MIDDLE" "MIDDLE"'/> |
337 | </Text> |
338 | <Appearance> |
339 | <Material diffuseColor='0.819608 0 0.023529'/> |
340 | </Appearance> |
341 | </Shape> |
342 | </Anchor> |
343 | </Scene> |
344 | </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.
TriggerScript
Script clockStartTime SFTime |
Clock
TimeSensor set_startTime SFTime |
then
|
Clock
TimeSensor fraction_changed SFFloat |
TriggerInterpolator
PositionInterpolator set_fraction SFFloat |
then
|
TriggerInterpolator
PositionInterpolator value_changed SFVec3f |
BulletTransform
Transform set_translation SFVec3f |
|||
then
|
Clock
TimeSensor fraction_changed SFFloat |
FlashInterpolator
PositionInterpolator set_fraction SFFloat |
then
|
FlashInterpolator
PositionInterpolator value_changed SFVec3f |
FlashTransform
Transform set_translation SFVec3f |
|||||
then
|
Clock
TimeSensor fraction_changed SFFloat |
ShootShockInterpolator
PositionInterpolator set_fraction SFFloat |
then
|
ShootShockInterpolator
PositionInterpolator value_changed SFVec3f |
ShootShockTransform
Transform set_translation SFVec3f |
|||||
TriggerScript
Script clockStartTime SFTime |
RifleFireSoundAudio
AudioClip set_startTime SFTime |
line 333
Anchor |
description='RifleM24Example' User-interaction hint for this node. |
<!--
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)
<ProtoDeclare name='ProtoName'>
<field
name='fieldName'/> </ProtoDeclare>
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->