<?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 name='titlecontent=' IntegerSequencerExample.x3d '/>
<meta name='descriptioncontent='This example shows how to use the IntegerSequencer prototype in an animated scenario.'/>
<meta name='creatorcontent='Don Brutzman'/>
<meta name='createdcontent='13 April 2002'/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name='referencecontent=' https://www.web3d.org/technicalinfo/specifications/vrml97/part1/nodesRef.html#ScalarInterpolator '/>
<meta name='referencecontent=' https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoPrototypes.x3d '/>
<meta name='subjectcontent='integer sequencer'/>
<meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Basic/development/IntegerSequencerExample.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!-- -->
<Scene>
<WorldInfo title='IntegerSequencerExample.x3d'/>
<Background groundColor='0.2 0.2 0.2skyColor='0.2 0.2 0.2'/>
<!-- ROUTE information for Clock node:  [from TouchToStart.touchTime to set_startTime ] [from TouchToStart.isOver to enabled ] [from fraction_changed to IntegerSequencerInstance.set_fraction ] -->
<TimeSensor DEF='ClockcycleInterval='12enabled='falseloop='true'/>

<!-- ROUTE information for IntegerSequencerInstance node:  [from Clock.fraction_changed to set_fraction ] [from TouchPrevious.isActive to previous ] [from TouchNext.isActive to next ] [from value_changed to CountDownSwitch.whichChoice ] -->
<IntegerSequencer DEF='IntegerSequencerInstancekey='0 0.08333 0.1667 0.25 0.3333 0.4167 0.5 0.5833 0.6666 0.75 0.8333 0.9167 1.0keyValue='10 9 8 7 6 5 4 3 2 1 0 -1 10'/>

< ROUTE  fromNode=' Clock' fromField='fraction_changed' toNode=' IntegerSequencerInstance' toField='set_fraction'/>
<Transform translation='0 2 0'>
<Shape>
<Text string='"IntegerSequencer => Switch" "touch blue text to count down"'>
<FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
<Appearance>
<Material diffuseColor='0.4 0.6 0.8'/>
</Appearance>
</Shape>
<!-- ROUTE information for TouchToStart node:  [from touchTime to Clock.set_startTime ] [from isOver to Clock.enabled ] -->
<TouchSensor DEF='TouchToStartdescription='Touch To Start'/>

< ROUTE  fromNode=' TouchToStart' fromField='touchTime' toNode=' Clock' toField='set_startTime'/>
< ROUTE  fromNode=' TouchToStart' fromField='isOver' toNode=' Clock' toField='enabled'/>
<!-- background box to simplify touching -->
<Transform translation='0 0 -0.5'>
<Shape>
<Box size='11 2 0.1'/>
<Appearance>
<Material diffuseColor='0.2 0.2 0.2transparency='0.95'/>
</Appearance>
</Shape>
</Transform>
</Transform>
<Transform translation='-3 -2.5 0'>
<Shape>
<Text string='"click for" "previous key" "(count up)"'>
<FontStyle DEF='PreviousNextFontjustify='"MIDDLE" "MIDDLE"size='0.7'/>
</Text>
<Appearance>
<Material diffuseColor='0.8 0.6 0.4'/>
</Appearance>
</Shape>
<!-- ROUTE information for TouchPrevious node:  [from isActive to IntegerSequencerInstance.previous ] -->
<TouchSensor DEF='TouchPreviousdescription='touch for previous'/>

< ROUTE  fromNode=' TouchPrevious' fromField='isActive' toNode=' IntegerSequencerInstance' toField='previous'/>
</Transform>
<Transform translation='3 -2.5 0'>
<Shape>
<Text string='"click for" "next key" "(count down)"'>
<FontStyle USE=' PreviousNextFont'/>
</Text>
<Appearance>
<Material diffuseColor='0.8 0.6 0.4'/>
</Appearance>
</Shape>
<!-- ROUTE information for TouchNext node:  [from isActive to IntegerSequencerInstance.next ] -->
<TouchSensor DEF='TouchNextdescription='touch for next'/>

< ROUTE  fromNode=' TouchNext' fromField='isActive' toNode=' IntegerSequencerInstance' toField='next'/>
</Transform>
<!-- Interesting materials from Universal Media library -->
<ExternProtoDeclare name='ArtDeco02'
  url=' "../UniversalMediaMaterials/ArtDecoPrototypes.wrl#ArtDeco02" "https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoDemo.wrl#ArtDeco02" "../UniversalMediaMaterials/ArtDecoPrototypes.x3d#ArtDeco02" "https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.x3d#ArtDeco02" ' />

<ExternProtoDeclare name='ArtDeco04'
  url=' "../UniversalMediaMaterials/ArtDecoPrototypes.wrl#ArtDeco04" "https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoDemo.wrl#ArtDeco04" "../UniversalMediaMaterials/ArtDecoPrototypes.x3d#ArtDeco04" "https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.x3d#ArtDeco04" ' />

