6. Creating Games with SVG and RaphaëlJS
One of the problems we saw when creating games with Canvas was that we had to independently track mouse interactions and locations of the drawn objects after rendering was complete. Scalable Vector Graphics (SVG) addresses these concerns by giving us a means to draw objects while retaining their locations as well as to receive events and modify them. In this chapter, you learn the essentials of SVG to get started in creating games. We also discuss how it compares to Canvas in regard to rendering capabilities and the subset of SVG that most clients implement.
Introduction to SVG
Compared to other elements of HTML5, SVG is a relatively mature component, first released in 2001, with its most recent release ...