#X3D V3.3 utf8
# X3D-to-ClassicVRML XSL translation autogenerated by X3dToVrml97.xslt
# https://www.web3d.org/x3d/content/X3dToVrml97.xslt
# Generated using XSLT processor: Saxonica
PROFILE Immersive
# [X3D] version=3.3
# [X3D] noNamespaceSchemaLocation=https://www.web3d.org/specifications/x3d-3.3.xsd
# [head]
COMPONENT EnvironmentalEffects:3
META "title" "TextureBackgroundCube.x3d"
META "description" "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 "created" "1 May 2017"
META "modified" "20 October 2019"
META "creator" "Don Brutzman"
META "reference" "BackgroundCube.x3d."
META "reference" "../GeometricShapes/CubeWithLabeledSides.x3d"
META "reference" "../Animation/CubeWithLabeledSidesViewpointSequencer.x3d"
META "Image" "../Animation/CubeWithLabeledSidesViewpointSequencer.png"
META "identifier" "https://x3dgraphics.com/examples/X3dForAdvancedModeling/Visualization/BackgroundCube.x3d"
### Warning: File name doesn't match for and
META "license" "https://www.web3d.org/x3d/content/examples/license.html"
META "generator" "X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit"
# [Scene] ========== ========== ==========
NavigationInfo { type [ "EXAMINE" "ANY" ] } ### Default X3D NavigationInfo
WorldInfo {
title "TextureBackgroundCube.x3d"
}
DEF TransparentBackground TextureBackground {
texture DEF backTexture ImageTexture {
url [ "../GeometricShapes/images/back.png" "https://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/images/back.png" ]
}
texture DEF bottomTexture ImageTexture {
url [ "../GeometricShapes/images/bottom.png" "https://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/images/bottom.png" ]
}
texture DEF frontTexture ImageTexture {
url [ "../GeometricShapes/images/front.png" "https://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/images/front.png" ]
}
texture DEF leftTexture ImageTexture {
url [ "../GeometricShapes/images/left.png" "https://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/images/left.png" ]
}
texture DEF rightTexture ImageTexture {
url [ "../GeometricShapes/images/right.png" "https://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/images/right.png" ]
}
texture DEF topTexture ImageTexture {
url [ "../GeometricShapes/images/top.png" "https://x3dgraphics.com/examples/X3dForAdvancedModeling/GeometricShapes/images/top.png" ]
}
}
DEF TransparencyAnimator ScalarInterpolator {
key [ 0 0.5 1 ]
keyValue [ 0 1 0 ]
}
ROUTE TransparencyAnimator.value_changed TO TransparentBackground.transparency
DEF Clock TimeSensor {
cycleInterval 6
loop TRUE
}
ROUTE Clock.fraction_changed TO TransparencyAnimator.set_fraction
DEF ImageLoadSensor LoadSensor {
watchList [
USE backTexture
USE bottomTexture
USE frontTexture
USE leftTexture
USE rightTexture
USE topTexture
]
}
DEF LoadSensorReportScript Script {
inputOnly SFBool isActiveUpdate
inputOnly SFBool isLoadedUpdate
inputOnly SFFloat progressUpdate
inputOnly SFTime loadTimeUpdate
inputOnly SFFloat transparencyUpdate
url [ "ecmascript: // ### X3D Browser.print() not supported by all VRML97 viewers, instead simply using print()
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);
}
" ]
}
ROUTE ImageLoadSensor.isActive TO LoadSensorReportScript.isActiveUpdate
ROUTE ImageLoadSensor.isLoaded TO LoadSensorReportScript.isLoadedUpdate
ROUTE ImageLoadSensor.loadTime TO LoadSensorReportScript.loadTimeUpdate
ROUTE ImageLoadSensor.progress TO LoadSensorReportScript.progressUpdate
ROUTE TransparencyAnimator.value_changed TO LoadSensorReportScript.transparencyUpdate
Viewpoint {
description "Front image of TextureBackground seen from origin"
fieldOfView 1.570796
position 0 0 0
}
Viewpoint {
description "Left image of TextureBackground seen from origin"
fieldOfView 1.570796
orientation 0 1 0 -1.570796
position 0 0 0
}
Viewpoint {
description "Top image of TextureBackground seen from origin"
fieldOfView 1.570796
orientation 1 0 0 1.570796
position 0 0 0
}
Viewpoint {
description "Back image of TextureBackground seen from origin"
fieldOfView 1.570796
orientation 0 1 0 3.141593
position 0 0 0
}
Viewpoint {
description "Right image of TextureBackground seen from origin"
fieldOfView 1.570796
orientation 0 1 0 1.570796
position 0 0 0
}
Viewpoint {
description "Bottom image of TextureBackground seen from origin"
fieldOfView 1.570796
orientation 1 0 0 -1.570796
position 0 0 0
}