{ "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":"SpinGroupInternalSubsetDeclaration.x3d"
          },
          {
            "@name":"creator",
            "@content":"Don Brutzman"
          },
          {
            "@name":"created",
            "@content":"18 September 2000"
          },
          {
            "@name":"modified",
            "@content":"20 October 2019"
          },
          {
            "@name":"description",
            "@content":"SpinGroup PROTO example content to test DTD modularization and extensibility - view XML source to see DTD internal-subset declarations."
          },
          {
            "@name":"error",
            "@content":"Test to demonstrate DOCTYPE extensibility, this X3D scene not valid and does not render."
          },
          {
            "@name":"warning",
            "@content":"You must view full source of the DTD declarations (SpinGroupInternalSubsetDeclaration.x3d.txt) to fully understand validation techniques in this file."
          },
          {
            "@name":"reference",
            "@content":"SpinGroupInternalSubsetDeclaration.x3d.txt"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/development/SpinGroupInternalSubsetDeclaration.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.1, https://www.web3d.org/x3d/content/README.X3D-Edit.html"
          },
          {
            "@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":[
          {
            "#comment":"Declaring the SpinGroupTag PROTO, so that translations of internally defined SpinGroupTag to VRML can work:"
          },
          { "ProtoDeclare":
            {
              "@name":"SpinGroupTag",
              "ProtoInterface": {
                  "field": [
                    {
                      "@name":"translation",
                      "@accessType":"inputOutput",
                      "@type":"SFVec3f",
                      "@value":[0,0,0]
                    },
                    {
                      "@name":"rotation",
                      "@accessType":"inputOutput",
                      "@type":"SFRotation",
                      "@value":[0,0,1,0]
                    },
                    {
                      "@name":"center",
                      "@accessType":"inputOutput",
                      "@type":"SFVec3f",
                      "@value":[0,0,0]
                    },
                    {
                      "@name":"cycleInterval",
                      "@accessType":"inputOutput",
                      "@type":"SFTime",
                      "@value":1
                    },
                    {
                      "@name":"children",
                      "@accessType":"inputOutput",
                      "@type":"MFNode",
                      "-children":[
                        { "WorldInfo":
                          {
                            "@info":["overridden at run time"]
                          }
                        }
                      ]
                    }
                  ]
              },
              "ProtoBody": {
                  "-children":[
                    {
                      "#comment":"SpinGroupTransform is first node, which determines node type, and encloses children for instances."
                    },
                    { "Transform":
                      {
                        "@DEF":"SpinGroupTransform-TagVersion",
                        "@rotation":[1,0,0,0],
                        "IS": {
                            "connect": [
                              {
                                "@nodeField":"translation",
                                "@protoField":"translation"
                              },
                              {
                                "@nodeField":"rotation",
                                "@protoField":"rotation"
                              },
                              {
                                "@nodeField":"center",
                                "@protoField":"center"
                              },
                              {
                                "@nodeField":"children",
                                "@protoField":"children"
                              }
                            ]
                        },
                        "-children":[
                          { "OrientationInterpolator":
                            {
                              "@DEF":"SpinGroupOrientationInterpolator-TagVersion",
                              "@key":[0.0,0.50,1.0],
                              "@keyValue":[0,1,0,0.0,0,1,0,-3.14159,0,1,0,-6.28318]
                            }
                          },
                          { "TimeSensor":
                            {
                              "@DEF":"SpinGroupTimeSensor-TagVersion",
                              "@loop":true,
                              "IS": {
                                  "connect": [
                                    {
                                      "@nodeField":"cycleInterval",
                                      "@protoField":"cycleInterval"
                                    }
                                  ]
                              }
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fraction_changed",
                              "@fromNode":"SpinGroupTimeSensor-TagVersion",
                              "@toField":"set_fraction",
                              "@toNode":"SpinGroupOrientationInterpolator-TagVersion"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"value_changed",
                              "@fromNode":"SpinGroupOrientationInterpolator-TagVersion",
                              "@toField":"set_rotation",
                              "@toNode":"SpinGroupTransform-TagVersion"
                            }
                          }
                        ]
                      }
                    }
                  ]
              }
            }
          },
          { "ProtoDeclare":
            {
              "@name":"SpinGroup",
              "ProtoInterface": {
                  "field": [
                    {
                      "@name":"translation",
                      "@accessType":"inputOutput",
                      "@type":"SFVec3f",
                      "@value":[0,0,0]
                    },
                    {
                      "@name":"rotation",
                      "@accessType":"inputOutput",
                      "@type":"SFRotation",
                      "@value":[0,0,1,0]
                    },
                    {
                      "@name":"center",
                      "@accessType":"inputOutput",
                      "@type":"SFVec3f",
                      "@value":[0,0,0]
                    },
                    {
                      "@name":"cycleInterval",
                      "@accessType":"inputOutput",
                      "@type":"SFTime",
                      "@value":1
                    },
                    {
                      "@name":"children",
                      "@accessType":"inputOutput",
                      "@type":"MFNode",
                      "-children":[
                        { "WorldInfo":
                          {
                            "@info":["overridden at run time"]
                          }
                        }
                      ]
                    }
                  ]
              },
              "ProtoBody": {
                  "-children":[
                    {
                      "#comment":"SpinGroupTransform is first node, which determines node type, and encloses children for instances."
                    },
                    { "Transform":
                      {
                        "@DEF":"SpinGroupTransform",
                        "IS": {
                            "connect": [
                              {
                                "@nodeField":"translation",
                                "@protoField":"translation"
                              },
                              {
                                "@nodeField":"rotation",
                                "@protoField":"rotation"
                              },
                              {
                                "@nodeField":"center",
                                "@protoField":"center"
                              },
                              {
                                "@nodeField":"children",
                                "@protoField":"children"
                              }
                            ]
                        },
                        "-children":[
                          { "OrientationInterpolator":
                            {
                              "@DEF":"SpinGroupOrientationInterpolator",
                              "@key":[0.0,0.50,1.0],
                              "@keyValue":[0,1,0,0.0,0,1,0,-3.14159,0,1,0,-6.28318]
                            }
                          },
                          { "TimeSensor":
                            {
                              "@DEF":"SpinGroupTimeSensor",
                              "@loop":true,
                              "IS": {
                                  "connect": [
                                    {
                                      "@nodeField":"cycleInterval",
                                      "@protoField":"cycleInterval"
                                    }
                                  ]
                              }
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"fraction_changed",
                              "@fromNode":"SpinGroupTimeSensor",
                              "@toField":"set_fraction",
                              "@toNode":"SpinGroupOrientationInterpolator"
                            }
                          },
                          { "ROUTE":
                            {
                              "@fromField":"value_changed",
                              "@fromNode":"SpinGroupOrientationInterpolator",
                              "@toField":"set_rotation",
                              "@toNode":"SpinGroupTransform"
                            }
                          }
                        ]
                      }
                    }
                  ]
              }
            }
          },
          { "Viewpoint":
            {
              "@description":"SpinGroup Examples",
              "@position":[0,0,15]
            }
          },
          { "NavigationInfo":
            {
              "@type":["EXAMINE"]
            }
          },
          {
            "#comment":"Instantiating the SpinGroupTag using a customized tag:"
          },
          {
            "#comment":"Instantiating the SpinGroup PROTO using a ProtoInstance tag:"
          },
          { "ProtoInstance":
            {
              "@name":"SpinGroup",
              "@DEF":"instanceTwo",
              "fieldValue": [
                {
                  "@name":"translation",
                  "@value":[0,1,0]
                },
                {
                  "@name":"cycleInterval",
                  "@value":12
                },
                {
                  "@name":"children",
                  "-children":[
                    { "Shape":
                      {
                        "-geometry":
                          { "Text":
                            {
                              "@string":["SpinGroup ProtoInstance example 2 single child"],
                              "-fontStyle":
                                { "FontStyle":
                                  {
                                    "@USE":"CENTER_FONT"
                                  }
                                }
                            }
                          }
                      }
                    }
                  ]
                }
              ]
            }
          },
          {
            "#comment":"Instantiating the SpinGroup PROTO with multiple Node children:"
          },
          { "ProtoInstance":
            {
              "@name":"SpinGroup",
              "@DEF":"instanceThree",
              "fieldValue": [
                {
                  "@name":"translation",
                  "@value":[0,-2,0]
                },
                {
                  "@name":"cycleInterval",
                  "@value":20
                },
                {
                  "@name":"children",
                  "-children":[
                    { "Shape":
                      {
                        "-appearance":
                          { "Appearance":
                            {
                              "@USE":"AQUAMARINE"
                            }
                          },
                        "-geometry":
                          { "Text":
                            {
                              "@string":["SpinGroup ProtoInstance","example 3 first child"],
                              "-fontStyle":
                                { "FontStyle":
                                  {
                                    "@USE":"CENTER_FONT"
                                  }
                                }
                            }
                          }
                      }
                    },
                    { "Transform":
                      {
                        "@translation":[0,-2,0],
                        "-children":[
                          { "Shape":
                            {
                              "-geometry":
                                { "Text":
                                  {
                                    "@string":["example 3 second child"],
                                    "-fontStyle":
                                      { "FontStyle":
                                        {
                                          "@USE":"CENTER_FONT"
                                        }
                                      }
                                  }
                                }
                            }
                          }
                        ]
                      }
                    }
                  ]
                }
              ]
            }
          }
        ]
    }
  }
}