<?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='SliderIntegerExample.x3d' name='title'/>
    <meta content='This is an example of the SliderInteger prototype, showing a slider bar starting at 12 and ranging from 0 to 24.' name='description'/>
    <meta content='Jane Wu' name='creator'/>
    <meta content='19 September 2001' name='created'/>
    <meta content='28 November 2019' name='modified'/>
    <meta content='slider example' name='subject'/>
    <meta content='https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderIntegerExample.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='SliderIntegerExample.x3d'/>
    <ExternProtoDeclare appinfo='Slider user-interface widget that produces integer output values' name='SliderInteger' url='"../../../Savage/Tools/Animation/SliderIntegerPrototype.x3d#SliderInteger" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderIntegerPrototype.x3d#SliderInteger" "../../../Savage/Tools/Animation/SliderIntegerPrototype.wrl#SliderInteger" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderIntegerPrototype.wrl#SliderInteger"'>
      <field accessType='initializeOnly' appinfo='default value 1.0' name='height' type='SFFloat'/>
      <field accessType='initializeOnly' appinfo='default value 0.1' name='radius' type='SFFloat'/>
      <field accessType='initializeOnly' appinfo='default value .8 .4 .8' name='sliderBarColor' type='SFColor'/>
      <field accessType='initializeOnly' appinfo='default value .3 .4 .8' name='sliderBallColor' type='SFColor'/>
      <field accessType='initializeOnly' appinfo='default value .2 .3 .9' name='sliderEndColor' type='SFColor'/>
      <field accessType='initializeOnly' appinfo='default value 0' name='min' type='SFInt32'/>
      <field accessType='initializeOnly' appinfo='default value 10' name='max' type='SFInt32'/>
      <field accessType='initializeOnly' appinfo='default value 0' name='value' type='SFInt32'/>
      <field accessType='inputOnly' appinfo='set minimum value for slider bar' name='setMin' type='SFInt32'/>
      <field accessType='inputOnly' appinfo='set maximum value for slider bar' name='setMax' type='SFInt32'/>
      <field accessType='inputOnly' appinfo='set value for slider bar' name='setValue' type='SFInt32'/>
      <field accessType='outputOnly' appinfo='output value for slider bar' name='valueChanged' type='SFInt32'/>
      <field accessType='initializeOnly' appinfo='default value 0.02' name='barRadius' type='SFFloat'/>
      <field accessType='initializeOnly' appinfo='Enable/disable console output for troubleshooting' name='traceEnabled' type='SFBool'/>
      <field accessType='initializeOnly' appinfo='Allowed values: vertical, horizontal' name='layoutDirection' type='SFString'/>
    </ExternProtoDeclare>
    <ExternProtoDeclare appinfo='SingleTypeConversion converts from a single typed value to various other types of values' name='SingleTypeConversion' url='"../../../Savage/Tools/Authoring/SingleTypeConversionPrototype.x3d#SingleTypeConversion" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/SingleTypeConversionPrototype.x3d#SingleTypeConversion" "../../../Savage/Tools/Authoring/SingleTypeConversionPrototype.wrl#SingleTypeConversion" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/SingleTypeConversionPrototype.wrl#SingleTypeConversion"'>
      <field accessType='initializeOnly' appinfo='decimalPlaces is the number of significant digits after the decimal point, use -1 to indicate no round off' name='decimalPlaces' type='SFInt32'/>
      <field accessType='inputOnly' name='setDecimalPlaces' type='SFInt32'/>
      <field accessType='inputOnly' name='BooleanValue' type='SFBool'/>
      <field accessType='inputOnly' name='FloatValue' type='SFFloat'/>
      <field accessType='inputOnly' name='IntegerValue' type='SFInt32'/>
      <field accessType='inputOnly' name='TimeValue' type='SFTime'/>
      <field accessType='outputOnly' name='BooleanResult' type='SFBool'/>
      <field accessType='outputOnly' name='FloatResult' type='SFFloat'/>
      <field accessType='outputOnly' name='IntegerResult' type='SFInt32'/>
      <field accessType='outputOnly' name='TimeResult' type='SFTime'/>
      <field accessType='outputOnly' name='StringResult' type='SFString'/>
      <field accessType='outputOnly' name='StringsResult' type='MFString'/>
    </ExternProtoDeclare>
    <!-- Scene graph begins here -->
    <Viewpoint description='Drag slider ball to change values' position='0 1 9'/>
    <Billboard axisOfRotation='0 0 0'>
      <Transform translation='0 2 0'>
        <Shape>
          <Appearance>
            <Material diffuseColor='0 1 1'/>
          </Appearance>
          <Text string='"Drag slider ball" "to change values," "select end stops to" "increment/decrement"'>
            <FontStyle justify='"MIDDLE" "MIDDLE"'/>
          </Text>
        </Shape>
      </Transform>
      <Transform translation='-0.4 -1.2 0'>
        <Shape>
          <Appearance>
            <Material/>
          </Appearance>
          <Text DEF='ResultString'/>
        </Shape>
      </Transform>
      <Transform translation='0 -2 0'>
        <ProtoInstance DEF='SliderExample' name='SliderInteger'>
          <fieldValue name='layoutDirection' value='horizontal'/>
          <fieldValue name='height' value='5'/>
          <fieldValue name='radius' value='0.1'/>
          <fieldValue name='min' value='0'/>
          <fieldValue name='max' value='24'/>
          <fieldValue name='value' value='12'/>
          <fieldValue name='sliderBarColor' value='0.8 0.4 0.8'/>
          <fieldValue name='sliderBallColor' value='0.3 0.4 0.8'/>
          <fieldValue name='sliderEndColor' value='0.2 0.3 0.9'/>
          <fieldValue name='traceEnabled' value='true'/>
        </ProtoInstance>
      </Transform>
    </Billboard>
    <ProtoInstance DEF='IntegerConverter' name='SingleTypeConversion'/>
    <ROUTE fromField='valueChanged' fromNode='SliderExample' toField='IntegerValue' toNode='IntegerConverter'/>
    <ROUTE fromField='StringsResult' fromNode='IntegerConverter' toField='set_string' toNode='ResultString'/>
  </Scene>
</X3D>