Including the Library

The first thing we need to do is include the Box2dWeb library in JavaScript.

<script type="text/javascript" src="Box2dWeb-2.1.a.3.js"></script>

Get HTML5 Canvas, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.