<?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='Fence.x3d' name='title'/>
    <meta content='This file draws the fence and door with lawn.' name='description'/>
    <meta content='Kok Keng Ng' name='creator'/>
    <meta content='20 September 2002' name='created'/>
    <meta content='20 October 2019' name='modified'/>
    <meta content='https://www.web3d.org/x3d/content/examples/Savage/Buildings/PlayGround/Fence.x3d' name='identifier'/>
    <meta content='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit' name='generator'/>
    <meta content='../../license.html' name='license'/>
  </head>
  <Scene>
    <WorldInfo title='Fence.x3d'/>
    <Transform DEF='FENCEBACKTX' translation='0 0 -8.75'>
      <Group DEF='FENCEGP5'>
        <Group DEF='FENCE1GP'>
          <Transform translation='0 -0.5 0'>
            <Shape DEF='FENCEbar'>
              <Box size='2.5 0.1 0.1'/>
              <Appearance DEF='FENCEApp'>
                <Material diffuseColor='0.8 0.5 0'/>
                <ImageTexture DEF='wood' url='"wood.jpg" "https://www.web3d.org/x3d/content/examples/Savage/Buildings/PlayGround/wood.jpg"'/>
              </Appearance>
            </Shape>
          </Transform>
          <Transform translation='0 -0.25 0'>
            <Shape USE='FENCEbar'/>
          </Transform>
          <Transform>
            <Shape USE='FENCEbar'/>
          </Transform>
          <Transform translation='0 0.25 0'>
            <Shape USE='FENCEbar'/>
          </Transform>
          <Transform rotation='0 0 1 1.57' translation='1.25 -.20 0'>
            <Shape DEF='FENCEleg'>
              <Box size='1.3 0.15 0.15'/>
              <Appearance>
                <Material diffuseColor='0.8 0.5 0'/>
                <ImageTexture USE='wood'/>
              </Appearance>
            </Shape>
          </Transform>
          <Transform rotation='0 0 1 1.57' translation='-1.25 -0.20 0'>
            <Shape USE='FENCEleg'/>
          </Transform>
        </Group>
        <Transform translation='2.5 0 0'>
          <Group USE='FENCE1GP'/>
        </Transform>
        <Transform translation='-2.5 0 0'>
          <Group USE='FENCE1GP'/>
        </Transform>
        <Transform translation='5 0 0'>
          <Group USE='FENCE1GP'/>
        </Transform>
        <Transform translation='7.5 0 0'>
          <Group USE='FENCE1GP'/>
        </Transform>
        <Transform translation='-5 0 0'>
          <Group USE='FENCE1GP'/>
        </Transform>
        <Transform translation='-7.5 0 0'>
          <Group USE='FENCE1GP'/>
        </Transform>
      </Group>
    </Transform>
    <Transform DEF='FENCERIGHTTX' rotation='0 1 0 1.57' translation='8.75 0 0'>
      <Group USE='FENCEGP5'/>
    </Transform>
    <Transform DEF='FENCELEFTTX' rotation='0 1 0 1.57' translation='-8.75 0 0'>
      <Group USE='FENCEGP5'/>
    </Transform>
    <Transform DEF='FENCEFRONTTX' translation='0 0 8.75'>
      <Group>
        <Transform translation='-2.5 0 0'>
          <Group USE='FENCE1GP'/>
        </Transform>
        <Transform translation='2.5 0 0'>
          <Group USE='FENCE1GP'/>
        </Transform>
        <Transform translation='5 0 0'>
          <Group USE='FENCE1GP'/>
        </Transform>
        <Transform translation='-5 0 0'>
          <Group USE='FENCE1GP'/>
        </Transform>
        <Transform translation='-7.5 0 0'>
          <Group USE='FENCE1GP'/>
        </Transform>
        <Transform translation='7.5 0 0'>
          <Group USE='FENCE1GP'/>
        </Transform>
      </Group>
      <Transform DEF='FENCERightDoorTX' center='0.6 0 0.05' translation='0.575 0 0.025'>
        <Group DEF='FENCERightDoorGP'>
          <Group DEF='FENCEDoor1'>
            <Transform translation='0. -0.5 0'>
              <Shape DEF='FENCEDoorbarShape'>
                <Box size='1 0.075 0.075'/>
                <Appearance USE='FENCEApp'/>
              </Shape>
            </Transform>
            <Transform DEF='FENCEDOORRIGHTLEGTX' rotation='0 0 1 1.57' translation='0.55 -.20 0'>
              <Shape DEF='FENCEDoorlegShape'>
                <Box size='1.2 0.1 0.1'/>
                <Appearance USE='FENCEApp'/>
              </Shape>
            </Transform>
            <Transform translation='0 -0.2 0'>
              <Shape USE='FENCEDoorbarShape'/>
            </Transform>
            <Transform translation='0 0.1 0'>
              <Shape USE='FENCEDoorbarShape'/>
            </Transform>
            <Transform translation='0 0.35 0'>
              <Shape USE='FENCEDoorbarShape'/>
            </Transform>
            <Transform DEF='FENCEDOORLEFTLEGTX' rotation='0 0 1 1.57' translation='-0.5 -.20 0'>
              <Shape USE='FENCEDoorlegShape'/>
            </Transform>
          </Group>
          <Group>
            <Transform rotation='0 0 1 0.785' scale='1.2 1 1' translation='0.05 -0.1 -0.05'>
              <Shape USE='FENCEDoorbarShape'/>
            </Transform>
          </Group>
          <TouchSensor DEF='FENCERightDoorSensor'/>
        </Group>
      </Transform>
      <Transform>
        <Group DEF='FENCELeftDoorGP'>
          <Transform DEF='FENCELeftDoorTX' center='-0.55 0 0.05' translation='-0.625 0 0.025'>
            <Group USE='FENCEDoor1'/>
            <Group>
              <Transform rotation='0 0 1 -0.785' scale='1.2 1 1' translation='-0.05 -0.1 -0.05'>
                <Shape USE='FENCEDoorbarShape'/>
              </Transform>
            </Group>
            <TouchSensor DEF='FENCELeftDoorSensor'/>
          </Transform>
        </Group>
      </Transform>
      <TimeSensor DEF='FENCEDoorTimer1' cycleInterval='12'/>
      <TimeSensor DEF='FENCEDoorTimer2' cycleInterval='15'/>
      <OrientationInterpolator DEF='FENCELeftDoorInterpolator' key='0 0.25 0.75 1' keyValue='0 1 0 0 0 1 0 -1.57 0 1 0 -1.57 0 1 0 0'/>
      <OrientationInterpolator DEF='FENCERightDoorInterpolator' key='0 0.25 0.75 1' keyValue='0 1 0 0.0 0 1 0 1.57 0 1 0 1.57 0 1 0 -0'/>
    </Transform>
    <Transform>
      <Transform>
        <Transform DEF='LAWN' translation='0 -0.8 0'>
          <Transform scale='4 1 4' translation='-14 0.01 -14'>
            <Shape>
              <Appearance>
                <ImageTexture url='"grass1.jpg" "https://www.web3d.org/x3d/content/examples/Savage/Buildings/PlayGround/grass1.jpg"'/>
                <TextureTransform scale='120 120'/>
              </Appearance>
              <ElevationGrid creaseAngle='0.785' height='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0' xDimension='8' xSpacing='1.' zDimension='8' zSpacing='1.'/>
            </Shape>
          </Transform>
        </Transform>
        <Transform DEF='FLOORTX' translation='0 -0.876 0'>
          <Shape DEF='FLOOR'>
            <Box size='28 0.15 28'/>
            <Appearance>
              <Material ambientIntensity='0.245763' diffuseColor='0.336312 0.24807 0.201129' shininess='0.061224' specularColor='0.108805 0.098067 0.096807'/>
            </Appearance>
          </Shape>
        </Transform>
      </Transform>
    </Transform>
    <Transform>
      <Sound direction='1 1 1' maxBack='100' maxFront='100' minBack='10' minFront='10'>
        <AudioClip DEF='DoorSound' description='Door sound' url='"Door.wav" "https://www.web3d.org/x3d/content/examples/Savage/Buildings/PlayGround/Door.wav"'/>
      </Sound>
    </Transform>
    <Transform/>
    <Viewpoint description='Front' orientation='1 0 0 -0.3' position='0 2 20'/>
    <Viewpoint description='MainDoor' orientation='1 0 0 -1.57' position='0 3 8.75'/>
    <ROUTE fromField='touchTime' fromNode='FENCELeftDoorSensor' toField='set_startTime' toNode='FENCEDoorTimer1'/>
    <ROUTE fromField='fraction_changed' fromNode='FENCEDoorTimer1' toField='set_fraction' toNode='FENCELeftDoorInterpolator'/>
    <ROUTE fromField='value_changed' fromNode='FENCELeftDoorInterpolator' toField='set_rotation' toNode='FENCELeftDoorTX'/>
    <ROUTE fromField='touchTime' fromNode='FENCERightDoorSensor' toField='set_startTime' toNode='FENCEDoorTimer2'/>
    <ROUTE fromField='fraction_changed' fromNode='FENCEDoorTimer2' toField='set_fraction' toNode='FENCERightDoorInterpolator'/>
    <ROUTE fromField='value_changed' fromNode='FENCERightDoorInterpolator' toField='set_rotation' toNode='FENCERightDoorTX'/>
    <ROUTE fromField='touchTime' fromNode='FENCELeftDoorSensor' toField='set_startTime' toNode='DoorSound'/>
    <ROUTE fromField='touchTime' fromNode='FENCERightDoorSensor' toField='set_startTime' toNode='DoorSound'/>
  </Scene>
</X3D>