X3D Model Documentation: IntegerSequencerExample.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2 
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
  3  <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'>
  4       <head>
  5            <meta name='titlecontent='IntegerSequencerExample.x3d'/>
  6            <meta name='descriptioncontent='This example shows how to use the IntegerSequencer prototype in an animated scenario.'/>
  7            <meta name='creatorcontent='Don Brutzman'/>
  8            <meta name='createdcontent='13 April 2002'/>
  9            <meta name='modifiedcontent='20 October 2019'/>
 10            <meta name='referencecontent='https://www.web3d.org/technicalinfo/specifications/vrml97/part1/nodesRef.html#ScalarInterpolator'/>
 11            <meta name='referencecontent='https://www.web3d.org/x3d/content/examples/Basic/UniversalMediaMaterials/ArtDecoPrototypes.x3d'/>
 12            <meta name='subjectcontent='integer sequencer'/>
 13            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/Basic/development/IntegerSequencerExample.x3d'/>
 14            <meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
 15            <meta name='licensecontent='../license.html'/>
 16       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top 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
-->
 17       <Scene>
 18            <WorldInfo title='IntegerSequencerExample.x3d'/>
 19            <Background groundColor='0.2 0.2 0.2skyColor='0.2 0.2 0.2'/>
 20 
          <!-- 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'/>
 21 
          <!-- 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'/>
 22            < ROUTE  fromNode='Clock' fromField='fraction_changed' toNode='IntegerSequencerInstance' toField='set_fraction'/>
 23            <Transform translation='0 2 0'>
 24                 <Shape>
 25                      <Text string='"IntegerSequencer => Switch" "touch blue text to count down"'>
 26                           <FontStyle justify='"MIDDLE" "MIDDLE"'/>
 27                      </Text>
 28                      <Appearance>
 29                           <Material diffuseColor='0.4 0.6 0.8'/>
 30                      </Appearance>
 31                 </Shape>
 32 
               <!-- ROUTE information for TouchToStart node:  [from touchTime to Clock.set_startTime ] [from isOver to Clock.enabled ] -->
               <TouchSensor DEF='TouchToStartdescription='Touch To Start'/>
 33                 < ROUTE  fromNode='TouchToStart' fromField='touchTime' toNode='Clock' toField='set_startTime'/>
 34                 < ROUTE  fromNode='TouchToStart' fromField='isOver' toNode='Clock' toField='enabled'/>
 35                 <!-- background box to simplify touching -->
 36                 <Transform translation='0 0 -0.5'>
 37                      <Shape>
 38                           <Box size='11 2 0.1'/>
 39                           <Appearance>
 40                                <Material diffuseColor='0.2 0.2 0.2transparency='0.95'/>
 41                           </Appearance>
 42                      </Shape>
 43                 </Transform>
 44            </Transform>
 45            <Transform translation='-3 -2.5 0'>
 46                 <Shape>
 47                      <Text string='"click for" "previous key" "(count up)"'>
 48 
                         <!-- FontStyle PreviousNextFont is a DEF node that has 1 USE node: USE_1 -->
                         <FontStyle DEF='PreviousNextFontjustify='"MIDDLE" "MIDDLE"size='0.7'/>
 49                      </Text>
 50                      <Appearance>
 51                           <Material diffuseColor='0.8 0.6 0.4'/>
 52                      </Appearance>
 53                 </Shape>
 54 
               <!-- ROUTE information for TouchPrevious node:  [from isActive to IntegerSequencerInstance.previous ] -->
               <TouchSensor DEF='TouchPreviousdescription='touch for previous'/>
 55                 < ROUTE  fromNode='TouchPrevious' fromField='isActive' toNode='IntegerSequencerInstance' toField='previous'/>
 56            </Transform>
 57            <Transform translation='3 -2.5 0'>
 58                 <Shape>
 59                      <Text string='"click for" "next key" "(count down)"'>
 60                           <FontStyle USE='PreviousNextFont'/>
 61                      </Text>
 62                      <Appearance>
 63                           <Material diffuseColor='0.8 0.6 0.4'/>
 64                      </Appearance>
 65                 </Shape>
 66 
               <!-- ROUTE information for TouchNext node:  [from isActive to IntegerSequencerInstance.next ] -->
               <TouchSensor DEF='TouchNextdescription='touch for next'/>
 67                 < ROUTE  fromNode='TouchNext' fromField='isActive' toNode='IntegerSequencerInstance' toField='next'/>
 68            </Transform>
 69            <!-- Interesting materials from Universal Media library -->
 70            <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" '/>
 71            <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" '/>
 72            <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" '/>
 73            <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" '/>
 74            <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" '/>
 75            <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" '/>
 76            <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" '/>
 77            <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" '/>
 78            <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" '/>
 79            <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" '/>
 80            <Transform translation='0 -0.5 0'>
 81 
               <!-- ROUTE information for CountDownSwitch node:  [from IntegerSequencerInstance.value_changed to whichChoice ] -->
               <Switch DEF='CountDownSwitchwhichChoice='0'>
 82                      <Group>
 83                           <Shape>
 84                                <Text length='0string='"child choice 0"'>
 85                                     <FontStyle justify='"MIDDLE" "MIDDLE"'/>
 86                                </Text>
 87                                <Appearance>
 88                                     <ProtoInstance name='ArtDeco02containerField='material'/>
 89                                </Appearance>
 90                           </Shape>
 91                      </Group>
 92                      <Shape>
 93                           <Text length='0string='"child choice 1"'>
 94                                <FontStyle justify='"MIDDLE" "MIDDLE"'/>
 95                           </Text>
 96                           <Appearance>
 97                                <ProtoInstance name='ArtDeco09containerField='material'/>
 98                           </Appearance>
 99                      </Shape>
