Supercharged JavaScript Graphics

Errata for Supercharged JavaScript Graphics

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
PDF Page 16
Graph Image

The Graph is talking about Math.floor() versus bitshift. The Blue box legend at the top says Math.sin(), probably left over from the previous graph.

Jim Connolly  Aug 09, 2011 
Printed Page 43,44
Page 43: 1st code block, line 3; Page 44: 2nd code block, line 6

The timeInfo object declares an interCount variable, but uses both interCount AND iterCount internally. The source download uses only iterCount.

I just thought I would point it out to help avoid confusion.

Todd Mullen  Dec 20, 2015 
Printed Page 59
top of page

The calculation of the background-positions goes to far, so that the map-indexes ( i.e 0,0,0,10,0,14,0,4...etc) doesnīt correspond to the correct offset. Subtract a tileWidth/tileHeight in the for-condition:

for (top = 0; top < (params.imageHeight ); top += params.tileHeight) {
for (left = 0; left < (params.imageWidth); left += params.tileWidth) {
tileBackPos.push(-left + 'px ' + -top + 'px');

for (top = 0; top < (params.imageHeight - params.tileHeight); top += params.tileHeight) {
for (left = 0; left < (params.imageWidth - params.tileWidth); left += params.tileWidth) {
tileBackPos.push(-left + 'px ' + -top + 'px');

Martin Sundvall  Apr 04, 2012 
Printed Page 60
Example 3-3 Three-layer tile-based scrolling

Around the middle of the page:

tileIndex = map[mapRows + sx];

should be:

tileIndex = map[mapRow + sx];

Anonymous  Mar 09, 2012 
PDF Page 126
2nd paragraph, 1st bullet

"Flash is a proprietary format owned by Adobe. There is no charge for playing Flash content, but to develop it you must purchase the appropriate authoring software. Using a closed system like Flash to power web-based content is incongruous with the evolution of a free and open Web."

This is simply put not true. No one has to buy an authoring software. The Flex development kit is published open source and the specification is open source as well. Also, there is quite a big open source community working and ActionScript, Flex, the SWF file format and there is a industry support as well to support the evolution of the web by enhancing Flash.

Florian Salihovic  Jul 26, 2011 
Printed Page 135

In the code for Figure 6-5, the canvas tag is printed as:
<canvas id="mycanvas" width=5 00, height=5 00>

This should be
<canvas id="mycanvas" width="500" height="500">

The same typos are on Page 145 and 149, too.

Anonymous  Mar 09, 2012 
Safari Books Online 147
First code block

Function name (when defined) is misspelled; should be "recurse", not "rescurse".

P. Roebuck  Aug 01, 2011 
Printed Page 185
"that.move" method

if (length > 5) { ... }
should be
if (speed > 5) { ... }

Without this correction, the rocket speed is not limited and this part of the code may be deleted, as it's not doing anything at all.

LuisQuin  Oct 20, 2015 
Printed Page 201
Section 'Simple encoding format', 2nd Paragraph

should be:

The same typo is on the next page about Extended encoding format.

Anonymous  Mar 09, 2012 
Printed Page 204

In the code on the top of the page, a quote is missing:
var URL = .....
'cht=bvg& +

should be:
var URL = .....
'cht=bvg&' +

Anonymous  Mar 09, 2012