X3D Model Documentation: ScalarInterpolatorFishPrototype.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='ScalarInterpolatorFishPrototype.x3d'/>
  6            <meta name='descriptioncontent='This is a prototype for a CircleFish, which is also used by CircleFishLod. Default fish size: length is 1 m (Y-axis), max Height is 1 m (Z-axis), max Width is 10 cm (X-axis).'/>
  7            <meta name='creatorcontent='Ildeniz Duman'/>
  8            <meta name='translatorcontent='Scott Tufts'/>
  9            <meta name='createdcontent='1 May 1998'/>
 10            <meta name='translatedcontent='11 December 2001'/>
 11            <meta name='modifiedcontent='20 October 2019'/>
 12            <meta name='referencecontent='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/CircleFishPrototype.x3d'/>
 13            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter07EventAnimationInterpolation/ScalarInterpolatorFishPrototype.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: Eye, FinColor, FinSkin, FishBodyExtrusion, FishColor, FishTexture, FishTransform, LeftPectoral, RightPectoral, TransparencyTimer, TransparencyValue, Way

Index for ProtoDeclare definition: CircleFish
-->
 17       <Scene>
 18            <WorldInfo title='ScalarInterpolatorFishPrototype.x3d'/>
 19            <ProtoDeclare name='CircleFish'>
 20                 <ProtoInterface>
 21                      <field name='skinTextureUrltype='MFStringaccessType='inputOutput'/>
 22                      <field name='fishScaletype='SFVec3fvalue='1 1 1accessType='inputOutput'/>
 23                      <field name='fishColortype='SFColorvalue='0.5 0.5 0.5accessType='inputOutput'/>
 24                      <field name='finColortype='SFColorvalue='0.5 0.5 0.5accessType='inputOutput'/>
 25                      <field name='positionKeytype='MFFloatvalue='0.0 0.125 0.25 0.375 0.5 0.625 0.750 0.8751accessType='inputOutput'/>
 26                      <field name='positionKeyValuetype='MFVec3fvalue='1.5 2 0 1.5 0 -1.0 0 -1 -1.0 -1.5 0 -1.0 -1.5 2 0 -1.5 0 1.0 0 -2 1.0 1.5 0 1.0 1.5 2 0accessType='inputOutput'/>
 27                      <field name='orientationKeytype='MFFloatvalue='0.0 0.25 0.5 0.750 1accessType='inputOutput'/>
 28                      <field name='orientationKeyValuetype='MFRotationvalue='0 1 0 0 0 1 0 -1.57 0 1 0 -3.14 0 1 0 -4.71 0 1 0 -6.28accessType='inputOutput'/>
 29                      <field name='orbitTimetype='SFTimevalue='90accessType='inputOutput'/>
 30                 </ProtoInterface>
 31                 <ProtoBody>
 32                      <Transform DEF='Way'>
 33                           <Transform rotation='1 0 0 1.395'>
 34                                <Transform DEF='FishTransform'>
 35                                     <IS>
 36                                          <connect nodeField='scaleprotoField='fishScale'/>
 37                                     </IS>
 38                                     <Shape>
 39                                          <Appearance>
 40 
                                             <!-- ROUTE information for FishColor node:  [from TransparencyValue.value_changed to transparency ] -->
                                             <Material DEF='FishColor'>
 41                                                    <IS>
 42                                                         <connect nodeField='diffuseColorprotoField='fishColor'/>
 43                                                    </IS>
 44                                               </Material>
 45                                               <ImageTexture DEF='FishTexture'>
 46                                                    <IS>
 47                                                         <connect nodeField='urlprotoField='skinTextureUrl'/>
 48                                                    </IS>
 49                                               </ImageTexture>
 50                                          </Appearance>
 51                                          <Extrusion DEF='FishBodyExtrusioncreaseAngle='0.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.05 0.3 0.05 0.45 0.1 0.5 0.05 0.45 0.05 0.2 0.03 0.4spine='0 1 0 0 0.8 0 0 0.6 0 0 0.5 0 0 0.3 0 0 0.2 0 0 0 0'/>
 52                                     </Shape>
 53 
                                   <!-- ROUTE information for TransparencyTimer node:  [from fraction_changed to TransparencyValue.set_fraction ] -->
                                   <TimeSensor DEF='TransparencyTimercycleInterval='3loop='truestartTime='1'/>
 54 
                                   <!-- ROUTE information for TransparencyValue node:  [from TransparencyTimer.fraction_changed to set_fraction ] [from value_changed to FishColor.transparency ] -->
                                   <ScalarInterpolator DEF='TransparencyValuekey='0 .5 1keyValue='0 1 0'/>
 55                                     < ROUTE  fromNode='TransparencyTimer' fromField='fraction_changed' toNode='TransparencyValue' toField='set_fraction'/>
 56                                     < ROUTE  fromNode='TransparencyValue' fromField='value_changed' toNode='FishColor' toField='transparency'/>
 57                                     <Shape>
 58 
                                        <!-- Appearance FinSkin is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
                                        <Appearance DEF='FinSkin'>
 59                                               <Material DEF='FinColortransparency='0.2'>
 60                                                    <IS>
 61                                                         <connect nodeField='diffuseColorprotoField='finColor'/>
 62                                                    </IS>
 63                                               </Material>
 64                                          </Appearance>
 65                                     </Shape>
 66                                     <Transform translation='0.015 0.8 -0.2'>
 67 
                                        <!-- Shape Eye is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
                                        <Shape DEF='Eye'>
 68                                               <Appearance>
 69                                                    <Material diffuseColor='0.5 0.5 0.5shininess='1specularColor='0.3 0.3 0.3'/>
 70                                               </Appearance>
 71                                               <Sphere radius='0.03'/>
 72                                          </Shape>
 73                                     </Transform>
 74                                     <Transform translation='-0.015 0.8 -0.2'>
 75                                          <Shape USE='Eye'/>
 76                                     </Transform>
 77                                     <Transform scale='1 1 0.7translation='0 0.98 0'>
 78                                          <Shape USE='Eye'/>
 79                                     </Transform>
 80                                     <Transform DEF='LeftPectoraltranslation='0.04 0.4 0.3'>
 81                                          <Shape>
 82                                               <Appearance USE='FinSkin'/>
 83                                               <IndexedFaceSet solid='falsecoordIndex='0 1 2 -1'>
 84                                                    <Coordinate point='0 0 0 0 0.2 0 0.2 0.1 0'/>
 85                                               </IndexedFaceSet>
 86                                          </Shape>
 87                                     </Transform>
 88                                     <Transform DEF='RightPectoraltranslation='-0.04 0.4 0.3'>
 89                                          <Shape>
 90                                               <Appearance USE='FinSkin'/>
 91                                               <IndexedFaceSet solid='falsecoordIndex='0 1 2 -1'>
 92                                                    <Coordinate point='0 0 0 0 0.2 0 -0.2 0.1 0'/>
 93                                               </IndexedFaceSet>
 94                                          </Shape>
 95                                     </Transform>
 96                                </Transform>
 97                           </Transform>
 98                      </Transform>
 99                 </ProtoBody>
100            </ProtoDeclare>
101            <!-- ==================== -->
102            <ProtoInstance name='CircleFish'/>
103       </Scene>
104  </X3D>
<!--

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

<!-- to top Index for DEF nodes: Eye, FinColor, FinSkin, FishBodyExtrusion, FishColor, FishTexture, FishTransform, LeftPectoral, RightPectoral, TransparencyTimer, TransparencyValue, Way

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

Event Graph ROUTE Table entries with 2 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.

TransparencyTimer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
TransparencyValue
ScalarInterpolator
set_fraction
SFFloat
then
 
 
 
TransparencyValue
ScalarInterpolator
value_changed
SFFloat

ROUTE
event to
(2)
FishColor
Material
transparency
SFFloat


ProtoInstance
CircleFish
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/Chapter07EventAnimationInterpolation/ScalarInterpolatorFishPrototypeIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter07EventAnimationInterpolation/ScalarInterpolatorFishPrototype.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. -->