<ExternProtoDeclare name='ArtDeco05'
  url=' "../UniversalMediaMaterials/ArtDecoPrototypes.wrl#ArtDeco05" "https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoDemo.wrl#ArtDeco05" "../UniversalMediaMaterials/ArtDecoPrototypes.x3d#ArtDeco05" "https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.x3d#ArtDeco05" ' />

<ExternProtoDeclare name='ArtDeco08'
  url=' "../UniversalMediaMaterials/ArtDecoPrototypes.wrl#ArtDeco08" "https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoDemo.wrl#ArtDeco08" "../UniversalMediaMaterials/ArtDecoPrototypes.x3d#ArtDeco08" "https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.x3d#ArtDeco08" ' />

<ExternProtoDeclare name='ArtDeco09'
  url=' "../UniversalMediaMaterials/ArtDecoPrototypes.wrl#ArtDeco09" "https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoDemo.wrl#ArtDeco09" "../UniversalMediaMaterials/ArtDecoPrototypes.x3d#ArtDeco09" "https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.x3d#ArtDeco09" ' />

<ExternProtoDeclare name='ArtDeco13'
  url=' "../UniversalMediaMaterials/ArtDecoPrototypes.wrl#ArtDeco13" "https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoDemo.wrl#ArtDeco13" "../UniversalMediaMaterials/ArtDecoPrototypes.x3d#ArtDeco13" "https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.x3d#ArtDeco13" ' />

<ExternProtoDeclare name='ArtDeco18'
  url=' "../UniversalMediaMaterials/ArtDecoPrototypes.wrl#ArtDeco18" "https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoDemo.wrl#ArtDeco18" "../UniversalMediaMaterials/ArtDecoPrototypes.x3d#ArtDeco18" "https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.x3d#ArtDeco18" ' />

<ExternProtoDeclare name='ArtDeco21'
  url=' "../UniversalMediaMaterials/ArtDecoPrototypes.wrl#ArtDeco21" "https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoDemo.wrl#ArtDeco21" "../UniversalMediaMaterials/ArtDecoPrototypes.x3d#ArtDeco21" "https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.x3d#ArtDeco21" ' />

<ExternProtoDeclare name='ArtDeco24'
  url=' "../UniversalMediaMaterials/ArtDecoPrototypes.wrl#ArtDeco24" "https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoDemo.wrl#ArtDeco24" "../UniversalMediaMaterials/ArtDecoPrototypes.x3d#ArtDeco24" "https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.x3d#ArtDeco24" ' />

<ExternProtoDeclare name='ArtDeco25'
  url=' "../UniversalMediaMaterials/ArtDecoPrototypes.wrl#ArtDeco25" "https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoDemo.wrl#ArtDeco25" "../UniversalMediaMaterials/ArtDecoPrototypes.x3d#ArtDeco25" "https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoExamples.x3d#ArtDeco25" ' />

<Transform translation='0 -0.5 0'>
<!-- ROUTE information for CountDownSwitch node:  [from IntegerSequencerInstance.value_changed to whichChoice ] -->
<Switch DEF='CountDownSwitchwhichChoice='0'>
<Group>
<Shape>
<Text length='0string='"child choice 0"'>
<FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
<Appearance>
<ProtoInstance name='ArtDeco02containerField='material'/>
</Appearance>
</Shape>
</Group>
<Shape>
<Text length='0string='"child choice 1"'>
<FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
<Appearance>
<ProtoInstance name='ArtDeco09containerField='material'/>
</Appearance>
</Shape>
<Shape>
<Text length='0string='"child choice 2"'>
<FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
<Appearance>
<ProtoInstance name='ArtDeco08containerField='material'/>
</Appearance>
</Shape>
<Shape>
<Text length='0string='"child choice 3"'>
<FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
<Appearance>
<ProtoInstance name='ArtDeco18containerField='material'/>
</Appearance>
</Shape>
<Shape>
<Text length='0string='"child choice 4"'>
<FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
<Appearance>
<ProtoInstance name='ArtDeco21containerField='material'/>
</Appearance>
</Shape>
<Shape>
<Text length='0string='"child choice 5"'>
<FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
<Appearance>
<ProtoInstance name='ArtDeco24containerField='material'/>
</Appearance>
</Shape>
<Shape>
<Text length='0string='"child choice 6"'>
<FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
<Appearance>
<ProtoInstance name='ArtDeco25containerField='material'/>
</Appearance>
</Shape>
<Shape>
<Text length='0string='"child choice 7"'>
<FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
<Appearance>
<ProtoInstance name='ArtDeco13containerField='material'/>
</Appearance>
</Shape>
<Shape>
<Text length='0string='"child choice 8"'>
<FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
<Appearance>
<ProtoInstance name='ArtDeco05containerField='material'/>
</Appearance>
</Shape>
<Shape>
<Text length='0string='"child choice 9"'>
<FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
<Appearance>
<ProtoInstance name='ArtDeco04containerField='material'/>
</Appearance>
</Shape>
<Shape>
<Text length='0string='"child choice 10"'>
<FontStyle justify='"MIDDLE" "MIDDLE"'/>
</Text>
<Appearance>
<ProtoInstance name='ArtDeco02containerField='material'/>
</Appearance>
</Shape>
</Switch>
</Transform>
< ROUTE  fromNode=' IntegerSequencerInstance' fromField='value_changed' toNode=' CountDownSwitch' toField='whichChoice'/>
</Scene>
</X3D>
<!--

