Skip to content

Instantly share code, notes, and snippets.

@tmtrademark
Last active February 2, 2020 22:12
Show Gist options
  • Save tmtrademark/6281c0c4367599b4a3ef73249570337d to your computer and use it in GitHub Desktop.
Save tmtrademark/6281c0c4367599b4a3ef73249570337d to your computer and use it in GitHub Desktop.
Full screen bit drop
jarEl.src = ``;
cupBase[1] = 5;
boxBody = new p2.Body({ mass: 0, position: [cupBase[0], cupBase[1]] });
console.log(boxBody);
boxShape = new p2.Box({ width: 1920, height: 5 });
boxShape.material = this.materials.wall;
boxBody.addShape(boxShape);
this.world.addBody(boxBody);
this.world.addBody(this.createRectangleBody([0, 0], 1, 1080, 0));
this.world.addBody(this.createRectangleBody([1919, 0], 1, 1080, 0));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment