HTML and CSS Reference
In-Depth Information
Step 3: Detect and record mouse movement
Next, record the mouse movement. The function in the following listing will add an event
listener to the
<canvas>
element, which updates the
wilson
object when mouse move-