X3D Model Documentation: multi_url.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='multi_url.x3d'/>
  6            <meta name='MovingImagecontent='multi_url-movie.mpg'/>
  7            <meta name='referencecontent='http://www.nist.gov/vrml.html'/>
  8            <meta name='referencecontent='http://www.itl.nist.gov/div897/ctg/vrml/vrml.html'/>
  9            <meta name='creatorcontent='http://www.itl.nist.gov/div897/ctg/vrml/members.html'/>
 10            <meta name='disclaimercontent='This file was provided by the National Institute of Standards and Technology, and is part of the X3D Conformance Test Suite, available at http://www.nist.gov/vrml.html The information contained within this file is provided for use in establishing conformance to the ISO VRML97 Specification. Conformance to this test does not imply recommendation or endorsement by the National Institute of Standards and Technology (NIST). This software can be redistributed and/or modified freely provided that any derivative works bear some notice that they are derived from it, and any modified versions bear some notice that they have been modified. '/>
 11            <meta name='referencecontent='Interactive Conformance Testing for VRML, Mary Brady and Lynn Rosenthal, NIST, created 8 September 2010 and updated 25 August 2016, https://www.nist.gov/itl/ssd/information-systems-group/interactive-conformance-testing-vrml'/>
 12            <meta name='infocontent='Correct definition and compliance of this conformance scene is maintained by the X3D Working Group, https://www.web3d.org/working-groups/x3d'/>
 13            <meta name='translatorcontent='Michael Kass NIST, Don Brutzman NPS'/>
 14            <meta name='translatedcontent='21 January 2001'/>
 15            <meta name='modifiedcontent='12 May 2024'/>
 16            <meta name='descriptioncontent='This file tests the ability of a browser to skip a nonexistent URL and proceed to the next url in the list to load a sound file. The first url in this AudioClip node points to a nonexistent file. The browser should skip this url when the file cannot be opened, and proceed to the next url. As a result, clicking on the left (Single URL) button, the viewer should hear the sound of a chime for 5 seconds. Clicking on the right (Multi URL) button should also result in a 5 second chime sound.'/>
 17            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/multi_url.x3d'/>
 18            <meta name='generatorcontent='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/>
 19            <meta name='generatorcontent='X3D-Edit 4.0, https://savage.nps.edu/X3D-Edit'/>
 20            <meta name='licensecontent='../../license.html'/>
 21       </head>
<!--

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

<!-- to top Index for DEF nodes: HORNCOLOR, MULTI, MULTI_TRANS, MULTIFLASH, MULTIMATERIAL, MULTITIMER, MYSOUND1, MYSOUND3, PHONOCOLOR, PROX_SENSOR, SINGLE, SINGLE_TRANS, SINGLEFLASH, SINGLEMATERIAL, SINGLETIMER, SOUND_SCRIPT, TOUCHMULTI, TOUCHSINGLE

