{ "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":"HeadsUpDisplayExample.x3d"
          },
          {
            "@name":"description",
            "@content":"Generic Heads Up Display (HUD) prototype to keep children on screen."
          },
          {
            "@name":"creator",
            "@content":"Don Brutzman"
          },
          {
            "@name":"created",
            "@content":"9 November 2003"
          },
          {
            "@name":"modified",
            "@content":"28 November 2019"
          },
          {
            "@name":"subject",
            "@content":"HUD Heads Up Display"
          },
          {
            "@name":"identifier",
            "@content":"https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/HeadsUpDisplayExample.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit"
          },
          {
            "@name":"license",
            "@content":"../../license.html"
          },
          {
            "@name":"translated",
            "@content":"04 January 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":"HeadsUpDisplayExample.x3d"
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"HeadsUpDisplay",
              "@appinfo":"HeadsUpDisplay positions child geometry in screen space, movable by the user",
              "@url":["../../../X3dForWebAuthors/Chapter14Prototypes/HeadsUpDisplayPrototype.x3d#HeadsUpDisplay","https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/HeadsUpDisplayPrototype.x3d#HeadsUpDisplay","../../../X3dForWebAuthors/Chapter14Prototypes/HeadsUpDisplayPrototype.wrl#HeadsUpDisplay","https://savage.nps.edu/Savage/Tools/HeadsUpDisplays/HeadsUpDisplayPrototype.wrl#HeadsUpDisplay"],
              "field": [
                {
                  "@name":"children",
                  "@accessType":"inputOutput",
                  "@appinfo":"Displayed subscene positioned as a HUD.",
                  "@type":"MFNode"
                },
                {
                  "@name":"dragChildren",
                  "@accessType":"inputOutput",
                  "@appinfo":"Additional HUD geometry which can be touched and dragged for repositioning. If this geometry goes offscreen (perhaps due to screen resizing) then it snaps back to original position.",
                  "@type":"MFNode"
                },
                {
                  "@name":"locationOffset",
                  "@accessType":"initializeOnly",
                  "@appinfo":"Modified screen location and distance (for size).",
                  "@type":"SFVec3f"
                },
                {
                  "@name":"traceEnabled",
                  "@accessType":"initializeOnly",
                  "@appinfo":"Enable/disable console output for troubleshooting.",
                  "@type":"SFBool"
                }
              ]
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"ViewPositionOrientation",
              "@appinfo":"ViewPositionOrientation provides provides console output of local position and orientation as user navigates",
              "@url":["../../Tools/Authoring/ViewPositionOrientationPrototype.x3d#ViewPositionOrientation","https://savage.nps.edu/Savage/Tools/Authoring/ViewPositionOrientationPrototype.x3d#ViewPositionOrientation","../../Tools/Authoring/ViewPositionOrientationPrototype.wrl#ViewPositionOrientation","https://savage.nps.edu/Savage/Tools/Authoring/ViewPositionOrientationPrototype.wrl#ViewPositionOrientation"],
              "field": [
                {
                  "@name":"enabled",
                  "@accessType":"inputOutput",
                  "@appinfo":"Whether or not ViewPositionOrientation sends output to console.",
                  "@type":"SFBool"
                },
                {
                  "@name":"traceEnabled",
                  "@accessType":"initializeOnly",
                  "@appinfo":"Output internal trace messages for debugging this node - developer use only can be ignored.",
                  "@type":"SFBool"
                },
                {
                  "@name":"set_traceEnabled",
                  "@accessType":"inputOnly",
                  "@appinfo":"Ability to turn output tracing on/off at runtime.",
                  "@type":"SFBool"
                },
                {
                  "@name":"position_changed",
                  "@accessType":"outputOnly",
                  "@appinfo":"Output local position.",
                  "@type":"SFVec3f"
                },
                {
                  "@name":"orientation_changed",
                  "@accessType":"outputOnly",
                  "@appinfo":"Output local orientation.",
                  "@type":"SFRotation"
                },
                {
                  "@name":"outputViewpointString",
                  "@accessType":"outputOnly",
                  "@appinfo":"MFString value of new Viewpoint",
                  "@type":"MFString"
                }
              ]
            }
          },
          {
            "#comment":"===================="
          },
          { "Inline":
            {
              "@DEF":"HelloWorld",
              "@url":["../../../HelloWorld.x3d","https://www.web3d.org/x3d/content/examples/Basic/HelloWorld.x3d","../../../HelloWorld.wrl","https://www.web3d.org/x3d/content/examples/Basic/HelloWorld.wrl"]
            }
          },
          { "ProtoInstance":
            {
              "@name":"HeadsUpDisplay",
              "fieldValue": [
                {
                  "@name":"children",
                  "-children":[
                    { "Shape":
                      {
                        "-appearance":
                          { "Appearance":
                            {
                              "-material":
                                { "Material":
                                  {
                                    "@diffuseColor":[0,1,1],
                                    "@emissiveColor":[0,1,1]
                                  }
                                }
                            }
                          },
                        "-geometry":
                          { "Text":
                            {
                              "@string":["HUD text"],
                              "-fontStyle":
                                { "FontStyle":
                                  {
                                    "@justify":["MIDDLE","MIDDLE"],
                                    "@size":0.8
                                  }
                                }
                            }
                          }
                      }
                    }
                  ]
                },
                {
                  "@name":"dragChildren",
                  "-children":[
                    { "Transform":
                      {
                        "@translation":[0,0,-0.2],
                        "-children":[
                          { "Shape":
                            {
                              "-geometry":
                                { "Box":
                                  {
                                    "@size":[4,2,0.001]
                                  }
                                },
                              "-appearance":
                                { "Appearance":
                                  {
                                    "-material":
                                      { "Material":
                                        {
                                          "@diffuseColor":[1,1,1],
                                          "@transparency":0.9
                                        }
                                      }
                                  }
                                }
                            }
                          }
                        ]
                      }
                    }
                  ]
                },
                {
                  "@name":"locationOffset",
                  "@value":[-4,-2,0]
                }
              ]
            }
          }
        ]
    }
  }
}