scene.addEventListener('mousemove', activity, false); var timer; function activity(event) { window.clearTimeout(timer); timer = setTimeout(function() { console.log('test'); }, 1000); }