Index for Viewpoint node: Viewpoint_1
-->
 22       <Scene>
 23            <WorldInfo title='multi_url.x3d'/>
 24            <Viewpoint description='entry viewpointposition='0 0 5'/>
 25 
 26            <Sound>
 27 
               <!-- ROUTE information for MYSOUND1 node:  [from TOUCHSINGLE.touchTime to set_startTime ] [from isActive to SOUND_SCRIPT.colorPhonograph ] -->
               <AudioClip DEF='MYSOUND1description='chimes'   url=' "chimes.wav" "https://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/chimes.wav" '/>
 28            </Sound>
 29            <Sound>
 30 
               <!-- ROUTE information for MYSOUND3 node:  [from TOUCHMULTI.touchTime to set_startTime ] [from isActive to SOUND_SCRIPT.colorPhonograph ] -->
               <AudioClip DEF='MYSOUND3description='skip over missing sound to again retrieve chimes'   url=' "nonexistent.wav" "https://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/nonexistent.wav" "chimes.wav" "https://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/chimes.wav" '/>
 31            </Sound>
 32            <Transform scale='0.5 0.5 0.5'>
 33                 <Transform translation='0 -2 0'>
 34                      <Shape>
 35                           <Appearance>
 36 
                              <!-- Material PHONOCOLOR is a DEF node that has 1 USE node: USE_1 -->
                              <Material DEF='PHONOCOLOR'/>
 37                           </Appearance>
 38                           <Box size='3 1.5 3'/>
 39                      </Shape>
 40                 </Transform>
 41                 <Transform rotation='1 0 0 -2.5'>
 42                      <Shape>
 43                           <Appearance>
 44 
                              <!-- Material HORNCOLOR is a DEF node that has 1 USE node: USE_1 -->
                              <Material DEF='HORNCOLOR'/>
 45                           </Appearance>
 46                           <Extrusion beginCap='falsecreaseAngle='1.57crossSection='1 0 0.92388 0.382683 0.707107 0.707106 0.382684 0.923879 1.26759e-006 1 -0.382682 0.92388 -0.707105 0.707108 -0.923879 0.382685 -1 2.53518e-006 -0.923881 -0.382681 -0.707109 -0.707105 -0.382687 -0.923878 -3.80277e-006 -1 0.38268 -0.923881 0.707104 -0.70711 0.923878 -0.382688 1 0endCap='falseorientation='0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0scale='2.2 2.2 1.8 1.8 1.4 1.4 1.2 1.2 1 1 0.8 0.8 0.6 0.6 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.2 0.2 0.0001 0.0001solid='falsespine='0 -1.4 0 0 -1.22137 0 0 -1.01245 0 0 -0.819601 0 0 -0.626754 0 0 -0.401765 0 0 -0.204459 0 0 -0.0164327 0 0 0.176777 0 0 0.380511 0 0 0.578542 0 0 0.819601 0 0 0.996378 0 0 1.8 0 0 1.2 0'/>
 47                      </Shape>
 48                 </Transform>
 49            </Transform>
 50 
          <!-- ROUTE information for SINGLE_TRANS node:  [from PROX_SENSOR.position_changed to set_translation ] [from PROX_SENSOR.orientation_changed to set_rotation ] -->
          <Transform DEF='SINGLE_TRANS'>
 51                 <Transform translation='-3 1.5 -5'>
 52                      <Shape>
 53                           <Appearance>
 54 
                              <!-- ROUTE information for SINGLEMATERIAL node:  [from SINGLEFLASH.value_changed to set_diffuseColor ] -->
                              <Material DEF='SINGLEMATERIALambientIntensity='1diffuseColor='0 1 0'/>
 55                           </Appearance>
 56                           <Box DEF='SINGLEsize='1 1 0.1'/>
 57                      </Shape>
 58                      <Transform translation='-0.35 -0.1 0.2'>
 59                           <Shape>
 60                                <Appearance>
 61                                     <Material ambientIntensity='1diffuseColor='0 0 0'/>
 62                                </Appearance>
 63                                <Text string='"Single" "URL"'>
 64                                     <FontStyle size='0.4'/>
 65                                </Text>
 66                           </Shape>
 67                      </Transform>
 68                 </Transform>
 69 
               <!-- ROUTE information for TOUCHSINGLE node:  [from touchTime to MYSOUND1.set_startTime ] [from touchTime to SINGLETIMER.set_startTime ] -->
               <TouchSensor DEF='TOUCHSINGLEdescription='touch for single url'/>
 70 
               <!-- ROUTE information for SINGLETIMER node:  [from TOUCHSINGLE.touchTime to set_startTime ] [from fraction_changed to SINGLEFLASH.set_fraction ] -->
               <TimeSensor DEF='SINGLETIMER'/>
 71 
               <!-- ROUTE information for SINGLEFLASH node:  [from SINGLETIMER.fraction_changed to set_fraction ] [from value_changed to SINGLEMATERIAL.set_diffuseColor ] -->
               <ColorInterpolator DEF='SINGLEFLASHkey='0 0.5 1keyValue='0 1 0 1 1 1 0 1 0'/>
 72            </Transform>
 73 
          <!-- ROUTE information for MULTI_TRANS node:  [from PROX_SENSOR.position_changed to set_translation ] [from PROX_SENSOR.orientation_changed to set_rotation ] -->
          <Transform DEF='MULTI_TRANS'>
 74                 <Transform translation='3 1.5 -5'>
 75                      <Shape>
 76                           <Appearance>
 77 
                              <!-- ROUTE information for MULTIMATERIAL node:  [from MULTIFLASH.value_changed to set_diffuseColor ] -->
                              <Material DEF='MULTIMATERIALambientIntensity='1diffuseColor='1 0 0'/>
 78                           </Appearance>
 79                           <Box DEF='MULTIsize='1 1 0.1'/>
 80                      </Shape>
 81                      <Transform translation='-0.55 -0.1 0.2'>
 82                           <Shape>
 83                                <Appearance>
 84                                     <Material ambientIntensity='1diffuseColor='0 0 0'/>
 85                                </Appearance>
 86                                <Text string='"Multi" "URL"'>
 87                                     <FontStyle size='0.4'/>
 88                                </Text>
 89                           </Shape>
 90                      </Transform>
 91                 </Transform>
 92 
               <!-- ROUTE information for TOUCHMULTI node:  [from touchTime to MYSOUND3.set_startTime ] [from touchTime to MULTITIMER.set_startTime ] -->
               <TouchSensor DEF='TOUCHMULTIdescription='touch for multiple url'/>
 93 
               <!-- ROUTE information for MULTITIMER node:  [from TOUCHMULTI.touchTime to set_startTime ] [from fraction_changed to MULTIFLASH.set_fraction ] -->
               <TimeSensor DEF='MULTITIMER'/>
 94 
               <!-- ROUTE information for MULTIFLASH node:  [from MULTITIMER.fraction_changed to set_fraction ] [from value_changed to MULTIMATERIAL.set_diffuseColor ] -->
               <ColorInterpolator DEF='MULTIFLASHkey='0 0.5 1keyValue='1 0 0 1 1 1 1 0 0'/>
 95            </Transform>
 96 
          <!-- ROUTE information for SOUND_SCRIPT node:  [from MYSOUND1.isActive to colorPhonograph ] [from MYSOUND3.isActive to colorPhonograph ] -->
          <Script DEF='SOUND_SCRIPTdirectOutput='true'   url=' "multi_url.js" "https://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/multi_url.js" '>
 97                 <field name='phonoColortype='SFNodeaccessType='initializeOnly'>
 98                      <Material USE='PHONOCOLOR'/>
 99                 </field>
100                 <field name='hornColortype='SFNodeaccessType='initializeOnly'>
101                      <Material USE='HORNCOLOR'/>
102                 </field>
103                 <field name='yellowtype='SFColorvalue='0.75 0.75 0.00accessType='initializeOnly'/>
104                 <field name='whitetype='SFColorvalue='0.80 0.80 0.80accessType='initializeOnly'/>
105                 <field name='colorPhonographtype='SFBoolaccessType='inputOnly'/>
106            </Script>
107            < ROUTE  fromNode='TOUCHSINGLE' fromField='touchTime' toNode='MYSOUND1' toField='set_startTime'/>
108            < ROUTE  fromNode='TOUCHMULTI' fromField='touchTime' toNode='MYSOUND3' toField='set_startTime'/>
109            < ROUTE  fromNode='MYSOUND1' fromField='isActive' toNode='SOUND_SCRIPT' toField='colorPhonograph'/>
110            < ROUTE  fromNode='MYSOUND3' fromField='isActive' toNode='SOUND_SCRIPT' toField='colorPhonograph'/>
111            < ROUTE  fromNode='TOUCHSINGLE' fromField='touchTime' toNode='SINGLETIMER' toField='set_startTime'/>
112            < ROUTE  fromNode='SINGLETIMER' fromField='fraction_changed' toNode='SINGLEFLASH' toField='set_fraction'/>
113            < ROUTE  fromNode='SINGLEFLASH' fromField='value_changed' toNode='SINGLEMATERIAL' toField='set_diffuseColor'/>
114            < ROUTE  fromNode='TOUCHMULTI' fromField='touchTime' toNode='MULTITIMER' toField='set_startTime'/>
115            < ROUTE  fromNode='MULTITIMER' fromField='fraction_changed' toNode='MULTIFLASH' toField='set_fraction'/>
116            < ROUTE  fromNode='MULTIFLASH' fromField='value_changed' toNode='MULTIMATERIAL' toField='set_diffuseColor'/>
117            < ROUTE  fromNode='PROX_SENSOR' fromField='position_changed' toNode='SINGLE_TRANS' toField='set_translation'/>
118            < ROUTE  fromNode='PROX_SENSOR' fromField='orientation_changed' toNode='SINGLE_TRANS' toField='set_rotation'/>
119            < ROUTE  fromNode='PROX_SENSOR' fromField='position_changed' toNode='MULTI_TRANS' toField='set_translation'/>
120            < ROUTE  fromNode='PROX_SENSOR' fromField='orientation_changed' toNode='MULTI_TRANS' toField='set_rotation'/>
121       </Scene>
122  </X3D>
<!--

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

