<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
<X3D profile='Immersive' version='3.3 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' https://www.web3d.org/specifications/x3d-3.3.xsd '>
<head>
<meta name='titlecontent='BooleanSequencerIntegerSequencer.x3d'/>
<meta name='descriptioncontent='Show synchronized use of BooleanSequencer and IntegerSequencer nodes for SpotLight enabled and Switch whichChoice control, respectively'/>
<meta name='creatorcontent='Don Brutzman'/>
<meta name='createdcontent='6 September 2006'/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name='identifiercontent=' https://X3dGraphics.com/examples/X3dForWebAuthors/Chapter09EventUtilitiesScripting/BooleanSequencerIntegerSequencer.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!-- -->
<Scene>
<WorldInfo title='BooleanSequencerIntegerSequencer.x3d'/>
<NavigationInfo/>
<!-- ROUTE information for Clock node:  [from fraction_changed to OnOffSequencer.set_fraction ] [from fraction_changed to ChildSequencer.set_fraction ] -->
<TimeSensor DEF='ClockcycleInterval='10loop='true'/>
<!-- ROUTE information for OnOffSequencer node:  [from Clock.fraction_changed to set_fraction ] [from value_changed to RedSpotLight.on ] -->
<BooleanSequencer DEF='OnOffSequencerkey='0 0.2 0.4 0.6 0.8 1keyValue='true false true false true truecontainerField='children'/>
<!-- ROUTE information for RedSpotLight node:  [from OnOffSequencer.value_changed to on ] -->
<SpotLight DEF='RedSpotLightcolor='1 0.0 0.0location='0 0 10'/>
<!-- Note no red or pink materials, only grey -->
<ROUTE fromNode='ClockfromField='fraction_changedtoNode='OnOffSequencertoField='set_fraction'/>
<ROUTE fromNode='OnOffSequencerfromField='value_changedtoNode='RedSpotLighttoField='on'/>
<!-- ROUTE information for ChildSequencer node:  [from Clock.fraction_changed to set_fraction ] [from value_changed to ShapeSwitcher.whichChoice ] -->
<IntegerSequencer DEF='ChildSequencerkey='0 0.2 0.4 0.6 0.8 1keyValue='0 1 2 3 -1 0containerField='children'/>
<Transform translation='-3.5 1 0'>
<!-- ROUTE information for ShapeSwitcher node:  [from ChildSequencer.value_changed to whichChoice ] -->
<Switch DEF='ShapeSwitcherwhichChoice='-1'>
<Shape DEF='Child0'>
<Text string='"Grey child 0" "headlight plus red light"'/>
<Appearance DEF='GreyAppearance'>
<Material diffuseColor='0.7 0.7 0.7'/>
</Appearance>
</Shape>
<Shape DEF='Child1'>
<Text string='"Grey child 1" "headlight only"'/>
<Appearance USE='GreyAppearance'/>
</Shape>
<Shape DEF='Child2'>
<Text string='"Grey child 2" "headlight plus red light"'/>
<Appearance USE='GreyAppearance'/>
</Shape>
<Shape DEF='Child3'>
<Text string='"Grey child 3" "headlight only"'/>
<Appearance USE='GreyAppearance'/>
</Shape>
</Switch>
</Transform>
<ROUTE fromNode='ClockfromField='fraction_changedtoNode='ChildSequencertoField='set_fraction'/>
<ROUTE fromNode='ChildSequencerfromField='value_changedtoNode='ShapeSwitchertoField='whichChoice'/>
</Scene>
</X3D>
<!--

Index for DEF nodes : Child0, Child1, Child2, Child3, ChildSequencer, Clock, GreyAppearance, OnOffSequencer, RedSpotLight, ShapeSwitcher
-->

<!-- Color key: <X3dNode DEF='idName' field='value'/> matches <XmlElement DEF='idName' attribute='value'/>
(Light blue background: behavior node) (Grey background: inserted documentation) (Magenta background: X3D Extensibility)
-->

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