#VRML V2.0 utf8
# X3D-to-VRML-97 XSL translation autogenerated by X3dToVrml97.xslt
# https://www.web3d.org/x3d/content/X3dToVrml97.xslt
# Generated using XSLT processor: Saxonica
# [X3D] VRML V3.3 utf8
# 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"
EXTERNPROTO LoadSensor [
# [appinfo] LoadSensor monitors the progress and success of downloading URL elements over a network. Only nodes that contain a valid URL field (i.e., descendants of X3DUrlObject), may be specified as watchList children. Multiple nodes may be watched with a single LoadSensor.
# documentation: https://www.web3d.org/specifications/ISO-IEC-19775/Part01/components/networking.html#LoadSensor exposedField SFBool enabled # [appinfo] Enables/disables the sensor node.
exposedField SFTime timeOut # [appinfo] Maximum time for which the LoadSensor will monitor loading, starting from when the sensor becomes active. timeOut=0 ordinarily indicates an indefinite time out period; i.e., the LoadSensor will wait until loading has completed either with success or failure timeOut=0 causes immediate loading for this implementation.
field MFNode watchList # [appinfo] Zero or more nodes with url fields to monitor.
eventIn MFNode set_watchList # [appinfo] Change watchList MFNode array.
eventOut SFBool isActive # [appinfo] isActive=true when loading begins, isActive=false when loading ends.
eventOut SFBool isLoaded # [appinfo] isLoaded=true when loading succeeds, isLoaded=false when loading fails or timeOut reached.
eventOut SFTime loadTime # [appinfo] loadTime event is generated when loading has successfully completed.
eventOut SFFloat progress # [appinfo] progress [0..1] indicates fraction of loading complete.
field SFNode metadata # [appinfo] associated Metadata node.
][
"LoadSensorPrototype.wrl#LoadSensor"
"https://www.web3d.org/x3d/content/examples/Basic/development/LoadSensorPrototype.wrl#LoadSensor"
"LoadSensorPrototype.x3d#LoadSensor"
"https://www.web3d.org/x3d/content/examples/Basic/development/LoadSensorPrototype.x3d#LoadSensor"
]
# [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 {
eventIn SFBool isActiveUpdate
eventIn SFBool isLoadedUpdate
eventIn SFFloat progressUpdate
eventIn SFTime loadTimeUpdate
eventIn SFFloat transparencyUpdate
url [ "javascript: // ### X3D Browser.print() not supported by all VRML97 viewers, instead simply using print()
function isActiveUpdate (eventValue)
{
printingln('TextureBackgroundCube LoadSensorReportScript: isActiveUpdate=' + eventValue);
}
function isLoadedUpdate (eventValue)
{
printingln('TextureBackgroundCube LoadSensorReportScript: isLoadedUpdate=' + eventValue);
}
function loadTimeUpdate (eventValue)
{
printingln('TextureBackgroundCube LoadSensorReportScript: loadTimeUpdate=' + eventValue);
}
function progressUpdate (eventValue)
{
printingln('TextureBackgroundCube LoadSensorReportScript: progressUpdate=' + eventValue);
}
function transparencyUpdate (eventValue)
{
// pretty busy interpolator
// printingln('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
}