100                      <Shape>
101                           <Text length='0string='"child choice 2"'>
102                                <FontStyle justify='"MIDDLE" "MIDDLE"'/>
103                           </Text>
104                           <Appearance>
105                                <ProtoInstance name='ArtDeco08containerField='material'/>
106                           </Appearance>
107                      </Shape>
108                      <Shape>
109                           <Text length='0string='"child choice 3"'>
110                                <FontStyle justify='"MIDDLE" "MIDDLE"'/>
111                           </Text>
112                           <Appearance>
113                                <ProtoInstance name='ArtDeco18containerField='material'/>
114                           </Appearance>
115                      </Shape>
116                      <Shape>
117                           <Text length='0string='"child choice 4"'>
118                                <FontStyle justify='"MIDDLE" "MIDDLE"'/>
119                           </Text>
120                           <Appearance>
121                                <ProtoInstance name='ArtDeco21containerField='material'/>
122                           </Appearance>
123                      </Shape>
124                      <Shape>
125                           <Text length='0string='"child choice 5"'>
126                                <FontStyle justify='"MIDDLE" "MIDDLE"'/>
127                           </Text>
128                           <Appearance>
129                                <ProtoInstance name='ArtDeco24containerField='material'/>
130                           </Appearance>
131                      </Shape>
132                      <Shape>
133                           <Text length='0string='"child choice 6"'>
134                                <FontStyle justify='"MIDDLE" "MIDDLE"'/>
135                           </Text>
136                           <Appearance>
137                                <ProtoInstance name='ArtDeco25containerField='material'/>
138                           </Appearance>
139                      </Shape>
140                      <Shape>
141                           <Text length='0string='"child choice 7"'>
142                                <FontStyle justify='"MIDDLE" "MIDDLE"'/>
143                           </Text>
144                           <Appearance>
145                                <ProtoInstance name='ArtDeco13containerField='material'/>
146                           </Appearance>
147                      </Shape>
148                      <Shape>
149                           <Text length='0string='"child choice 8"'>
150                                <FontStyle justify='"MIDDLE" "MIDDLE"'/>
151                           </Text>
152                           <Appearance>
153                                <ProtoInstance name='ArtDeco05containerField='material'/>
154                           </Appearance>
155                      </Shape>
156                      <Shape>
157                           <Text length='0string='"child choice 9"'>
158                                <FontStyle justify='"MIDDLE" "MIDDLE"'/>
159                           </Text>
160                           <Appearance>
161                                <ProtoInstance name='ArtDeco04containerField='material'/>
162                           </Appearance>
163                      </Shape>
164                      <Shape>
165                           <Text length='0string='"child choice 10"'>
166                                <FontStyle justify='"MIDDLE" "MIDDLE"'/>
167                           </Text>
168                           <Appearance>
169                                <ProtoInstance name='ArtDeco02containerField='material'/>
170                           </Appearance>
171                      </Shape>
172                 </Switch>
173            </Transform>
174            < ROUTE  fromNode='IntegerSequencerInstance' fromField='value_changed' toNode='CountDownSwitch' toField='whichChoice'/>
175       </Scene>
176  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top 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
-->
X3D Tooltips element index: Appearance, Background, Box, ExternProtoDeclare, FontStyle, Group, head, IntegerSequencer, Material, meta, ProtoInstance, ROUTE, Scene, Shape, Switch, Text, TimeSensor, TouchSensor, Transform, WorldInfo, X3D, accessType and type, XML data types, field types

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


ProtoInstance
ArtDeco02
No ROUTE connection found for output events from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 


ProtoInstance
ArtDeco09
No ROUTE connection found for output events from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 


ProtoInstance
ArtDeco08
No ROUTE connection found for output events from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 


ProtoInstance
ArtDeco18
No ROUTE connection found for output events from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 


ProtoInstance
ArtDeco21
No ROUTE connection found for output events from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 


ProtoInstance
ArtDeco24
No ROUTE connection found for output events from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 


ProtoInstance
ArtDeco25
No ROUTE connection found for output events from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 


ProtoInstance
ArtDeco13
No ROUTE connection found for output events from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 


ProtoInstance
ArtDeco05
No ROUTE connection found for output events from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 


ProtoInstance
ArtDeco04
No ROUTE connection found for output events from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 


ProtoInstance
ArtDeco02
No ROUTE connection found for output events from this node.
This ProtoInstance contains SFNode/MFNode fieldValue declarations with
direct access to other nodes, and thus has potential to produce run-time animation. 
Additional guidance on X3D animation can be found in the 10-Step Animation Design Process and Event Tracing hint sheets. Have fun with X3D! 😀

-->
<!-- 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. -->