X3D Model Documentation: SubWorld.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='SubWorld.x3d'/>
  6            <meta name='descriptioncontent='Multiple sounds example: submarine world with sounds. This world illustrates the use of multiple sounds and their ellipsoids to arrange so that different sounds are heard at different points in the world.'/>
  7            <meta name='creatorcontent='John L. Moreland'/>
  8            <meta name='translatorcontent='Don Brutzman'/>
  9            <meta name='createdcontent='1 July 1998'/>
 10            <meta name='translatedcontent='2 February 2014'/>
 11            <meta name='modifiedcontent='11 October 2020'/>
 12            <meta name='referencecontent='originals/subworld.wrl'/>
 13            <meta name='referencecontent='http://www.siggraph.org/s98'/>
 14            <meta name='referencecontent='http://www.siggraph.org/s98/conference/courses/18.html'/>
 15            <meta name='referencecontent='http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/slides/mt0350.htm'/>
 16            <meta name='referencecontent='http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/vrml97.htm'/>
 17            <meta name='referencecontent='https://www.web3d.org/x3d/content/examples/X3dResources.html'/>
 18            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/SubWorld.x3d'/>
 19            <meta name='generatorcontent='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/>
 20            <meta name='generatorcontent='X3D-Edit, https://savage.nps.edu/X3D-Edit'/>
 21            <meta name='licensecontent='../license.html'/>
 22       </head>
<!--

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

