aboutsummaryrefslogtreecommitdiff
path: root/sketch.js
diff options
context:
space:
mode:
Diffstat (limited to 'sketch.js')
-rw-r--r--sketch.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/sketch.js b/sketch.js
index 473c192..34fb7b5 100644
--- a/sketch.js
+++ b/sketch.js
@@ -32,6 +32,11 @@ function draw() {
ps[i].reflect(createVector(0.25*wid, -0.25*hei), 5);
}
+ for(var j = ps.length - 1; j >= 0; j--) {
+ if(i != j && ps[i].collide(ps[j]))
+ console.log("COLLIDE" + ps[i] + ps[j]);
+ }
+
if (ps[i].pos.y >= hei)
ps.splice(i, 1);
}