Skip to content

Instantly share code, notes, and snippets.

View HzJavier's full-sized avatar

HzJavier HzJavier

View GitHub Profile
function drawMouseSpeedDemo() {
var mrefreshinterval = 500; // update display every 500ms
var lastmousex=-1;
var lastmousey=-1;
var lastmousetime;
var mousetravel = 0;
var mpoints = [];
var mpoints_max = 30;
$('html').mousemove(function(e) {
var mousex = e.pageX;