<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
<X3D profile='Immersive' version='3.3' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.3.xsd'>
  <head>
    <meta content='PixelTextureComponentExamples.x3d' name='title'/>
    <meta content='This example shows the five PixelTexture components, with 0 to 4 components each, shown in Table 5-18.' name='description'/>
    <meta content='Leonard Daly and Don Brutzman' name='creator'/>
    <meta content='25 August 2008' name='created'/>
    <meta content='20 October 2019' name='modified'/>
    <meta content='https://X3dGraphics.com' name='reference'/>
    <meta content='X3D for Web Authors, Table 5.18' name='reference'/>
    <meta content='https://www.web3d.org/x3d/content/examples/X3dResources.html' name='reference'/>
    <meta content='Copyright (c) 2006, Daly Realism and Don Brutzman' name='rights'/>
    <meta content='X3D book, X3D graphics, X3D-Edit, http://www.x3dGraphics.com' name='subject'/>
    <meta content='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter05AppearanceMaterialTextures/PixelTextureComponentExamples.x3d' name='identifier'/>
    <meta content='X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit' name='generator'/>
    <meta content='../license.html' name='license'/>
  </head>
  <Scene>
    <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'>
      <Shape>
        <Appearance>
          <PixelTexture DEF='ZeroComponents'/>
        </Appearance>
        <Box/>
      </Shape>
      <Transform translation='0 -2 0'>
        <Shape>
          <Text string='"0"'>
            <FontStyle DEF='CenterJustify' justify='"MIDDLE" "MIDDLE"'/>
          </Text>
          <Appearance DEF='TextMaterial'>
            <Material diffuseColor='1 1 1'/>
          </Appearance>
        </Shape>
      </Transform>
    </Transform>
    <Transform translation='-3 0 0'>
      <Shape>
        <Appearance>
          <PixelTexture DEF='OneComponent' image='1 2 1 0xFF 0x00'/>
        </Appearance>
        <Box/>
      </Shape>
      <Transform translation='0 -2 0'>
        <Shape>
          <Text string='"1"'>
            <FontStyle USE='CenterJustify'/>
          </Text>
          <Appearance USE='TextMaterial'/>
        </Shape>
      </Transform>
    </Transform>
    <Transform>
      <Shape>
        <Appearance>
          <PixelTexture DEF='TwoComponents' image='2 1 2 0xCCFF 0x2277'/>
        </Appearance>
        <Box/>
      </Shape>
      <Transform translation='0 -2 0'>
        <Shape>
          <Text string='"2"'>
            <FontStyle USE='CenterJustify'/>
          </Text>
          <Appearance USE='TextMaterial'/>
        </Shape>
      </Transform>
    </Transform>
    <Transform translation='3 0 0'>
      <Shape>
        <Appearance>
          <!-- note 0x000000 = 0 -->
          <PixelTexture DEF='ThreeComponents' image='2 4 3 0xFF0000 0xFF00 0x000000 0 0 0 0xFFFFFF 0xFFFF00'/>
        </Appearance>
        <Box/>
      </Shape>
      <Transform translation='0 -2 0'>
        <Shape>
          <Text string='"3"'>
            <FontStyle USE='CenterJustify'/>
          </Text>
          <Appearance USE='TextMaterial'/>
        </Shape>
      </Transform>
    </Transform>
    <Transform translation='6 0 0'>
      <Shape>
        <Appearance>
          <!-- 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 -->
          <PixelTexture DEF='FourComponents' image='3 2 4 0xFF0000FF 0x00FF00FF 0x0000FFFF 0xFF00007F 0x00FF007F 0x0000FF7F'/>
        </Appearance>
        <Box/>
      </Shape>
      <Transform translation='0 -2 0'>
        <Shape>
          <Text string='"4"'>
            <FontStyle USE='CenterJustify'/>
          </Text>
          <Appearance USE='TextMaterial'/>
        </Shape>
      </Transform>
    </Transform>
    <!-- Background from PixelTextureBW.x3d -->
    <Transform translation='0 6 -2'>
      <Shape>
        <Appearance>
          <PixelTexture image='8 8 1 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0x00 0xcc 0x00 0xcc 0x00 0xcc 0x00 0xcc'/>
        </Appearance>
        <Box size='16 16 .1'/>
      </Shape>
    </Transform>
  </Scene>
</X3D>