{ "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":"Robots.x3d"
          },
          {
            "@name":"description",
            "@content":"Robot generator prototype to create multiple new nodes. For this example, we create a new \"Robot\" node type that has three fields, one each for setting the l color (robot body), its eye color, and its rod color (gadgets on the body). Those three fields are used within the body of the Prototype where the robot form is constructed. Each time a Prototype field (l, eye, and rod colors) is used within the Prototype body, use the \"IS\" syntax to say: \"this field within the Prototype body IS equal to the argument in the Prototype interface.\""
          },
          {
            "@name":"creator",
            "@content":"David R. Nadeau"
          },
          {
            "@name":"translator",
            "@content":"Don Brutzman"
          },
          {
            "@name":"created",
            "@content":"1 July 1998"
          },
          {
            "@name":"translated",
            "@content":"2 February 2014"
          },
          {
            "@name":"modified",
            "@content":"20 October 2019"
          },
          {
            "@name":"reference",
            "@content":"RoboBill.x3d"
          },
          {
            "@name":"reference",
            "@content":"originals/robot.wrl"
          },
          {
            "@name":"reference",
            "@content":"http://www.siggraph.org/s98"
          },
          {
            "@name":"reference",
            "@content":"http://www.siggraph.org/s98/conference/courses/18.html"
          },
          {
            "@name":"reference",
            "@content":"http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/slides/mt0479.htm"
          },
          {
            "@name":"reference",
            "@content":"http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/vrml97.htm"
          },
          {
            "@name":"reference",
            "@content":"https://www.web3d.org/x3d/content/examples/X3dResources.html"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Robots.x3d"
          },
          {
            "@name":"generator",
            "@content":"Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@name":"license",
            "@content":"../license.html"
          },
          {
            "@name":"translated",
            "@content":"17 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":
            {
              "@info":["Copyright (c) 1998, David R. Nadeau"],
              "@title":"Robot Generator"
            }
          },
          { "Viewpoint":
            {
              "@description":"Entry view",
              "@orientation":[1.0,0.0,0.0,-0.34],
              "@position":[0.0,3.6,6.8]
            }
          },
          { "NavigationInfo":
            {
            }
          },
          { "Background":
            {
              "@skyAngle":[1.77,1.87,1.97],
              "@skyColor":[0.0,0.0,0.0,0.0,0.0,0.0,0.4,0.0,0.0,0.6,0.0,0.0]
            }
          },
          { "ProtoDeclare":
            {
              "@name":"Robot",
              "ProtoInterface": {
                  "field": [
                    {
                      "@name":"rodColor",
                      "@accessType":"initializeOnly",
                      "@type":"SFColor",
                      "@value":[1.0,1.0,0.0]
                    },
                    {
                      "@name":"eyeColor",
                      "@accessType":"initializeOnly",
                      "@type":"SFColor",
                      "@value":[0.6,0.0,0.0]
                    },
                    {
                      "@name":"lColor",
                      "@accessType":"initializeOnly",
                      "@type":"SFColor",
                      "@value":[0.6,0.6,0.8]
                    }
                  ]
              },
              "ProtoBody": {
                  "-children":[
                    { "Group":
                      {
                        "-children":[
                          { "Shape":
                            {
                              "-appearance":
                                { "Appearance":
                                  {
                                    "@DEF":"RobotColor",
                                    "-material":
                                      { "Material":
                                        {
                                          "IS": {
                                              "connect": [
                                                {
                                                  "@nodeField":"diffuseColor",
                                                  "@protoField":"lColor"
                                                }
                                              ]
                                          }
                                        }
                                      }
                                  }
                                },
                              "-geometry":
                                { "Sphere":
                                  {
                                    "@radius":0.5
                                  }
                                }
                            }
                          },
                          { "Transform":
                            {
                              "@DEF":"Rod",
                              "@rotation":[0.0,0.0,1.0,-0.785],
                              "@translation":[0.4,0.6,0.0],
                              "-children":[
                                { "Shape":
                                  {
                                    "-appearance":
                                      { "Appearance":
                                        {
                                          "@DEF":"RobotGlow",
                                          "-material":
                                            { "Material":
                                              {
                                                "@diffuseColor":[0.0,0.0,0.0],
                                                "IS": {
                                                    "connect": [
                                                      {
                                                        "@nodeField":"emissiveColor",
                                                        "@protoField":"rodColor"
                                                      }
                                                    ]
                                                }
                                              }
                                            }
                                        }
                                      },
                                    "-geometry":
                                      { "Cylinder":
                                        {
                                          "@height":0.65,
                                          "@radius":0.04
                                        }
                                      }
                                  }
                                }
                              ]
                            }
                          },
                          { "Transform":
                            {
                              "@rotation":[0.0,1.0,0.0,1.57],
                              "-children":[
                                { "Transform":
                                  {
                                    "@USE":"Rod"
                                  }
                                }
                              ]
                            }
                          },
                          { "Transform":
                            {
                              "@rotation":[0.0,1.0,0.0,3.14],
                              "-children":[
                                { "Transform":
                                  {
                                    "@USE":"Rod"
                                  }
                                }
                              ]
                            }
                          },
                          { "Transform":
                            {
                              "@rotation":[0.0,1.0,0.0,-1.57],
                              "-children":[
                                { "Transform":
                                  {
                                    "@USE":"Rod"
                                  }
                                }
                              ]
                            }
                          },
                          { "Transform":
                            {
                              "@translation":[0.0,0.85,0.0],
                              "-children":[
                                { "Shape":
                                  {
                                    "-appearance":
                                      { "Appearance":
                                        {
                                          "@USE":"RobotColor"
                                        }
                                      },
                                    "-geometry":
                                      { "Cylinder":
                                        {
                                          "@height":0.1,
                                          "@radius":0.8
                                        }
                                      }
                                  }
                                }
                              ]
                            }
                          },
                          { "Transform":
                            {
                              "@translation":[0.0,0.95,0.0],
                              "-children":[
                                { "Shape":
                                  {
                                    "-appearance":
                                      { "Appearance":
                                        {
                                          "@USE":"RobotColor"
                                        }
                                      },
                                    "-geometry":
                                      { "Cylinder":
                                        {
                                          "@height":0.1,
                                          "@radius":0.2
                                        }
                                      }
                                  }
                                }
                              ]
                            }
                          },
                          { "Billboard":
                            {
                              "-children":[
                                { "Transform":
                                  {
                                    "@translation":[0.0,1.4,0.0],
                                    "-children":[
                                      { "Shape":
                                        {
                                          "-appearance":
                                            { "Appearance":
                                              {
                                                "@USE":"RobotColor"
                                              }
                                            },
                                          "-geometry":
                                            { "Sphere":
                                              {
                                                "@radius":0.5
                                              }
                                            }
                                        }
                                      },
                                      { "Transform":
                                        {
                                          "@translation":[0.0,0.25,0.35],
                                          "-children":[
                                            { "Shape":
                                              {
                                                "-appearance":
                                                  { "Appearance":
                                                    {
                                                      "-material":
                                                        { "Material":
                                                          {
                                                            "@diffuseColor":[0.2,0.2,0.2]
                                                          }
                                                        }
                                                    }
                                                  },
                                                "-geometry":
                                                  { "Box":
                                                    {
                                                      "@size":[0.6,0.05,0.2]
                                                    }
                                                  }
                                              }
                                            }
                                          ]
                                        }
                                      },
                                      { "Transform":
                                        {
                                          "@translation":[0.1,0.15,0.38],
                                          "-children":[
                                            { "Shape":
                                              {
                                                "@DEF":"Eye",
                                                "-appearance":
                                                  { "Appearance":
                                                    {
                                                      "-material":
                                                        { "Material":
                                                          {
                                                            "@diffuseColor":[0.0,0.0,0.0],
                                                            "IS": {
                                                                "connect": [
                                                                  {
                                                                    "@nodeField":"emissiveColor",
                                                                    "@protoField":"eyeColor"
                                                                  }
                                                                ]
                                                            }
                                                          }
                                                        }
                                                    }
                                                  },
                                                "-geometry":
                                                  { "Sphere":
                                                    {
                                                      "@radius":0.09
                                                    }
                                                  }
                                              }
                                            }
                                          ]
                                        }
                                      },
                                      { "Transform":
                                        {
                                          "@translation":[-0.1,0.15,0.38],
                                          "-children":[
                                            { "Shape":
                                              {
                                                "@USE":"Eye"
                                              }
                                            }
                                          ]
                                        }
                                      },
                                      { "Transform":
                                        {
                                          "@translation":[0.85,0.1,0.0],
                                          "-children":[
                                            { "Transform":
                                              {
                                                "@rotation":[0.0,0.0,1.0,1.57],
                                                "@translation":[-0.2,0.0,0.0],
                                                "-children":[
                                                  { "Shape":
                                                    {
                                                      "@DEF":"AntenaeBar",
                                                      "-appearance":
                                                        { "Appearance":
                                                          {
                                                            "@USE":"RobotColor"
                                                          }
                                                        },
                                                      "-geometry":
                                                        { "Cylinder":
                                                          {
                                                            "@height":0.4,
                                                            "@radius":0.04
                                                          }
                                                        }
                                                    }
                                                  }
                                                ]
                                              }
                                            },
                                            { "Shape":
                                              {
                                                "-appearance":
                                                  { "Appearance":
                                                    {
                                                      "@USE":"RobotColor"
                                                    }
                                                  },
                                                "-geometry":
                                                  { "Sphere":
                                                    {
                                                      "@radius":0.09
                                                    }
                                                  }
                                              }
                                            },
                                            { "Transform":
                                              {
                                                "@translation":[0.0,0.58,0.0],
                                                "-children":[
                                                  { "Shape":
                                                    {
                                                      "-appearance":
                                                        { "Appearance":
                                                          {
                                                            "@USE":"RobotGlow"
                                                          }
                                                        },
                                                      "-geometry":
                                                        { "Cone":
                                                          {
                                                            "@bottomRadius":0.02,
                                                            "@height":1.0
                                                          }
                                                        }
                                                    }
                                                  }
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      },
                                      { "Transform":
                                        {
                                          "@translation":[-0.85,0.1,0.0],
                                          "-children":[
                                            { "Transform":
                                              {
                                                "@rotation":[0.0,0.0,1.0,-1.57],
                                                "@translation":[0.2,0.0,0.0],
                                                "-children":[
                                                  { "Shape":
                                                    {
                                                      "@USE":"AntenaeBar"
                                                    }
                                                  }
                                                ]
                                              }
                                            },
                                            { "Transform":
                                              {
                                                "@rotation":[0.0,0.0,1.0,0.785],
                                                "-children":[
                                                  { "Shape":
                                                    {
                                                      "-appearance":
                                                        { "Appearance":
                                                          {
                                                            "@USE":"RobotColor"
                                                          }
                                                        },
                                                      "-geometry":
                                                        { "Box":
                                                          {
                                                            "@size":[0.2,0.2,0.2]
                                                          }
                                                        }
                                                    }
                                                  },
                                                  { "Transform":
                                                    {
                                                      "@translation":[0.0,0.58,0.0],
                                                      "-children":[
                                                        { "Shape":
                                                          {
                                                            "-appearance":
                                                              { "Appearance":
                                                                {
                                                                  "@USE":"RobotGlow"
                                                                }
                                                              },
                                                            "-geometry":
                                                              { "Box":
                                                                {
                                                                  "@size":[0.02,1.0,0.02]
                                                                }
                                                              }
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  { "Transform":
                                                    {
                                                      "@translation":[0.0,0.95,0.0],
                                                      "-children":[
                                                        { "Shape":
                                                          {
                                                            "-appearance":
                                                              { "Appearance":
                                                                {
                                                                  "@USE":"RobotGlow"
                                                                }
                                                              },
                                                            "-geometry":
                                                              { "Box":
                                                                {
                                                                  "@size":[0.2,0.02,0.02]
                                                                }
                                                              }
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  },
                                                  { "Transform":
                                                    {
                                                      "@translation":[0.0,0.85,0.0],
                                                      "-children":[
                                                        { "Shape":
                                                          {
                                                            "-appearance":
                                                              { "Appearance":
                                                                {
                                                                  "@USE":"RobotGlow"
                                                                }
                                                              },
                                                            "-geometry":
                                                              { "Box":
                                                                {
                                                                  "@size":[0.4,0.02,0.02]
                                                                }
                                                              }
                                                          }
                                                        }
                                                      ]
                                                    }
                                                  }
                                                ]
                                              }
                                            }
                                          ]
                                        }
                                      }
                                    ]
                                  }
                                }
                              ]
                            }
                          }
                        ]
                      }
                    }
                  ]
              }
            }
          },
          { "ProtoInstance":
            {
              "@name":"Robot",
              "fieldValue": [
                {
                  "@name":"eyeColor",
                  "@value":[1.0,0.0,0.0]
                },
                {
                  "@name":"rodColor",
                  "@value":[1.0,1.0,0.0]
                },
                {
                  "@name":"lColor",
                  "@value":[0.6,0.6,0.8]
                }
              ]
            }
          },
          { "Transform":
            {
              "@translation":[-2.0,0.0,0.0],
              "-children":[
                { "ProtoInstance":
                  {
                    "@name":"Robot",
                    "fieldValue": [
                      {
                        "@name":"eyeColor",
                        "@value":[0.0,1.0,0.0]
                      },
                      {
                        "@name":"rodColor",
                        "@value":[1.0,0.5,0.0]
                      },
                      {
                        "@name":"lColor",
                        "@value":[0.6,0.5,0.3]
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@translation":[2.0,0.0,0.0],
              "-children":[
                { "ProtoInstance":
                  {
                    "@name":"Robot",
                    "fieldValue": [
                      {
                        "@name":"eyeColor",
                        "@value":[0.0,0.8,1.0]
                      },
                      {
                        "@name":"rodColor",
                        "@value":[0.0,0.8,1.0]
                      },
                      {
                        "@name":"lColor",
                        "@value":[0.6,0.3,0.8]
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@translation":[4.5,0.0,-3.0],
              "-children":[
                { "ProtoInstance":
                  {
                    "@name":"Robot",
                    "fieldValue": [
                      {
                        "@name":"eyeColor",
                        "@value":[0.0,0.0,0.0]
                      },
                      {
                        "@name":"rodColor",
                        "@value":[1.0,0.0,0.5]
                      },
                      {
                        "@name":"lColor",
                        "@value":[0.0,0.4,0.9]
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@translation":[1.5,0.0,-3.0],
              "-children":[
                { "ProtoInstance":
                  {
                    "@name":"Robot",
                    "fieldValue": [
                      {
                        "@name":"eyeColor",
                        "@value":[0.0,1.0,0.0]
                      },
                      {
                        "@name":"rodColor",
                        "@value":[1.0,1.0,0.0]
                      },
                      {
                        "@name":"lColor",
                        "@value":[0.6,0.6,0.5]
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@translation":[-1.5,0.0,-3.0],
              "-children":[
                { "ProtoInstance":
                  {
                    "@name":"Robot",
                    "fieldValue": [
                      {
                        "@name":"eyeColor",
                        "@value":[1.0,1.0,0.0]
                      },
                      {
                        "@name":"rodColor",
                        "@value":[1.0,0.0,1.0]
                      },
                      {
                        "@name":"lColor",
                        "@value":[1.0,0.5,0.5]
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@translation":[-4.5,0.0,-3.0],
              "-children":[
                { "ProtoInstance":
                  {
                    "@name":"Robot",
                    "fieldValue": [
                      {
                        "@name":"eyeColor",
                        "@value":[1.0,0.0,0.0]
                      },
                      {
                        "@name":"rodColor",
                        "@value":[0.5,0.0,1.0]
                      },
                      {
                        "@name":"lColor",
                        "@value":[0.0,0.5,1.0]
                      }
                    ]
                  }
                }
              ]
            }
          }
        ]
    }
  }
}