Errata

Getting Started with p5.js

Errata for Getting Started with p5.js

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. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

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

Version Location Description Submitted By Date submitted Date corrected
PDF
Page 48
Example 3-12: Set Stroke Weight. draw() function

The next last(or second) line is missing in draw() function:
strokeWeight(1);

to return stroke weight to 1.

Else a first ellipse will also have weight 20.

Note from the Author or Editor:
At the moment, but code is fine as it is. The drawing properties are refreshed each time through the draw(). However, I agree that the code is better with the explicit strokeWeight(1). So, to fix, the code should start:

void draw() {
background(204);
strokeWeight(1); // Stroke weight to 1 pixel
ellipse(75, 60, 90, 90);

IB15  Dec 31, 2015