| 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=' FishPrototype.x3d '/> |
| 6 | <meta name='description' content='This is a reusable prototype of a generic fish, which can be configured upon instancing to create customized fish.'/> |
| 7 | <meta name=' warning ' content=' Circular fish behavior is embedded in prototype, instead the circular path needs to be used in external files or possibly parameterized. '/> |
| 8 | <meta name='creator' content='Ildeniz Duman'/> |
| 9 | <meta name='translator' content='Scott Tufts'/> |
| 10 | <meta name='created' content='1 June 1998'/> |
| 11 | <meta name='translated' content='9 December 2001'/> |
| 12 | <meta name='modified' content='20 October 2019'/> |
| 13 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/FishPrototype.x3d '/> |
| 14 | <meta name='generator' content='X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
| 15 | <meta name='license' content='../license.html'/> |
| 16 | </head> |
| 17 | <Scene> |
| 18 | <WorldInfo title='FishPrototype.x3d'/> |
| 19 | <ProtoDeclare name='Fish'> |
| 20 | <ProtoInterface> |
| 21 | <field name='skinTextureUrl' type='MFString' accessType='inputOutput'/> |
| 22 | <field name='fishScale' type='SFVec3f' value='1 1 1' accessType='inputOutput'/> |
| 23 | <field name='fishColor' type='SFColor' value='0.7 0.7 0.7' accessType='inputOutput'/> |
| 24 | </ProtoInterface> |
| 25 | <ProtoBody> |
| 26 | <Transform DEF='FishTransform'> |
| 27 | <IS> |
| 28 | <connect nodeField='scale' protoField='fishScale'/> |
| 29 | </IS> |
| 30 |
<!-- ROUTE information for Way node:
[from Turn.value_changed to set_rotation
]
-->
<Transform DEF='Way'> |
| 31 | <Transform translation='4 0 0'> |
| 32 | <Transform rotation='1 0 0 1.57'> |
| 33 | <Shape> |
| 34 | <Appearance> |
| 35 | <Material DEF='FishColor'> |
| 36 | <IS> |
| 37 | <connect nodeField='diffuseColor' protoField='fishColor'/> |
| 38 | </IS> |
| 39 | </Material> |
| 40 | <ImageTexture DEF='FishTexture'> |
| 41 | <IS> |
| 42 | <connect nodeField='url' protoField='skinTextureUrl'/> |
| 43 | </IS> |
| 44 | </ImageTexture> |
| 45 | </Appearance> |
| 46 |
<!-- ROUTE information for FishShape node:
[from Waggler.value_changed to set_spine
]
-->
<Extrusion DEF='FishShape' creaseAngle='1.57' crossSection='1.00 0.00 0.92 -0.38 0.71 -0.71 0.38 -0.92 0.00 -1.00 -0.38 -0.92 -0.71 -0.71 -0.92 -0.38 -1.00 -0.00 -0.92 0.38 -0.71 0.71 -0.38 0.92 0.00 1.00 0.38 0.92 0.71 0.71 0.92 0.38 1.00 0.00' scale='0.03 0.03 0.1 0.15 0.4 0.7 0.5 0.75 0.4 0.55 0.2 0.3 0.05 0.1 0.03 0.6' spine='0 3.51 0 0 3.50 0 0 2.80 0 0 2.3 0 0 1.5 0 0 0.5 0 0 0 0 0 -0.6 0'/> |
| 47 | </Shape> |
| 48 | <Shape> |
| 49 | |
| 50 | <Material diffuseColor='0.7 0.7 0.7' transparency='0.3'/> |
| 51 | </Appearance> |
| 52 | <IndexedFaceSet solid='false' coordIndex='0 1 2 3 -1'> |
| 53 |
<!-- ROUTE information for Pelvic node:
[from Points.value_changed to set_point
]
-->
<Coordinate DEF='Pelvic' point='0 2.2 0.6 0 2.2 -0.7 0 0.3 -0.3 0 0.7 0.5'/> |
| 54 | </IndexedFaceSet> |
| 55 | </Shape> |
| 56 | <Transform translation='0.3 2.8 -0.4'> |
| 57 | |
| 58 | <Appearance> |
| 59 | <Material diffuseColor='0.5 0.5 0.5' shininess='1' specularColor='0.3 0.3 0.3'/> |
| 60 | </Appearance> |
| 61 | <Sphere radius='0.08'/> |
| 62 | </Shape> |
| 63 | </Transform> |
| 64 | <Transform translation='-0.3 2.8 -0.4'> |
| 65 | <Shape USE='Eye'/> |
| 66 | </Transform> |
| 67 | <Transform scale='2.6 1 0.7' translation='0 3.44 -0.1'> |
| 68 | <Shape USE='Eye'/> |
| 69 | </Transform> |
| 70 |
<!-- ROUTE information for LeftPectoral node:
[from LeftPectoralRotation.value_changed to set_rotation
]
-->
<Transform DEF='LeftPectoral' translation='-0.3 2.7 0.1'> |
| 71 | <Shape> |
| 72 | <Appearance USE='FinSkin'/> |
| 73 | <IndexedFaceSet solid='false' coordIndex='0 1 2 -1'> |
| 74 | <Coordinate point='0 0 0 -0.5 -0.2 0.1 -0.25 0.2 0.25'/> |
| 75 | </IndexedFaceSet> |
| 76 | </Shape> |
| 77 | </Transform> |
| 78 |
<!-- ROUTE information for RightPectoral node:
[from RightPectoralRotation.value_changed to set_rotation
]
-->
<Transform DEF='RightPectoral' translation='0.3 2.7 0.1'> |
| 79 | <Shape> |
| 80 | <Appearance USE='FinSkin'/> |
| 81 | <IndexedFaceSet solid='false' coordIndex='0 1 2 -1'> |
| 82 | <Coordinate point='0 0 0 0.5 -0.2 0.1 0.25 0.2 0.25'/> |
| 83 | </IndexedFaceSet> |
| 84 | </Shape> |
| 85 | </Transform> |
| 86 | </Transform> |
| 87 | </Transform> |
| 88 | </Transform> |
| 89 | <Group DEF='AnimationGroup'> |
| 90 |
<!-- ROUTE information for RouteTImer node:
[from fraction_changed to Turn.set_fraction
]
-->
<TimeSensor DEF='RouteTImer' cycleInterval='50' loop='true'/> |
| 91 |
<!-- ROUTE information for Timer node:
[from fraction_changed to Waggler.set_fraction
]
[from fraction_changed to Points.set_fraction
]
[from fraction_changed to LeftPectoralRotation.set_fraction
]
[from fraction_changed to RightPectoralRotation.set_fraction
]
-->
<TimeSensor DEF='Timer' cycleInterval='1.5' loop='true'/> |
| 92 |
<!-- ROUTE information for Waggler node:
[from Timer.fraction_changed to set_fraction
]
[from value_changed to FishShape.set_spine
]
-->
<CoordinateInterpolator DEF='Waggler' key='0.0 0.5 1.0' keyValue='0 3.55 0 0 3.50 0 0 2.80 0 0 2.3 0 -0.05 1.5 0 0.1 0.5 0 0.2 0 0 0.3 -0.6 0 0 3.55 0 0 3.50 0 0 2.80 0 0 2.3 0 0.05 1.5 0 -0.1 0.5 0 -0.2 0 0 -0.3 -0.6 0 0 3.55 0 0 3.50 0 0 2.80 0 0 2.3 0 -0.05 1.5 0 0.1 0.5 0 0.2 0 0 0.3 -0.6 0'/> |
| 93 | < ROUTE fromNode='Timer' fromField='fraction_changed' toNode='Waggler' toField='set_fraction'/> |
| 94 | < ROUTE fromNode='Waggler' fromField='value_changed' toNode='FishShape' toField='set_spine'/> |
| 95 |
<!-- ROUTE information for Points node:
[from Timer.fraction_changed to set_fraction
]
[from value_changed to Pelvic.set_point
]
-->
<CoordinateInterpolator DEF='Points' key='0.0 0.5 1.0' keyValue='0 2.2 0.6 0 2.2 -0.7 0.2 0.3 -0.3 0.2 0.7 0.5 0 2.2 0.6 0 2.2 -0.7 -0.2 0.3 -0.3 -0.2 0.7 0.5 0 2.2 0.6 0 2.2 -0.7 0.2 0.3 -0.3 0.2 0.7 0.5'/> |
| 96 | < ROUTE fromNode='Timer' fromField='fraction_changed' toNode='Points' toField='set_fraction'/> |
| 97 | < ROUTE fromNode='Points' fromField='value_changed' toNode='Pelvic' toField='set_point'/> |
| 98 |
<!-- ROUTE information for LeftPectoralRotation node:
[from Timer.fraction_changed to set_fraction
]
[from value_changed to LeftPectoral.set_rotation
]
-->
<OrientationInterpolator DEF='LeftPectoralRotation' key='0 0.3 0.7 1' keyValue='0 1 0 0.523 0 1 0 0 0 1 0 0 0 1 0 0.523'/> |
| 99 | < ROUTE fromNode='Timer' fromField='fraction_changed' toNode='LeftPectoralRotation' toField='set_fraction'/> |
| 100 | < ROUTE fromNode='LeftPectoralRotation' fromField='value_changed' toNode='LeftPectoral' toField='set_rotation'/> |
| 101 |
<!-- ROUTE information for RightPectoralRotation node:
[from Timer.fraction_changed to set_fraction
]
[from value_changed to RightPectoral.set_rotation
]
-->
<OrientationInterpolator DEF='RightPectoralRotation' key='0 0.3 0.7 1' keyValue='0 1 0 -0.523 0 1 0 0 0 1 0 0 0 1 0 -0.523'/> |
| 102 | < ROUTE fromNode='Timer' fromField='fraction_changed' toNode='RightPectoralRotation' toField='set_fraction'/> |
| 103 | < ROUTE fromNode='RightPectoralRotation' fromField='value_changed' toNode='RightPectoral' toField='set_rotation'/> |
| 104 |
<!-- ROUTE information for Turn node:
[from RouteTImer.fraction_changed to set_fraction
]
[from value_changed to Way.set_rotation
]
-->
<OrientationInterpolator DEF='Turn' key='0 0.25 0.5 0.75 1' keyValue='0 1 0 0 0 1 0 -1.57 0 1 0 -3.14 0 1 0 -4.71 0 1 0 0'/> |
| 105 | < ROUTE fromNode='RouteTImer' fromField='fraction_changed' toNode='Turn' toField='set_fraction'/> |
| 106 | < ROUTE fromNode='Turn' fromField='value_changed' toNode='Way' toField='set_rotation'/> |
| 107 | </Group> |
| 108 | </Transform> |
| 109 | </ProtoBody> |
| 110 | </ProtoDeclare> |
| 111 | <!-- ==================== --> |
| 112 | <ProtoInstance name='Fish'/> |
| 113 | </Scene> |
| 114 | </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.
|
RouteTImer
TimeSensor fraction_changed SFFloat |
Turn
OrientationInterpolator set_fraction SFFloat |
then
|
Turn
OrientationInterpolator value_changed SFRotation |
Way
Transform set_rotation SFRotation |
|
Timer
TimeSensor fraction_changed SFFloat |
Waggler
CoordinateInterpolator set_fraction SFFloat |
then
|
Waggler
CoordinateInterpolator value_changed MFVec3f |
FishShape
Extrusion set_spine MFVec3f |
||
|
Timer
TimeSensor fraction_changed SFFloat |
Points
CoordinateInterpolator set_fraction SFFloat |
then
|
Points
CoordinateInterpolator value_changed MFVec3f |
Pelvic
Coordinate set_point MFVec3f |
||
|
Timer
TimeSensor fraction_changed SFFloat |
LeftPectoralRotation
OrientationInterpolator set_fraction SFFloat |
then
|
LeftPectoralRotation
OrientationInterpolator value_changed SFRotation |
LeftPectoral
Transform set_rotation SFRotation |
||
|
Timer
TimeSensor fraction_changed SFFloat |
RightPectoralRotation
OrientationInterpolator set_fraction SFFloat |
then
|
RightPectoralRotation
OrientationInterpolator value_changed SFRotation |
RightPectoral
Transform set_rotation SFRotation |
| line 112
ProtoInstance Fish |
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.
-->