velocity1.js 145 B

12345678910
  1. var stage = new mtm.Stage('c'),
  2. ball = new Ball(50, 100),
  3. vx = 5;
  4. stage.shapes.push(ball);
  5. stage.play(function() {
  6. ball.x += vx;
  7. });