{ "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":"CompassRosePrototype.x3d"
          },
          {
            "@name":"description",
            "@content":"Definition of the CompassRose prototype, a heads-up display (HUD) showing heading for current viewpoint direction."
          },
          {
            "@name":"creator",
            "@content":"Christian Greuel, Director of Art & Production, Planet 9 Studios, Inc."
          },
          {
            "@name":"translator",
            "@content":"Xeena VRML importer, X3D-Edit 3.1, https://www.web3d.org/x3d/content/README.X3D-Edit.html"
          },
          {
            "@name":"created",
            "@content":"1 August 2006"
          },
          {
            "@name":"translated",
            "@content":"14 October 2006"
          },
          {
            "@name":"modified",
            "@content":"14 June 20"
          },
          {
            "@name":"Image",
            "@content":"Textures/CompassHeadings.png"
          },
          {
            "@name":"reference",
            "@content":"originals/CompassRosePrototype.wrl"
          },
          {
            "@name":"subject",
            "@content":"compass rose heads-up display HUD"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/CompassRosePrototype.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit, https://www.web3d.org/x3d/content/README.X3D-Edit.html"
          },
          {
            "@name":"generator",
            "@content":"Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.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":[
          { "WorldInfo":
            {
              "@info":["Christian Greuel, Director of Art & Production"],
              "@title":"Compass Rose Prototype"
            }
          },
          { "ProtoDeclare":
            {
              "@name":"CompassRose",
              "ProtoInterface": {
                  "field": [
                    {
                      "@name":"size",
                      "@accessType":"initializeOnly",
                      "@type":"SFVec3f",
                      "@value":[1.0,1.0,1.0]
                    },
                    {
                      "@name":"locationOffset",
                      "@accessType":"initializeOnly",
                      "@type":"SFVec3f",
                      "@value":[0.0,0.0,0.0]
                    }
                  ]
              },
              "ProtoBody": {
                  "-children":[
                    { "Group":
                      {
                        "@DEF":"CompassRose",
                        "-children":[
                          { "ProximitySensor":
                            {
                              "@DEF":"CompassProx",
                              "@size":[1.0E9,1.0E9,1.0E9],
                              "IS": {
                                  "connect": [
                                    {
                                      "@nodeField":"center",
                                      "@protoField":"locationOffset"
                                    }
                                  ]
                              }
                            }
                          },
                          { "Transform":
                            {
                              "@DEF":"FixedLocation",
                              "-children":[
                                { "Transform":
                                  {
                                    "@DEF":"LocationOffset",
                                    "IS": {
                                        "connect": [
                                          {
                                            "@nodeField":"translation",
                                            "@protoField":"locationOffset"
                                          },
                                          {
                                            "@nodeField":"scale",
                                            "@protoField":"size"
                                          }
                                        ]
                                    },
                                    "-children":[
                                      { "Transform":
                                        {
                                          "@scale":[0.02,0.02,0.02],
                                          "@translation":[0.0,0.0,-0.2],
                                          "-children":[
                                            { "Group":
                                              {
                                                "@DEF":"Compass",
                                                "-children":[
                                                  { "Transform":
                                                    {
                                                      "@DEF":"Needle",
                                                      "-children":[
                                                        { "Shape":
                                                          {
                                                            "-appearance":
                                                              { "Appearance":
                                                                {
                                                                  "-texture":
                                                                    { "ImageTexture":
                                                                      {
                                                                        "@url":["Textures/CompassNeedle.png","https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/Textures/CompassNeedle.png"]
                                                                      }
                                                                    }
                                                                }
                                                              },
                                                            "-geometry":
                                                              { "IndexedFaceSet":
                                                                {
                                                                  "@coordIndex":[1,2,3,-1,1,3,0,-1],
                                                                  "@texCoordIndex":[1,2,3,-1,1,3,0,-1],
                                                                  "-coord":
                                                                    { "Coordinate":
                                                                      {
                                                                        "@point":[0.5,0.5,0.0,-0.5,0.5,0.0,-0.5,-0.5,0.0,0.5,-0.5,0.0]
                                                                      }
                                                                    },
                                                                  "-texCoord":
                                                                    { "TextureCoordinate":
                                                                      {
                                                                        "@point":[1.0,1.0,0.0,1.0,0.0,0.0,1.0,0.0]
                                                                      }
                                                                    }
                                                                }
                                                              }
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  { "Transform":
                                                    {
                                                      "@DEF":"Headings",
                                                      "-children":[
                                                        { "Shape":
                                                          {
                                                            "-appearance":
                                                              { "Appearance":
                                                                {
                                                                  "-texture":
                                                                    { "ImageTexture":
                                                                      {
                                                                        "@url":["Textures/CompassHeadings.png","https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/Textures/CompassHeadings.png"]
                                                                      }
                                                                    }
                                                                }
                                                              },
                                                            "-geometry":
                                                              { "IndexedFaceSet":
                                                                {
                                                                  "@coordIndex":[1,2,3,-1,1,3,0,-1],
                                                                  "@texCoordIndex":[1,2,3,-1,1,3,0,-1],
                                                                  "-coord":
                                                                    { "Coordinate":
                                                                      {
                                                                        "@point":[0.5,0.5,0.0,-0.5,0.5,0.0,-0.5,-0.5,0.0,0.5,-0.5,0.0]
                                                                      }
                                                                    },
                                                                  "-texCoord":
                                                                    { "TextureCoordinate":
                                                                      {
                                                                        "@point":[1.0,1.0,0.0,1.0,0.0,0.0,1.0,0.0]
                                                                      }
                                                                    }
                                                                }
                                                              }
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  { "Script":
                                                    {
                                                      "@DEF":"RoseScript",
                                                      "field": [
                                                        {
                                                          "@name":"rot",
                                                          "@accessType":"initializeOnly",
                                                          "@type":"SFRotation",
                                                          "@value":[0.0,1.0,0.0,0.0]
                                                        },
                                                        {
                                                          "@name":"dir",
                                                          "@accessType":"initializeOnly",
                                                          "@type":"SFNode",
                                                          "-children":[
                                                            { "Transform":
                                                              {
                                                                "@USE":"Headings"
                                                              }
                                                            }
                                                          ]
                                                        },
                                                        {
                                                          "@name":"proxrot",
                                                          "@accessType":"inputOnly",
                                                          "@type":"SFRotation"
                                                        }
                                                      ],
                                                      "#sourceCode":[
"",
"",
"ecmascript:",
"\tfunction proxrot(v) {",
"\t\trot[0] = 0;",
"\t\trot[1] = 0;",
"\t\trot[2] = v[1];",
"\t\trot[3] = -v[3];",
"\t\tdir.set_rotation = rot;",
"\t}",
"",
""
]
                                                    }
                                                  }
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      }
                                    ]
                                  }
                                }
                              ]
                            }
                          }
                        ]
                      }
                    }
                  ]
              }
            }
          }
        ]
    }
  }
}