X3D Model Documentation: HalfMoonPrototype.x3d

  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='titlecontent='HalfMoonPrototype.x3d'/>
  6            <meta name='descriptioncontent='Prototype for a group of HalfMoon fish in the Kelp forest.'/>
  7            <meta name='creatorcontent='Ildeniz Duman'/>
  8            <meta name='translatorcontent='Scott Tufts'/>
  9            <meta name='createdcontent='1 June 1998'/>
 10            <meta name='modifiedcontent='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='identifiercontent='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/HalfMoonPrototype.x3d'/>
 14            <meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
 15            <meta name='licensecontent='../license.html'/>
 16       </head>
<!--

<!-- Event Graph ROUTE Table shows event connections. -->

<!-- to top Index for DEF nodes: AnimationGroup, Eye, Fin_Skin, Fish_Shape, FishColor, FishTexture, HalfMoonPath, Left_Pectoral, Left_Pectoral_Rotation, MyHalfMoon, Orbit, OrbitClock, Right_Pectoral, Right_Pectoral_Rotation, Timer, Waggler

Index for ProtoDeclare definition: HalfMoon
-->
 17       <Scene>
 18            <WorldInfo title='HalfMoonPrototype.x3d'/>
 19            <ProtoDeclare name='HalfMoonappinfo='HalfMoon fish'>
 20                 <ProtoInterface>
 21                      <field name='skinTextureUrltype='MFStringvalue=' "HalfMoonScalesPatch.jpg" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/HalfMoonScalesPatch.jpg"' accessType='inputOutput'/>
 22                      <field name='fishScaletype='SFVec3fvalue='0.3 0.25 0.25accessType='inputOutput'/>
 23                      <field name='fishColortype='SFColorvalue='0.7 0.7 0.7accessType='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='scaleprotoField='fishScale'/>
 29                           </IS>
 30                           <Shape>
 31                                <Appearance>
 32                                     <Material DEF='FishColor'>
 33                                          <IS>
 34                                               <connect nodeField='diffuseColorprotoField='fishColor'/>
 35                                          </IS>
 36                                     </Material>
 37                                     <ImageTexture DEF='FishTexture'>
 38                                          <IS>
 39                                               <connect nodeField='urlprotoField='skinTextureUrl'/>
 40                                          </IS>
 41                                     </ImageTexture>
 42                                </Appearance>
 43 
                              <!-- ROUTE information for Fish_Shape node:  [from Waggler.value_changed to set_spine ] -->
                              <Extrusion DEF='Fish_ShapecreaseAngle='1.57crossSection='-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 1scale='0.03 0.03 0.3 0.3 0.2 0.4 0.1 0.5 0.1 0.15 0.03 0.4spine='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 
                              <!-- Appearance Fin_Skin is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
                              <Appearance DEF='Fin_Skin'>
 47                                     <Material diffuseColor='0.5 0.5 0.5transparency='0.2'/>
 48                                </Appearance>
 49                           </Shape>
 50                           <Transform translation='1.37 0.1 0.1'>
 51 
                              <!-- Shape Eye is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
                              <Shape DEF='Eye'>
 52                                     <Appearance>
 53                                          <Material diffuseColor='0.5 0.5 0.5shininess='1specularColor='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.7translation='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_Pectoraltranslation='1.1 -0.15 -0.1'>
 66                                <Shape>
 67                                     <Appearance USE='Fin_Skin'/>
 68                                     <IndexedFaceSet solid='falsecoordIndex='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_Pectoraltranslation='1.1 -0.15 0.1'>
 74                                <Shape>
 75                                     <Appearance USE='Fin_Skin'/>
 76                                     <IndexedFaceSet solid='falsecoordIndex='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='TimercycleInterval='5loop='true'/>
 83 
                              <!-- ROUTE information for Waggler node:  [from Timer.fraction_changed to set_fraction ] [from value_changed to Fish_Shape.set_spine ] -->
                              <CoordinateInterpolator DEF='Wagglerkey='0.0 0.15 0.28 0.4 0.55 0.7 0.85 1keyValue='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_Rotationkey='0 0.3 0.7 1keyValue='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_Rotationkey='0 0.3 0.7 1keyValue='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='OrbitClockcycleInterval='90enabled='falseloop='true'/>
 88 
                              <!-- ROUTE information for Orbit node:  [from OrbitClock.fraction_changed to set_fraction ] [from value_changed to MyHalfMoon.set_rotation ] -->
                              <OrientationInterpolator DEF='Orbitkey='0.0 0.25 0.5 0.750 1keyValue='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='HalfMoonPathkey='0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1keyValue='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 shows event connections. -->

<!-- to top Index for DEF nodes: AnimationGroup, Eye, Fin_Skin, Fish_Shape, FishColor, FishTexture, HalfMoonPath, Left_Pectoral, Left_Pectoral_Rotation, MyHalfMoon, Orbit, OrbitClock, Right_Pectoral, Right_Pectoral_Rotation, Timer, Waggler

Index for ProtoDeclare definition: HalfMoon
-->
X3D Tooltips element index: Appearance, connect, Coordinate, CoordinateInterpolator, Extrusion, field, Group, head, ImageTexture, IndexedFaceSet, IS, Material, meta, OrientationInterpolator, PositionInterpolator, ProtoBody, ProtoDeclare, ProtoInstance, ProtoInterface, ROUTE, Scene, Shape, Sphere, TimeSensor, Transform, WorldInfo, X3D, accessType and type, XML data types, field types

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

ROUTE
event to
(1)
Orbit
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
Orbit
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(2)
MyHalfMoon
Transform
set_rotation
SFRotation
OrbitClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
HalfMoonPath
PositionInterpolator
set_fraction
SFFloat
then
 
 
 
HalfMoonPath
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(2)
MyHalfMoon
Transform
set_translation
SFVec3f

Timer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
Waggler
CoordinateInterpolator
set_fraction
SFFloat
then
 
 
 
Waggler
CoordinateInterpolator
value_changed
MFVec3f

ROUTE
event to
(2)
Fish_Shape
Extrusion
set_spine
MFVec3f
Timer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
Left_Pectoral_Rotation
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
Left_Pectoral_Rotation
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(2)
Left_Pectoral
Transform
set_rotation
SFRotation
Timer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
Right_Pectoral_Rotation
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
Right_Pectoral_Rotation
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(2)
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. 

-->
<!-- Online at
https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/HalfMoonPrototypeIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/HalfMoonPrototype.x3d -->

<!-- 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> -->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->