X3D Model Documentation: KelpExamplesNoBase.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='KelpExamplesNoBase.x3d'/>
  6            <meta name='descriptioncontent='Creates 3 instances of Kelp that sway.'/>
  7            <meta name='creatorcontent='Joseph Cannon, Dan DeVos, Don Brutzman'/>
  8            <meta name='createdcontent='25 September 1998'/>
  9            <meta name='modifiedcontent='20 October 2019'/>
 10            <meta name='referencecontent='http://faculty.nps.edu/brutzman/kelp'/>
 11            <meta name='referencecontent='KelpForestDesignPaperWeb3dSymposiumFebruary2002.pdf'/>
 12            <meta name='referencecontent='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/KelpForestDesignPaperWeb3dSymposiumFebruary2002.pdf'/>
 13            <meta name='referencecontent='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/Teaching3d-KelpForestCaseStudy.pdf'/>
 14            <meta name='accessRightscontent='All content has permissions for free use. Please provide credit to the Naval Postgraduate School (NPS) Modeling Virtual Environments and Simulation (MOVES) Institute.'/>
 15            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/KelpExamplesNoBase.x3d'/>
 16            <meta name='generatorcontent='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/>
 17            <meta name='licensecontent='../license.html'/>
 18       </head>
<!--

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

<!-- to top Index for DEF nodes: Clock0, KelpPath0, KelpPath1, KelpPath2, KelpTransform0, KelpTransform1, KelpTransform2, TimeDelay1, TimeDelay2

