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='title' content=' SeaStateElevationGridExample.x3d '/> |
6 | <meta name='description' content='Sea State animation using ElevationGrid.'/> |
7 | <meta name='creator' content='Don Brutzman, Marcus Simoes and MV3204 class'/> |
8 | <meta name='created' content='25 May 2001'/> |
9 | <meta name='modified' content='20 October 2019'/> |
10 | <meta name=' warning ' content=' unfinished, but in progress... '/> |
11 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/Savage/Environment/SeaState/SeaStateElevationGridExample.x3d '/> |
12 | <meta name='reference' content=' SeaStateExtrusionExample.x3d '/> |
13 | <meta name='subject' content='sea state, MFFloat interpolator script'/> |
14 | <meta name='generator' content='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
15 | <meta name='license' content='../../license.html'/> |
16 | </head> |
17 | <Scene> |
18 | <WorldInfo title='SeaStateElevationGridExample.x3d'/> |
19 | <Viewpoint description='hello sea state' orientation='1 0 0 -0.78' position='0 5 5'/> |
20 |
<!-- ROUTE information for WaveClock node:
[from fraction_changed to MFFloatInterpolatorScript.set_fraction
]
-->
<TimeSensor DEF='WaveClock' cycleInterval='3' loop='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_fraction' type='SFFloat' accessType='inputOnly'/> |
24 | <field name='key' type='MFFloat' accessType='inputOutput'/> |
25 | <field name='keyValue' type='MFFloat' accessType='inputOutput'/> |
26 | <field name='value_changed' type='MFFloat' accessType='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='WaveGrid' xDimension='3' zDimension='3' height='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 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 |
MFFloatInterpolatorScript
Script set_fraction SFFloat |
then
|
MFFloatInterpolatorScript
Script value_changed MFFloat |
WaveGrid
ElevationGrid set_height MFFloat |
<!--
Color-coding 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)
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->