to top <!-- Event Graph ROUTE Table shows event connections -->
 
<!-- Index for DEF nodes: Clock, CountDownSwitch, IntegerSequencerInstance, PreviousNextFont, TouchNext, TouchPrevious, TouchToStart Index for ExternProtoDeclare definitions: ArtDeco02, ArtDeco04, ArtDeco05, ArtDeco08, ArtDeco09, ArtDeco13, ArtDeco18, ArtDeco21, ArtDeco24, ArtDeco25
-->

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

TouchNext
TouchSensor
isActive
SFBool

ROUTE
event to
(1)
IntegerSequencerInstance
IntegerSequencer
next
SFBool

 
 
then
IntegerSequencerInstance
IntegerSequencer
value_changed
SFInt32

ROUTE
event to
(2)
CountDownSwitch
Switch
whichChoice
SFInt32


TouchPrevious
TouchSensor
isActive
SFBool

ROUTE
event to
(1)
IntegerSequencerInstance
IntegerSequencer
previous
SFBool

 
 
then
IntegerSequencerInstance
IntegerSequencer
value_changed
SFInt32

ROUTE
event to
(2)
CountDownSwitch
Switch
whichChoice
SFInt32


TouchToStart
TouchSensor
touchTime
SFTime

ROUTE
event to
(1)
Clock
TimeSensor
set_startTime
SFTime

 
 
then
Clock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
IntegerSequencerInstance
IntegerSequencer
set_fraction
SFFloat

 
 
then
IntegerSequencerInstance
IntegerSequencer
value_changed
SFInt32

ROUTE
event to
(3)
CountDownSwitch
Switch
whichChoice
SFInt32
TouchToStart
TouchSensor
isOver
SFBool

ROUTE
event to
(1)
Clock
TimeSensor
enabled
SFBool

 
 
then
Clock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
IntegerSequencerInstance
IntegerSequencer
set_fraction
SFFloat

 
 
then
IntegerSequencerInstance
IntegerSequencer
value_changed
SFInt32

ROUTE
event to
(3)
CountDownSwitch
Switch
whichChoice
SFInt32


Clock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
IntegerSequencerInstance
IntegerSequencer
set_fraction
SFFloat

 
 
then
IntegerSequencerInstance
IntegerSequencer
value_changed
SFInt32

ROUTE
event to
(2)
CountDownSwitch
Switch
whichChoice
SFInt32



ProtoInstance
ArtDeco02
No ROUTE connection found for output from this node.
Contains SFNode/MFNode field with indirect access to other nodes. 



ProtoInstance
ArtDeco09
No ROUTE connection found for output from this node.
Contains SFNode/MFNode field with indirect access to other nodes. 



ProtoInstance
ArtDeco08
No ROUTE connection found for output from this node.
Contains SFNode/MFNode field with indirect access to other nodes. 



ProtoInstance
ArtDeco18
No ROUTE connection found for output from this node.
Contains SFNode/MFNode field with indirect access to other nodes. 



ProtoInstance
ArtDeco21
No ROUTE connection found for output from this node.
Contains SFNode/MFNode field with indirect access to other nodes. 



ProtoInstance
ArtDeco24
No ROUTE connection found for output from this node.
Contains SFNode/MFNode field with indirect access to other nodes. 



ProtoInstance
ArtDeco25
No ROUTE connection found for output from this node.
Contains SFNode/MFNode field with indirect access to other nodes. 



ProtoInstance
ArtDeco13
No ROUTE connection found for output from this node.
Contains SFNode/MFNode field with indirect access to other nodes. 



ProtoInstance
ArtDeco05
No ROUTE connection found for output from this node.
Contains SFNode/MFNode field with indirect access to other nodes. 



ProtoInstance
ArtDeco04
No ROUTE connection found for output from this node.
Contains SFNode/MFNode field with indirect access to other nodes. 



ProtoInstance
ArtDeco02
No ROUTE connection found for output from this node.
Contains SFNode/MFNode field with indirect access to other nodes. 


-->

<!-- Online at
https://www.web3d.org/x3d/content/examples/Basic/development/IntegerSequencerExampleIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Basic/development/IntegerSequencerExample.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)
    <ProtoInstance name='ProtoName'> <field name='fieldName'/> </ProtoInstance> -->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->