Chapter 6. Making Canvas Interactive and Stateful
In This Chapter
Now that we’ve covered the entire canvas API, we take a look at animating the canvas and making it interactive.
Nearly all interactive canvas applications are event driven, typically by a combination of mouse, touch device, or keyboard events. Retrieving coordinates from input devices is not always an intuitive exercise, so we examine our options for handling mouse and touch events in the canvas.