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='title' content='Figure20_14DirectionalLightSunAnimated.x3d'/> |
6 | <meta name='creator' content='Figure 20.14, The VRML 2.0 Sourcebook, Copyright [1997] By Andrea L. Ames, David R. Nadeau, and John L. Moreland'/> |
7 | <meta name='reference' content='http://www.wiley.com/legacy/compbooks/vrml2sbk/ch20/20fig14.htm'/> |
8 | <meta name='translator' content='Don Brutzman'/> |
9 | <meta name='created' content='10 September 2000'/> |
10 | <meta name='modified' content='20 October 2019'/> |
11 | <meta name='description' content='A DirectionalLight simulates the sun from sunrise through sunset, animated using multiple interpolators. Compare Figures 20.13a, 13b, 13c, 14.'/> |
12 | <meta name='reference' content='Figure20_13aDirectionalLightSunrise.x3d'/> |
13 | <meta name='reference' content='Figure20_13bDirectionalLightNoon.x3d'/> |
14 | <meta name='reference' content='Figure20_13cDirectionalLightSunset.x3d'/> |
15 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter20Lighting/Figure20_14DirectionalLightSunAnimated.x3d'/> |
16 | <meta name='generator' content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/> |
17 | <meta name='license' content='../../license.html'/> |
18 | </head> |
19 | <Scene> |
20 | <WorldInfo title='Figure20_14DirectionalLightSunAnimated.x3d'/> |
21 | <Viewpoint description='Sunlight animation' orientation='1 0 0 -0.15' position='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 0' skyColor='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='SunLight' ambientIntensity='0.5' color='1 0.6 0' direction='-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='Clock' cycleInterval='10' loop='true'/> |
29 |
<!-- ROUTE information for LightDirection node:
[from Clock.fraction_changed to set_fraction
]
[from value_changed to SunLight.set_direction
]
-->
<PositionInterpolator DEF='LightDirection' key='0 0.1 0.5 0.9 1' keyValue='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='LightColor' key='0 0.1 0.5 0.9 1' keyValue='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='LightAmbient' key='0 0.1 0.5 0.9 1' keyValue='0.3 0.3 0.7 0.2 0.2'/> |
32 | <Inline DEF='VAULT' bboxCenter='0 1 0' bboxSize='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 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 |
LightDirection
PositionInterpolator set_fraction SFFloat |
then
|
LightDirection
PositionInterpolator value_changed SFVec3f |
SunLight
DirectionalLight set_direction SFVec3f |
||
Clock
TimeSensor fraction_changed SFFloat |
LightColor
ColorInterpolator set_fraction SFFloat |
then
|
LightColor
ColorInterpolator value_changed SFColor |
SunLight
DirectionalLight set_color SFColor |
||
Clock
TimeSensor fraction_changed SFFloat |
LightAmbient
ScalarInterpolator set_fraction SFFloat |
then
|
LightAmbient
ScalarInterpolator value_changed SFFloat |
SunLight
DirectionalLight set_ambientIntensity SFFloat |
<!--
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)
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->