<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
<X3D profile='Immersive'  version='3.3 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation =' https://www.web3d.org/specifications/x3d-3.3.xsd ' >
<head>
<component level='3name='EnvironmentalEffects'/>
<meta name='titlecontent=' TextureBackgroundCube.x3d '/>
<meta name='descriptioncontent='TextureBackground containing ImageTexture nodes, with labeled side images and wide field-of-view (FOV) Viewpoints, suitable for scene-orientation testing. Includes transparency interpolator test and also LoadSensor Script console to log events of interest.'/>
<meta name='createdcontent='1 May 2017'/>
<meta name='modifiedcontent='18 December 2023'/>
<meta name='creatorcontent='Don Brutzman'/>
<meta name='referencecontent='BackgroundCube.x3d.'/>
<meta name='referencecontent=' ../GeometricShapes/CubeWithLabeledSides.x3d'/>
<meta name='referencecontent=' ../Animation/CubeWithLabeledSidesViewpointSequencer.x3d'/>
<meta name='Imagecontent=' ../Animation/CubeWithLabeledSidesViewpointSequencer.png' />
<meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/Visualization/TextureBackgroundCube.x3d '/>
<meta name='licensecontent=' https://www.web3d.org/x3d/content/examples/license.html '/>
<meta name='generatorcontent='X3D-Edit 4.0, https://savage.nps.edu/X3D-Edit'/>
</head>
<!-- -->
<Scene>
<WorldInfo title='TextureBackgroundCube.x3d'/>
<!-- ROUTE information for TransparentBackground node:  [from TransparencyAnimator.value_changed to transparency ] -->
<TextureBackground DEF='TransparentBackground'>
</TextureBackground>
<!-- ROUTE information for TransparencyAnimator node:  [from Clock.fraction_changed to set_fraction ] [from value_changed to TransparentBackground.transparency ] [from value_changed to LoadSensorReportScript.transparencyUpdate ] -->
<ScalarInterpolator DEF='TransparencyAnimatorkey='0 0.5 1keyValue='0 1 0'/>

< ROUTE  fromNode=' TransparencyAnimator' fromField='value_changed' toNode=' TransparentBackground' toField='transparency'/>
<!-- ROUTE information for Clock node:  [from fraction_changed to TransparencyAnimator.set_fraction ] -->
<TimeSensor DEF='ClockcycleInterval='6loop='true'/>

