{ "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":"PixelTextureComponentExamples.x3d"
          },
          {
            "@name":"description",
            "@content":"This example shows the five PixelTexture components, with 0 to 4 components each, shown in Table 5-18."
          },
          {
            "@name":"creator",
            "@content":"Leonard Daly and Don Brutzman"
          },
          {
            "@name":"created",
            "@content":"25 August 2008"
          },
          {
            "@name":"modified",
            "@content":"20 October 2019"
          },
          {
            "@name":"reference",
            "@content":"https://X3dGraphics.com"
          },
          {
            "@name":"reference",
            "@content":"X3D for Web Authors, Table 5.18"
          },
          {
            "@name":"reference",
            "@content":"https://www.web3d.org/x3d/content/examples/X3dResources.html"
          },
          {
            "@name":"rights",
            "@content":"Copyright (c) 2006, Daly Realism and Don Brutzman"
          },
          {
            "@name":"subject",
            "@content":"X3D book, X3D graphics, X3D-Edit, http://www.x3dGraphics.com"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter05AppearanceMaterialTextures/PixelTextureComponentExamples.x3d"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@name":"license",
            "@content":"../license.html"
          },
          {
            "@name":"translated",
            "@content":"17 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":"PixelTextureComponentExamples.x3d"
            }
          },
          { "Background":
            {
              "@skyColor":[0.1,0.1,0.4]
            }
          },
          { "Viewpoint":
            {
              "@description":"Table 5.18 SFImage component examples",
              "@position":[0,0,14]
            }
          },
          { "Transform":
            {
              "@translation":[-6,0,0],
              "-children":[
                { "Shape":
                  {
                    "-appearance":
                      { "Appearance":
                        {
                          "-texture":
                            { "PixelTexture":
                              {
                                "@DEF":"ZeroComponents"
                              }
                            }
                        }
                      },
                    "-geometry":
                      { "Box":
                        {
                        }
                      }
                  }
                },
                { "Transform":
                  {
                    "@translation":[0,-2,0],
                    "-children":[
                      { "Shape":
                        {
                          "-geometry":
                            { "Text":
                              {
                                "@string":["0"],
                                "-fontStyle":
                                  { "FontStyle":
                                    {
                                      "@DEF":"CenterJustify",
                                      "@justify":["MIDDLE","MIDDLE"]
                                    }
                                  }
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "@DEF":"TextMaterial",
                                "-material":
                                  { "Material":
                                    {
                                      "@diffuseColor":[1,1,1]
                                    }
                                  }
                              }
                            }
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@translation":[-3,0,0],
              "-children":[
                { "Shape":
                  {
                    "-appearance":
                      { "Appearance":
                        {
                          "-texture":
                            { "PixelTexture":
                              {
                                "@DEF":"OneComponent",
                                "@image":[1,2,1,255,0]
                              }
                            }
                        }
                      },
                    "-geometry":
                      { "Box":
                        {
                        }
                      }
                  }
                },
                { "Transform":
                  {
                    "@translation":[0,-2,0],
                    "-children":[
                      { "Shape":
                        {
                          "-geometry":
                            { "Text":
                              {
                                "@string":["1"],
                                "-fontStyle":
                                  { "FontStyle":
                                    {
                                      "@USE":"CenterJustify"
                                    }
                                  }
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "@USE":"TextMaterial"
                              }
                            }
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "-children":[
                { "Shape":
                  {
                    "-appearance":
                      { "Appearance":
                        {
                          "-texture":
                            { "PixelTexture":
                              {
                                "@DEF":"TwoComponents",
                                "@image":[2,1,2,52479,8823]
                              }
                            }
                        }
                      },
                    "-geometry":
                      { "Box":
                        {
                        }
                      }
                  }
                },
                { "Transform":
                  {
                    "@translation":[0,-2,0],
                    "-children":[
                      { "Shape":
                        {
                          "-geometry":
                            { "Text":
                              {
                                "@string":["2"],
                                "-fontStyle":
                                  { "FontStyle":
                                    {
                                      "@USE":"CenterJustify"
                                    }
                                  }
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "@USE":"TextMaterial"
                              }
                            }
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@translation":[3,0,0],
              "-children":[
                { "Shape":
                  {
                    "-appearance":
                      { "Appearance":
                        {
                          "-children":[
                            {
                              "#comment":"note 0x000000 = 0"
                            }
                          ],
                          "-texture":
                            { "PixelTexture":
                              {
                                "@DEF":"ThreeComponents",
                                "@image":[2,4,3,16711680,65280,0,0,0,0,16777215,16776960]
                              }
                            }
                        }
                      },
                    "-geometry":
                      { "Box":
                        {
                        }
                      }
                  }
                },
                { "Transform":
                  {
                    "@translation":[0,-2,0],
                    "-children":[
                      { "Shape":
                        {
                          "-geometry":
                            { "Text":
                              {
                                "@string":["3"],
                                "-fontStyle":
                                  { "FontStyle":
                                    {
                                      "@USE":"CenterJustify"
                                    }
                                  }
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "@USE":"TextMaterial"
                              }
                            }
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@translation":[6,0,0],
              "-children":[
                { "Shape":
                  {
                    "-appearance":
                      { "Appearance":
                        {
                          "-children":[
                            {
                              "#comment":"Erroneous value in book: 1 0 0 255, 0 1 0 255, 0 0 1 255, 1 0 0 127, 0 1 0 127, 0 0 1 127"
                            }
                          ],
                          "-texture":
                            { "PixelTexture":
                              {
                                "@DEF":"FourComponents",
                                "@image":[3,2,4,4278190335,16711935,65535,4278190207,16711807,65407]
                              }
                            }
                        }
                      },
                    "-geometry":
                      { "Box":
                        {
                        }
                      }
                  }
                },
                { "Transform":
                  {
                    "@translation":[0,-2,0],
                    "-children":[
                      { "Shape":
                        {
                          "-geometry":
                            { "Text":
                              {
                                "@string":["4"],
                                "-fontStyle":
                                  { "FontStyle":
                                    {
                                      "@USE":"CenterJustify"
                                    }
                                  }
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "@USE":"TextMaterial"
                              }
                            }
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          {
            "#comment":"Background from PixelTextureBW.x3d"
          },
          { "Transform":
            {
              "@translation":[0,6,-2],
              "-children":[
                { "Shape":
                  {
                    "-appearance":
                      { "Appearance":
                        {
                          "-texture":
                            { "PixelTexture":
                              {
                                "@image":[8,8,1,204,0,204,0,204,0,204,0,0,204,0,204,0,204,0,204,204,0,204,0,204,0,204,0,0,204,0,204,0,204,0,204,204,0,204,0,204,0,204,0,0,204,0,204,0,204,0,204,204,0,204,0,204,0,204,0,0,204,0,204,0,204,0,204]
                              }
                            }
                        }
                      },
                    "-geometry":
                      { "Box":
                        {
                          "@size":[16,16,0.1]
                        }
                      }
                  }
                }
              ]
            }
          }
        ]
    }
  }
}