INNER CODE UNIT · JavaScript

newBall

city41/breakouts · breakouts/stagejs/app.js:133

  function newBall() {
    var body = new p2.Body({
      mass : 1
    });
    body.damping = 0;
    body.angularDamping = 0;
    body.addShape(shape.ball);
    body.isBall = true;
    body.ui = Stage.anim("ball", 10).pin("handle", 0.5).play();
    return body;
  }

  function newDrop(name) {
    var body = new p2.Body({
      mass : 1
    });
    body.addShape(shape.drop);
    body.isDrop = name;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…