<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
<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'>
  <head>
    <meta content='startltstoplooptrue.x3d' name='title'/>
    <meta content='startltstoplooptrue-movie.mpg' name='MovingImage'/>
    <meta content='http://www.nist.gov/vrml.html' name='reference'/>
    <meta content='http://www.itl.nist.gov/div897/ctg/vrml/vrml.html' name='reference'/>
    <meta content='http://www.itl.nist.gov/div897/ctg/vrml/members.html' name='creator'/>
    <meta content='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.' name='disclaimer'/>
    <meta content='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' name='reference'/>
    <meta content='Correct definition and compliance of this conformance scene is maintained by the X3D Working Group, https://www.web3d.org/working-groups/x3d' name='info'/>
    <meta content='Michael Kass NIST' name='creator'/>
    <meta content='Don Brutzman' name='translator'/>
    <meta content='21 January 2001' name='translated'/>
    <meta content='28 August 2023' name='modified'/>
    <meta content='Test of loop equals true, and the startTime less than stopTime. The chime sound will play until stopTime is reached. Clicking on the "Start" button sets startTime to "now". Simultaneously, stopTime is set to ("now" + 12 seconds). As a result, the sound will cycle for 2 complete loops (a total of 10 seconds), then setop 2 seconds into the third loop. If the "Stop" button is pressed any time before stopTime is reached, the sound should stop instantly.' name='description'/>
    <meta content='https://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/startltstoplooptrue.x3d' name='identifier'/>
    <meta content='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html' name='generator'/>
    <meta content='X3D-Edit 4.0, https://www.web3d.org/x3d/tools/X3D-Edit' name='generator'/>
    <meta content='../../license.html' name='license'/>
  </head>
  <Scene>
    <WorldInfo title='startltstoplooptrue.x3d'/>
    <Viewpoint description='entry viewpoint' position='0 0 5'/>
    <ProximitySensor DEF='PROX_SENSOR' size='1000 1000 1000'/>
    <Sound>
      <AudioClip DEF='MYSOUND' description='chimes' loop='true' startTime='2' stopTime='4' url='"chimes.wav" "https://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/chimes.wav"'/>
    </Sound>
    <Transform scale='0.5 0.5 0.5'>
      <Transform translation='0 -2 0'>
        <Shape>
          <Appearance>
            <Material DEF='PHONOCOLOR'/>
          </Appearance>
          <Box size='3 1.5 3'/>
        </Shape>
      </Transform>
      <Transform rotation='1 0 0 -2.5'>
        <Shape>
          <Appearance>
            <Material DEF='HORNCOLOR'/>
          </Appearance>
          <Extrusion beginCap='false' creaseAngle='1.57' crossSection='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 0' endCap='false' orientation='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 0' scale='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.0001' solid='false' spine='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'/>
        </Shape>
      </Transform>
    </Transform>
    <Transform DEF='START_TRANS'>
      <Transform translation='-3 1.5 -5'>
        <Shape>
          <Appearance>
            <Material DEF='GOMATERIAL' ambientIntensity='1' diffuseColor='0 1 0'/>
          </Appearance>
          <Box DEF='START' size='1 1 0.1'/>
        </Shape>
        <Transform translation='-0.35 -0.1 0.2'>
          <Shape>
            <Appearance>
              <Material ambientIntensity='1' diffuseColor='0 0 0'/>
            </Appearance>
            <Text string='"Start"'>
              <FontStyle size='0.4'/>
            </Text>
          </Shape>
        </Transform>
      </Transform>
      <TouchSensor DEF='TOUCHSTART' description='touch to start'/>
      <TimeSensor DEF='GOTIMER'/>
      <ColorInterpolator DEF='GOFLASH' key='0 0.5 1' keyValue='0 1 0 1 1 1 0 1 0'/>
    </Transform>
    <Transform DEF='STOP_TRANS'>
      <Transform translation='3 1.5 -5'>
        <Shape>
          <Appearance>
            <Material DEF='STOPMATERIAL' ambientIntensity='1' diffuseColor='1 0 0'/>
          </Appearance>
          <Box DEF='STOP' size='1 1 0.1'/>
        </Shape>
        <Transform translation='-0.55 -0.1 0.2'>
          <Shape>
            <Appearance>
              <Material ambientIntensity='1' diffuseColor='0 0 0'/>
            </Appearance>
            <Text string='"Stop"'>
              <FontStyle size='0.4'/>
            </Text>
          </Shape>
        </Transform>
      </Transform>
      <TouchSensor DEF='TOUCHSTOP' description='touch to stop'/>
      <TimeSensor DEF='STOPTIMER'/>
      <ColorInterpolator DEF='STOPFLASH' key='0 0.5 1' keyValue='1 0 0 1 1 1 1 0 0'/>
    </Transform>
    <Script DEF='SOUND_SCRIPT' directOutput='true' url='"startltstoplooptrue.js" "https://www.web3d.org/x3d/content/examples/ConformanceNist/Sounds/AudioClip/startltstoplooptrue.js"'>
      <field accessType='initializeOnly' name='mySound' type='SFNode'>
        <AudioClip USE='MYSOUND'/>
      </field>
      <field accessType='initializeOnly' name='phonoColor' type='SFNode'>
        <Material USE='PHONOCOLOR'/>
      </field>
      <field accessType='initializeOnly' name='hornColor' type='SFNode'>
        <Material USE='HORNCOLOR'/>
      </field>
      <field accessType='initializeOnly' name='yellow' type='SFColor' value='0.75 0.75 0.00'/>
      <field accessType='initializeOnly' name='white' type='SFColor' value='0.80 0.80 0.80'/>
      <field accessType='inputOnly' name='colorPhonograph' type='SFBool'/>
      <field accessType='inputOnly' name='set_stopTime' type='SFTime'/>
    </Script>
    <ROUTE fromField='touchTime' fromNode='TOUCHSTART' toField='set_startTime' toNode='MYSOUND'/>
    <ROUTE fromField='touchTime' fromNode='TOUCHSTART' toField='set_stopTime' toNode='SOUND_SCRIPT'/>
    <ROUTE fromField='touchTime' fromNode='TOUCHSTOP' toField='set_stopTime' toNode='MYSOUND'/>
    <ROUTE fromField='position_changed' fromNode='PROX_SENSOR' toField='set_translation' toNode='START_TRANS'/>
    <ROUTE fromField='orientation_changed' fromNode='PROX_SENSOR' toField='set_rotation' toNode='START_TRANS'/>
    <ROUTE fromField='position_changed' fromNode='PROX_SENSOR' toField='set_translation' toNode='STOP_TRANS'/>
    <ROUTE fromField='orientation_changed' fromNode='PROX_SENSOR' toField='set_rotation' toNode='STOP_TRANS'/>
    <ROUTE fromField='isActive' fromNode='MYSOUND' toField='colorPhonograph' toNode='SOUND_SCRIPT'/>
    <ROUTE fromField='touchTime' fromNode='TOUCHSTART' toField='set_startTime' toNode='GOTIMER'/>
    <ROUTE fromField='fraction_changed' fromNode='GOTIMER' toField='set_fraction' toNode='GOFLASH'/>
    <ROUTE fromField='value_changed' fromNode='GOFLASH' toField='set_diffuseColor' toNode='GOMATERIAL'/>
    <ROUTE fromField='touchTime' fromNode='TOUCHSTOP' toField='set_startTime' toNode='STOPTIMER'/>
    <ROUTE fromField='fraction_changed' fromNode='STOPTIMER' toField='set_fraction' toNode='STOPFLASH'/>
    <ROUTE fromField='value_changed' fromNode='STOPFLASH' toField='set_diffuseColor' toNode='STOPMATERIAL'/>
  </Scene>
</X3D>