Permalink
Browse files

Added a little ramp to the ball demo

  • Loading branch information...
1 parent 8b3eabc commit e84e823047cf6501c960670b80086dc1eb940c62 @josephg josephg committed Jan 13, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 demo/ball.js
View
6 demo/ball.js
@@ -42,7 +42,11 @@ var Balls = function() {
};
*/
- ctx.strokeStyle = "black";
+ this.ctx.strokeStyle = "black";
+
+ var ramp = space.addShape(new cp.SegmentShape(space.staticBody, v(100, 100), v(300, 200), 10));
+ ramp.setElasticity(1);
+ ramp.setFriction(1);
};
Balls.prototype = Object.create(Demo.prototype);

0 comments on commit e84e823

Please sign in to comment.