Use newer keyboard polyfill, require IE8+

This commit is contained in:
Joshua Bell
2014-01-22 21:06:31 -08:00
parent 308c2d0baf
commit 30ff0201d8
4 changed files with 20 additions and 26 deletions

View File

@@ -74,7 +74,7 @@
var pdl = [0, 0, 0, 0];
// Mouse-as-Joystick
addEvent(wrapper_elem, 'mousemove', function (e) {
wrapper_elem.addEventListener('mousemove', function (e) {
var rect = wrapper_elem.getBoundingClientRect(),
x = e.clientX - rect.left, y = e.clientY - rect.top;
function clamp(n, min, max) { return n < min ? min : n > max ? max : n; }