Skip to content

Instantly share code, notes, and snippets.

@Convicted202
Convicted202 / gist:a2cafa2f6b7f7819feec
Created November 28, 2014 16:09
windows store links to review
http://msdn.microsoft.com/en-us/library/windows/apps/hh696636.aspx
@Convicted202
Convicted202 / gist:97df7103db6c6384a0c6
Last active August 29, 2015 14:10
Common usage of animation with callback called constantly
function animLoop( render, element ) {
var running, lastFrame = +new Date;
function loop( now ) {
// stop the loop if render returned false
if ( running !== false ) {
requestAnimationFrame( loop, element );
var deltaT = now - lastFrame;
// do not render frame when deltaT is too high
if ( deltaT < 160 ) {
running = render( deltaT );