{ "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":"Chair.x3d"
          },
          {
            "@name":"description",
            "@content":"A chair for a room, modeled as a Prototype for reuse."
          },
          {
            "@name":"creator",
            "@content":"Frederic Roussille"
          },
          {
            "@name":"contributor",
            "@content":"Don Brutzman"
          },
          {
            "@name":"created",
            "@content":"1 April 2001"
          },
          {
            "@name":"modified",
            "@content":"20 October 2019"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/Chair.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":"Chair.x3d"
            }
          },
          { "Viewpoint":
            {
              "@description":"Chair example ProtoInstance",
              "@position":[0,0,4]
            }
          },
          { "ProtoDeclare":
            {
              "@name":"Chair",
              "ProtoInterface": {
                  "field": [
                    {
                      "@name":"diffuseColor",
                      "@accessType":"inputOutput",
                      "@type":"SFColor",
                      "@value":[0.7,0.7,0.4]
                    }
                  ]
              },
              "ProtoBody": {
                  "-children":[
                    { "Transform":
                      {
                        "@scale":[0.15,0.15,0.15],
                        "@translation":[0,0.52,0],
                        "-children":[
                          { "Transform":
                            {
                              "@DEF":"seat",
                              "-children":[
                                { "Transform":
                                  {
                                    "@rotation":[1,0,0,1.57],
                                    "-children":[
                                      {
                                        "#comment":"seat"
                                      },
                                      { "Shape":
                                        {
                                          "-appearance":
                                            { "Appearance":
                                              {
                                                "@DEF":"chair_color",
                                                "-material":
                                                  { "Material":
                                                    {
                                                      "@DEF":"color",
                                                      "IS": {
                                                          "connect": [
                                                            {
                                                              "@nodeField":"diffuseColor",
                                                              "@protoField":"diffuseColor"
                                                            }
                                                          ]
                                                      }
                                                    }
                                                  }
                                              }
                                            },
                                          "-geometry":
                                            { "Extrusion":
                                              {
                                                "@DEF":"ExtrusionSeatCushion",
                                                "@ccw":false,
                                                "@creaseAngle":1.57,
                                                "@crossSection":[-2,0,2,0,2.3,0.3,2.4,0.4,2.5,0.5,2.5,1,-2,1,-2,0],
                                                "@scale":[0.5,1],
                                                "@solid":false,
                                                "@spine":[1,0,0,0.92,-0.38,0,0.71,-0.71,0,0.38,-0.92,0,0,-1,0,-0.38,-0.92,0,-0.71,-0.71,0,-0.92,-0.38,0,-1,0,0,-0.92,0.38,0,-0.71,0.71,0,-0.38,0.92,0,0,1,0,0.38,0.92,0,0.71,0.71,0,0.92,0.38,0,1,0,0]
                                              }
                                            }
                                        }
                                      }
                                    ]
                                  }
                                },
                                { "Transform":
                                  {
                                    "@translation":[0,1,1],
                                    "-children":[
                                      {
                                        "#comment":"back"
                                      },
                                      { "Shape":
                                        {
                                          "-appearance":
                                            { "Appearance":
                                              {
                                                "@USE":"chair_color"
                                              }
                                            },
                                          "-geometry":
                                            { "Extrusion":
                                              {
                                                "@DEF":"ExtrusionSeatBack",
                                                "@convex":false,
                                                "@creaseAngle":1.57,
                                                "@crossSection":[1,0,0.8,0,0.736,0.304,0.568,0.568,0.304,0.736,0,0.8,-0.304,0.736,-0.568,0.568,-0.736,0.304,-0.8,0,-1,0,-0.92,0.38,-0.71,0.71,-0.38,0.92,0,1,0.38,0.92,0.71,0.71,0.92,0.38,1,0,0.8,0],
                                                "@scale":[1.4,1,2,1],
                                                "@solid":false,
                                                "@spine":[0,0,0,0,4,0]
                                              }
                                            }
                                        }
                                      }
                                    ]
                                  }
                                },
                                { "CylinderSensor":
                                  {
                                    "@DEF":"SeatRotationCylinderSensor",
                                    "@description":"Swivel chair"
                                  }
                                }
                              ]
                            }
                          },
                          { "Transform":
                            {
                              "@rotation":[1,0,0,-1.57],
                              "-children":[
                                {
                                  "#comment":"foot"
                                },
                                { "Shape":
                                  {
                                    "-appearance":
                                      { "Appearance":
                                        {
                                          "@USE":"chair_color"
                                        }
                                      },
                                    "-geometry":
                                      { "Extrusion":
                                        {
                                          "@DEF":"ExtrusionSeatBase",
                                          "@beginCap":false,
                                          "@convex":false,
                                          "@creaseAngle":1.57,
                                          "@crossSection":[0,0,0.2,0,0.23,2,0.28,3,1,3.3,1.5,3.5,0,3.5,0,0],
                                          "@endCap":false,
                                          "@solid":false,
                                          "@spine":[0.1,0,0,0.092,-0.038,0,0.071,-0.071,0,0.038,-0.092,0,0,-0.1,0,-0.038,-0.092,0,-0.071,-0.071,0,-0.092,-0.038,0,-0.1,0,0,-0.092,0.038,0,-0.071,0.071,0,-0.038,0.092,0,0,0.1,0,0.038,0.092,0,0.071,0.071,0,0.092,0.038,0,0.1,0,0]
                                        }
                                      }
                                  }
                                }
                              ]
                            }
                          }
                        ]
                      }
                    },
                    { "ROUTE":
                      {
                        "@fromField":"rotation_changed",
                        "@fromNode":"SeatRotationCylinderSensor",
                        "@toField":"set_rotation",
                        "@toNode":"seat"
                      }
                    }
                  ]
              }
            }
          },
          { "ProtoInstance":
            {
              "@name":"Chair",
              "@DEF":"chaise"
            }
          }
        ]
    }
  }
}