<?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='Figure20_14DirectionalLightSunAnimated.x3d'/>
<meta name='creatorcontent='Figure 20.14, The VRML 2.0 Sourcebook, Copyright [1997] By Andrea L. Ames, David R. Nadeau, and John L. Moreland'/>
<meta name='referencecontent=' http://www.wiley.com/legacy/compbooks/vrml2sbk/ch20/20fig14.htm '/>
<meta name='translatorcontent='Don Brutzman'/>
<meta name='createdcontent='10 September 2000'/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name='descriptioncontent='A DirectionalLight simulates the sun from sunrise through sunset, animated using multiple interpolators. Compare Figures 20.13a, 13b, 13c, 14.'/>
<meta name='referencecontent='Figure20_13aDirectionalLightSunrise.x3d'/>
<meta name='referencecontent='Figure20_13bDirectionalLightNoon.x3d'/>
<meta name='referencecontent='Figure20_13cDirectionalLightSunset.x3d'/>
<meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter20Lighting/Figure20_14DirectionalLightSunAnimated.x3d '/>
<meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../../license.html'/>
</head>
<!--

to top <!-- Event Graph ROUTE Table shows event connections -->
 
<!-- Index for DEF nodes: Clock, LightAmbient, LightColor, LightDirection, SunLight, VAULT

Index for Viewpoint node: Viewpoint_1
-->
<Scene>
<WorldInfo title='Figure20_14DirectionalLightSunAnimated.x3d'/>
<Viewpoint description='Sunlight animationorientation='1 0 0 -0.15position='0 4 10'/>
<!-- Note headlight turned off in NavigationInfo. Most browsers allow user toggling headlight also. -->
<!-- This NavigationInfo node is bound at runtime and overrides the NavigationInfo headlight setting within the Inlined scene. -->
<NavigationInfo headlight='false'/>
<Background groundColor='0 0 0skyColor='0.15 0.15 0.25'/>
<Group>
<!-- 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'/>


<!-- 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'/>

<!-- 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'/>

<!-- 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'/>

<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" ' />

<Shape>
<Box size='16 0.01 16'/>
<Appearance>
<Material diffuseColor='0.2 0.6 0'/>
</Appearance>
</Shape>
</Group>
< ROUTE  fromNode=' Clock' fromField='fraction_changed' toNode=' LightDirection' toField='set_fraction'/>
< ROUTE  fromNode=' Clock' fromField='fraction_changed' toNode=' LightColor' toField='set_fraction'/>
< ROUTE  fromNode=' Clock' fromField='fraction_changed' toNode=' LightAmbient' toField='set_fraction'/>
< ROUTE  fromNode=' LightDirection' fromField='value_changed' toNode=' SunLight' toField='set_direction'/>
< ROUTE  fromNode=' LightColor' fromField='value_changed' toNode=' SunLight' toField='set_color'/>
< ROUTE  fromNode=' LightAmbient' fromField='value_changed' toNode=' SunLight' toField='set_ambientIntensity'/>
</Scene>
</X3D>
<!--

to top <!-- Event Graph ROUTE Table shows event connections -->
 
<!-- Index for DEF nodes: Clock, LightAmbient, LightColor, LightDirection, SunLight, VAULT

Index for Viewpoint node: Viewpoint_1
-->

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


-->

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