{ "X3D": {
    "encoding":"UTF-8",
    "@profile":"Immersive",
    "@version":"3.3",
    "@xsd:noNamespaceSchemaLocation":"https://www.web3d.org/specifications/x3d-3.3.xsd",
    "JSON schema":"https://www.web3d.org/specifications/x3d-4.0-JSONSchema.autogenerated.json",
    "head": {
        "component": [
          {
            "@name":"EnvironmentalEffects",
            "@level":3
          }
        ],
        "meta": [
          {
            "@name":"title",
            "@content":"TextureBackgroundCube.x3d"
          },
          {
            "@name":"description",
            "@content":"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."
          },
          {
            "@name":"created",
            "@content":"1 May 2017"
          },
          {
            "@name":"modified",
            "@content":"18 December 2023"
          },
          {
            "@name":"creator",
            "@content":"Don Brutzman"
          },
          {
            "@name":"reference",
            "@content":"BackgroundCube.x3d."
          },
          {
            "@name":"reference",
            "@content":"../GeometricShapes/CubeWithLabeledSides.x3d"
          },
          {
            "@name":"reference",
            "@content":"../Animation/CubeWithLabeledSidesViewpointSequencer.x3d"
          },
          {
            "@name":"Image",
            "@content":"../Animation/CubeWithLabeledSidesViewpointSequencer.png"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/Visualization/TextureBackgroundCube.x3d"
          },
          {
            "@name":"license",
            "@content":"https://www.web3d.org/x3d/content/examples/license.html"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 4.0, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@name":"translated",
            "@content":"31 August 2025"
          },
          {
            "@name":"generator",
            "@content":"X3dToJson.xslt, https://www.web3d.org/x3d/stylesheets/X3dToJson.html"
          },
          {
            "@name":"reference",
            "@content":"X3D JSON encoding: https://www.web3d.org/wiki/index.php/X3D_JSON_Encoding"
          }
        ]
    },
    "Scene": {
        "-children":[
          { "WorldInfo":
            {
              "@title":"TextureBackgroundCube.x3d"
            }
          },
          { "TextureBackground":
            {
              "@DEF":"TransparentBackground",
              "-backTexture":
                { "ImageTexture":
                  {
                    "@DEF":"backTexture",
                    "@url":["../GeometricShapes/images/back.png","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GeometricShapes/images/back.png"]
                  }
                },
              "-bottomTexture":
                { "ImageTexture":
                  {
                    "@DEF":"bottomTexture",
                    "@url":["../GeometricShapes/images/bottom.png","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GeometricShapes/images/bottom.png"]
                  }
                },
              "-frontTexture":
                { "ImageTexture":
                  {
                    "@DEF":"frontTexture",
                    "@url":["../GeometricShapes/images/front.png","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GeometricShapes/images/front.png"]
                  }
                },
              "-leftTexture":
                { "ImageTexture":
                  {
                    "@DEF":"leftTexture",
                    "@url":["../GeometricShapes/images/left.png","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GeometricShapes/images/left.png"]
                  }
                },
              "-rightTexture":
                { "ImageTexture":
                  {
                    "@DEF":"rightTexture",
                    "@url":["../GeometricShapes/images/right.png","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GeometricShapes/images/right.png"]
                  }
                },
              "-topTexture":
                { "ImageTexture":
                  {
                    "@DEF":"topTexture",
                    "@url":["../GeometricShapes/images/top.png","https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GeometricShapes/images/top.png"]
                  }
                }
            }
          },
          { "ScalarInterpolator":
            {
              "@DEF":"TransparencyAnimator",
              "@key":[0,0.5,1],
              "@keyValue":[0,1,0]
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"TransparencyAnimator",
              "@toField":"transparency",
              "@toNode":"TransparentBackground"
            }
          },
          { "TimeSensor":
            {
              "@DEF":"Clock",
              "@cycleInterval":6,
              "@loop":true
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"Clock",
              "@toField":"set_fraction",
              "@toNode":"TransparencyAnimator"
            }
          },
          { "LoadSensor":
            {
              "@DEF":"ImageLoadSensor",
              "-watchList":[
                { "ImageTexture":
                  {
                    "@USE":"backTexture"
                  }
                },
                { "ImageTexture":
                  {
                    "@USE":"bottomTexture"
                  }
                },
                { "ImageTexture":
                  {
                    "@USE":"frontTexture"
                  }
                },
                { "ImageTexture":
                  {
                    "@USE":"leftTexture"
                  }
                },
                { "ImageTexture":
                  {
                    "@USE":"rightTexture"
                  }
                },
                { "ImageTexture":
                  {
                    "@USE":"topTexture"
                  }
                }
              ]
            }
          },
          { "Script":
            {
              "@DEF":"LoadSensorReportScript",
              "field": [
                {
                  "@name":"isActiveUpdate",
                  "@accessType":"inputOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"isLoadedUpdate",
                  "@accessType":"inputOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"progressUpdate",
                  "@accessType":"inputOnly",
                  "@type":"SFFloat"
                },
                {
                  "@name":"loadTimeUpdate",
                  "@accessType":"inputOnly",
                  "@type":"SFTime"
                },
                {
                  "@name":"transparencyUpdate",
                  "@accessType":"inputOnly",
                  "@type":"SFFloat"
                }
              ],
              "#sourceCode":[
"",
"",
"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);",
"}",
"",
""
]
            }
          },
          { "ROUTE":
            {
              "@fromField":"isActive",
              "@fromNode":"ImageLoadSensor",
              "@toField":"isActiveUpdate",
              "@toNode":"LoadSensorReportScript"
            }
          },
          { "ROUTE":
            {
              "@fromField":"isLoaded",
              "@fromNode":"ImageLoadSensor",
              "@toField":"isLoadedUpdate",
              "@toNode":"LoadSensorReportScript"
            }
          },
          { "ROUTE":
            {
              "@fromField":"loadTime",
              "@fromNode":"ImageLoadSensor",
              "@toField":"loadTimeUpdate",
              "@toNode":"LoadSensorReportScript"
            }
          },
          { "ROUTE":
            {
              "@fromField":"progress",
              "@fromNode":"ImageLoadSensor",
              "@toField":"progressUpdate",
              "@toNode":"LoadSensorReportScript"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"TransparencyAnimator",
              "@toField":"transparencyUpdate",
              "@toNode":"LoadSensorReportScript"
            }
          },
          { "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]
            }
          }
        ]
    }
  }
}