X3D Model Documentation: SeaStateElevationGridExample.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2 
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
  3  <X3D profile='Immersive' version='3.0 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.0.xsd'>
  4       <head>
  5            <meta name='titlecontent=' SeaStateElevationGridExample.x3d '/>
  6            <meta name='descriptioncontent='Sea State animation using ElevationGrid.'/>
  7            <meta name='creatorcontent='Don Brutzman, Marcus Simoes and MV3204 class'/>
  8            <meta name='createdcontent='25 May 2001'/>
  9            <meta name='modifiedcontent='20 October 2019'/>
 10            <meta name=' warning content=' unfinished, but in progress... '/>
 11            <meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Savage/Environment/SeaState/SeaStateElevationGridExample.x3d '/>
 12            <meta name='referencecontent=' SeaStateExtrusionExample.x3d '/>
 13            <meta name='subjectcontent='sea state, MFFloat interpolator script'/>
 14            <meta name='generatorcontent='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit'/>
 15            <meta name='licensecontent='../../license.html'/>
 16       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: MFFloatInterpolatorScript, WaveClock, WaveGrid

Index for Viewpoint node: Viewpoint_1
-->
 17       <Scene>
 18            <WorldInfo title='SeaStateElevationGridExample.x3d'/>
 19            <Viewpoint description='hello sea stateorientation='1 0 0 -0.78position='0 5 5'/>
 20 
          <!-- ROUTE information for WaveClock node:  [from fraction_changed to MFFloatInterpolatorScript.set_fraction ] -->
          <TimeSensor DEF='WaveClockcycleInterval='3loop='true'/>
 21            <!-- WaveHeightCalculationScript -->
 22 
          <!-- ROUTE information for MFFloatInterpolatorScript node:  [from WaveClock.fraction_changed to set_fraction ] [from value_changed to WaveGrid.set_height ] -->
          <Script DEF='MFFloatInterpolatorScript'>
 23                 <field name='set_fractiontype='SFFloataccessType='inputOnly'/>
 24                 <field name='keytype='MFFloataccessType='inputOutput'/>
 25                 <field name='keyValuetype='MFFloataccessType='inputOutput'/>
 26                 <field name='value_changedtype='MFFloataccessType='outputOnly'/>
  <![CDATA[
      
ecmascript:

function set_fraction (value, timestamp)
{
//	Browser.println ('received value=' + value);

//	interpolate between values in our keyValue array
}

    
]]>
 28            </Script>
 29            <Shape>
 30 
               <!-- ROUTE information for WaveGrid node:  [from MFFloatInterpolatorScript.value_changed to set_height ] -->
               <ElevationGrid DEF='WaveGridxDimension='3zDimension='3height='0 0 0 0 0 0 0 0 0'/>
 31                 <Appearance>
 32                      <Material diffuseColor='0 0.6 0.6'/>
 33                 </Appearance>
 34            </Shape>
 35            < ROUTE  fromNode='WaveClock' fromField='fraction_changed' toNode='MFFloatInterpolatorScript' toField='set_fraction'/>
 36            < ROUTE  fromNode='MFFloatInterpolatorScript' fromField='value_changed' toNode='WaveGrid' toField='set_height'/>
 37       </Scene>
 38  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF nodes index: MFFloatInterpolatorScript, WaveClock, WaveGrid

Index for Viewpoint node: Viewpoint_1
-->
X3D Tooltips element index: Appearance, ElevationGrid, field, head, Material, meta, ROUTE, Scene, Script, Shape, TimeSensor, Viewpoint, WorldInfo, X3D, plus documentation for accessType definitions, type definitions, XML data types, and 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.

WaveClock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
MFFloatInterpolatorScript
Script
set_fraction
SFFloat
then
 
 
 
MFFloatInterpolatorScript
Script
value_changed
MFFloat

ROUTE
event to
(2)
WaveGrid
ElevationGrid
set_height
MFFloat


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/Savage/Environment/SeaState/SeaStateElevationGridExampleIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Savage/Environment/SeaState/SeaStateElevationGridExample.x3d -->

<!-- Color-coding legend: X3D terminology <X3dNode  DEF='idNamefield='value'/> matches XML terminology <XmlElement  DEF='idNameattribute='value'/>
(Light-blue background: event-based behavior node or statement) (Grey background inside box: inserted documentation) (Magenta background: X3D Extensibility)
-->

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