<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "http://www.web3d.org/TaskGroups/x3d/translation/x3d-compact.dtd"
                     "/www.web3d.org/TaskGroups/x3d/translation/x3d-compact.dtd">
<X3D>
<head>
<meta name='filename' content='HalfmoonProto.x3d'/>
<meta name='description' content='This is a proto for a Halfmoon for the Kelp forest'/>
<meta name='author' content='Ildeniz Duman'/>
<meta name='translator' content='Scott Tufts'/>
<meta name='created' content='1998'/>
<meta name='revised' content='3 Dec 2001'/>
<meta name='version' content='V2.1'/>
<meta name='url' content='*enter online url address for this file here*'/>
<meta name='generator' content='X3D-Edit, http://www.web3d.org/TaskGroups/x3d/translation/README.X3D-Edit.html'/>
</head>
<!--

Index for ProtoDeclareHalfmoon. Index for DEFsEye, Fin_Skin, Fish_Shape, FishColor, FishTexture, HalfmoonPath, Left_Pectoral, Left_Pectoral_Rotation, MyHalfmoon, Orbit, OrbitClock, Right_Pectoral, Right_Pectoral_Rotation, Timer, Waggler.

-->
<Scene>
<ProtoDeclare name='Halfmoon'>
<field name='skinTexture' type='MFString' value='"halfmoonScalesPatch.jpg"' accessType='inputOutput'/>
<field name='fishScale' type='SFVec3f' value='0.3 0.25 0.25' accessType='inputOutput'/>
<field name='fishColor' type='SFColor' value='0.7 0.7 0.7' accessType='inputOutput'/>
<Transform DEF='MyHalfmoon' rotation='1 0 0 1.57' translation='5 0 0'>
<IS>
<connect nodeField='scale' protoField='fishScale'/>
</IS>
<Shape>
<Appearance>
<Material DEF='FishColor'>
<IS>
<connect nodeField='diffuseColor' protoField='fishColor'/>
</IS>
</Material>
<ImageTexture DEF='FishTexture'>
<IS>
<connect nodeField='url' protoField='skinTexture'/>
</IS>
</ImageTexture>
</Appearance>
<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'/>
</Shape>
<Shape>
<Appearance DEF='Fin_Skin'>
<Material diffuseColor='0.5 0.5 0.5' transparency='0.2'/>
</Appearance>
</Shape>
<Transform translation='1.37 0.1 0.1'>
<Shape DEF='Eye'>
<Appearance>
<Material diffuseColor='0.5 0.5 0.5' shininess='1' specularColor='0.3 0.3 0.3'/>
</Appearance>
<Sphere radius='0.04'/>
</Shape>
</Transform>
<Transform translation='1.37 0.1 -0.1'>
<Shape USE='Eye'/>
</Transform>
<Transform scale='2.6 1 0.7' translation='1.46 0 0'>
<!-- Mouth -->
<Shape USE='Eye'/>
</Transform>
<Transform DEF='Left_Pectoral' translation='1.1 -0.15 -0.1'>
<Shape>
<Appearance USE='Fin_Skin'/>
<IndexedFaceSet solid='false' coordIndex='0, 1, 2, -1'>
<Coordinate point='0 0 0, 0.2 0 0, -0.2 0 -0.2'/>
</IndexedFaceSet>
</Shape>
</Transform>
<Transform DEF='Right_Pectoral' translation='1.1 -0.15 0.1'>
<Shape>
<Appearance USE='Fin_Skin'/>
<IndexedFaceSet solid='false' coordIndex='0, 1, 2, -1'>
<Coordinate point='0 0 0, 0.2 0 0, -0.2 0 0.2'/>
</IndexedFaceSet>
</Shape>
</Transform>
</Transform>
<TimeSensor DEF='Timer' cycleInterval='5' loop='true'/>
<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,'/>
<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'/>
<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'/>
<!-- orbiting time -->
<TimeSensor DEF='OrbitClock' cycleInterval='90' loop='true'/>
<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'/>
<PositionInterpolator DEF='HalfmoonPath' key='0.0 , 0.125, 0.25, 0.375, 0.5, 0.625, 0.750, 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'/>
<ROUTE fromNode='Timer' fromField='fraction_changed' toNode='Waggler' toField='set_fraction'/>
<ROUTE fromNode='Waggler' fromField='value_changed' toNode='Fish_Shape' toField='set_spine'/>
<ROUTE fromNode='Timer' fromField='fraction_changed' toNode='Left_Pectoral_Rotation' toField='set_fraction'/>
<ROUTE fromNode='Left_Pectoral_Rotation' fromField='value_changed' toNode='Left_Pectoral' toField='set_rotation'/>
<ROUTE fromNode='Timer' fromField='fraction_changed' toNode='Right_Pectoral_Rotation' toField='set_fraction'/>
<ROUTE fromNode='Right_Pectoral_Rotation' fromField='value_changed' toNode='Right_Pectoral' toField='set_rotation'/>
<ROUTE fromNode='OrbitClock' fromField='fraction_changed' toNode='Orbit' toField='set_fraction'/>
<ROUTE fromNode='OrbitClock' fromField='fraction_changed' toNode='HalfmoonPath' toField='set_fraction'/>
<ROUTE fromNode='Orbit' fromField='value_changed' toNode='MyHalfmoon' toField='set_rotation'/>
<ROUTE fromNode='HalfmoonPath' fromField='value_changed' toNode='MyHalfmoon' toField='set_translation'/>
</ProtoDeclare>
<NavigationInfo type='EXAMINE ANY'/>
<!-- Scene graph nodes are added here -->
<ProtoInstance name='Halfmoon'/>
</Scene>
</X3D>
<!--

Index for ProtoDeclareHalfmoon. Index for DEFsEye, Fin_Skin, Fish_Shape, FishColor, FishTexture, HalfmoonPath, Left_Pectoral, Left_Pectoral_Rotation, MyHalfmoon, Orbit, OrbitClock, Right_Pectoral, Right_Pectoral_Rotation, Timer, Waggler.

-->
<!-- Tag color codes: <NodeType DEF='NodeName' attribute='value'/> < Prototype name='ProtoName'/> < field name='fieldName'/> </Prototype > -->