point
Use observable to monitor
mouse and touch events.
Usage
First bind to the element you wish to capture data for. In this case
let's capture data at the document level:
var point = require('point')(document);
Now to receive the pointer events simply pass point a function that will
process the data:
point(function(args) {
console.log(args);
});
The event data is passed to the function as a 4 element array:
[ pageX, pageY, data, originalEvent ]
At this stage, the data object [2] simply tells you the type of the pointer
event, with three possible values: