X3D Model Documentation: Figure20_14DirectionalLightSunAnimated.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='Figure20_14DirectionalLightSunAnimated.x3d'/>
  6            <meta name='creatorcontent='Figure 20.14, 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/ch20/20fig14.htm'/>
  8            <meta name='translatorcontent='Don Brutzman'/>
  9            <meta name='createdcontent='10 September 2000'/>
 10            <meta name='modifiedcontent='20 October 2019'/>
 11            <meta name='descriptioncontent='A DirectionalLight simulates the sun from sunrise through sunset, animated using multiple interpolators. Compare Figures 20.13a, 13b, 13c, 14.'/>
 12            <meta name='referencecontent='Figure20_13aDirectionalLightSunrise.x3d'/>
 13            <meta name='referencecontent='Figure20_13bDirectionalLightNoon.x3d'/>
 14            <meta name='referencecontent='Figure20_13cDirectionalLightSunset.x3d'/>
 15            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter20Lighting/Figure20_14DirectionalLightSunAnimated.x3d'/>
 16            <meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
 17            <meta name='licensecontent='../../license.html'/>
 18       </head>
<!--

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

<!-- to top Index for DEF nodes: Clock, LightAmbient, LightColor, LightDirection, SunLight, VAULT

Index for Viewpoint node: Viewpoint_1
-->
 19       <Scene>
 20            <WorldInfo title='Figure20_14DirectionalLightSunAnimated.x3d'/>
 21            <Viewpoint description='Sunlight animationorientation='1 0 0 -0.15position='0 4 10'/>
 22            <!-- Note headlight turned off in NavigationInfo. Most browsers allow user toggling headlight also. -->
 23            <!-- This NavigationInfo node is bound at runtime and overrides the NavigationInfo headlight setting within the Inlined scene. -->
 24            <NavigationInfo headlight='false'/>
 25            <Background groundColor='0 0 0skyColor='0.15 0.15 0.25'/>
 26            <Group>
 27 
               <!-- ROUTE information for SunLight node:  [from LightDirection.value_changed to set_direction ] [from LightColor.value_changed to set_color ] [from LightAmbient.value_changed to set_ambientIntensity ] -->
               <DirectionalLight DEF='SunLightambientIntensity='0.5color='1 0.6 0direction='-0.8 -0.2 -0.2'/>
 28 
               <!-- ROUTE information for Clock node:  [from fraction_changed to LightDirection.set_fraction ] [from fraction_changed to LightColor.set_fraction ] [from fraction_changed to LightAmbient.set_fraction ] -->
               <TimeSensor DEF='ClockcycleInterval='10loop='true'/>
 29 
               <!-- ROUTE information for LightDirection node:  [from Clock.fraction_changed to set_fraction ] [from value_changed to SunLight.set_direction ] -->
               <PositionInterpolator DEF='LightDirectionkey='0 0.1 0.5 0.9 1keyValue='0.8 -0.2 -0.2 0.8 -0.2 -0.2 0 -1 -0.2 -0.8 -0.2 -0.2 -0.8 -0.2 -0.2'/>
 30 
               <!-- ROUTE information for LightColor node:  [from Clock.fraction_changed to set_fraction ] [from value_changed to SunLight.set_color ] -->
               <ColorInterpolator DEF='LightColorkey='0 0.1 0.5 0.9 1keyValue='1 0.6 0 1 0.6 0 1 0.9 0.7 1 0.3 0.1 1 0.3 0.1'/>
 31 
               <!-- ROUTE information for LightAmbient node:  [from Clock.fraction_changed to set_fraction ] [from value_changed to SunLight.set_ambientIntensity ] -->
               <ScalarInterpolator DEF='LightAmbientkey='0 0.1 0.5 0.9 1keyValue='0.3 0.3 0.7 0.2 0.2'/>
 32                 <Inline DEF='VAULTbboxCenter='0 1 0bboxSize='6 2 6'   url=' "../Chapter13PointsLinesFaces/Figure13_16VaultedCeiling.x3d" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter13PointsLinesFaces/Figure13_16VaultedCeiling.x3d" "../Chapter13PointsLinesFaces/Figure13_16VaultedCeiling.wrl" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter13PointsLinesFaces/Figure13_16VaultedCeiling.wrl" '/>
 33                 <Shape>
 34                      <Box size='16 0.01 16'/>
 35                      <Appearance>
 36                           <Material diffuseColor='0.2 0.6 0'/>
 37                      </Appearance>
 38                 </Shape>
 39            </Group>
 40            < ROUTE  fromNode='Clock' fromField='fraction_changed' toNode='LightDirection' toField='set_fraction'/>
 41            < ROUTE  fromNode='Clock' fromField='fraction_changed' toNode='LightColor' toField='set_fraction'/>
 42            < ROUTE  fromNode='Clock' fromField='fraction_changed' toNode='LightAmbient' toField='set_fraction'/>
 43            < ROUTE  fromNode='LightDirection' fromField='value_changed' toNode='SunLight' toField='set_direction'/>
 44            < ROUTE  fromNode='LightColor' fromField='value_changed' toNode='SunLight' toField='set_color'/>
 45            < ROUTE  fromNode='LightAmbient' fromField='value_changed' toNode='SunLight' toField='set_ambientIntensity'/>
 46       </Scene>
 47  </X3D>
<!--

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

<!-- to top Index for DEF nodes: Clock, LightAmbient, LightColor, LightDirection, SunLight, VAULT

Index for Viewpoint node: Viewpoint_1
-->
X3D Tooltips element index: Appearance, Background, Box, ColorInterpolator, DirectionalLight, Group, head, Inline, Material, meta, NavigationInfo, PositionInterpolator, ROUTE, ScalarInterpolator, Scene, Shape, TimeSensor, Viewpoint, WorldInfo, X3D, accessType and type, XML data types, field types

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

Clock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
LightDirection
PositionInterpolator
set_fraction
SFFloat
then
 
 
 
LightDirection
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(2)
SunLight
DirectionalLight
set_direction
SFVec3f
Clock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
LightColor
ColorInterpolator
set_fraction
SFFloat
then
 
 
 
LightColor
ColorInterpolator
value_changed
SFColor

ROUTE
event to
(2)
SunLight
DirectionalLight
set_color
SFColor
Clock
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
LightAmbient
ScalarInterpolator
set_fraction
SFFloat
then
 
 
 
LightAmbient
ScalarInterpolator
value_changed
SFFloat

ROUTE
event to
(2)
SunLight
DirectionalLight
set_ambientIntensity
SFFloat
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/Chapter20Lighting/Figure20_14DirectionalLightSunAnimatedIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter20Lighting/Figure20_14DirectionalLightSunAnimated.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)
-->

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