X3D Model Documentation: TextureBackgroundCube.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2  <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
  3  <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'>
  4       <head>
  5            <component level='3name='EnvironmentalEffects'/>
  6            <meta name='titlecontent='TextureBackgroundCube.x3d'/>
  7            <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.'/>
  8            <meta name='createdcontent='1 May 2017'/>
  9            <meta name='modifiedcontent='18 December 2023'/>
 10            <meta name='creatorcontent='Don Brutzman'/>
 11            <meta name='referencecontent='BackgroundCube.x3d.'/>
 12            <meta name='referencecontent='../GeometricShapes/CubeWithLabeledSides.x3d'/>
 13            <meta name='referencecontent='../Animation/CubeWithLabeledSidesViewpointSequencer.x3d'/>
 14            <meta name='Imagecontent='../Animation/CubeWithLabeledSidesViewpointSequencer.png'/>
 15            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/Visualization/TextureBackgroundCube.x3d'/>
 16            <meta name='licensecontent='https://www.web3d.org/x3d/content/examples/license.html'/>
 17            <meta name='generatorcontent='X3D-Edit 4.0, https://savage.nps.edu/X3D-Edit'/>
 18       </head>
<!--

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

<!-- to top 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
-->
 19       <Scene>
 20            <WorldInfo title='TextureBackgroundCube.x3d'/>
 21 
          <!-- ROUTE information for TransparentBackground node:  [from TransparencyAnimator.value_changed to transparency ] -->
          <TextureBackground DEF='TransparentBackground'>
 22 
               <!-- ImageTexture backTexture is a DEF node that has 1 USE node: USE_1 -->
               <ImageTexture DEF='backTexturecontainerField='backTexture'   url=' "../GeometricShapes/images/back.png " "https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GeometricShapes/images/back.png " '/>
 23 
               <!-- ImageTexture bottomTexture is a DEF node that has 1 USE node: USE_1 -->
               <ImageTexture DEF='bottomTexturecontainerField='bottomTexture'   url=' "../GeometricShapes/images/bottom.png " "https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GeometricShapes/images/bottom.png " '/>
 24 
               <!-- ImageTexture frontTexture is a DEF node that has 1 USE node: USE_1 -->
               <ImageTexture DEF='frontTexturecontainerField='frontTexture'   url=' "../GeometricShapes/images/front.png " "https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GeometricShapes/images/front.png " '/>
 25 
               <!-- ImageTexture leftTexture is a DEF node that has 1 USE node: USE_1 -->
               <ImageTexture DEF='leftTexturecontainerField='leftTexture'   url=' "../GeometricShapes/images/left.png " "https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GeometricShapes/images/left.png " '/>
 26 
               <!-- ImageTexture rightTexture is a DEF node that has 1 USE node: USE_1 -->
               <ImageTexture DEF='rightTexturecontainerField='rightTexture'   url=' "../GeometricShapes/images/right.png " "https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GeometricShapes/images/right.png " '/>
 27 
               <!-- ImageTexture topTexture is a DEF node that has 1 USE node: USE_1 -->
               <ImageTexture DEF='topTexturecontainerField='topTexture'   url=' "../GeometricShapes/images/top.png " "https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GeometricShapes/images/top.png " '/>
 28            </TextureBackground>
 29 
          <!-- 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'/>
 30            < ROUTE  fromNode='TransparencyAnimator' fromField='value_changed' toNode='TransparentBackground' toField='transparency'/>
 31 
          <!-- ROUTE information for Clock node:  [from fraction_changed to TransparencyAnimator.set_fraction ] -->
          <TimeSensor DEF='ClockcycleInterval='6loop='true'/>
 32            < ROUTE  fromNode='Clock' fromField='fraction_changed' toNode='TransparencyAnimator' toField='set_fraction'/>
 33 
 34                 <ImageTexture USE='backTexturecontainerField='watchList'/>
 35                 <ImageTexture USE='bottomTexturecontainerField='watchList'/>
 36                 <ImageTexture USE='frontTexturecontainerField='watchList'/>
 37                 <ImageTexture USE='leftTexturecontainerField='watchList'/>
 38                 <ImageTexture USE='rightTexturecontainerField='watchList'/>
 39                 <ImageTexture USE='topTexturecontainerField='watchList'/>
 40            </LoadSensor>
 41 
 42                 <field name='isActiveUpdatetype='SFBoolaccessType='inputOnly'/>
 43                 <field name='isLoadedUpdatetype='SFBoolaccessType='inputOnly'/>
 44                 <field name='progressUpdatetype='SFFloataccessType='inputOnly'/>
 45                 <field name='loadTimeUpdatetype='SFTimeaccessType='inputOnly'/>
 46                 <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);
}

    
]]>
 48            </Script>
 49            < ROUTE  fromNode='ImageLoadSensor' fromField='isActive' toNode='LoadSensorReportScript' toField='isActiveUpdate'/>
 50            < ROUTE  fromNode='ImageLoadSensor' fromField='isLoaded' toNode='LoadSensorReportScript' toField='isLoadedUpdate'/>
 51            < ROUTE  fromNode='ImageLoadSensor' fromField='loadTime' toNode='LoadSensorReportScript' toField='loadTimeUpdate'/>
 52            < ROUTE  fromNode='ImageLoadSensor' fromField='progress' toNode='LoadSensorReportScript' toField='progressUpdate'/>
 53            < ROUTE  fromNode='TransparencyAnimator' fromField='value_changed' toNode='LoadSensorReportScript' toField='transparencyUpdate'/>
 54            <Viewpoint description='Front image of TextureBackground seen from originfieldOfView='1.570796position='0 0 0'/>
 55            <Viewpoint description='Left image of TextureBackground seen from originfieldOfView='1.570796orientation='0 1 0 -1.570796position='0 0 0'/>
 56            <Viewpoint description='Top image of TextureBackground seen from originfieldOfView='1.570796orientation='1 0 0 1.570796position='0 0 0'/>
 57            <Viewpoint description='Back image of TextureBackground seen from originfieldOfView='1.570796orientation='0 1 0 3.141593position='0 0 0'/>
 58            <Viewpoint description='Right image of TextureBackground seen from originfieldOfView='1.570796orientation='0 1 0 1.570796position='0 0 0'/>
 59            <Viewpoint description='Bottom image of TextureBackground seen from originfieldOfView='1.570796orientation='1 0 0 -1.570796position='0 0 0'/>
 60       </Scene>
 61  </X3D>
<!--

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

<!-- to top 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
-->
X3D Tooltips element index: component, field, head, ImageTexture, LoadSensor, meta, ROUTE, ScalarInterpolator, Scene, Script, TextureBackground, TimeSensor, Viewpoint, WorldInfo, X3D, accessType and type, XML data types, field types

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