Is there a plugin [this is definitely not a behavior but a plugin] that can detect what is the current vertical and horizontal mouse direction ?
mouse.getHorizontal :: returns "left" or "right"
mouse.getVertical :: returns "up" or "down"
addEventListener("mousemove", getMouseDirection, false);
var xDirection = "";
var yDirection = "";
var oldX = 0;
var oldY = 0;
//deal with the horizontal case
if (oldX < e.pageX)
xDirection = "right";
xDirection = "left";
//deal with the vertical case
if (oldY < e.pageY)
yDirection = "down";
yDirection = "up";
oldX = e.pageX;
oldY = e.pageY;
console.log(xDirection + " " + yDirection);
But I do not know how to "package" this into a plugin, does anyone know how to pack this into a plugin ?