{ "X3D": {
    "encoding":"UTF-8",
    "@profile":"Immersive",
    "@version":"4.0",
    "@xsd:noNamespaceSchemaLocation":"https://www.web3d.org/specifications/x3d-4.0.xsd",
    "JSON schema":"https://www.web3d.org/specifications/x3d-4.0-JSONSchema.autogenerated.json",
    "head": {
        "meta": [
          {
            "@name":"title",
            "@content":"Robot.x3d"
          },
          {
            "@name":"description",
            "@content":"X3D encodings example: Robot. Seek or zoom in towards the robot to start a simple animation sequence. This scene demonstrates nested prototype instances"
          },
          {
            "@name":"creator",
            "@content":"Don Brutzman and Joe Williams"
          },
          {
            "@name":"created",
            "@content":"1 June 2002"
          },
          {
            "@name":"modified",
            "@content":"28 September 2025"
          },
          {
            "@name":"specificationSection",
            "@content":"X3D encodings, ISO/IEC 19776-1.3, Part 1: XML encoding, Annex C.15 Robot"
          },
          {
            "@name":"specificationUrl",
            "@content":"https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19776-1v4.0-CD/Part01/examples.html#Robot"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/Robot.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 4.0, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@name":"license",
            "@content":"../license.html"
          },
          {
            "@name":"translated",
            "@content":"28 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":"Robot.x3d"
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"Shuttle",
              "@url":["ShuttlesAndPendulums.x3d#Shuttle","https://www.web3d.org/Specifications/Encodings/ShuttlesAndPendulums.x3d#Shuttle"],
              "field": [
                {
                  "@name":"rate",
                  "@accessType":"initializeOnly",
                  "@type":"SFTime"
                },
                {
                  "@name":"distance",
                  "@accessType":"initializeOnly",
                  "@type":"SFFloat"
                },
                {
                  "@name":"children",
                  "@accessType":"initializeOnly",
                  "@type":"MFNode"
                },
                {
                  "@name":"startTime",
                  "@accessType":"inputOutput",
                  "@type":"SFTime"
                },
                {
                  "@name":"stopTime",
                  "@accessType":"inputOutput",
                  "@type":"SFTime"
                },
                {
                  "@name":"loop",
                  "@accessType":"initializeOnly",
                  "@type":"SFBool"
                }
              ]
            }
          },
          { "ExternProtoDeclare":
            {
              "@name":"Pendulum",
              "@url":["ShuttlesAndPendulums.x3d#Pendulum","https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/ShuttlesAndPendulums.x3d#Pendulum"],
              "field": [
                {
                  "@name":"rate",
                  "@accessType":"initializeOnly",
                  "@type":"SFTime"
                },
                {
                  "@name":"maxAngle",
                  "@accessType":"initializeOnly",
                  "@type":"SFFloat"
                },
                {
                  "@name":"children",
                  "@accessType":"initializeOnly",
                  "@type":"MFNode"
                },
                {
                  "@name":"startTime",
                  "@accessType":"inputOutput",
                  "@type":"SFTime"
                },
                {
                  "@name":"stopTime",
                  "@accessType":"inputOutput",
                  "@type":"SFTime"
                },
                {
                  "@name":"loop",
                  "@accessType":"initializeOnly",
                  "@type":"SFBool"
                }
              ]
            }
          },
          { "NavigationInfo":
            {
              "@speed":20,
              "@type":["WALK","ANY"]
            }
          },
          { "Viewpoint":
            {
              "@description":"Watch Robot Stand",
              "@position":[0,0,150]
            }
          },
          { "Viewpoint":
            {
              "@description":"Watch Robot Walk when close",
              "@position":[0,0,95]
            }
          },
          { "ProximitySensor":
            {
              "@DEF":"Near",
              "@size":[200,200,200]
            }
          },
          { "ProtoInstance":
            {
              "@name":"Shuttle",
              "@DEF":"WALK",
              "fieldValue": [
                {
                  "@name":"stopTime",
                  "@value":1
                },
                {
                  "@name":"rate",
                  "@value":10
                },
                {
                  "@name":"distance",
                  "@value":20
                },
                {
                  "@name":"children",
                  "-children":[
                    { "Transform":
                      {
                        "@rotation":[0,1,0,1.57],
                        "-children":[
                          { "Shape":
                            {
                              "-appearance":
                                { "Appearance":
                                  {
                                    "@DEF":"A",
                                    "-material":
                                      { "Material":
                                        {
                                          "@diffuseColor":[0,0.5,0.7]
                                        }
                                      }
                                  }
                                },
                              "-children":[
                                {
                                  "#comment":"head"
                                }
                              ],
                              "-geometry":
                                { "Box":
                                  {
                                  }
                                }
                            }
                          },
                          { "Transform":
                            {
                              "@scale":[1,5,1],
                              "@translation":[0,-5,0],
                              "-children":[
                                { "Shape":
                                  {
                                    "-appearance":
                                      { "Appearance":
                                        {
                                          "@USE":"A"
                                        }
                                      },
                                    "-children":[
                                      {
                                        "#comment":"body"
                                      }
                                    ],
                                    "-geometry":
                                      { "Sphere":
                                        {
                                        }
                                      }
                                  }
                                }
                              ]
                            }
                          },
                          { "Transform":
                            {
                              "@rotation":[0,1,0,1.57],
                              "@translation":[1.5,0,0],
                              "-children":[
                                { "ProtoInstance":
                                  {
                                    "@name":"Pendulum",
                                    "@DEF":"Arm",
                                    "fieldValue": [
                                      {
                                        "@name":"stopTime",
                                        "@value":1
                                      },
                                      {
                                        "@name":"rate",
                                        "@value":1
                                      },
                                      {
                                        "@name":"maxAngle",
                                        "@value":0.52
                                      },
                                      {
                                        "@name":"children",
                                        "-children":[
                                          { "Transform":
                                            {
                                              "@translation":[0,-3,0],
                                              "-children":[
                                                { "Shape":
                                                  {
                                                    "-appearance":
                                                      { "Appearance":
                                                        {
                                                          "@USE":"A"
                                                        }
                                                      },
                                                    "-geometry":
                                                      { "Cylinder":
                                                        {
                                                          "@height":4,
                                                          "@radius":0.5
                                                        }
                                                      }
                                                  }
                                                }
                                              ]
                                            }
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                }
                              ]
                            }
                          },
                          { "Transform":
                            {
                              "@rotation":[0,-1,0,1.57],
                              "@translation":[-1.5,0,0],
                              "-children":[
                                {
                                  "#comment":"name='Pendulum' no longer required for ProtoInstance USE nodes"
                                },
                                { "ProtoInstance":
                                  {
                                    "@name":"Pendulum",
                                    "@USE":"Arm"
                                  }
                                }
                              ]
                            }
                          }
                        ]
                      }
                    }
                  ]
                }
              ]
            }
          },
          { "ROUTE":
            {
              "@fromField":"enterTime",
              "@fromNode":"Near",
              "@toField":"startTime",
              "@toNode":"WALK"
            }
          },
          { "ROUTE":
            {
              "@fromField":"enterTime",
              "@fromNode":"Near",
              "@toField":"startTime",
              "@toNode":"Arm"
            }
          },
          { "ROUTE":
            {
              "@fromField":"exitTime",
              "@fromNode":"Near",
              "@toField":"stopTime",
              "@toNode":"WALK"
            }
          },
          { "ROUTE":
            {
              "@fromField":"exitTime",
              "@fromNode":"Near",
              "@toField":"stopTime",
              "@toNode":"Arm"
            }
          }
        ]
    }
  }
}