Introduction

SVG (scalable vector graphics) is the closest thing that HTML5 has to a direct competitor to Flash. SVG provides the capability to draw vector graphics that can be scaled, rotated, and transformed to your heart’s content while still providing a scene graph to interact with, meaning SVG elements can receive mouse and touch events. This chapter uses SVG with a 2-D physics engine, called Box2d, which has been ported from C++ to JavaScript (by way of ActionScript) to create a physics playground and cannon game.

Get Professional HTML5 Mobile Game Development 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.