HTML and CSS Reference
In-Depth Information
Listing I.34. Request pointer lock when the mode changes to full screen
Next, you need to update the
follow_mouse()
function again, as shown in the follow-
ing listing. The Pointer Lock API adds two additional properties to a mouse event:
move-
mentX
and
movementY
. These can be used in a similar way to the orientation events in
section I.35.