{ "X3D": {
    "encoding":"UTF-8",
    "@profile":"Immersive",
    "@version":"3.2",
    "@xsd:noNamespaceSchemaLocation":"https://www.web3d.org/specifications/x3d-3.2.xsd",
    "JSON schema":"https://www.web3d.org/specifications/x3d-4.0-JSONSchema.autogenerated.json",
    "head": {
        "meta": [
          {
            "@name":"title",
            "@content":"MaterialExample.x3d"
          },
          {
            "@name":"description",
            "@content":"Material node example for X3D-Edit MaterialEditor, which uses Scene Access Interface (SAI) externally to select/deselect different shapes, axes and lights while modifying Material values."
          },
          {
            "@name":"creator",
            "@content":"Don Brutzman"
          },
          {
            "@name":"created",
            "@content":"17 December 2006"
          },
          {
            "@name":"modified",
            "@content":"20 October 2019"
          },
          {
            "@name":"subject",
            "@content":"X3D-Edit example"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/Basic/development/MaterialExample.x3d"
          },
          {
            "@name":"reference",
            "@content":"src/www.web3d.org/x3d/tools/X3dEdit3.3/X3D/src/org/web3d/x3d/templates/MaterialExample.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@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":[
          { "WorldInfo":
            {
              "@title":"MaterialExample.x3d"
            }
          },
          { "Viewpoint":
            {
              "@DEF":"ViewpointNode",
              "@description":"default",
              "@position":[0,0,4]
            }
          },
          { "NavigationInfo":
            {
              "@headlight":false,
              "@type":["EXAMINE"]
            }
          },
          { "Background":
            {
              "@DEF":"BackgroundNode"
            }
          },
          { "DirectionalLight":
            {
              "@DEF":"DirectionalLightNode",
              "@direction":[-0.707,0,-0.707]
            }
          },
          { "Shape":
            {
              "@DEF":"ShapeNode",
              "-geometry":
                { "Sphere":
                  {
                  }
                },
              "-appearance":
                { "Appearance":
                  {
                    "-material":
                      { "Material":
                        {
                          "@DEF":"MaterialNode"
                        }
                      }
                  }
                }
            }
          },
          { "Switch":
            {
              "@DEF":"AxesSwitch",
              "@whichChoice":0,
              "-children":[
                { "Group":
                  {
                    "-children":[
                      { "Group":
                        {
                          "@DEF":"xAxis",
                          "-children":[
                            { "Shape":
                              {
                                "-geometry":
                                  { "IndexedLineSet":
                                    {
                                      "@coordIndex":[0,1],
                                      "-coord":
                                        { "Coordinate":
                                          {
                                            "@point":[0,0,0,1.25,0,0]
                                          }
                                        }
                                    }
                                  },
                                "-appearance":
                                  { "Appearance":
                                    {
                                      "@DEF":"AppearanceRed",
                                      "-material":
                                        { "Material":
                                          {
                                            "@diffuseColor":[0,0,0],
                                            "@emissiveColor":[0.8,0,0]
                                          }
                                        }
                                    }
                                  }
                              }
                            },
                            { "Transform":
                              {
                                "@translation":[1.4,0,0],
                                "-children":[
                                  { "Billboard":
                                    {
                                      "-children":[
                                        { "Shape":
                                          {
                                            "-geometry":
                                              { "Text":
                                                {
                                                  "@string":["x"],
                                                  "-fontStyle":
                                                    { "FontStyle":
                                                      {
                                                        "@DEF":"LabelStyle",
                                                        "@justify":["MIDDLE","MIDDLE"],
                                                        "@size":0.3
                                                      }
                                                    }
                                                }
                                              },
                                            "-appearance":
                                              { "Appearance":
                                                {
                                                  "@USE":"AppearanceRed"
                                                }
                                              }
                                          }
                                        }
                                      ]
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      },
                      { "Group":
                        {
                          "@DEF":"yAxis",
                          "-children":[
                            { "Shape":
                              {
                                "-geometry":
                                  { "IndexedLineSet":
                                    {
                                      "@coordIndex":[0,1],
                                      "-coord":
                                        { "Coordinate":
                                          {
                                            "@point":[0,0,0,0,1.25,0]
                                          }
                                        }
                                    }
                                  },
                                "-appearance":
                                  { "Appearance":
                                    {
                                      "@DEF":"AppearanceGreen",
                                      "-material":
                                        { "Material":
                                          {
                                            "@diffuseColor":[0,0,0],
                                            "@emissiveColor":[0,0.8,0]
                                          }
                                        }
                                    }
                                  }
                              }
                            },
                            { "Transform":
                              {
                                "@translation":[0,1.4,0],
                                "-children":[
                                  { "Billboard":
                                    {
                                      "@axisOfRotation":[0,0,0],
                                      "-children":[
                                        { "Shape":
                                          {
                                            "-geometry":
                                              { "Text":
                                                {
                                                  "@string":["y"],
                                                  "-fontStyle":
                                                    { "FontStyle":
                                                      {
                                                        "@USE":"LabelStyle"
                                                      }
                                                    }
                                                }
                                              },
                                            "-appearance":
                                              { "Appearance":
                                                {
                                                  "@USE":"AppearanceGreen"
                                                }
                                              }
                                          }
                                        }
                                      ]
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      },
                      { "Group":
                        {
                          "@DEF":"zAxis",
                          "-children":[
                            { "Shape":
                              {
                                "-geometry":
                                  { "IndexedLineSet":
                                    {
                                      "@coordIndex":[0,1],
                                      "-coord":
                                        { "Coordinate":
                                          {
                                            "@point":[0,0,0,0,0,1.25]
                                          }
                                        }
                                    }
                                  },
                                "-appearance":
                                  { "Appearance":
                                    {
                                      "@DEF":"AppearanceBlue",
                                      "-material":
                                        { "Material":
                                          {
                                            "@diffuseColor":[0,0,0],
                                            "@emissiveColor":[0,0,0.8]
                                          }
                                        }
                                    }
                                  }
                              }
                            },
                            { "Transform":
                              {
                                "@translation":[0,0,1.4],
                                "-children":[
                                  { "Billboard":
                                    {
                                      "@axisOfRotation":[0,0,0],
                                      "-children":[
                                        { "Shape":
                                          {
                                            "-geometry":
                                              { "Text":
                                                {
                                                  "@string":["z"],
                                                  "-fontStyle":
                                                    { "FontStyle":
                                                      {
                                                        "@USE":"LabelStyle"
                                                      }
                                                    }
                                                }
                                              },
                                            "-appearance":
                                              { "Appearance":
                                                {
                                                  "@USE":"AppearanceBlue"
                                                }
                                              }
                                          }
                                        }
                                      ]
                                    }
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Switch":
            {
              "@DEF":"LightDirectionVectorSwitch",
              "@whichChoice":0,
              "-children":[
                { "Transform":
                  {
                    "@scale":[1.25,1.25,1.25],
                    "-children":[
                      { "Shape":
                        {
                          "-geometry":
                            { "IndexedLineSet":
                              {
                                "@coordIndex":[0,1],
                                "-children":[
                                  {
                                    "#comment":"negate direction-vector values so that line approaches from light direction towards origin"
                                  }
                                ],
                                "-coord":
                                  { "Coordinate":
                                    {
                                      "@DEF":"LightDirectionCoordinateNode",
                                      "@point":[0.707,0,0.707,0,0,0]
                                    }
                                  }
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@DEF":"LightDirectionLineMaterial",
                                      "@diffuseColor":[0,0,0],
                                      "@emissiveColor":[1,1,1]
                                    }
                                  }
                              }
                            }
                        }
                      }
                    ]
                  }
                }
              ]
            }
          }
        ]
    }
  }
}