Errata

WebGL: Up and Running

Errata for WebGL: Up and Running

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
ePub Page notsure
Figure 3-11 is missing

Figure 3-11 is missing in the Kindle version.

Mark Swanson  Oct 07, 2012 
ePub Page loc 418
Loc 418 of 4704

The initShader(gl) function is not mentioned at all in the book. Whereas this is needed for the draw().

Plus the last function onLoad() is necessary in order to have a working program, which did not appear as well.

Anonymous  Nov 23, 2018 
ePub Page Loc 917
Location 917 of 4704

On chapter three, the code started to show an implementation of the Sun light source. Then skipped the rest of the code change part which needed to have the Sun custom class as per the graphics-earth-lit.html file.

Figure 3-6 is showing the earth lit, but this couldn't happen following the examples.

In other words, this was a two step process. The 1st section of the code change was shown in bold, and nothing was printed regarding the 2nd section.

The comment stated 'let there be light'... but there was none.

Anonymous  Nov 24, 2018 
PDF Page 3
list item titled "WebGL is based on OpenGL ES 2.0"

Third sentence ends with two periods.

netcastwide  Sep 15, 2012 
PDF Page 14
Example 1-5. The vertex and fragment shaders (code)

The opening quotation mark " is missing for the line

vec4(vertexPos, 1.0);\n" +

Same typo also appears on page 58 in code in Example 3-8 A very simple WebGL shader.

netcastwide  Sep 22, 2012 
PDF Page 14
Next to last line in Example 1-5

Missing opening quote on next to last line of Example 1-5 (should read)

" vec4(vertexPos, 1.0);\n"


David Wilkins  Mar 11, 2013 
PDF Page 18
list element "Three.js is fast"

First sentence ends with "(i.e., knowing when the mouse pointer is over an object)". The syntax is redundant. Use either "i.e" or parentheses.

netcastwide  Sep 15, 2012 
PDF Page 19
last paragraph

For the occasional weekend coder, an easier way to serve the web pages is to run the following command in the source directory

python -m SimpleHTTPServer

instead of installing Apache.

netcastwide  Sep 22, 2012 
PDF Page 20
example 2-1 code

example 2-1.

The code does not work in its current state (with recent versions of three.js) because 'PlaneGeometry' now defaults to the XZ plane rather than the XY plane. (camera is looking at it from the side and instead needs to move up on Y and look towards 0,0,0)

Andrew Burrell  Aug 09, 2012 
PDF Page 24
Example 2-2

In example camera is not added to scene.

Below line:
camera.position.set( 0, 0, 3 );
should be added:
scene.add( camera );



Anonymous  Sep 15, 2012 
PDF Page 34
Example 3-1. Basic Earth example (code)

A single-line JavaScript comment is split over two lines on PDF page, as shown below.

// Call superclass init code to set up scene, renderer,
default camera

netcastwide  Sep 22, 2012 
Printed Page 95
2nd paragraph under example

Viewport coordinates do not range from -.5 to +.5. They range from -1 to +1. (Otherwise the code example multiplying by 2 and adding/subtracting 1 doesn't make sense).

Peter O'Shaughnessy  Sep 28, 2012 
Other Digital Version 1252
Normal Map and Specular Map paragraphs

Shouldn't it be RGB, not RBG?

Peter Norquist  Oct 05, 2012