{ "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":"AnimatedGrid.x3d"
          },
          {
            "@name":"description",
            "@content":"Animated grid world illustrates the use of a script to change the whichChoice field of a Switch node. When animated, this enables switching among different pieces of geometry, such as the separate ElevationGrid scenes shown in this example."
          },
          {
            "@name":"creator",
            "@content":"John L. Moreland"
          },
          {
            "@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":"originals/animgrid.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/mt0495.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/AnimatedGrid.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":"01 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":
            {
              "@info":["Copyright (c) 1998, John L. Moreland"],
              "@title":"Animated grid"
            }
          },
          { "Viewpoint":
            {
              "@description":"Entry view",
              "@orientation":[1.0,0.0,0.0,-0.83],
              "@position":[0.0,12.0,12.0]
            }
          },
          { "NavigationInfo":
            {
              "@headlight":false,
              "@type":["EXAMINE"]
            }
          },
          { "DirectionalLight":
            {
              "@direction":[1.0,-1.0,-1.0]
            }
          },
          { "DirectionalLight":
            {
              "@direction":[-1.0,1.0,1.0]
            }
          },
          { "Switch":
            {
              "@DEF":"Grids",
              "@whichChoice":0,
              "-children":[
                { "Inline":
                  {
                    "@bboxSize":[14.0,5.0,14.0],
                    "@url":["Terrain00.x3d","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Terrain00.x3d","Terrain00.wrl","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Terrain00.wrl"]
                  }
                },
                { "Inline":
                  {
                    "@bboxSize":[14.0,5.0,14.0],
                    "@url":["Terrain01.x3d","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Terrain01.x3d","Terrain01.wrl","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Terrain01.wrl"]
                  }
                },
                { "Inline":
                  {
                    "@bboxSize":[14.0,5.0,14.0],
                    "@url":["Terrain02.x3d","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Terrain02.x3d","Terrain02.wrl","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Terrain02.wrl"]
                  }
                },
                { "Inline":
                  {
                    "@bboxSize":[14.0,5.0,14.0],
                    "@url":["Terrain03.x3d","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Terrain03.x3d","Terrain03.wrl","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Terrain03.wrl"]
                  }
                },
                { "Inline":
                  {
                    "@bboxSize":[14.0,5.0,14.0],
                    "@url":["Terrain04.x3d","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Terrain04.x3d","Terrain04.wrl","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Terrain04.wrl"]
                  }
                },
                { "Inline":
                  {
                    "@bboxSize":[14.0,5.0,14.0],
                    "@url":["Terrain05.x3d","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Terrain05.x3d","Terrain05.wrl","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Terrain05.wrl"]
                  }
                },
                { "Inline":
                  {
                    "@bboxSize":[14.0,5.0,14.0],
                    "@url":["Terrain06.x3d","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Terrain06.x3d","Terrain06.wrl","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Terrain06.wrl"]
                  }
                },
                { "Inline":
                  {
                    "@bboxSize":[14.0,5.0,14.0],
                    "@url":["Terrain07.x3d","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Terrain07.x3d","Terrain07.wrl","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Terrain07.wrl"]
                  }
                },
                { "Inline":
                  {
                    "@bboxSize":[14.0,5.0,14.0],
                    "@url":["Terrain08.x3d","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Terrain08.x3d","Terrain08.wrl","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Terrain08.wrl"]
                  }
                },
                { "Inline":
                  {
                    "@bboxSize":[14.0,5.0,14.0],
                    "@url":["Terrain09.x3d","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Terrain09.x3d","Terrain09.wrl","https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Terrain09.wrl"]
                  }
                }
              ]
            }
          },
          { "TimeSensor":
            {
              "@DEF":"Clock",
              "@cycleInterval":2.0,
              "@loop":true,
              "@startTime":1.0
            }
          },
          { "Script":
            {
              "@DEF":"Switcher",
              "field": [
                {
                  "@name":"choice_changed",
                  "@accessType":"outputOnly",
                  "@type":"SFInt32"
                },
                {
                  "@name":"numberOfChoices",
                  "@accessType":"initializeOnly",
                  "@type":"SFInt32",
                  "@value":10
                },
                {
                  "@name":"set_fraction",
                  "@accessType":"inputOnly",
                  "@type":"SFFloat"
                }
              ],
              "#sourceCode":[
"",
"",
"ecmascript:",
"    function set_fraction( frac, stamp ) {",
"            choice_changed = frac * numberOfChoices;",
"    }",
"",
""
]
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"Clock",
              "@toField":"set_fraction",
              "@toNode":"Switcher"
            }
          },
          { "ROUTE":
            {
              "@fromField":"choice_changed",
              "@fromNode":"Switcher",
              "@toField":"set_whichChoice",
              "@toNode":"Grids"
            }
          }
        ]
    }
  }
}