<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "http://www.web3d.org/specifications/x3d-3.3.dtd">
<X3D profile='Immersive' version='3.3 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' http://www.web3d.org/specifications/x3d-3.3.xsd '>
<head>
<meta name='titlecontent='FishPrototype.x3d'/>
<meta name='descriptioncontent='This is a reusable prototype of a generic fish, which can be configured upon instancing to create customized fish.'/>
<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. '/>
<meta name='creatorcontent='Ildeniz Duman'/>
<meta name='translatorcontent='Scott Tufts'/>
<meta name='createdcontent='1 June 1998'/>
<meta name='translatedcontent='9 December 2001'/>
<meta name='modifiedcontent='4 May 2004'/>
<meta name='identifiercontent=' http://X3dGraphics.com/examples/X3dForWebAuthors/KelpForestExhibit/FishPrototype.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!-- -->
<Scene>
<ProtoDeclare name='Fish'>
<ProtoInterface>
<field name='skinTextureUrltype='MFStringaccessType='inputOutput'/>
<field name='fishScaletype='SFVec3fvalue='1 1 1accessType='inputOutput'/>
<field name='fishColortype='SFColorvalue='0.7 0.7 0.7accessType='inputOutput'/>
</ProtoInterface>
<ProtoBody>
<Transform DEF='FishTransform'>
<IS>
<connect nodeField='scaleprotoField='fishScale'/>
</IS>
<!-- ROUTE information for Way node:  [from Turn.value_changed to set_rotation ] -->
<Transform DEF='Way'>
<Transform translation='4 0 0'>
<Transform rotation='1 0 0 1.57'>
<Shape>
<Appearance>
<Material DEF='FishColor'>
<IS>
<connect nodeField='diffuseColorprotoField='fishColor'/>
</IS>
</Material>
<ImageTexture DEF='FishTexture'>
<IS>
<connect nodeField='urlprotoField='skinTextureUrl'/>
</IS>
</ImageTexture>
</Appearance>
<!-- ROUTE information for FishShape node:  [from Waggler.value_changed to set_spine ] -->
<Extrusion DEF='FishShapecreaseAngle='1.57crossSection='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.00scale='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.6spine='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'/>
</Shape>
<Shape>
<Appearance DEF='FinSkin'>
<Material diffuseColor='0.7 0.7 0.7transparency='0.3'/>
</Appearance>
<IndexedFaceSet solid='falsecoordIndex='0 1 2 3 -1'>
<!-- ROUTE information for Pelvic node:  [from Points.value_changed to set_point ] -->
<Coordinate DEF='Pelvicpoint='0 2.2 0.6 0 2.2 -0.7 0 0.3 -0.3 0 0.7 0.5'/>
</IndexedFaceSet>
</Shape>
<Transform translation='0.3 2.8 -0.4'>
<Shape DEF='Eye'>
<Appearance>
<Material diffuseColor='0.5 0.5 0.5shininess='1specularColor='0.3 0.3 0.3'/>
</Appearance>
<Sphere radius='0.08'/>
</Shape>
</Transform>
<Transform translation='-0.3 2.8 -0.4'>
<Shape USE='Eye'/>
</Transform>
<Transform scale='2.6 1 0.7translation='0 3.44 -0.1'>
<Shape USE='Eye'/>
</Transform>
<!-- ROUTE information for LeftPectoral node:  [from LeftPectoralRotation.value_changed to set_rotation ] -->
<Transform DEF='LeftPectoraltranslation='-0.3 2.7 0.1'>
<Shape>
<Appearance USE='FinSkin'/>
<IndexedFaceSet solid='falsecoordIndex='0 1 2 -1'>
<Coordinate point='0 0 0 -0.5 -0.2 0.1 -0.25 0.2 0.25'/>
</IndexedFaceSet>
</Shape>
</Transform>
<!-- ROUTE information for RightPectoral node:  [from RightPectoralRotation.value_changed to set_rotation ] -->
<Transform DEF='RightPectoraltranslation='0.3 2.7 0.1'>
<Shape>
<Appearance USE='FinSkin'/>
<IndexedFaceSet solid='falsecoordIndex='0 1 2 -1'>
<Coordinate point='0 0 0 0.5 -0.2 0.1 0.25 0.2 0.25'/>
</IndexedFaceSet>
</Shape>
</Transform>
</Transform>
</Transform>
</Transform>
<Group DEF='AnimationGroup'>
<!-- ROUTE information for RouteTImer node:  [from fraction_changed to Turn.set_fraction ] -->
<TimeSensor DEF='RouteTImercycleInterval='50loop='true'/>
<!-- 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='TimercycleInterval='1.5loop='true'/>
<!-- ROUTE information for Waggler node:  [from Timer.fraction_changed to set_fraction ] [from value_changed to FishShape.set_spine ] -->
<CoordinateInterpolator DEF='Wagglerkey='0.0 0.5 1.0keyValue='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'/>
<ROUTE fromNode='TimerfromField='fraction_changedtoNode='WagglertoField='set_fraction'/>
<ROUTE fromNode='WagglerfromField='value_changedtoNode='FishShapetoField='set_spine'/>
<!-- ROUTE information for Points node:  [from Timer.fraction_changed to set_fraction ] [from value_changed to Pelvic.set_point ] -->
<CoordinateInterpolator DEF='Pointskey='0.0 0.5 1.0keyValue='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'/>
<ROUTE fromNode='TimerfromField='fraction_changedtoNode='PointstoField='set_fraction'/>
<ROUTE fromNode='PointsfromField='value_changedtoNode='PelvictoField='set_point'/>
<!-- ROUTE information for LeftPectoralRotation node:  [from Timer.fraction_changed to set_fraction ] [from value_changed to LeftPectoral.set_rotation ] -->
<OrientationInterpolator DEF='LeftPectoralRotationkey='0 0.3 0.7 1keyValue='0 1 0 0.523 0 1 0 0 0 1 0 0 0 1 0 0.523'/>
<ROUTE fromNode='TimerfromField='fraction_changedtoNode='LeftPectoralRotationtoField='set_fraction'/>
<ROUTE fromNode='LeftPectoralRotationfromField='value_changedtoNode='LeftPectoraltoField='set_rotation'/>
<!-- ROUTE information for RightPectoralRotation node:  [from Timer.fraction_changed to set_fraction ] [from value_changed to RightPectoral.set_rotation ] -->
<OrientationInterpolator DEF='RightPectoralRotationkey='0 0.3 0.7 1keyValue='0 1 0 -0.523 0 1 0 0 0 1 0 0 0 1 0 -0.523'/>
<ROUTE fromNode='TimerfromField='fraction_changedtoNode='RightPectoralRotationtoField='set_fraction'/>
<ROUTE fromNode='RightPectoralRotationfromField='value_changedtoNode='RightPectoraltoField='set_rotation'/>
<!-- ROUTE information for Turn node:  [from RouteTImer.fraction_changed to set_fraction ] [from value_changed to Way.set_rotation ] -->
<OrientationInterpolator DEF='Turnkey='0 0.25 0.5 0.75 1keyValue='0 1 0 0 0 1 0 -1.57 0 1 0 -3.14 0 1 0 -4.71 0 1 0 0'/>
<ROUTE fromNode='RouteTImerfromField='fraction_changedtoNode='TurntoField='set_fraction'/>
<ROUTE fromNode='TurnfromField='value_changedtoNode='WaytoField='set_rotation'/>
</Group>
</Transform>
</ProtoBody>
</ProtoDeclare>
<!-- ==================== -->
<ProtoInstance name='Fish'/>
</Scene>
</X3D>
<!--

Index for ProtoDeclare definition : Fish

Index for DEF nodes : AnimationGroup, Eye, FinSkin, FishColor, FishShape, FishTexture, FishTransform, LeftPectoral, LeftPectoralRotation, Pelvic, Points, RightPectoral, RightPectoralRotation, RouteTImer, Timer, Turn, Waggler, Way
-->

<!-- Color key: <X3dNode DEF='idName' field='value'/> matches <XmlElement DEF='idName' attribute='value'/>
(Light blue background: behavior node) (Grey background: inserted documentation) (Magenta background: X3D Extensibility)
    <Prototype name='ProtoName'> <field name='fieldName'/> </Prototype> -->

<!-- Additional help information about X3D scenes: X3D Resources, X3D Scene Authoring Hints and X3D Tooltips -->