Errata



Notes:
  1. Chapter 1
    1. Pages 11-12:
      document.getElementById('').html()
      references should be
      document.getElementById('').innerHTML
    2. Page 23:
      Should mention that we are introducing a new variable, angle, to store an angle which is measured in radians. This variable is then used in Listing 1-10 to change the x-translation amount of our vertices.
    3. Page 23:
      In Listing 1-8, requestAnimFrame should be requestAnimationFrame
    4. Page 23:
      The URL for the polyfill has moved from https://gist.github.com/1579671 to https://gist.github.com/paulirish/1579671
    5. Page 28:
      In Figure 1-13, vertice (-1.0, 2.0, -2.0) should be (1.0, 2.0, -2.0) and vertice (1.5, -1.0, -2.0) should be (1.5, 1.0, -2.0).
  2. Chapter 2
    1. Page 45:
      final_color.r = green.gr; //average green, blue should be
      final_color = vec4(green + blue) * 0.5;
  3. Chapters 7 and 8: THREE.UV has been DEPRECATED. Use THREE.Vector2 instead
  4. Chapter 7 Prism Examples: The indice order should be
            "indices" : [
                    //setup vertice buffers
                    //16 triangles
                        0,1,3,          //front face
                        1,4,3,  //flipped
                        1,2,4,
                        3,4,5,  
    
                        6,9,7,          //rear face
                        7,9,10, //flipped
                        7,10,8,
                        9,11,10,
                        
                        6,7,9,          //rear face
                        7,10,9, //flipped
                        7,8,10,
                        9,10,11,
                        
                        0,3,6,//flipped         //left side
                        3,9,6,
                        3,5,9,//flipped
                        5,11,9,
    
                        2,8,4,//flipped         //right side
                        4,8,10,
                        4,10,5,//flipped
                        5,10,11
                    ]
  5. Chapter 7 Decal Textured Prism Example:
    uSampler texture format for THREE.js starting with r51 has changed
    from
    
                   uSampler: { type: "t", value: 0, texture: texture[STONE_TEXTURE] },
                   uSampler2: { type: "t", value: 1, texture: texture[WEBGL_LOGO_TEXTURE] }
    
    to
    
                   uSampler: { type: "t", value: texture[STONE_TEXTURE] },
                   uSampler2: { type: "t", value: texture[WEBGL_LOGO_TEXTURE] }