MDN self-hosted library · e01.org

Bounce off the walls

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
this.ball.body.setCollideWorldBounds(true, 1, 1);