Skip to content

Commit 6defb7b

Browse files
authored
Merge pull request #216 from multimentha/fix_missing_comments
Add comments from book to example 8-3
2 parents 23dc8ad + f4c671d commit 6defb7b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

chp08_objects/example_08_03_zoogobject/example_08_03_zoogobject.pde

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,27 @@
33
// http://www.learningprocessing.com
44

55
// Example 8-3
6+
// Zoog is an object!
67
Zoog zoog;
78

89
void setup() {
910
size(480, 270);
11+
// Zoog is given initial properties via the constructor.
1012
zoog = new Zoog(width/2,height/2,60,60,16);
1113
}
1214

1315
void draw() {
1416
background(255);
1517
// mouseX position determines speed factor
1618
float factor = constrain(mouseX/10,0,5);
19+
// Zoog can do stuff with functions!
1720
zoog.jiggle(factor);
1821
zoog.display();
1922
}
2023

24+
// Everything about Zoog is contained in this one class.
25+
// Zoog has properties (location, width, height, eye size)
26+
// and Zoog has abilities (jiggle, display).
2127
class Zoog {
2228
// Zoog's variables
2329
float x,y,w,h,eyeSize;

0 commit comments

Comments
 (0)