{ "X3D": {
    "encoding":"UTF-8",
    "@profile":"Interactive",
    "@version":"3.0",
    "@xsd:noNamespaceSchemaLocation":"http://www.web3d.org/specifications/x3d-3.0.xsd",
    "JSON schema":"http://www.web3d.org/specifications/x3d-3.3-JSONSchema.json",
    "head": {
        "meta": [
          {
            "@name":"title",
            "@content":"Figure20.10BlinkingRedLightbulb.x3d"
          },
          {
            "@name":"description",
            "@content":"A blinking lightbulb showing multiple lighting effects."
          },
          {
            "@name":"creator",
            "@content":"Figure 20.10, The VRML 2.0 Sourcebook, Copyright [1997] By Andrea L. Ames, David R. Nadeau, and John L. Moreland"
          },
          {
            "@name":"reference",
            "@content":"http://www.wiley.com/legacy/compbooks/vrml2sbk/ch20/20fig10.htm"
          },
          {
            "@name":"translator",
            "@content":"Don Brutzman"
          },
          {
            "@name":"created",
            "@content":"8 September 2000"
          },
          {
            "@name":"modified",
            "@content":"13 October 2015"
          },
          {
            "@name":"warning",
            "@content":"Xj3D run-time exception"
          },
          {
            "@name":"identifier",
            "@content":"http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter20-Lighting/Figure20.10BlinkingRedLightbulb.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit"
          },
          {
            "@name":"license",
            "@content":"../../license.html"
          },
          {
            "@name":"translated",
            "@content":"19 March 2017"
          },
          {
            "@name":"generator",
            "@content":"X3dToJson.xslt, http://www.web3d.org/x3d/stylesheets/X3dToJson.html"
          },
          {
            "@name":"warning",
            "@content":"An experimental version of X3D JSON encoding is used for this scene.  Status online at http://www.web3d.org/wiki/index.php/X3D_JSON_Encoding"
          }
        ]
    },
    "Scene": {
        "-children":[
          { "Viewpoint":
            {
              "@description":"Blinking red light bulb",
              "@orientation":[1,0,0,1.1],
              "@position":[0,2,0.25]
            }
          },
          {
            "#comment":"It is almost always a good idea to turn off headlight to avoid washing out other lighting effects in a scene"
          },
          { "NavigationInfo":
            {
              "@headlight":false
            }
          },
          {
            "#comment":"Ceiling height"
          },
          { "Transform":
            {
              "@translation":[0,3,0],
              "-children":[
                { "Transform":
                  {
                    "@translation":[0,-0.05,0],
                    "-children":[
                      { "DirectionalLight":
                        {
                          "@DEF":"CeilingDirectionalLight",
                          "@ambientIntensity":1,
                          "@direction":[0,1,0],
                          "@intensity":0.15
                        }
                      },
                      { "PointLight":
                        {
                          "@DEF":"BulbLight",
                          "@color":[1,0,0],
                          "@intensity":0.5,
                          "@radius":16
                        }
                      },
                      { "Shape":
                        {
                          "-geometry":
                            { "Sphere":
                              {
                                "@DEF":"Bulb",
                                "@radius":0.04
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@DEF":"BulbMaterial",
                                      "@diffuseColor":[0,0,0],
                                      "@emissiveColor":[1,0.3,0.3]
                                    }
                                  }
                              }
                            }
                        }
                      },
                      { "Transform":
                        {
                          "@translation":[-0.25,0.05,-0.25],
                          "-children":[
                            { "Shape":
                              {
                                "-geometry":
                                  { "ElevationGrid":
                                    {
                                      "@height":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
                                      "@solid":false,
                                      "@xDimension":11,
                                      "@xSpacing":0.05,
                                      "@zDimension":11,
                                      "@zSpacing":0.05
                                    }
                                  },
                                "-appearance":
                                  { "Appearance":
                                    {
                                      "-material":
                                        { "Material":
                                          {
                                            "@diffuseColor":[1,1,1]
                                          }
                                        }
                                    }
                                  }
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          {
            "#comment":"Animation brightness and colors"
          },
          { "TimeSensor":
            {
              "@DEF":"Clock",
              "@cycleInterval":4,
              "@loop":true
            }
          },
          { "ScalarInterpolator":
            {
              "@DEF":"BulbIntensity",
              "@key":[0,0.5,0.5,1],
              "@keyValue":[0.8,0.8,0,0]
            }
          },
          { "ColorInterpolator":
            {
              "@DEF":"BulbDiffuse",
              "@key":[0,0.5,0.5,1],
              "@keyValue":[0.3,0.3,0.3,0.3,0.3,0.3,1,0.3,0.3,1,0.3,0.3]
            }
          },
          { "ColorInterpolator":
            {
              "@DEF":"BulbEmissive",
              "@key":[0,0.5,0.5,1],
              "@keyValue":[1,0.3,0.3,1,0.3,0.3,0,0,0,0,0,0]
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"Clock",
              "@toField":"set_fraction",
              "@toNode":"BulbIntensity"
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"Clock",
              "@toField":"set_fraction",
              "@toNode":"BulbDiffuse"
            }
          },
          { "ROUTE":
            {
              "@fromField":"fraction_changed",
              "@fromNode":"Clock",
              "@toField":"set_fraction",
              "@toNode":"BulbEmissive"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"BulbIntensity",
              "@toField":"set_intensity",
              "@toNode":"BulbLight"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"BulbDiffuse",
              "@toField":"set_diffuseColor",
              "@toNode":"BulbMaterial"
            }
          },
          { "ROUTE":
            {
              "@fromField":"value_changed",
              "@fromNode":"BulbEmissive",
              "@toField":"set_emissiveColor",
              "@toNode":"BulbMaterial"
            }
          }
        ]
    }
  }
}