Index for ExternProtoDeclare definition: Kelp
-->
 19       <Scene>
 20            <WorldInfo title='KelpExamplesNoBase.x3d'/>
 21            <ExternProtoDeclare name='Kelpappinfo='Kelp strands and bulbs with no base'   url=' "KelpPrototype.x3d#Kelp" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/KelpPrototype.x3d#Kelp" "KelpPrototype.wrl#Kelp" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/KelpPrototype.wrl#Kelp" '>
 22                 <field name='frontBladeSizetype='SFVec3faccessType='inputOutput'/>
 23                 <field name='rearSideBladeHeighttype='SFVec3faccessType='inputOutput'/>
 24                 <field name='frontSideBladeHeighttype='SFVec3faccessType='inputOutput'/>
 25                 <field name='rightBladeSizetype='SFVec3faccessType='inputOutput'/>
 26                 <field name='rightSideBladeHeighttype='SFVec3faccessType='inputOutput'/>
 27                 <field name='leftBladeSizetype='SFVec3faccessType='inputOutput'/>
 28                 <field name='rearBladeSizetype='SFVec3faccessType='inputOutput'/>
 29                 <field name='leftSideBladeHeighttype='SFVec3faccessType='inputOutput'/>
 30            </ExternProtoDeclare>
 31            <Group>
 32 
               <!-- ROUTE information for KelpTransform0 node:  [from KelpPath0.value_changed to set_rotation ] -->
               <Transform DEF='KelpTransform0scale='0.3 0.3 0.3'>
 33                      <ProtoInstance name='Kelp'/>
 34                 </Transform>
 35 
               <!-- ROUTE information for KelpTransform1 node:  [from KelpPath1.value_changed to set_rotation ] -->
               <Transform DEF='KelpTransform1rotation='0.0 1.0 0.0 5.5scale='0.29 0.29 0.29translation='-0.5 0.0 0.0'>
 36                      <ProtoInstance name='Kelp'>
 37                           <fieldValue name='rearSideBladeHeightvalue='0.0 15.0 0.0'/>
 38                           <fieldValue name='frontBladeSizevalue='0.4 0.4 0.4'/>
 39                           <fieldValue name='frontSideBladeHeightvalue='0.0 23.0 0.0'/>
 40                           <fieldValue name='rightBladeSizevalue='0.4 0.4 0.4'/>
 41                           <fieldValue name='rightSideBladeHeightvalue='0.0 20.0 0.0'/>
 42                           <fieldValue name='leftBladeSizevalue='0.7 0.7 0.7'/>
 43                           <fieldValue name='rearBladeSizevalue='0.7 0.7 0.7'/>
 44                           <fieldValue name='leftSideBladeHeightvalue='0.0 6.0 0.0'/>
 45                      </ProtoInstance>
 46                 </Transform>
 47 
               <!-- ROUTE information for KelpTransform2 node:  [from KelpPath2.value_changed to set_rotation ] -->
               <Transform DEF='KelpTransform2scale='0.3 0.3 0.3translation='0.5 0.0 0.5'>
 48                      <ProtoInstance name='Kelp'>
 49                           <fieldValue name='rearSideBladeHeightvalue='0.0 18.0 0.0'/>
 50                           <fieldValue name='frontBladeSizevalue='0.7 0.7 0.7'/>
 51                           <fieldValue name='frontSideBladeHeightvalue='0.0 8.0 0.0'/>
 52                           <fieldValue name='rightBladeSizevalue='0.7 0.7 0.7'/>
 53                           <fieldValue name='rightSideBladeHeightvalue='0.0 16.0 0.0'/>
 54                           <fieldValue name='leftBladeSizevalue='0.7 0.7 0.7'/>
 55                           <fieldValue name='rearBladeSizevalue='0.4 0.4 0.4'/>
 56                           <fieldValue name='leftSideBladeHeightvalue='0.0 13.0 0.0'/>
 57                      </ProtoInstance>
 58                 </Transform>
 59            </Group>
 60            <Group>
 61                 <!-- ==================== -->
 62 
               <!-- ROUTE information for Clock0 node:  [from fraction_changed to KelpPath0.set_fraction ] [from fraction_changed to TimeDelay1.set_fraction ] [from fraction_changed to TimeDelay2.set_fraction ] -->
               <TimeSensor DEF='Clock0cycleInterval='5.5loop='true'/>
 63                 <!-- ==================== -->
 64 
               <!-- ROUTE information for KelpPath0 node:  [from Clock0.fraction_changed to set_fraction ] [from value_changed to KelpTransform0.set_rotation ] -->
               <OrientationInterpolator DEF='KelpPath0key='0.0 0.05 0.25 0.45 0.5 0.55 0.75 0.95 1.0keyValue='0 0 1 0.1 0 0 1 0.095 0 0 1 0 0 0 1 -0.095 0 0 1 -0.1 0 0 1 -0.095 0 0 1 0 0 0 1 0.095 0 0 1 0.1'/>
 65                 < ROUTE  fromNode='Clock0' fromField='fraction_changed' toNode='KelpPath0' toField='set_fraction'/>
 66                 < ROUTE  fromNode='KelpPath0' fromField='value_changed' toNode='KelpTransform0' toField='set_rotation'/>
 67                 <!-- ==================== -->
 68 
               <!-- ROUTE information for TimeDelay1 node:  [from Clock0.fraction_changed to set_fraction ] [from value_changed to KelpPath1.set_fraction ] -->
               <Script DEF='TimeDelay1'>
 69                      <field name='set_fractiontype='SFFloataccessType='inputOnly'/>
 70                      <field name='value_changedtype='SFFloataccessType='outputOnly'/>
  <![CDATA[
        
ecmascript:

function set_fraction (value, timestamp)
{
	delay = 0.25;
	delayedValue = value + (delay/5.5); // delay/interval, seconds
	if (delayedValue > 1) delayedValue--;
	value_changed = delayedValue;

//	Browser.println ('TimeDelay1 value=' + value + ', value_changed=' + value_changed);
}

      
]]>
 72                 </Script>
 73 
               <!-- ROUTE information for KelpPath1 node:  [from TimeDelay1.value_changed to set_fraction ] [from value_changed to KelpTransform1.set_rotation ] -->
               <OrientationInterpolator DEF='KelpPath1key='0.0 0.05 0.25 0.45 0.5 0.55 0.75 0.95 1.0keyValue='0 0 1 0.1 0 0 1 0.095 0 0 1 0 0 0 1 -0.095 0 0 1 -0.1 0 0 1 -0.095 0 0 1 0 0 0 1 0.095 0 0 1 0.1'/>
 74                 < ROUTE  fromNode='Clock0' fromField='fraction_changed' toNode='TimeDelay1' toField='set_fraction'/>
 75                 < ROUTE  fromNode='TimeDelay1' fromField='value_changed' toNode='KelpPath1' toField='set_fraction'/>
 76                 < ROUTE  fromNode='KelpPath1' fromField='value_changed' toNode='KelpTransform1' toField='set_rotation'/>
 77                 <!-- ==================== -->
 78 
               <!-- ROUTE information for TimeDelay2 node:  [from Clock0.fraction_changed to set_fraction ] [from value_changed to KelpPath2.set_fraction ] -->
               <Script DEF='TimeDelay2'>
 79                      <field name='set_fractiontype='SFFloataccessType='inputOnly'/>
 80                      <field name='value_changedtype='SFFloataccessType='outputOnly'/>
  <![CDATA[
        
ecmascript:

function set_fraction (value, timestamp)
{
	delay = 0.5;
	delayedValue = value + (delay/5.5); // delay/interval, seconds
	if (delayedValue > 1) delayedValue--;
	value_changed = delayedValue;

//	Browser.println ('TimeDelay2 value=' + value + ', value_changed=' + value_changed);
}

      
]]>
 82                 </Script>
 83 
               <!-- ROUTE information for KelpPath2 node:  [from TimeDelay2.value_changed to set_fraction ] [from value_changed to KelpTransform2.set_rotation ] -->
               <OrientationInterpolator DEF='KelpPath2key='0.0 0.05 0.25 0.45 0.5 0.55 0.75 0.95 1.0keyValue='0 0 1 0.1 0 0 1 0.095 0 0 1 0 0 0 1 -0.095 0 0 1 -0.1 0 0 1 -0.095 0 0 1 0 0 0 1 0.095 0 0 1 0.1'/>
 84                 < ROUTE  fromNode='Clock0' fromField='fraction_changed' toNode='TimeDelay2' toField='set_fraction'/>
 85                 < ROUTE  fromNode='TimeDelay2' fromField='value_changed' toNode='KelpPath2' toField='set_fraction'/>
 86                 < ROUTE  fromNode='KelpPath2' fromField='value_changed' toNode='KelpTransform2' toField='set_rotation'/>
 87            </Group>
 88       </Scene>
 89  </X3D>
