| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,10 +9,10 @@ void setup() { | |||
| 9 | 9 | //size(200, 200); | |
| 10 | 10 | smooth(); | |
| 11 | 11 | noStroke(); | |
| 12 | - ellipseMode(CENTER_RADIUS); | ||
| 12 | + ellipseMode(RADIUS); | ||
| 13 | 13 | randomSeed(0); | |
| 14 | 14 | for(int i=0; i<sps.length; i++) { | |
| 15 | - sps[i] = new Spot(); | ||
| 15 | + sps[i] = new Spot(); | ||
| 16 | 16 | } | |
| 17 | 17 | } | |
| 18 | 18 | ||
@@ -21,12 +21,12 @@ void draw() { | |||
| 21 | 21 | rect(0, 0, width, height); | |
| 22 | 22 | fill(0); | |
| 23 | 23 | for(int i=0; i<sps.length; i++) { | |
| 24 | - sps[i].updateDisplay(); | ||
| 24 | + sps[i].updateDisplay(); | ||
| 25 | 25 | } | |
| 26 | 26 | } | |
| 27 | 27 | ||
| 28 | 28 | void mousePressed() { | |
| 29 | - save("page_278.tif"); | ||
| 29 | + save("page_278.tif"); | ||
| 30 | 30 | } | |
| 31 | 31 | ||
| 32 | 32 | ||
@@ -46,18 +46,18 @@ class Spot { | |||
| 46 | 46 | if (r < .25) { | |
| 47 | 47 | directionX = 1; | |
| 48 | 48 | directionY = 1; | |
| 49 | - } | ||
| 49 | + } | ||
| 50 | 50 | else if (r < .5) { | |
| 51 | 51 | directionX = -1; | |
| 52 | - directionY = 1; | ||
| 53 | - } | ||
| 52 | + directionY = 1; | ||
| 53 | + } | ||
| 54 | 54 | else if (r < .75) { | |
| 55 | 55 | directionX = 1; | |
| 56 | - directionY = -1; | ||
| 57 | - } | ||
| 56 | + directionY = -1; | ||
| 57 | + } | ||
| 58 | 58 | else { | |
| 59 | 59 | directionX = -1; | |
| 60 | - directionY = -1; | ||
| 60 | + directionY = -1; | ||
| 61 | 61 | } | |
| 62 | 62 | } | |
| 63 | 63 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments