{ "X3D": {
    "encoding":"UTF-8",
    "@profile":"Immersive",
    "@version":"3.2",
    "@xsd:noNamespaceSchemaLocation":"https://www.web3d.org/specifications/x3d-3.2.xsd",
    "JSON schema":"https://www.web3d.org/specifications/x3d-4.0-JSONSchema.autogenerated.json",
    "head": {
        "meta": [
          {
            "@name":"title",
            "@content":"DoorDesired.x3d"
          },
          {
            "@name":"description",
            "@content":"X3D Follower example"
          },
          {
            "@name":"creator",
            "@content":"Herbert Stocker"
          },
          {
            "@name":"translator",
            "@content":"Don Brutzman"
          },
          {
            "@name":"created",
            "@content":"18 April 2006"
          },
          {
            "@name":"translated",
            "@content":"2 December 2011"
          },
          {
            "@name":"modified",
            "@content":"20 October 2019"
          },
          {
            "@name":"reference",
            "@content":"originals/door_desired.wrl"
          },
          {
            "@name":"reference",
            "@content":"Stocker_06_Followers.pdf"
          },
          {
            "@name":"reference",
            "@content":"http://www.hersto.com/Publications/Followers"
          },
          {
            "@name":"requires",
            "@content":"X3D version 3.2 or greater"
          },
          {
            "@name":"subject",
            "@content":"X3D Follower Chaser Damper"
          },
          {
            "@name":"warning",
            "@content":"under development, instantReality works but BS Contact fails silently"
          },
          {
            "@name":"reference",
            "@content":"https://www.web3d.org/x3d/specifications/ISO-IEC-19775-1.2-X3D-AbstractSpecification/Part01/components/followers.html"
          },
          {
            "@name":"reference",
            "@content":"https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/Basic/Followers/originals/DoorDesired.x3d"
          },
          {
            "@name":"generator",
            "@content":"Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@name":"license",
            "@content":"../../license.html"
          },
          {
            "@name":"translated",
            "@content":"20 April 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":"DoorDesired.x3d"
            }
          },
          { "Background":
            {
              "@DEF":"Bgnd",
              "@skyAngle":[1.1,1.4,1.57],
              "@skyColor":[0.176,0.314,0.529,0.176,0.314,0.529,0.314,0.549,0.784,0.706,0.824,0.922]
            }
          },
          { "Viewpoint":
            {
              "@description":"initial View",
              "@fieldOfView":0.844,
              "@orientation":[-0.0040,1.0,0.0030,0.439],
              "@position":[3.163,1.65,5.877]
            }
          },
          { "Viewpoint":
            {
              "@description":"from the top",
              "@fieldOfView":0.844,
              "@orientation":[-0.979,-0.051,0.198,1.263],
              "@position":[-1.216,9.189,2.77]
            }
          },
          { "Shape":
            {
              "-appearance":
                { "Appearance":
                  {
                    "-material":
                      { "Material":
                        {
                          "@diffuseColor":[0.0,0.0,0.0],
                          "@emissiveColor":[0.318,0.663,0.0]
                        }
                      }
                  }
                },
              "-geometry":
                { "Box":
                  {
                    "@size":[100.0,0.1,100.0]
                  }
                }
            }
          },
          { "Group":
            {
              "-children":[
                { "TouchSensor":
                  {
                    "@DEF":"TchCyls",
                    "@description":"touch to activate"
                  }
                },
                { "Transform":
                  {
                    "@translation":[-1.25,1.0,0.0],
                    "-children":[
                      { "Shape":
                        {
                          "@DEF":"ShCyl",
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@ambientIntensity":0.00333,
                                      "@diffuseColor":[0.52,0.26,0.0],
                                      "@emissiveColor":[0.24,0.0,0.0],
                                      "@shininess":0.12,
                                      "@specularColor":[0.97,0.98,0.12]
                                    }
                                  }
                              }
                            },
                          "-geometry":
                            { "Cylinder":
                              {
                                "@radius":0.375
                              }
                            }
                        }
                      }
                    ]
                  }
                },
                { "Transform":
                  {
                    "@translation":[1.25,1.0,0.0],
                    "-children":[
                      { "Shape":
                        {
                          "@USE":"ShCyl"
                        }
                      }
                    ]
                  }
                },
                { "Transform":
                  {
                    "@translation":[-4.25,1.0,0.0],
                    "-children":[
                      { "Shape":
                        {
                          "@DEF":"ShWall",
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@ambientIntensity":0.00333,
                                      "@diffuseColor":[0.425,0.182,0.0075],
                                      "@emissiveColor":[0.425,0.182,0.0075],
                                      "@shininess":0.12
                                    }
                                  }
                              }
                            },
                          "-geometry":
                            { "Box":
                              {
                                "@size":[6.0,1.99,0.1]
                              }
                            }
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@translation":[4.25,1.0,0.0],
              "-children":[
                { "Shape":
                  {
                    "@USE":"ShWall"
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@translation":[-1.25,0.0,0.0],
              "-children":[
                { "TouchSensor":
                  {
                    "@DEF":"TchDoor",
                    "@description":"touch to activate"
                  }
                },
                { "Transform":
                  {
                    "@DEF":"TransDoor",
                    "-children":[
                      { "Transform":
                        {
                          "@translation":[1.25,1.0,0.0],
                          "-children":[
                            { "Shape":
                              {
                                "-appearance":
                                  { "Appearance":
                                    {
                                      "-material":
                                        { "Material":
                                          {
                                            "@diffuseColor":[0.024,0.2,0.334],
                                            "@emissiveColor":[0.05,0.4,0.666]
                                          }
                                        }
                                    }
                                  },
                                "-geometry":
                                  { "Box":
                                    {
                                      "@size":[1.75,2.0,0.075]
                                    }
                                  }
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "OrientationChaser":
            {
              "@DEF":"DmpODoor",
              "@duration":1.3
            }
          },
          { "Script":
            {
              "@DEF":"Worker",
              "field": [
                {
                  "@name":"cOriOpen",
                  "@accessType":"initializeOnly",
                  "@type":"SFRotation",
                  "@value":[0.0,-1.0,0.0,2.5]
                },
                {
                  "@name":"touched",
                  "@accessType":"inputOnly",
                  "@type":"SFTime"
                },
                {
                  "@name":"IsOpen",
                  "@accessType":"initializeOnly",
                  "@type":"SFBool",
                  "@value":false
                },
                {
                  "@name":"oriToGoTo",
                  "@accessType":"outputOnly",
                  "@type":"SFRotation"
                },
                {
                  "@name":"cOriClosed",
                  "@accessType":"initializeOnly",
                  "@type":"SFRotation",
                  "@value":[0.0,0.0,1.0,0.0]
                }
              ],
              "#sourceCode":[
"",
"",
"ecmascript:",
"",
"function touched(t)",
"{",
"    if(IsOpen)",
"    {",
"        oriToGoTo= cOriClosed;",
"        IsOpen= false;",
"    }else",
"    {",
"        oriToGoTo= cOriOpen;",
"        IsOpen= true;",
"    }",
"}",
"",
""
]
            }
          },
          { "ROUTE":
            {
              "@fromField":"touchTime",
              "@fromNode":"TchDoor",
              "@toField":"touched",
              "@toNode":"Worker"
            }
          },
          { "ROUTE":
            {
              "@fromField":"touchTime",
              "@fromNode":"TchCyls",
              "@toField":"touched",
              "@toNode":"Worker"
            }
          },
          { "ROUTE":
            {
              "@fromField":"oriToGoTo",
              "@fromNode":"Worker",
              "@toField":"set_destination",
              "@toNode":"DmpODoor"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"DmpODoor",
              "@toField":"rotation",
              "@toNode":"TransDoor"
            }
          }
        ]
    }
  }
}