<?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='Torch.x3d' name='title'/>
    <meta content='Example torch using MovieTexture and flickering lights.' name='description'/>
    <meta content='Panos Michalopoulos' name='creator'/>
    <meta content='19 February 2001' name='created'/>
    <meta content='20 October 2019' name='modified'/>
    <meta content='https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/Torch.x3d' name='identifier'/>
    <meta content='X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit' name='generator'/>
    <meta content='../license.html' name='license'/>
  </head>
  <Scene>
    <WorldInfo title='Torch.x3d'/>
    <NavigationInfo headlight='false'/>
    <Viewpoint description='Standard' orientation='0 1 0 0.1' position='0.5 0 8'/>
    <Transform scale='0.2 0.2 0.2' translation='-2.3 1 0'>
      <Group DEF='Torch'>
        <Shape>
          <Extrusion creaseAngle='2' crossSection='-1 0 0 1 1 0 0 -1 -1 0' scale='0.1 0.1 0.2 0.2' spine='0 -1 0 0 1 0'/>
          <Appearance DEF='TorchMetal'>
            <Material diffuseColor='1 0.9 0.3'/>
          </Appearance>
        </Shape>
        <Transform translation='0 1.15 0'>
          <Shape>
            <Cylinder height='0.3' radius='0.3'/>
            <Appearance USE='TorchMetal'/>
          </Shape>
        </Transform>
        <Transform rotation='0 1 0 -1.7' scale='1.5 1.5 1.5' translation='0 1.3 0'>
          <Shape>
            <Extrusion crossSection='-1 0 0 1 1 0 0 -1 -1 0' scale='0.1 0.1 0.3 0.3 0.5 0.5 0.5 0.5 0.3 0.3 0.1 0.1 0.001 0.001' spine='0 0 0 0 0.2 0 0 0.5 0 0 0.6 0 0 1 0 0 1.5 0 0 2 0'/>
            <Appearance DEF='Flame'>
              <MovieTexture DEF='flames' loop='true' repeatS='false' repeatT='false' url='"flames.mpg" "https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/flames.mpg"'/>
            </Appearance>
          </Shape>
        </Transform>
        <PointLight DEF='Light' ambientIntensity='0.3' attenuation='0 0 0.1' color='1 1 0.5' location='0 2 0'/>
        <TimeSensor DEF='LightTimer' cycleInterval='1.5' loop='true'/>
        <ScalarInterpolator DEF='LightValues' key='0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1' keyValue='1 0.7 0.5 0.8 1 0.5 0.8 0.7 1 0.5 1'/>
      </Group>
    </Transform>
    <Transform scale='0.2 0.2 0.2' translation='2.3 1 0'>
      <Group USE='Torch'/>
    </Transform>
    <Transform translation='0 -2.5 0'>
      <Shape>
        <Box size='5 0.1 5'/>
        <Appearance DEF='Wall'>
          <Material diffuseColor='0.9 0.9 0.9' specularColor='0 0.1 0'/>
          <ImageTexture DEF='Soil1' url='"Soil1.jpg" "https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/Soil1.jpg"'/>
        </Appearance>
      </Shape>
    </Transform>
    <Transform translation='0 2.5 0'>
      <Shape>
        <Box size='5 0.1 5'/>
        <Appearance USE='Wall'/>
      </Shape>
    </Transform>
    <Transform translation='-2.5 0 0'>
      <Shape>
        <Box size='0.1 5 5'/>
        <Appearance USE='Wall'/>
      </Shape>
    </Transform>
    <Transform translation='2.5 0 0'>
      <Shape>
        <Box size='0.1 5 5'/>
        <Appearance USE='Wall'/>
      </Shape>
    </Transform>
    <Transform translation='0 0 -2.5'>
      <Shape>
        <Box size='5 5 0.1'/>
        <Appearance USE='Wall'/>
      </Shape>
    </Transform>
    <ROUTE fromField='fraction_changed' fromNode='LightTimer' toField='set_fraction' toNode='LightValues'/>
    <ROUTE fromField='value_changed' fromNode='LightValues' toField='set_intensity' toNode='Light'/>
  </Scene>
</X3D>