{ "X3D": {
    "encoding":"UTF-8",
    "@profile":"Immersive",
    "@version":"3.0",
    "@xsd:noNamespaceSchemaLocation":"https://www.web3d.org/specifications/x3d-3.0.xsd",
    "JSON schema":"https://www.web3d.org/specifications/x3d-4.0-JSONSchema.autogenerated.json",
    "head": {
        "meta": [
          {
            "@name":"title",
            "@content":"OahuCollisionSite.x3d"
          },
          {
            "@name":"description",
            "@content":"This program reenacts the collision of the USS Greenville and the Ehime Maru. A previously written, stand-alone reenactment of the collision has been inlined. The islands of Oahu and Molaki (partial) have been inlined as the background."
          },
          {
            "@name":"creator",
            "@content":"Capt Mark Lennerton USMC"
          },
          {
            "@name":"translator",
            "@content":"Capt Mark Lennerton USMC"
          },
          {
            "@name":"warning",
            "@content":"terrain is misaligned 90 degrees with respect to North"
          },
          {
            "@name":"modified",
            "@content":"20 October 2019"
          },
          {
            "@name":"modified",
            "@content":"20 October 2019"
          },
          {
            "@name":"reference",
            "@content":"MakingOahuAreaModelInVRMLX3D.ppt"
          },
          {
            "@name":"subject",
            "@content":"Oahu Hawaii collision Greenville Ehime Maru submarine"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/Savage/Locations/Hawaii/OahuCollisionSite.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@name":"license",
            "@content":"../../license.html"
          },
          {
            "@name":"translated",
            "@content":"21 April 2026"
          },
          {
            "@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":"OahuCollisionSite.x3d"
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"CameraCompass36",
              "@url":["../../../Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.wrl#CameraCompass36","https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.wrl#CameraCompass36","../../../Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.x3d#CameraCompass36","https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/CameraCompassPrototypes.x3d#CameraCompass36"],
              "field": [
                {
                  "@name":"enabled",
                  "@accessType":"inputOutput",
                  "@type":"SFBool"
                },
                {
                  "@name":"positionOffsetFromCamera",
                  "@accessType":"inputOutput",
                  "@type":"SFVec3f"
                },
                {
                  "@name":"markerColor",
                  "@accessType":"inputOutput",
                  "@type":"SFColor"
                },
                {
                  "@name":"labelColor",
                  "@accessType":"inputOutput",
                  "@type":"SFColor"
                }
              ]
            }
          },
          { "NavigationInfo":
            {
              "@avatarSize":[10,1.6,1],
              "@speed":1000,
              "@visibilityLimit":1000000
            }
          },
          { "Viewpoint":
            {
              "@description":"Collision_Point_Boresighted",
              "@orientation":[1,-1,0,-0.401],
              "@position":[65000,3000,-8250]
            }
          },
          { "Transform":
            {
              "-children":[
                { "Viewpoint":
                  {
                    "@description":"Turn_to_Mag_North"
                  }
                }
              ]
            }
          },
          { "Background":
            {
              "@DEF":"BackgroundCyan-ish",
              "@groundAngle":[1.309,1.570796],
              "@groundColor":[0.15,0.15,0.7,0.2,0.2,0.65,0.6,0.6,0.6],
              "@skyAngle":[1.309,1.571],
              "@skyColor":[0,0.2,0.7,0.0,0.5,1,1,1,1]
            }
          },
          { "Background":
            {
              "@DEF":"BackgroundReddish",
              "@groundAngle":[1.309,1.570796],
              "@groundColor":[0.15,0.15,0.7,0.2,0.2,0.65,0.6,0.6,0.2],
              "@skyAngle":[1.309,1.571],
              "@skyColor":[1,0,0,1,0.4,0,1,1,0]
            }
          },
          { "Transform":
            {
              "@rotation":[0,1,0,1.57],
              "@translation":[62000,0,-18250],
              "-children":[
                { "Inline":
                  {
                    "@url":["CollisionCourses.x3d","https://www.web3d.org/x3d/content/examples/Savage/Locations/Hawaii/CollisionCourses.x3d","CollisionCourses.wrl","https://www.web3d.org/x3d/content/examples/Savage/Locations/Hawaii/CollisionCourses.wrl"]
                  }
                }
              ]
            }
          },
          { "Inline":
            {
              "@url":["OahuAndSouthernBathymetry.x3d","https://www.web3d.org/x3d/content/examples/Savage/Locations/Hawaii/OahuAndSouthernBathymetry.x3d","OahuAndSouthernBathymetry.wrl","https://www.web3d.org/x3d/content/examples/Savage/Locations/Hawaii/OahuAndSouthernBathymetry.wrl"]
            }
          },
          { "ProtoInstance":
            {
              "@name":"CameraCompass36",
              "fieldValue": [
                {
                  "@name":"enabled",
                  "@value":true
                },
                {
                  "@name":"positionOffsetFromCamera",
                  "@value":[0,5,0]
                },
                {
                  "@name":"markerColor",
                  "@value":[0.9,0.9,0.9]
                },
                {
                  "@name":"labelColor",
                  "@value":[0.9,0.9,0.9]
                }
              ]
            }
          },
          { "Group":
            {
              "@DEF":"BackgroundControls",
              "-children":[
                { "Transform":
                  {
                    "@DEF":"LatLongOn",
                    "@scale":[2000,2000,2000],
                    "@translation":[-10000,5000,-120000],
                    "-children":[
                      { "Shape":
                        {
                          "-geometry":
                            { "Sphere":
                              {
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@diffuseColor":[0,0.5,0.8]
                                    }
                                  }
                              }
                            }
                        }
                      },
                      { "TouchSensor":
                        {
                          "@DEF":"SensorButton1"
                        }
                      }
                    ]
                  }
                },
                { "Transform":
                  {
                    "@scale":[2000,2000,2000],
                    "@translation":[-5000,5000,-120000],
                    "-children":[
                      { "Shape":
                        {
                          "-geometry":
                            { "Sphere":
                              {
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@diffuseColor":[1,0.4,0]
                                    }
                                  }
                              }
                            }
                        }
                      },
                      { "TouchSensor":
                        {
                          "@DEF":"SensorButton2"
                        }
                      }
                    ]
                  }
                },
                { "Script":
                  {
                    "@DEF":"Filter1",
                    "field": [
                      {
                        "@name":"set_boolean",
                        "@accessType":"inputOnly",
                        "@type":"SFBool"
                      },
                      {
                        "@name":"activated",
                        "@accessType":"outputOnly",
                        "@type":"SFBool"
                      },
                      {
                        "@name":"count",
                        "@accessType":"initializeOnly",
                        "@type":"SFInt32",
                        "@value":1
                      }
                    ],
                    "-children":[
                      {
                        "#comment":"activated: provides a persistent binding value, otherwise isActive events will toggle Background binding on/off."
                      },
                      {
                        "#comment":"count: only used locally, so it is declared for persistence"
                      }
                    ],
                    "#sourceCode":[
"",
"",
"ecmascript:",
"",
"function initialize () {",
"  Browser.println (' '); // skip line",
"  Browser.println ('Click shapes to select a background...');",
"  Browser.println (' '); // skip line",
"}",
"",
"// setting the value of an eventOut variable also sends it as an event",
"",
"function set_boolean ( value, eventTime ) {",
"  if ( value == true ) {",
"\tactivated = value;",
"\tBrowser.println ('Display blue clear sky' + count);",
"  }",
"  else count++;  // received isActive value = false",
"}",
"",
""
]
                  }
                },
                { "Script":
                  {
                    "@DEF":"Filter2",
                    "field": [
                      {
                        "@name":"set_boolean",
                        "@accessType":"inputOnly",
                        "@type":"SFBool"
                      },
                      {
                        "@name":"activated",
                        "@accessType":"outputOnly",
                        "@type":"SFBool"
                      },
                      {
                        "@name":"count",
                        "@accessType":"initializeOnly",
                        "@type":"SFInt32",
                        "@value":1
                      }
                    ],
                    "#sourceCode":[
"",
"",
"ecmascript:",
"",
"// setting the value of an eventOut variable also sends it as an event",
"",
"function set_boolean ( value, eventTime ) {",
"  if ( value == true ) {",
"\tactivated = value;",
"\tBrowser.println ('Display red sunset sky' + count);",
"  }",
"  else count++;  // received isActive value = false",
"}",
"",
""
]
                  }
                }
              ]
            }
          },
          { "ROUTE":
            {
              "@fromField":"isActive",
              "@fromNode":"SensorButton1",
              "@toField":"set_boolean",
              "@toNode":"Filter1"
            }
          },
          { "ROUTE":
            {
              "@fromField":"activated",
              "@fromNode":"Filter1",
              "@toField":"set_bind",
              "@toNode":"BackgroundCyan-ish"
            }
          },
          { "ROUTE":
            {
              "@fromField":"isActive",
              "@fromNode":"SensorButton2",
              "@toField":"set_boolean",
              "@toNode":"Filter2"
            }
          },
          { "ROUTE":
            {
              "@fromField":"activated",
              "@fromNode":"Filter2",
              "@toField":"set_bind",
              "@toNode":"BackgroundReddish"
            }
          }
        ]
    }
  }
}