<!-- to top Index for DEF nodes: HORNCOLOR, MULTI, MULTI_TRANS, MULTIFLASH, MULTIMATERIAL, MULTITIMER, MYSOUND1, MYSOUND3, PHONOCOLOR, PROX_SENSOR, SINGLE, SINGLE_TRANS, SINGLEFLASH, SINGLEMATERIAL, SINGLETIMER, SOUND_SCRIPT, TOUCHMULTI, TOUCHSINGLE

Index for Viewpoint node: Viewpoint_1
-->
X3D Tooltips element index: Appearance, AudioClip, Box, ColorInterpolator, Extrusion, field, FontStyle, head, Material, meta, ProximitySensor, ROUTE, Scene, Script, Shape, Sound, Text, TimeSensor, TouchSensor, Transform, Viewpoint, WorldInfo, X3D, accessType and type, XML data types, field types

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

TOUCHMULTI
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
MYSOUND3
AudioClip
set_startTime
SFTime
then
 
 
 
MYSOUND3
AudioClip
isActive
SFBool

ROUTE
event to
(2)
SOUND_SCRIPT
Script
colorPhonograph
SFBool
TOUCHMULTI
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
MULTITIMER
TimeSensor
set_startTime
SFTime
then
 
 
 
MULTITIMER
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
MULTIFLASH
ColorInterpolator
set_fraction
SFFloat
then
 
 
 
MULTIFLASH
ColorInterpolator
value_changed
SFColor

ROUTE
event to
(3)
MULTIMATERIAL
Material
set_diffuseColor
SFColor

TOUCHSINGLE
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
MYSOUND1
AudioClip
set_startTime
SFTime
then
 
 
 
MYSOUND1
AudioClip
isActive
SFBool

ROUTE
event to
(2)
SOUND_SCRIPT
Script
colorPhonograph
SFBool
TOUCHSINGLE
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
SINGLETIMER
TimeSensor
set_startTime
SFTime
then
 
 
 
SINGLETIMER
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
SINGLEFLASH
ColorInterpolator
set_fraction
SFFloat
then
 
 
 
SINGLEFLASH
ColorInterpolator
value_changed
SFColor

ROUTE
event to
(3)
SINGLEMATERIAL
Material
set_diffuseColor
SFColor

PROX_SENSOR
ProximitySensor
position_changed
SFVec3f

ROUTE
event to
(1)
SINGLE_TRANS
Transform
set_translation
SFVec3f
PROX_SENSOR
ProximitySensor
orientation_changed
SFRotation

ROUTE
event to
(1)
SINGLE_TRANS
Transform
set_rotation
SFRotation
PROX_SENSOR
ProximitySensor
position_changed
SFVec3f

ROUTE
event to
(1)
MULTI_TRANS
Transform
set_translation
SFVec3f
PROX_SENSOR
ProximitySensor
orientation_changed
SFRotation

ROUTE
event to
(1)
MULTI_TRANS
Transform
set_rotation
SFRotation

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/ConformanceNist/Sounds/AudioClip/multi_urlIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/multi_url.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. -->