{ "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":"AGM65MaverickViewAnchors.x3d"
          },
          {
            "@name":"description",
            "@content":"AGM-65M Maverick Missile with anchors points for selective viewpoints, and touch sensors for user interaction."
          },
          {
            "@name":"creator",
            "@content":"Al Shaffer"
          },
          {
            "@name":"created",
            "@content":"20 January 2005"
          },
          {
            "@name":"modified",
            "@content":"16 January 2014"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/Savage/Weapons/Missiles/AGM65MaverickViewAnchors.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@name":"license",
            "@content":"../../license.html"
          },
          {
            "@name":"translated",
            "@content":"26 March 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":[
          {
            "#comment":"Viewpoint nodes set various views, based on selection of Anchor points in the world."
          },
          { "WorldInfo":
            {
              "@title":"AGM65MaverickViewAnchors.x3d"
            }
          },
          { "Viewpoint":
            {
              "@DEF":"MISSILE_INITIAL_VIEW",
              "@description":"Initial view of Missile",
              "@position":[-50,0,100]
            }
          },
          { "Viewpoint":
            {
              "@DEF":"MISSILE_CLOSEUP",
              "@description":"Closeup view of missile",
              "@position":[0.0,0.0,13.0]
            }
          },
          { "Viewpoint":
            {
              "@DEF":"MISSILE_AFT",
              "@description":"Aft view of missile, for launch",
              "@orientation":[-0.1,0.9,0.1,1.57],
              "@position":[22.0,5.0,5.0]
            }
          },
          { "Anchor":
            {
              "@description":"Click for closeup viewpoint of missile",
              "@url":["#MISSILE_CLOSEUP"],
              "-children":[
                { "Transform":
                  {
                    "@rotation":[1,0,0,-1.1],
                    "@translation":[-4.0,-2.5,15.0],
                    "-children":[
                      { "Collision":
                        {
                          "@enabled":false,
                          "-children":[
                            { "Shape":
                              {
                                "-geometry":
                                  { "Cone":
                                    {
                                      "@bottomRadius":0.5,
                                      "@height":2.5
                                    }
                                  },
                                "-appearance":
                                  { "Appearance":
                                    {
                                      "-material":
                                        { "Material":
                                          {
                                            "@diffuseColor":[0.1,0.4,0.8],
                                            "@emissiveColor":[0,0.1,0.2],
                                            "@shininess":0.4,
                                            "@specularColor":[0.8,0.8,0.8],
                                            "@transparency":0.5
                                          }
                                        }
                                    }
                                  }
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Anchor":
            {
              "@description":"Click for aft view of missile (for cool launch view)",
              "@url":["#MISSILE_AFT"],
              "-children":[
                { "Transform":
                  {
                    "@rotation":[0,0,1,1.57],
                    "@translation":[9.5,0.0,0.0],
                    "-children":[
                      { "Collision":
                        {
                          "@enabled":false,
                          "-children":[
                            { "Shape":
                              {
                                "-geometry":
                                  { "Cone":
                                    {
                                      "@bottomRadius":0.5,
                                      "@height":2.5
                                    }
                                  },
                                "-appearance":
                                  { "Appearance":
                                    {
                                      "-material":
                                        { "Material":
                                          {
                                            "@diffuseColor":[0.1,0.8,0.4],
                                            "@emissiveColor":[0,0.2,0.1],
                                            "@shininess":0.4,
                                            "@specularColor":[0.8,0.8,0.8],
                                            "@transparency":0.5
                                          }
                                        }
                                    }
                                  }
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Anchor":
            {
              "@description":"Click to return to initial view of missile",
              "@url":["#MISSILE_INITIAL_VIEW"],
              "-children":[
                { "Transform":
                  {
                    "@rotation":[1,0,0,3.14],
                    "@translation":[0.0,5.0,0.0],
                    "-children":[
                      { "Collision":
                        {
                          "@enabled":false,
                          "-children":[
                            { "Shape":
                              {
                                "-geometry":
                                  { "Cone":
                                    {
                                      "@bottomRadius":0.5,
                                      "@height":2.5
                                    }
                                  },
                                "-appearance":
                                  { "Appearance":
                                    {
                                      "-material":
                                        { "Material":
                                          {
                                            "@diffuseColor":[1,0,0],
                                            "@emissiveColor":[0.2,0,0],
                                            "@shininess":0.4,
                                            "@specularColor":[0.8,0.8,0.8],
                                            "@transparency":0.5
                                          }
                                        }
                                    }
                                  }
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Background":
            {
              "@backUrl":["urn:web3d:media:textures/panoramas/ocean_4_back.jpg","ocean_4_back.jpg","https://www.web3d.org/WorkingGroups/media/textures/panoramas/ocean_4_back.jpg","https://www.web3d.org/x3d/content/examples/UniversalMediaPanoramas/ocean_4_back.jpg","http://www.web3dmedia.com/UniversalMedia/textures/panoramas/ocean_4_back.jpg","http://www.officetowers.com/UniversalMedia/textures/panoramas/ocean_4_back.jpg","http://geometrek.com/UniversalMedia/textures/panoramas/ocean_4_back.jpg","http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/ocean_4_back.jpg"],
              "@bottomUrl":["urn:web3d:media:textures/panoramas/ocean_4_bottom.jpg","ocean_4_bottom.jpg","https://www.web3d.org/WorkingGroups/media/textures/panoramas/ocean_4_bottom.jpg","https://www.web3d.org/x3d/content/examples/UniversalMediaPanoramas/ocean_4_bottom.jpg","http://www.web3dmedia.com/UniversalMedia/textures/panoramas/ocean_4_bottom.jpg","http://www.officetowers.com/UniversalMedia/textures/panoramas/ocean_4_bottom.jpg","http://geometrek.com/UniversalMedia/textures/panoramas/ocean_4_bottom.jpg","http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/ocean_4_bottom.jpg"],
              "@frontUrl":["urn:web3d:media:textures/panoramas/ocean_4_front.jpg","ocean_4_front.jpg","https://www.web3d.org/WorkingGroups/media/textures/panoramas/ocean_4_front.jpg","https://www.web3d.org/x3d/content/examples/UniversalMediaPanoramas/ocean_4_front.jpg","http://www.web3dmedia.com/UniversalMedia/textures/panoramas/ocean_4_front.jpg","http://www.officetowers.com/UniversalMedia/textures/panoramas/ocean_4_front.jpg","http://geometrek.com/UniversalMedia/textures/panoramas/ocean_4_front.jpg","http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/ocean_4_front.jpg"],
              "@groundAngle":[0.1,1.309,1.570796],
              "@groundColor":[0,0,0,0,0.1,0.3,0,0.2,0.5,0,0.3,0.8],
              "@leftUrl":["urn:web3d:media:textures/panoramas/ocean_4_left.jpg","ocean_4_left.jpg","https://www.web3d.org/WorkingGroups/media/textures/panoramas/ocean_4_left.jpg","https://www.web3d.org/x3d/content/examples/UniversalMediaPanoramas/ocean_4_left.jpg","http://www.web3dmedia.com/UniversalMedia/textures/panoramas/ocean_4_left.jpg","http://www.officetowers.com/UniversalMedia/textures/panoramas/ocean_4_left.jpg","http://geometrek.com/UniversalMedia/textures/panoramas/ocean_4_left.jpg","http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/ocean_4_left.jpg"],
              "@rightUrl":["urn:web3d:media:textures/panoramas/ocean_4_right.jpg","ocean_4_right.jpg","https://www.web3d.org/WorkingGroups/media/textures/panoramas/ocean_4_right.jpg","https://www.web3d.org/x3d/content/examples/UniversalMediaPanoramas/ocean_4_right.jpg","http://www.web3dmedia.com/UniversalMedia/textures/panoramas/ocean_4_right.jpg","http://www.officetowers.com/UniversalMedia/textures/panoramas/ocean_4_right.jpg","http://geometrek.com/UniversalMedia/textures/panoramas/ocean_4_right.jpg","http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/ocean_4_right.jpg"],
              "@skyAngle":[0.1,0.15,1.309,1.571],
              "@skyColor":[0.4,0.4,0.1,0.4,0.4,0.1,0,0.1,0.3,0,0.2,0.6,0.8,0.8,0.8],
              "@topUrl":["urn:web3d:media:textures/panoramas/ocean_4_top.jpg","ocean_4_top.jpg","https://www.web3d.org/WorkingGroups/media/textures/panoramas/ocean_4_top.jpg","https://www.web3d.org/x3d/content/examples/UniversalMediaPanoramas/ocean_4_top.jpg","http://www.web3dmedia.com/UniversalMedia/textures/panoramas/ocean_4_top.jpg","http://www.officetowers.com/UniversalMedia/textures/panoramas/ocean_4_top.jpg","http://geometrek.com/UniversalMedia/textures/panoramas/ocean_4_top.jpg","http://www.sc.ehu.es/ccwgamoa/UniversalMedia/textures/panoramas/ocean_4_top.jpg"]
            }
          },
          { "Group":
            {
              "-children":[
                { "Transform":
                  {
                    "@DEF":"MISSILE_TRANSFORM",
                    "-children":[
                      { "Inline":
                        {
                          "@DEF":"AGM65Maverick",
                          "@url":["ShafferAGM65Maverick.x3d","https://www.web3d.org/x3d/content/examples/Savage/Weapons/Missiles/ShafferAGM65Maverick.x3d","ShafferAGM65Maverick.wrl","https://www.web3d.org/x3d/content/examples/Savage/Weapons/Missiles/ShafferAGM65Maverick.wrl"]
                        }
                      }
                    ]
                  }
                },
                {
                  "#comment":"Define sensors and interpolator for missile rotation."
                },
                { "TouchSensor":
                  {
                    "@DEF":"MyTouchSensor",
                    "@description":"touch sensor: hover mouse to rotate missile"
                  }
                },
                { "TimeSensor":
                  {
                    "@DEF":"CLOCK1",
                    "@cycleInterval":4,
                    "@enabled":false,
                    "@loop":true
                  }
                },
                { "OrientationInterpolator":
                  {
                    "@DEF":"RotateInterpolator",
                    "@key":[0.0,0.25,0.5,0.75,1.0],
                    "@keyValue":[1.0,0.0,0.0,0.0,1.0,0.0,0.0,-1.57,1.0,0.0,0.0,-3.14,1.0,0.0,0.0,-4.71,1.0,0.0,0.0,-6.28]
                  }
                },
                {
                  "#comment":"Define sensors and interpolators for missile launch, travel, and rotation."
                },
                { "TouchSensor":
                  {
                    "@DEF":"MyClickSensor",
                    "@description":"touch sensor: click to launch missile"
                  }
                },
                { "TimeSensor":
                  {
                    "@DEF":"CLOCK2",
                    "@cycleInterval":4
                  }
                },
                { "PositionInterpolator":
                  {
                    "@DEF":"PathInterpolator",
                    "@key":[0.0,0.25,0.5,0.75,1.0],
                    "@keyValue":[0.0,0.0,0.0,-75.0,0.0,0.0,-150.0,0.0,0.0,-225.0,0.0,0.0,0.0,0.0,0.0]
                  }
                },
                { "OrientationInterpolator":
                  {
                    "@DEF":"SpinInterpolator",
                    "@key":[0.0,0.25,0.5,0.75,1.0],
                    "@keyValue":[1.0,0.0,0.0,0.0,1.0,0.0,0.0,-1.57,1.0,0.0,0.0,-3.14,1.0,0.0,0.0,-4.71,1.0,0.0,0.0,-6.28]
                  }
                }
              ]
            }
          },
          {
            "#comment":"Set ROUTE for missile to launch when clicked, and rotate during travel."
          },
          { "ROUTE":
            {
              "@fromField":"touchTime",
              "@fromNode":"MyClickSensor",
              "@toField":"set_startTime",
              "@toNode":"CLOCK2"
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"CLOCK2",
              "@toField":"set_fraction",
              "@toNode":"PathInterpolator"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"PathInterpolator",
              "@toField":"set_translation",
              "@toNode":"MISSILE_TRANSFORM"
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"CLOCK2",
              "@toField":"set_fraction",
              "@toNode":"SpinInterpolator"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"SpinInterpolator",
              "@toField":"set_rotation",
              "@toNode":"MISSILE_TRANSFORM"
            }
          },
          {
            "#comment":"Set ROUTE for missile to rotate longitudinally when touched."
          },
          { "ROUTE":
            {
              "@fromField":"isOver",
              "@fromNode":"MyTouchSensor",
              "@toField":"set_enabled",
              "@toNode":"CLOCK1"
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"CLOCK1",
              "@toField":"set_fraction",
              "@toNode":"RotateInterpolator"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"RotateInterpolator",
              "@toField":"set_rotation",
              "@toNode":"MISSILE_TRANSFORM"
            }
          }
        ]
    }
  }
}