<!--

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

<!-- to top Index for DEF nodes: Clock0, KelpPath0, KelpPath1, KelpPath2, KelpTransform0, KelpTransform1, KelpTransform2, TimeDelay1, TimeDelay2

Index for ExternProtoDeclare definition: Kelp
-->
X3D Tooltips element index: ExternProtoDeclare, field, fieldValue, Group, head, meta, OrientationInterpolator, ProtoInstance, ROUTE, Scene, Script, TimeSensor, Transform, WorldInfo, X3D, accessType and type, XML data types, field types

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

Clock0
TimeSensor
fraction_changed
SFFloat

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

ROUTE
event to
(2)
KelpTransform0
Transform
set_rotation
SFRotation
Clock0
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
TimeDelay1
Script
set_fraction
SFFloat
then
 
 
 
TimeDelay1
Script
value_changed
SFFloat

ROUTE
event to
(2)
KelpPath1
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
KelpPath1
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(3)
KelpTransform1
Transform
set_rotation
SFRotation
Clock0
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
TimeDelay2
Script
set_fraction
SFFloat
then
 
 
 
TimeDelay2
Script
value_changed
SFFloat

ROUTE
event to
(2)
KelpPath2
OrientationInterpolator
set_fraction
SFFloat
then
 
 
 
KelpPath2
OrientationInterpolator
value_changed
SFRotation

ROUTE
event to
(3)
KelpTransform2
Transform
set_rotation
SFRotation


ProtoInstance
Kelp
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. 


ProtoInstance
Kelp
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. 


ProtoInstance
Kelp
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. 
Additional guidance on X3D animation can be found in the 10-Step Animation Design Process and Event Tracing hint sheets. Have fun with X3D! 😀

-->
<!-- Online at
https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/KelpExamplesNoBaseIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/X3dForWebAuthors/KelpForestExhibit/KelpExamplesNoBase.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. -->