<?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='20 October 2019'/>
<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://x3dgraphics.com/examples/X3dForAdvancedModeling/Visualization/BackgroundCube.x3d '/>
<meta name='licensecontent=' https://www.web3d.org/x3d/content/examples/license.html '/>
<meta name='generatorcontent='X3D-Edit 3.3, 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='TransparencyAnimatorfromField='value_changedtoNode='TransparentBackgroundtoField='transparency'/>
<!-- ROUTE information for Clock node:  [from fraction_changed to TransparencyAnimator.set_fraction ] -->
<TimeSensor DEF='ClockcycleInterval='6loop='true'/>
<ROUTE fromNode='ClockfromField='fraction_changedtoNode='TransparencyAnimatortoField='set_fraction'/>
<!-- ROUTE information for ImageLoadSensor node:  [from isActive to LoadSensorReportScript.isActiveUpdate ] [from isLoaded to LoadSensorReportScript.isLoadedUpdate ] [from loadTime to LoadSensorReportScript.loadTimeUpdate ] [from progress to LoadSensorReportScript.progressUpdate ] -->
<LoadSensor DEF='ImageLoadSensor'>
<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>
<!-- ROUTE information for LoadSensorReportScript node:  [from ImageLoadSensor.isActive to isActiveUpdate ] [from ImageLoadSensor.isLoaded to isLoadedUpdate ] [from ImageLoadSensor.loadTime to loadTimeUpdate ] [from ImageLoadSensor.progress to progressUpdate ] [from TransparencyAnimator.value_changed to transparencyUpdate ] -->
<Script DEF='LoadSensorReportScript'>
<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='ImageLoadSensorfromField='isActivetoNode='LoadSensorReportScripttoField='isActiveUpdate'/>
<ROUTE fromNode='ImageLoadSensorfromField='isLoadedtoNode='LoadSensorReportScripttoField='isLoadedUpdate'/>
<ROUTE fromNode='ImageLoadSensorfromField='loadTimetoNode='LoadSensorReportScripttoField='loadTimeUpdate'/>
<ROUTE fromNode='ImageLoadSensorfromField='progresstoNode='LoadSensorReportScripttoField='progressUpdate'/>
<ROUTE fromNode='TransparencyAnimatorfromField='value_changedtoNode='LoadSensorReportScripttoField='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>
<!--

Index for DEF nodes : backTexture, bottomTexture, Clock, frontTexture, ImageLoadSensor, leftTexture, LoadSensorReportScript, rightTexture, topTexture, TransparencyAnimator, TransparentBackground

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

<!-- Color key: <X3dNode DEF='idName' field='value'/> matches <XmlElement DEF='idName' attribute='value'/>
(Light blue background: behavior node) (Grey background: inserted documentation) (Magenta background: X3D Extensibility)
-->

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