< ROUTE  fromNode=' Clock' fromField='fraction_changed' toNode=' TransparencyAnimator' toField='set_fraction'/>
<ImageTexture USE=' backTexturecontainerField='watchList'/>
<ImageTexture USE=' bottomTexturecontainerField='watchList'/>
<ImageTexture USE=' frontTexturecontainerField='watchList'/>
<ImageTexture USE=' leftTexturecontainerField='watchList'/>
<ImageTexture USE=' rightTexturecontainerField='watchList'/>
<ImageTexture USE=' topTexturecontainerField='watchList'/>
</LoadSensor>
<field name='isActiveUpdatetype='SFBoolaccessType='inputOnly'/>
<field name='isLoadedUpdatetype='SFBoolaccessType='inputOnly'/>
<field name='progressUpdatetype='SFFloataccessType='inputOnly'/>
<field name='loadTimeUpdatetype='SFTimeaccessType='inputOnly'/>
<field name='transparencyUpdatetype='SFFloataccessType='inputOnly'/>
<![CDATA[
      
ecmascript:

function isActiveUpdate (eventValue)
{
   Browser.println('TextureBackgroundCube LoadSensorReportScript: isActiveUpdate=' + eventValue);
}

function isLoadedUpdate (eventValue)
{
   Browser.println('TextureBackgroundCube LoadSensorReportScript: isLoadedUpdate=' + eventValue);
}

function loadTimeUpdate (eventValue)
{
   Browser.println('TextureBackgroundCube LoadSensorReportScript: loadTimeUpdate=' + eventValue);
}

function progressUpdate (eventValue)
{
   Browser.println('TextureBackgroundCube LoadSensorReportScript: progressUpdate=' + eventValue);
}

function transparencyUpdate (eventValue)
{
// pretty busy interpolator
// Browser.println('TextureBackgroundCube LoadSensorReportScript: transparencyUpdate=' + eventValue);
}

    
]]>
</Script>
< ROUTE  fromNode=' ImageLoadSensor' fromField='isActive' toNode=' LoadSensorReportScript' toField='isActiveUpdate'/>
< ROUTE  fromNode=' ImageLoadSensor' fromField='isLoaded' toNode=' LoadSensorReportScript' toField='isLoadedUpdate'/>
< ROUTE  fromNode=' ImageLoadSensor' fromField='loadTime' toNode=' LoadSensorReportScript' toField='loadTimeUpdate'/>
< ROUTE  fromNode=' ImageLoadSensor' fromField='progress' toNode=' LoadSensorReportScript' toField='progressUpdate'/>
< ROUTE  fromNode=' TransparencyAnimator' fromField='value_changed' toNode=' LoadSensorReportScript' toField='transparencyUpdate'/>
<Viewpoint description='Front image of TextureBackground seen from originfieldOfView='1.570796position='0 0 0'/>
<Viewpoint description='Left image of TextureBackground seen from originfieldOfView='1.570796orientation='0 1 0 -1.570796position='0 0 0'/>
<Viewpoint description='Top image of TextureBackground seen from originfieldOfView='1.570796orientation='1 0 0 1.570796position='0 0 0'/>
<Viewpoint description='Back image of TextureBackground seen from originfieldOfView='1.570796orientation='0 1 0 3.141593position='0 0 0'/>
<Viewpoint description='Right image of TextureBackground seen from originfieldOfView='1.570796orientation='0 1 0 1.570796position='0 0 0'/>
<Viewpoint description='Bottom image of TextureBackground seen from originfieldOfView='1.570796orientation='1 0 0 -1.570796position='0 0 0'/>
</Scene>
</X3D>
<!--

to top <!-- Event Graph ROUTE Table shows event connections -->
 
<!-- Index for DEF nodes: backTexture, bottomTexture, Clock, frontTexture, ImageLoadSensor, leftTexture, LoadSensorReportScript, rightTexture, topTexture, TransparencyAnimator, TransparentBackground

Index for Viewpoint nodes: Viewpoint_1, Viewpoint_2, Viewpoint_3, Viewpoint_4, Viewpoint_5, Viewpoint_6
-->

Event Graph ROUTE Table entries with 7 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)
TransparencyAnimator
ScalarInterpolator
set_fraction
SFFloat

 
 
then
TransparencyAnimator
ScalarInterpolator
value_changed
SFFloat

ROUTE
event to
(2)
TransparentBackground
TextureBackground
transparency
SFFloat
 
 
 
then
TransparencyAnimator
ScalarInterpolator
value_changed
SFFloat

ROUTE
event to
(2)
LoadSensorReportScript
Script
transparencyUpdate
SFFloat


ImageLoadSensor
LoadSensor
isActive
SFBool

ROUTE
event to
(1)
LoadSensorReportScript
Script
isActiveUpdate
SFBool
ImageLoadSensor
LoadSensor
isLoaded
SFBool

ROUTE
event to
(1)
LoadSensorReportScript
Script
isLoadedUpdate
SFBool
ImageLoadSensor
LoadSensor
loadTime
SFTime

ROUTE
event to
(1)
LoadSensorReportScript
Script
loadTimeUpdate
SFTime
ImageLoadSensor
LoadSensor
progress
SFFloat

ROUTE
event to
(1)
LoadSensorReportScript
Script
progressUpdate
SFFloat


-->

<!-- Online at
https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/Visualization/TextureBackgroundCubeIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/Visualization/TextureBackgroundCube.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. -->