{ "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":"HiddenViewpointPrototype.x3d"
          },
          {
            "@name":"description",
            "@content":"Prototype to produce hidden viewpoints that becomes active (binds) upon pointer selection to reveal an interesting view, with an optionally label. Especially cool is deselecting: the user returns to wherever the previous viewpoint was. Numerous HiddenViewpoints can be used without cluttering up the browser's viewpoint description list."
          },
          {
            "@name":"creator",
            "@content":"Don Brutzman"
          },
          {
            "@name":"created",
            "@content":"1 May 2001"
          },
          {
            "@name":"modified",
            "@content":"28 November 2019"
          },
          {
            "@name":"Image",
            "@content":"HiddenViewpointTest-WaypointInterpolator.png"
          },
          {
            "@name":"Image",
            "@content":"https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/HiddenViewpointTest-WaypointInterpolator.png"
          },
          {
            "@name":"reference",
            "@content":"WaypointInterpolatorExample.x3d"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/HiddenViewpointPrototype.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":[
          { "WorldInfo":
            {
              "@title":"HiddenViewpointPrototype.x3d"
            }
          },
          { "ProtoDeclare":
            {
              "@name":"HiddenViewpoint",
              "@appinfo":"Hidden viewpoint becomes active (binds) upon pointer selection to reveal an interesting view with an optionally label",
              "ProtoInterface": {
                  "field": [
                    {
                      "@name":"position",
                      "@accessType":"inputOutput",
                      "@type":"SFVec3f",
                      "@value":[0,0,0]
                    },
                    {
                      "@name":"rotation",
                      "@accessType":"inputOutput",
                      "@type":"SFRotation",
                      "@value":[0,1,0,0]
                    },
                    {
                      "@name":"sensorRadius",
                      "@accessType":"initializeOnly",
                      "@type":"SFFloat",
                      "@value":1
                    },
                    {
                      "@name":"activate",
                      "@accessType":"inputOnly",
                      "@type":"SFBool"
                    },
                    {
                      "@name":"label",
                      "@accessType":"inputOutput",
                      "@type":"MFString"
                    },
                    {
                      "@name":"labelOffset",
                      "@accessType":"inputOutput",
                      "@type":"SFVec3f",
                      "@value":[0,-1,0]
                    },
                    {
                      "@name":"labelFontSize",
                      "@accessType":"initializeOnly",
                      "@type":"SFFloat",
                      "@value":1
                    },
                    {
                      "@name":"labelColor",
                      "@accessType":"inputOutput",
                      "@type":"SFColor",
                      "@value":[0.8,0.8,0.8]
                    }
                  ]
              },
              "ProtoBody": {
                  "-children":[
                    {
                      "#comment":"Touchable Sphere to bind a labeled local viewpoint while clicked..."
                    },
                    { "Transform":
                      {
                        "@DEF":"LocationTransform",
                        "IS": {
                            "connect": [
                              {
                                "@nodeField":"translation",
                                "@protoField":"position"
                              },
                              {
                                "@nodeField":"center",
                                "@protoField":"position"
                              },
                              {
                                "@nodeField":"rotation",
                                "@protoField":"rotation"
                              }
                            ]
                        },
                        "-children":[
                          { "Shape":
                            {
                              "-geometry":
                                { "Sphere":
                                  {
                                    "@DEF":"TransparentSphere",
                                    "IS": {
                                        "connect": [
                                          {
                                            "@nodeField":"radius",
                                            "@protoField":"sensorRadius"
                                          }
                                        ]
                                    }
                                  }
                                },
                              "-appearance":
                                { "Appearance":
                                  {
                                    "-material":
                                      { "Material":
                                        {
                                          "@transparency":1
                                        }
                                      }
                                  }
                                }
                            }
                          },
                          { "TouchSensor":
                            {
                              "@DEF":"InvisibleTouchSensorNoDescription"
                            }
                          },
                          { "Transform":
                            {
                              "@DEF":"HiddenViewpointTransform",
                              "IS": {
                                  "connect": [
                                    {
                                      "@nodeField":"translation",
                                      "@protoField":"labelOffset"
                                    }
                                  ]
                              },
                              "-children":[
                                {
                                  "#comment":"No description is provided for HiddenViewpoint so that it does NOT appear in the viewpoint list."
                                },
                                { "Viewpoint":
                                  {
                                    "@DEF":"HiddenViewNoDescription",
                                    "@position":[0,0,4],
                                    "IS": {
                                        "connect": [
                                          {
                                            "@nodeField":"set_bind",
                                            "@protoField":"activate"
                                          }
                                        ]
                                    }
                                  }
                                }
                              ]
                            }
                          },
                          { "LOD":
                            {
                              "@DEF":"LabelTextLOD",
                              "@range":[8],
                              "-children":[
                                { "Group":
                                  {
                                    "-children":[
                                      { "Transform":
                                        {
                                          "@DEF":"LabelTransform",
                                          "IS": {
                                              "connect": [
                                                {
                                                  "@nodeField":"translation",
                                                  "@protoField":"labelOffset"
                                                }
                                              ]
                                          },
                                          "-children":[
                                            { "Shape":
                                              {
                                                "-geometry":
                                                  { "Text":
                                                    {
                                                      "@DEF":"LabelText",
                                                      "IS": {
                                                          "connect": [
                                                            {
                                                              "@nodeField":"string",
                                                              "@protoField":"label"
                                                            }
                                                          ]
                                                      },
                                                      "-fontStyle":
                                                        { "FontStyle":
                                                          {
                                                            "@DEF":"LabelFontStyle",
                                                            "@justify":["MIDDLE","MIDDLE"],
                                                            "IS": {
                                                                "connect": [
                                                                  {
                                                                    "@nodeField":"size",
                                                                    "@protoField":"labelFontSize"
                                                                  }
                                                                ]
                                                            }
                                                          }
                                                        }
                                                    }
                                                  },
                                                "-appearance":
                                                  { "Appearance":
                                                    {
                                                      "-material":
                                                        { "Material":
                                                          {
                                                            "@DEF":"TextMaterial",
                                                            "@diffuseColor":[0,0,0],
                                                            "IS": {
                                                                "connect": [
                                                                  {
                                                                    "@nodeField":"emissiveColor",
                                                                    "@protoField":"labelColor"
                                                                  }
                                                                ]
                                                            }
                                                          }
                                                        },
                                                      "-children":[
                                                        {
                                                          "#comment":"emissiveColor used for TextMaterial so that label is visible regardless. Thus diffuseColor set to (0 0 0) so that default value (0.8 0.8 0.8) doesn't wash out emissive."
                                                        }
                                                      ]
                                                    }
                                                  }
                                              }
                                            }
                                          ]
                                        }
                                      }
                                    ]
                                  }
                                },
                                { "WorldInfo":
                                  {
                                    "@info":["null node"]
                                  }
                                }
                              ]
                            }
                          }
                        ]
                      }
                    },
                    { "ROUTE":
                      {
                        "@fromField":"isActive",
                        "@fromNode":"InvisibleTouchSensorNoDescription",
                        "@toField":"set_bind",
                        "@toNode":"HiddenViewNoDescription"
                      }
                    }
                  ]
              }
            }
          },
          {
            "#comment":"======================================"
          },
          { "Viewpoint":
            {
              "@description":"HiddenViewpoint launch",
              "@position":[0,0,12]
            }
          },
          { "Anchor":
            {
              "@description":"WaypointInterpolator example",
              "@parameter":["target=_blank"],
              "@url":["WaypointInterpolatorExample.x3d","https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/WaypointInterpolatorExample.x3d","WaypointInterpolatorExample.wrl","https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/WaypointInterpolatorExample.wrl"],
              "-children":[
                { "Shape":
                  {
                    "-geometry":
                      { "Text":
                        {
                          "@string":["Click on this text to see","HiddenViewpoint example use","then click beneath origin axes","in WaypointInterpolator","example scene"],
                          "-fontStyle":
                            { "FontStyle":
                              {
                                "@justify":["MIDDLE","MIDDLE"]
                              }
                            }
                        }
                      },
                    "-appearance":
                      { "Appearance":
                        {
                          "-material":
                            { "Material":
                              {
                                "@diffuseColor":[1,1,0.2]
                              }
                            }
                        }
                      }
                  }
                }
              ]
            }
          }
        ]
    }
  }
}