<!-- to top Index for DEF nodes: Churn, OI, OI2, Sub, TS, TS2, WaterTT

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2, Viewpoint_3, Viewpoint_4
-->
 23       <Scene>
 24            <WorldInfo info='"Copyright (c) 1998, John L. Moreland"title='Submarine world with sounds'/>
 25            <NavigationInfo/>
 26            <Viewpoint description='Aboveorientation='1.0 0.0 0.0 -0.7position='0.0 10.0 19.0'/>
 27            <Viewpoint description='Surfaceposition='0.0 0.0 20.0'/>
 28            <Viewpoint description='Belowposition='0.0 -3.0 20.0'/>
 29            <Viewpoint description='Middleposition='0.0 -3.0 0.0'/>
 30            <Group>
 31                 <Shape>
 32                      <Appearance>
 33 
                         <!-- ROUTE information for WaterTT node:  [from Churn.one_changed to set_rotation ] -->
                         <TextureTransform DEF='WaterTTscale='0.3 0.3'/>
 34                           <Material diffuseColor='0.254 0.494 0.8965emissiveColor='0.254 0.494 0.8965transparency='0.5'/>
 35                           <ImageTexture   url=' "water.jpg " "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/water.jpg " '/>
 36                      </Appearance>
 37                      <IndexedFaceSet solid='falsecoordIndex='0 1 2 3 0'>
 38                           <Coordinate point='20.0 0.0 20.0 20.0 0.0 -20.0 -20.0 0.0 -20.0 -20.0 0.0 20.0'/>
 39                      </IndexedFaceSet>
 40                 </Shape>
 41 
               <!-- ROUTE information for Sub node:  [from OI.value_changed to set_rotation ] -->
               <Transform DEF='Sub'>
 42                      <Transform translation='10.0 -2.0 0.0'>
 43                           <Inline   url=' "Sub.x3d" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Sub.x3d" "Sub.wrl" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Sub.wrl" '/>
 44                      </Transform>
 45                 </Transform>
 46            </Group>
 47            <Background groundAngle='1.309 1.570796groundColor='0.0 0.3 0.7 0.0 0.2 0.3 0.0 0.0 0.3skyAngle='1.309 1.571skyColor='0.0 0.2 0.9 0.0 0.3 0.8 0.254 0.494 0.8965'/>
 48 
          <!-- ROUTE information for TS node:  [from fraction_changed to OI.set_fraction ] -->
          <TimeSensor DEF='TScycleInterval='8.0loop='true'/>
 49 
          <!-- ROUTE information for OI node:  [from TS.fraction_changed to set_fraction ] [from value_changed to Sub.set_rotation ] -->
          <OrientationInterpolator DEF='OIkey='0.0 0.5 1.0keyValue='0.0 1.0 0.0 0.0 0.0 1.0 0.0 3.14159 0.0 1.0 0.0 6.283'/>
 50            < ROUTE  fromNode='TS' fromField='fraction_changed' toNode='OI' toField='set_fraction'/>
 51            < ROUTE  fromNode='OI' fromField='value_changed' toNode='Sub' toField='set_rotation'/>
 52 
          <!-- ROUTE information for TS2 node:  [from fraction_changed to OI2.set_fraction ] -->
          <TimeSensor DEF='TS2cycleInterval='90.0loop='true'/>
 53 
          <!-- ROUTE information for OI2 node:  [from TS2.fraction_changed to set_fraction ] [from value_changed to Churn.set_rotation ] -->
          <OrientationInterpolator DEF='OI2key='0.0 0.5 1.0keyValue='0.0 1.0 0.0 0.0 0.0 1.0 0.0 3.14159 0.0 1.0 0.0 6.283'/>
 54 
          <!-- ROUTE information for Churn node:  [from OI2.value_changed to set_rotation ] [from one_changed to WaterTT.set_rotation ] -->
          <Script DEF='Churn'>
 55                 <field name='one_changedtype='SFFloataccessType='outputOnly'/>
 56                 <field name='set_rotationtype='SFRotationaccessType='inputOnly'/>
  <![CDATA[
      
ecmascript:
		function set_rotation( rot, et )
		{
			one_changed = rot[3];
		}

    
]]>
 58            </Script>
 59            < ROUTE  fromNode='TS2' fromField='fraction_changed' toNode='OI2' toField='set_fraction'/>
 60            < ROUTE  fromNode='OI2' fromField='value_changed' toNode='Churn' toField='set_rotation'/>
 61            < ROUTE  fromNode='Churn' fromField='one_changed' toNode='WaterTT' toField='set_rotation'/>
 62            <Transform scale='40.0 9.0 40.0translation='0.0 8.0 0.0'>
 63                 <Sound maxBack='1.0maxFront='1.0spatialize='false'>
 64                      <AudioClip loop='true'   url=' "air.wav" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/air.wav" '/>
 65                 </Sound>
 66            </Transform>
 67            <Transform scale='25.0 1.0 25.0'>
 68                 <Sound maxBack='1.0maxFront='1.0spatialize='false'>
 69                      <AudioClip loop='true'   url=' "paddle.wav" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/paddle.wav" '/>
 70                 </Sound>
 71            </Transform>
 72            <Transform scale='40.0 9.0 40.0translation='0.0 -8.0 0.0'>
 73                 <Sound maxBack='1.0maxFront='1.0spatialize='false'>
 74                      <AudioClip loop='true'   url=' "water.wav" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/water.wav" '/>
 75                 </Sound>
 76            </Transform>
 77       </Scene>
 78  </X3D>
<!--

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

<!-- to top Index for DEF nodes: Churn, OI, OI2, Sub, TS, TS2, WaterTT

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2, Viewpoint_3, Viewpoint_4
-->
X3D Tooltips element index: Appearance, AudioClip, Background, Coordinate, field, Group, head, ImageTexture, IndexedFaceSet, Inline, Material, meta, NavigationInfo, OrientationInterpolator, ROUTE, Scene, Script, Shape, Sound, TextureTransform, TimeSensor, Transform, Viewpoint, WorldInfo, X3D, accessType and type, XML data types, field types

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

TS
TimeSensor
fraction_changed
SFFloat

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

ROUTE
event to
(2)
Sub
Transform
set_rotation
SFRotation

TS2
TimeSensor
fraction_changed
SFFloat

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

ROUTE
event to
(2)
Churn
Script
set_rotation
SFRotation
then
 
 
 
Churn
Script
one_changed
SFFloat

ROUTE
event to
(3)
WaterTT
TextureTransform
set_rotation
SFFloat

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/Vrml2Sourcebook/Siggraph98Course/SubWorldIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/SubWorld.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)
-->

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