X3D Model Documentation: Figure10_09ThreeBlinkingShapes.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='Interchange' version='3.0 xmlns:xsd='https://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.0.xsd'>
  4       <head>
  5            <meta name='titlecontent=' Figure10_09ThreeBlinkingShapes.x3d '/>
  6            <meta name='creatorcontent='Figure 10.9, The VRML 2.0 Sourcebook, Copyright [1997] By Andrea L. Ames, David R. Nadeau, and John L. Moreland'/>
  7            <meta name='referencecontent=' http://www.wiley.com/legacy/compbooks/vrml2sbk/ch10/10fig09.htm '/>
  8            <meta name='translatorcontent='Don Brutzman'/>
  9            <meta name='createdcontent='15 August 2000'/>
 10            <meta name='modifiedcontent='20 October 2019'/>
 11            <meta name='descriptioncontent='Three blinking shapes, each controlled using independent ColorInterpolator nodes.'/>
 12            <meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter10Materials/Figure10_09ThreeBlinkingShapes.x3d '/>
 13            <meta name='generatorcontent='X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit'/>
 14            <meta name='licensecontent='../../license.html'/>
 15       </head>
<!--

Event Graph ROUTE Table shows event connections.

--> <!-- to top DEF nodes index: BALL_COLOR_1, BALL_COLOR_2, BALL_COLOR_3, CLOCK_1, CLOCK_2, CLOCK_3, COLOR_PATH_1, COLOR_PATH_2, COLOR_PATH_3

Index for Viewpoint node: Viewpoint_1

-->
 16       <Scene>
 17            <WorldInfo title='Figure10_09ThreeBlinkingShapes.x3d'/>
 18            <Viewpoint description='Blinking shapesposition='0 0 8'/>
 19            <Group>
 20                 <Transform translation='-2 0 0'>
 21                      <Shape>
 22                           <Appearance>
 23 
                              <!-- ROUTE information for BALL_COLOR_1 node:  [from COLOR_PATH_1.value_changed to set_emissiveColor ] -->
                              <Material DEF='BALL_COLOR_1diffuseColor='0.4 0.4 0.4'/>
 24                           </Appearance>
 25                           <Box size='1.5 1.5 1.5'/>
 26                      </Shape>
 27                 </Transform>
 28                 <Shape>
 29                      <Appearance>
 30 
                         <!-- ROUTE information for BALL_COLOR_2 node:  [from COLOR_PATH_2.value_changed to set_emissiveColor ] -->
                         <Material DEF='BALL_COLOR_2diffuseColor='0.4 0.4 0.4'/>
 31                      </Appearance>
 32                      <Sphere/>
 33                 </Shape>
 34                 <Transform translation='2 0 0'>
 35                      <Shape>
 36                           <Appearance>
 37 
                              <!-- ROUTE information for BALL_COLOR_3 node:  [from COLOR_PATH_3.value_changed to set_emissiveColor ] -->
                              <Material DEF='BALL_COLOR_3diffuseColor='0.4 0.4 0.4'/>
 38                           </Appearance>
 39                           <Cone/>
 40                      </Shape>
 41                 </Transform>
 42 
               <!-- ROUTE information for CLOCK_1 node:  [from fraction_changed to COLOR_PATH_1.set_fraction ] -->
               <TimeSensor DEF='CLOCK_1cycleInterval='2loop='trueenabled='true'/>
 43 
               <!-- ROUTE information for CLOCK_2 node:  [from fraction_changed to COLOR_PATH_2.set_fraction ] -->
               <TimeSensor DEF='CLOCK_2cycleInterval='3.6loop='trueenabled='true'/>
 44 
               <!-- ROUTE information for CLOCK_3 node:  [from fraction_changed to COLOR_PATH_3.set_fraction ] -->
               <TimeSensor DEF='CLOCK_3cycleInterval='5loop='trueenabled='true'/>
 45 
               <!-- ROUTE information for COLOR_PATH_1 node:  [from CLOCK_1.fraction_changed to set_fraction ] [from value_changed to BALL_COLOR_1.set_emissiveColor ] -->
               <ColorInterpolator DEF='COLOR_PATH_1key='0.0 0.5 0.5 1.0keyValue='1 1 0 1 1 0 0 0 1 0 0 1'/>
 46 
               <!-- ROUTE information for COLOR_PATH_2 node:  [from CLOCK_2.fraction_changed to set_fraction ] [from value_changed to BALL_COLOR_2.set_emissiveColor ] -->
               <ColorInterpolator DEF='COLOR_PATH_2key='0.0 0.5 0.5 1.0keyValue='0.5 0.5 0.5 0.5 0.5 0.5 1 1 1 1 1 1'/>
 47 
               <!-- ROUTE information for COLOR_PATH_3 node:  [from CLOCK_3.fraction_changed to set_fraction ] [from value_changed to BALL_COLOR_3.set_emissiveColor ] -->
               <ColorInterpolator DEF='COLOR_PATH_3key='0.0 0.5 0.5 1.0keyValue='0 1 0 0 1 0 1 0 0 1 0 0'/>
 48            </Group>
 49            < ROUTE  fromNode='CLOCK_1' fromField='fraction_changed' toNode='COLOR_PATH_1' toField='set_fraction'/>
 50            < ROUTE  fromNode='CLOCK_2' fromField='fraction_changed' toNode='COLOR_PATH_2' toField='set_fraction'/>
 51            < ROUTE  fromNode='CLOCK_3' fromField='fraction_changed' toNode='COLOR_PATH_3' toField='set_fraction'/>
 52            < ROUTE  fromNode='COLOR_PATH_1' fromField='value_changed' toNode='BALL_COLOR_1' toField='set_emissiveColor'/>
 53            < ROUTE  fromNode='COLOR_PATH_2' fromField='value_changed' toNode='BALL_COLOR_2' toField='set_emissiveColor'/>
 54            < ROUTE  fromNode='COLOR_PATH_3' fromField='value_changed' toNode='BALL_COLOR_3' toField='set_emissiveColor'/>
 55       </Scene>
 56  </X3D>
<!--

Event Graph ROUTE Table shows event connections.

--> <!-- to top DEF nodes index: BALL_COLOR_1, BALL_COLOR_2, BALL_COLOR_3, CLOCK_1, CLOCK_2, CLOCK_3, COLOR_PATH_1, COLOR_PATH_2, COLOR_PATH_3

Index for Viewpoint node: Viewpoint_1

-->
X3D Tooltips element index: to top Appearance, Box, ColorInterpolator, Cone, Group, head, Material, meta, ROUTE, Scene, Shape, Sphere, TimeSensor, Transform, Viewpoint, WorldInfo, X3D,
plus documentation for accessType definitions, type definitions, XML data types, and field types

🔖   Event Graph ROUTE Table entries with 4 ROUTE connections, showing X3D event-model relationships for this scene.

Each row with a ROUTE statement shows an event cascade that may occur during a single timestamp interval between frame renderings, performed as part of the X3D execution model.

CLOCK_1
TimeSensor
fraction_changed
SFFloat
→
ROUTE
event to
(1)
COLOR_PATH_1
ColorInterpolator
set_fraction
SFFloat
then
from
same
node
COLOR_PATH_1
ColorInterpolator
value_changed
SFColor
→
ROUTE
event to
(2)
BALL_COLOR_1
Material
set_emissiveColor
SFColor

CLOCK_2
TimeSensor
fraction_changed
SFFloat
→
ROUTE
event to
(1)
COLOR_PATH_2
ColorInterpolator
set_fraction
SFFloat
then
from
same
node
COLOR_PATH_2
ColorInterpolator
value_changed
SFColor
→
ROUTE
event to
(2)
BALL_COLOR_2
Material
set_emissiveColor
SFColor

CLOCK_3
TimeSensor
fraction_changed
SFFloat
→
ROUTE
event to
(1)
COLOR_PATH_3
ColorInterpolator
set_fraction
SFFloat
then
from
same
node
COLOR_PATH_3
ColorInterpolator
value_changed
SFColor
→
ROUTE
event to
(2)
BALL_COLOR_3
Material
set_emissiveColor
SFColor

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/Vrml2Sourcebook/Chapter10Materials/Figure10_09ThreeBlinkingShapesIndex.html -->
<!-- SourceForge version control Version control at    
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter10Materials/Figure10_09ThreeBlinkingShapes.x3d -->

<!-- Color-coding legend: X3D terminology <X3dNode DEF='idNamefield='value'/> matches XML terminology <XmlElement DEF='idNameattribute='value'/>
(Light-blue background: event-based behavior node or statement) (Grey background inside box: inserted documentation) (Magenta background: X3D Extensibility)
-->

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