{ "X3D": {
    "encoding":"UTF-8",
    "@profile":"Immersive",
    "@version":"3.3",
    "@xsd:noNamespaceSchemaLocation":"https://www.web3d.org/specifications/x3d-3.3.xsd",
    "JSON schema":"https://www.web3d.org/specifications/x3d-4.0-JSONSchema.autogenerated.json",
    "head": {
        "meta": [
          {
            "@name":"title",
            "@content":"A3_GeoInline.x3d"
          },
          {
            "@name":"creator",
            "@content":"Martin Reddy SRI, original example"
          },
          {
            "@name":"creator",
            "@content":"Don Brutzman NPS, X3D encoding"
          },
          {
            "@name":"created",
            "@content":"26 June 2000"
          },
          {
            "@name":"modified",
            "@content":"17 June 2020"
          },
          {
            "@name":"description",
            "@content":"Specification example: on-demand inlining via GeoInline for scene resource management."
          },
          {
            "@name":"warning",
            "@content":"GeoVRML 1.1 GeoInline functionality is embedded in X3D Inline node, GeoInline no longer supported in X3D."
          },
          {
            "@name":"reference",
            "@content":"http://www.geovrml.org/1.0/doc/examples.html"
          },
          {
            "@name":"reference",
            "@content":"originals/geoinlineTest.wrl"
          },
          {
            "@name":"reference",
            "@content":"VRML 97 encoding http://www.geovrml.org/1.0/doc/examples/geoinline.wrl"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/Basic/Geospatial/A3_GeoInline.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@name":"license",
            "@content":"../license.html"
          },
          {
            "@name":"translated",
            "@content":"02 September 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":"A3_GeoInline.x3d"
            }
          },
          { "Group":
            {
              "-children":[
                {
                  "#comment":"Original GeoVRML GeoInline node replaced by improved X3D Inline node"
                },
                { "Inline":
                  {
                    "@DEF":"TestInline",
                    "@load":false,
                    "@url":["BoxSimple.x3d","https://www.web3d.org/x3d/content/examples/Basic/Geospatial/BoxSimple.x3d","BoxSimple.wrl","https://www.web3d.org/x3d/content/examples/Basic/Geospatial/BoxSimple.wrl"]
                  }
                },
                {
                  "#comment":"don't load TestInline until 'true' event sent"
                }
              ]
            }
          },
          {
            "#comment":"Two cones that are used to load and unload the URL for the box"
          },
          { "Transform":
            {
              "@scale":[0.5,0.5,0.5],
              "@translation":[2,1.0,0],
              "-children":[
                { "TouchSensor":
                  {
                    "@DEF":"LoadTrigger",
                    "@description":"click to load inlined Box"
                  }
                },
                { "Shape":
                  {
                    "-appearance":
                      { "Appearance":
                        {
                          "-material":
                            { "Material":
                              {
                                "@diffuseColor":[1,0,0]
                              }
                            }
                        }
                      },
                    "-geometry":
                      { "Cone":
                        {
                        }
                      }
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@scale":[0.5,0.5,0.5],
              "@translation":[1.5,1.2,0.3],
              "-children":[
                { "Shape":
                  {
                    "-geometry":
                      { "Text":
                        {
                          "@length":[0],
                          "@string":["Load Cube"],
                          "-fontStyle":
                            { "FontStyle":
                              {
                              }
                            }
                        }
                      },
                    "-appearance":
                      { "Appearance":
                        {
                          "-material":
                            { "Material":
                              {
                                "@diffuseColor":[0,0.6,0.3]
                              }
                            }
                        }
                      }
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@rotation":[1,0,0,3.1415],
              "@scale":[0.5,0.5,0.5],
              "@translation":[2,-1.0,0],
              "-children":[
                { "TouchSensor":
                  {
                    "@DEF":"UnLoadTrigger",
                    "@description":"click to unload inlined Box"
                  }
                },
                { "Shape":
                  {
                    "-appearance":
                      { "Appearance":
                        {
                          "-material":
                            { "Material":
                              {
                                "@diffuseColor":[0,0,1]
                              }
                            }
                        }
                      },
                    "-geometry":
                      { "Cone":
                        {
                        }
                      }
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@scale":[0.5,0.5,0.5],
              "@translation":[1.5,-1.5,0.3],
              "-children":[
                { "Shape":
                  {
                    "-geometry":
                      { "Text":
                        {
                          "@length":[0],
                          "@string":["Unload Cube"],
                          "-fontStyle":
                            { "FontStyle":
                              {
                              }
                            }
                        }
                      },
                    "-appearance":
                      { "Appearance":
                        {
                          "-material":
                            { "Material":
                              {
                                "@diffuseColor":[0.6,0.3,0]
                              }
                            }
                        }
                      }
                  }
                }
              ]
            }
          },
          {
            "#comment":"a couple of scripts to process the events from clicking on the cones"
          },
          { "Script":
            {
              "@DEF":"ReturnTrue",
              "field": [
                {
                  "@name":"set_value",
                  "@accessType":"inputOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"value_changed",
                  "@accessType":"outputOnly",
                  "@type":"SFBool"
                }
              ],
              "#sourceCode":[
"",
"",
"ecmascript:",
"",
"function set_value( value ) {",
"  if ( value == true ) value_changed = true;",
"}",
"",
""
]
            }
          },
          { "Script":
            {
              "@DEF":"ReturnFalse",
              "field": [
                {
                  "@name":"set_value",
                  "@accessType":"inputOnly",
                  "@type":"SFBool"
                },
                {
                  "@name":"value_changed",
                  "@accessType":"outputOnly",
                  "@type":"SFBool"
                }
              ],
              "#sourceCode":[
"",
"",
"ecmascript:",
"",
"function set_value( value ) {",
"  if ( value == true ) value_changed = false;",
"}",
"",
""
]
            }
          },
          { "ROUTE":
            {
              "@fromField":"isActive",
              "@fromNode":"LoadTrigger",
              "@toField":"set_value",
              "@toNode":"ReturnTrue"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"ReturnTrue",
              "@toField":"set_load",
              "@toNode":"TestInline"
            }
          },
          { "ROUTE":
            {
              "@fromField":"isActive",
              "@fromNode":"UnLoadTrigger",
              "@toField":"set_value",
              "@toNode":"ReturnFalse"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"ReturnFalse",
              "@toField":"set_load",
              "@toNode":"TestInline"
            }
          }
        ]
    }
  }
}