<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
<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 ' >
<head>
<meta name='titlecontent='SubWorld.x3d'/>
<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.'/>
<meta name='creatorcontent='John L. Moreland'/>
<meta name='translatorcontent='Don Brutzman'/>
<meta name='createdcontent='1 July 1998'/>
<meta name='translatedcontent='2 February 2014'/>
<meta name='modifiedcontent='11 October 2020'/>
<meta name='referencecontent='originals/subworld.wrl'/>
<meta name='referencecontent=' http://www.siggraph.org/s98 '/>
<meta name='referencecontent=' http://www.siggraph.org/s98/conference/courses/18.html '/>
<meta name='referencecontent=' http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/slides/mt0350.htm '/>
<meta name='referencecontent=' http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/vrml97.htm '/>
<meta name='referencecontent=' https://www.web3d.org/x3d/content/examples/X3dResources.html '/>
<meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/SubWorld.x3d '/>
<meta name='generatorcontent='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/>
<meta name='generatorcontent='X3D-Edit, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!--

to top <!-- Event Graph ROUTE Table shows event connections -->
 
<!-- Index for DEF nodes: Churn, OI, OI2, Sub, TS, TS2, WaterTT

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2, Viewpoint_3, Viewpoint_4
-->
<Scene>
<WorldInfo info='"Copyright (c) 1998, John L. Moreland"title='Submarine world with sounds'/>
<NavigationInfo/>
<Viewpoint description='Aboveorientation='1.0 0.0 0.0 -0.7position='0.0 10.0 19.0'/>
<Viewpoint description='Surfaceposition='0.0 0.0 20.0'/>
<Viewpoint description='Belowposition='0.0 -3.0 20.0'/>
<Viewpoint description='Middleposition='0.0 -3.0 0.0'/>
<Group>
<Shape>
<Appearance>
<!-- ROUTE information for WaterTT node:  [from Churn.one_changed to set_rotation ] -->
<TextureTransform DEF='WaterTTscale='0.3 0.3'/>

<Material diffuseColor='0.254 0.494 0.8965emissiveColor='0.254 0.494 0.8965transparency='0.5'/>
<ImageTexture
  url=' "water.jpg " "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/water.jpg " ' />
</Appearance>
<IndexedFaceSet solid='falsecoordIndex='0 1 2 3 0'>
<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'/>
</IndexedFaceSet>
</Shape>
<!-- ROUTE information for Sub node:  [from OI.value_changed to set_rotation ] -->
<Transform DEF='Sub'>
</Transform>
</Group>
<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'/>
<!-- ROUTE information for TS node:  [from fraction_changed to OI.set_fraction ] -->
<TimeSensor DEF='TScycleInterval='8.0loop='true'/>

<!-- 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'/>

< ROUTE  fromNode=' TS' fromField='fraction_changed' toNode=' OI' toField='set_fraction'/>
< ROUTE  fromNode=' OI' fromField='value_changed' toNode=' Sub' toField='set_rotation'/>
<!-- ROUTE information for TS2 node:  [from fraction_changed to OI2.set_fraction ] -->
<TimeSensor DEF='TS2cycleInterval='90.0loop='true'/>

<!-- 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'/>

<!-- ROUTE information for Churn node:  [from OI2.value_changed to set_rotation ] [from one_changed to WaterTT.set_rotation ] -->
<Script DEF='Churn'>
<field name='one_changedtype='SFFloataccessType='outputOnly'/>
<field name='set_rotationtype='SFRotationaccessType='inputOnly'/>
<![CDATA[
      
ecmascript:
		function set_rotation( rot, et )
		{
			one_changed = rot[3];
		}

    
]]>
</Script>
< ROUTE  fromNode=' TS2' fromField='fraction_changed' toNode=' OI2' toField='set_fraction'/>
< ROUTE  fromNode=' OI2' fromField='value_changed' toNode=' Churn' toField='set_rotation'/>
< ROUTE  fromNode=' Churn' fromField='one_changed' toNode=' WaterTT' toField='set_rotation'/>
<Transform scale='40.0 9.0 40.0translation='0.0 8.0 0.0'>
<Sound maxBack='1.0maxFront='1.0spatialize='false'> </Sound>
</Transform>
<Transform scale='25.0 1.0 25.0'>
<Sound maxBack='1.0maxFront='1.0spatialize='false'> </Sound>
</Transform>
<Transform scale='40.0 9.0 40.0translation='0.0 -8.0 0.0'>
<Sound maxBack='1.0maxFront='1.0spatialize='false'> </Sound>
</Transform>
</Scene>
</X3D>
<!--

to top <!-- Event Graph ROUTE Table shows event connections -->
 
<!-- Index for DEF nodes: Churn, OI, OI2, Sub, TS, TS2, WaterTT

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2, Viewpoint_3, Viewpoint_4
-->

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



-->

<!-- 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. -->