Now using requestAnimationFrame instead of setInterval. Added simple controls for previewing sample