1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
|
3 | <X3D profile='Immersive' version='3.3' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.3.xsd'> |
4 | <head> |
5 | <meta name='title' content='HalfMoonPrototype.x3d'/> |
6 | <meta name='description' content='Prototype for a group of HalfMoon fish in the Kelp forest.'/> |
7 | <meta name='creator' content='Ildeniz Duman'/> |
8 | <meta name='translator' content='Scott Tufts'/> |
9 | <meta name='created' content='1 June 1998'/> |
10 | <meta name='modified' content='22 February 2022'/> |
11 | <meta name=' warning ' content=' Additional PositionInterpolator present but disabled. '/> |
12 | <meta name=' warning ' content=' Wiggle causes texture flashing. TODO: move animation to example file. '/> |
13 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/HalfMoonPrototype.x3d'/> |
14 | <meta name='generator' content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/> |
15 | <meta name='license' content='../license.html'/> |
16 | </head> |
17 | <Scene> |
18 | <WorldInfo title='HalfMoonPrototype.x3d'/> |
19 | <ProtoDeclare name='HalfMoon' appinfo='HalfMoon fish'> |
20 | <ProtoInterface> |
21 | <field name='skinTextureUrl' type='MFString' value=' "HalfMoonScalesPatch.jpg" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/HalfMoonScalesPatch.jpg"' accessType='inputOutput'/> |
22 | <field name='fishScale' type='SFVec3f' value='0.3 0.25 0.25' accessType='inputOutput'/> |
23 | <field name='fishColor' type='SFColor' value='0.7 0.7 0.7' accessType='inputOutput'/> |
24 | </ProtoInterface> |
25 | <ProtoBody> |
26 |
<!-- ROUTE information for MyHalfMoon node:
[from Orbit.value_changed to set_rotation
]
[from HalfMoonPath.value_changed to set_translation
]
-->
<Transform DEF='MyHalfMoon'> |
27 | <IS> |
28 | <connect nodeField='scale' protoField='fishScale'/> |
29 | </IS> |
30 | <Shape> |
31 | <Appearance> |
32 | <Material DEF='FishColor'> |
33 | <IS> |
34 | <connect nodeField='diffuseColor' protoField='fishColor'/> |
35 | </IS> |
36 | </Material> |
37 | <ImageTexture DEF='FishTexture'> |
38 | <IS> |
39 | <connect nodeField='url' protoField='skinTextureUrl'/> |
40 | </IS> |
41 | </ImageTexture> |
42 | </Appearance> |
43 |
<!-- ROUTE information for Fish_Shape node:
[from Waggler.value_changed to set_spine
]
-->
<Extrusion DEF='Fish_Shape' creaseAngle='1.57' crossSection='-0.1 1.0 0.1 1 0.5 0.5 0.5 -0.5 0.1 -1 -0.1 -1 -0.5 -0.5 -0.5 0.5 -0.1 1' scale='0.03 0.03 0.3 0.3 0.2 0.4 0.1 0.5 0.1 0.15 0.03 0.4' spine='0 1.5 0 0 1.2 0 0 0.5 0 0 0.3 0 0 0 0 0 -0.3 0'/> |
44 | </Shape> |
45 | <Shape> |
46 | |
47 | <Material diffuseColor='0.5 0.5 0.5' transparency='0.2'/> |
48 | </Appearance> |
49 | </Shape> |
50 | <Transform translation='1.37 0.1 0.1'> |
51 | |
52 | <Appearance> |
53 | <Material diffuseColor='0.5 0.5 0.5' shininess='1' specularColor='0.3 0.3 0.3'/> |
54 | </Appearance> |
55 | <Sphere radius='0.04'/> |
56 | </Shape> |
57 | </Transform> |
58 | <Transform translation='1.37 0.1 -0.1'> |
59 | <Shape USE='Eye'/> |
60 | </Transform> |
61 | <Transform scale='2.6 1 0.7' translation='1.46 0 0'> |
62 | <!-- Mouth --> |
63 | <Shape USE='Eye'/> |
64 | </Transform> |
65 |
<!-- ROUTE information for Left_Pectoral node:
[from Left_Pectoral_Rotation.value_changed to set_rotation
]
-->
<Transform DEF='Left_Pectoral' translation='1.1 -0.15 -0.1'> |
66 | <Shape> |
67 | <Appearance USE='Fin_Skin'/> |
68 | <IndexedFaceSet solid='false' coordIndex='0 1 2 -1'> |
69 | <Coordinate point='0 0 0 0.2 0 0 -0.2 0 -0.2'/> |
70 | </IndexedFaceSet> |
71 | </Shape> |
72 | </Transform> |
73 |
<!-- ROUTE information for Right_Pectoral node:
[from Right_Pectoral_Rotation.value_changed to set_rotation
]
-->
<Transform DEF='Right_Pectoral' translation='1.1 -0.15 0.1'> |
74 | <Shape> |
75 | <Appearance USE='Fin_Skin'/> |
76 | <IndexedFaceSet solid='false' coordIndex='0 1 2 -1'> |
77 | <Coordinate point='0 0 0 0.2 0 0 -0.2 0 0.2'/> |
78 | </IndexedFaceSet> |
79 | </Shape> |
80 | </Transform> |
81 | <Group DEF='AnimationGroup'> |
82 |
<!-- ROUTE information for Timer node:
[from fraction_changed to Waggler.set_fraction
]
[from fraction_changed to Left_Pectoral_Rotation.set_fraction
]
[from fraction_changed to Right_Pectoral_Rotation.set_fraction
]
-->
<TimeSensor DEF='Timer' cycleInterval='5' loop='true'/> |
83 |
<!-- ROUTE information for Waggler node:
[from Timer.fraction_changed to set_fraction
]
[from value_changed to Fish_Shape.set_spine
]
-->
<CoordinateInterpolator DEF='Waggler' key='0.0 0.15 0.28 0.4 0.55 0.7 0.85 1' keyValue='1.5 0 0 1.2 0 0 0.5 0 0 0.3 0 0 0 0 0 -0.3 0 0 1.5 0 0 1.20 0 0 0.5 0 .1 0.3 0 .2 0 0 0.25 -0.3 0 0.3 1.5 0 0 1.20 0 0 0.5 0 0 0.3 0 0 0 0 0 -0.3 0 0 1.5 0 0 1.2 0 0 0.5 0 -0.1 0.3 0 -0.2 0 0 -0.25 -0.3 0 -0.3 1.5 0 0 1.2 0 0 0.5 0 0 0.3 0 0 0 0 0 -0.3 0 0 1.5 0 0 1.2 0 0 0.5 0 0.1 0.3 0 0.2 0 0 0.25 -0.3 0 0.3 1.5 0 0 1.2 0 0 0.5 0 0 0.3 0 0 0 0 0 -0.3 0 0 1.5 0 0 1.2 0 0 0.5 0 -0.1 0.3 0 -0.2 0 0 -0.25 -0.3 0 -0.3'/> |
84 |
<!-- ROUTE information for Left_Pectoral_Rotation node:
[from Timer.fraction_changed to set_fraction
]
[from value_changed to Left_Pectoral.set_rotation
]
-->
<OrientationInterpolator DEF='Left_Pectoral_Rotation' key='0 0.3 0.7 1' keyValue='1 0 0 -0.52 1 0 0 0 1 0 0 0 1 0 0 -0.52'/> |
85 |
<!-- ROUTE information for Right_Pectoral_Rotation node:
[from Timer.fraction_changed to set_fraction
]
[from value_changed to Right_Pectoral.set_rotation
]
-->
<OrientationInterpolator DEF='Right_Pectoral_Rotation' key='0 0.3 0.7 1' keyValue='1 0 0 -0.52 1 0 0 0 1 0 0 0 1 0 0 -0.52'/> |
86 | <!-- orbiting time --> |
87 |
<!-- ROUTE information for OrbitClock node:
[from fraction_changed to Orbit.set_fraction
]
[from fraction_changed to HalfMoonPath.set_fraction
]
-->
<TimeSensor DEF='OrbitClock' cycleInterval='90' enabled='false' loop='true'/> |
88 |
<!-- ROUTE information for Orbit node:
[from OrbitClock.fraction_changed to set_fraction
]
[from value_changed to MyHalfMoon.set_rotation
]
-->
<OrientationInterpolator DEF='Orbit' key='0.0 0.25 0.5 0.750 1' keyValue='0 1 0 6.28 0 1 0 1.57 0 1 0 3.14 0 1 0 4.71 0 1 0 6.28'/> |
89 |
<!-- ROUTE information for HalfMoonPath node:
[from OrbitClock.fraction_changed to set_fraction
]
[from value_changed to MyHalfMoon.set_translation
]
-->
<PositionInterpolator DEF='HalfMoonPath' key='0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1' keyValue='15 2 0 15 0 -10 0 -1 -10 -15 0 -10 -15 2 0 -15 0 10 0 -2 10 15 0 10 15 2 0'/> |
90 | < ROUTE fromNode='Timer' fromField='fraction_changed' toNode='Waggler' toField='set_fraction'/> |
91 | < ROUTE fromNode='Waggler' fromField='value_changed' toNode='Fish_Shape' toField='set_spine'/> |
92 | < ROUTE fromNode='Timer' fromField='fraction_changed' toNode='Left_Pectoral_Rotation' toField='set_fraction'/> |
93 | < ROUTE fromNode='Left_Pectoral_Rotation' fromField='value_changed' toNode='Left_Pectoral' toField='set_rotation'/> |
94 | < ROUTE fromNode='Timer' fromField='fraction_changed' toNode='Right_Pectoral_Rotation' toField='set_fraction'/> |
95 | < ROUTE fromNode='Right_Pectoral_Rotation' fromField='value_changed' toNode='Right_Pectoral' toField='set_rotation'/> |
96 | < ROUTE fromNode='OrbitClock' fromField='fraction_changed' toNode='Orbit' toField='set_fraction'/> |
97 | < ROUTE fromNode='OrbitClock' fromField='fraction_changed' toNode='HalfMoonPath' toField='set_fraction'/> |
98 | < ROUTE fromNode='Orbit' fromField='value_changed' toNode='MyHalfMoon' toField='set_rotation'/> |
99 | < ROUTE fromNode='HalfMoonPath' fromField='value_changed' toNode='MyHalfMoon' toField='set_translation'/> |
100 | </Group> |
101 | </Transform> |
102 | </ProtoBody> |
103 | </ProtoDeclare> |
104 | <!-- ==================== --> |
105 | <ProtoInstance name='HalfMoon'/> |
106 | </Scene> |
107 | </X3D> |
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.
OrbitClock
TimeSensor fraction_changed SFFloat |
Orbit
OrientationInterpolator set_fraction SFFloat |
then
|
Orbit
OrientationInterpolator value_changed SFRotation |
MyHalfMoon
Transform set_rotation SFRotation |
||
OrbitClock
TimeSensor fraction_changed SFFloat |
HalfMoonPath
PositionInterpolator set_fraction SFFloat |
then
|
HalfMoonPath
PositionInterpolator value_changed SFVec3f |
MyHalfMoon
Transform set_translation SFVec3f |
Timer
TimeSensor fraction_changed SFFloat |
Waggler
CoordinateInterpolator set_fraction SFFloat |
then
|
Waggler
CoordinateInterpolator value_changed MFVec3f |
Fish_Shape
Extrusion set_spine MFVec3f |
||
Timer
TimeSensor fraction_changed SFFloat |
Left_Pectoral_Rotation
OrientationInterpolator set_fraction SFFloat |
then
|
Left_Pectoral_Rotation
OrientationInterpolator value_changed SFRotation |
Left_Pectoral
Transform set_rotation SFRotation |
||
Timer
TimeSensor fraction_changed SFFloat |
Right_Pectoral_Rotation
OrientationInterpolator set_fraction SFFloat |
then
|
Right_Pectoral_Rotation
OrientationInterpolator value_changed SFRotation |
Right_Pectoral
Transform set_rotation SFRotation |
ProtoInstance HalfMoon |
No ROUTE connection found for output events 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 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. -->