HTML and CSS Reference
In-Depth Information
Listing I.35. Follow the mouse movement
function
follow_mouse
() {
document
.
addEventListener
(
"mousemove"
,
function
(
e
) {
wilson
.
v_x
=
e
.
movementX
||
e
.
mozMovementX
||
e
.
webkitMovementX
||
0
;
wilson
.
v_y
=
e
.
movementY
||
e
.
mozMovementY
||
e
.
webkitMovementY
||
0
;
offset
+=
wilson
.
v_x
;
},
false
);
};
I.4. Summary
In this appendix you've had a glimpse of the future of HTML5. A lot of effort is directed
toward accessing device capabilities (webcams, microphones, orientation sensors, and so
on) as well as toward building seamless gaming and application experiences (full-screen
and pointer lock) to rival native applications. As these standards are finalized and imple-
mentations mature over the next few years, we should see a lot of exciting new web applic-
ations. Now that you've read this appendix (and the rest of this topic), you should be well
equipped to take an active role in developing the World Wide Web of tomorrow!