| 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='title' content=' SoundAudioClip.x3d '/> |
| 6 | <meta name='description' content='An example of the Sound and AudioClip node showing the effect of the various volume regions'/> |
| 7 | <meta name='created' content='1 May 2006'/> |
| 8 | <meta name='modified' content='13 May 2020'/> |
| 9 | <meta name='reference' content='https://X3dGraphics.com'/> |
| 10 | <meta name='reference' content=' https://www.web3d.org/x3d/content/examples/X3dResources.html '/> |
| 11 | <meta name='creator' content='Don Brutzman'/> |
| 12 | <meta name='rights' content='Copyright 2006, Daly Realism and Don Brutzman'/> |
| 13 | <meta name='subject' content='X3D book, X3D graphics, X3D-Edit, http://www.x3dGraphics.com'/> |
| 14 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound/SoundAudioClip.x3d '/> |
| 15 | <meta name='generator' content='X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
| 16 | <meta name='license' content='../license.html'/> |
| 17 | </head> |
| 18 | <Scene> |
| 19 | <WorldInfo title='SoundAudioClip.x3d'/> |
| 20 | <Viewpoint description='Sound spheroid approximating ellipsoid volume' orientation='1 0 0 -0.2' position='0 40 200'/> |
| 21 | <Viewpoint description='100m distant' orientation='1 0 0 -0.2' position='0 20 100'/> |
| 22 | <Viewpoint description='50m distant' orientation='1 0 0 -0.2' position='0 10 50'/> |
| 23 | <Viewpoint description='25m distant' orientation='1 0 0 -0.2' position='0 5 25'/> |
| 24 | <Viewpoint description='10m distant' orientation='1 0 0 -0.2' position='0 2 10'/> |
| 25 | <Viewpoint description='center' orientation='0 1 0 -1.57' position='0 2 0'/> |
| 26 | <NavigationInfo speed='10' type='"WALK" "ANY"'/> |
| 27 | <!-- Sound node is positioned and oriented in local coordinate reference frame of scene graph at origin of sound --> |
| 28 | <!-- Sound location y-value is 1.6 in order to match typical avatar height (in meters) --> |
| 29 | <Sound DEF='Audible' location='0 1.6 0' maxBack='20' maxFront='100' minBack='10' minFront='10' priority='1'> |
| 30 | <AudioClip DEF='WaterSounds' description='Running Water' loop='true' url=' "aqua.wav" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound/aqua.wav" '/> |
| 31 | </Sound> |
| 32 | <!-- minWidth = sqrt (minBack * minFront) = 10 --> |
| 33 | <!-- maxWidth = sqrt (maxBack * maxFront) = 45 --> |
| 34 | <!-- Approximate ellipsoidal footprints and envelope using Cylinders and Spheres, respectively --> |
| 35 | <!-- Minimum attenuation parameters 10, 10, 10 produce a Cylinder and Sphere with uniform scale --> |
| 36 | <Transform DEF='minShapes' scale='10 10 10'> |
| 37 | <Shape> |
| 38 | <Cylinder height='0.05'/> |
| 39 | <Appearance> |
| 40 | <Material DEF='MinFootprintMaterial' diffuseColor='0.8 0 0'/> |
| 41 | </Appearance> |
| 42 | </Shape> |
| 43 | <Collision enabled='false'> |
| 44 | <Shape> |
| 45 | <Sphere/> |
| 46 | <Appearance> |
| 47 | <Material DEF='MinSpheroidMaterial' diffuseColor='0.8 0 0' transparency='0.5'/> |
| 48 | </Appearance> |
| 49 | </Shape> |
| 50 | </Collision> |
| 51 | </Transform> |
| 52 | <!-- Maximum attenuation parameters 20, 100, 45 produce a Cylinder and Sphere with non-uniform scale --> |
| 53 | <!-- Sound direction is x axis, so maximum-attenuation length = (100 + 20) = 120 and radius = 120 / 2 = 60 along x axis --> |
| 54 | <!-- and so width, height dimensions ~= maximum-attenuation halfwidth = maxWidth ~= 45 along y, z axes --> |
| 55 | <!-- Ellipsoid focus is (0 0 0) but geometric center of spheroidal approximation is (-maxBack + x radius) = (-20 + 60) = 40 along x axis --> |
| 56 | <Transform DEF='maxShapes' scale='60 45 45' translation='40 0 0'> |
| 57 | <Shape> |
| 58 | <Cylinder height='0.002'/> |
| 59 | <Appearance> |
| 60 | <Material DEF='MaxFootprintMaterial' diffuseColor='1 0.894118 0.341176'/> |
| 61 | </Appearance> |
| 62 | </Shape> |
| 63 | <Collision enabled='false'> |
| 64 | <Shape> |
| 65 | <Sphere/> |
| 66 | <Appearance> |
| 67 | <Material DEF='MaxSpheroidMaterial' diffuseColor='1 0.5 0' transparency='0.75'/> |
| 68 | </Appearance> |
| 69 | </Shape> |
| 70 | </Collision> |
| 71 | </Transform> |
| 72 | <!-- Author-assist prototype from Savage X3D model archive --> |
| 73 | <ExternProtoDeclare name='GridXZ' url=' "../../Savage/Tools/Authoring/GridXZPrototype.x3d#GridXZ" "https://savage.nps.edu/Savage/Tools/Authoring/GridXZPrototype.x3d#GridXZ" "../../Savage/Tools/Authoring/GridXZPrototype.wrl#GridXZ" "https://savage.nps.edu/Savage/Tools/Authoring/GridXZPrototype.wrl#GridXZ" '> |
| 74 | <field name='description' type='SFString' accessType='initializeOnly'/> |
| 75 | <field name='labelColor' type='SFColor' accessType='inputOutput'/> |
| 76 |
<field name='scale' type='SFVec3f' accessType='inputOutput'
appinfo='default unscaled size: 10m by 10m'/> |
| 77 |
<field name='labelsOffset' type='SFVec3f' accessType='inputOutput'
appinfo='label location offset (in meters) to improve readability'/> |
| 78 | <field name='originLabel' type='MFString' accessType='inputOutput'/> |
| 79 |
<field name='WestLabel' type='MFString' accessType='inputOutput'
appinfo='-Z axis'/> |
| 80 | <field name='NorthWestLabel' type='MFString' accessType='inputOutput'/> |
| 81 |
<field name='NorthLabel' type='MFString' accessType='inputOutput'
appinfo='+X axis'/> |
| 82 | <field name='NorthEastLabel' type='MFString' accessType='inputOutput'/> |
| 83 |
<field name='EastLabel' type='MFString' accessType='inputOutput'
appinfo='+Z axis'/> |
| 84 | <field name='SouthEastLabel' type='MFString' accessType='inputOutput'/> |
| 85 |
<field name='SouthLabel' type='MFString' accessType='inputOutput'
appinfo='-X axis'/> |
| 86 | <field name='SouthWestLabel' type='MFString' accessType='inputOutput'/> |
| 87 | </ExternProtoDeclare> |
| 88 | <!-- default values scaled up by factor of 10 in this instance --> |
| 89 | <ProtoInstance name='GridXZ'> |
| 90 | <fieldValue name='description' value='GridXZ'/> |
| 91 | <fieldValue name='labelColor' value='1 1 1'/> |
| 92 | <fieldValue name='scale' value='10 10 10'/> |
| 93 | <fieldValue name='labelsOffset' value='0 -0.5 0'/> |
| 94 | <fieldValue name='originLabel' value='"origin" "0 0 0"'/> |
| 95 | <fieldValue name='NorthLabel' value='"North" "-Z"'/> |
| 96 | <fieldValue name='NorthEastLabel' value='"100 0 -100"'/> |
| 97 | <fieldValue name='EastLabel' value='"East" "+X"'/> |
| 98 | <fieldValue name='SouthEastLabel' value='"100 0 100"'/> |
| 99 | <fieldValue name='SouthLabel' value='"South" "+Z"'/> |
| 100 | <fieldValue name='SouthWestLabel' value='"-100 0 100"'/> |
| 101 | <fieldValue name='WestLabel' value='"West" "-X"'/> |
| 102 | <fieldValue name='NorthWestLabel' value='"-100 0 -100"'/> |
| 103 | </ProtoInstance> |
| 104 | </Scene> |
| 105 | </X3D> |
Event Graph ROUTE Table with 0 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.
| line 89
ProtoInstance GridXZ |
No direct ROUTE connection found for events to/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. |
<!--
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)
<ProtoInstance name='ProtoName'>
<field
name='fieldName'/> </ProtoInstance>
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->