Skip to content

Instantly share code, notes, and snippets.

@mrdoob
mrdoob / RequestAnimationFrame.js
Created February 22, 2011 14:50
Provides requestAnimationFrame in a cross browser way.
/**
* Provides requestAnimationFrame in a cross browser way.
* @author paulirish / http://paulirish.com/
*/
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.webkitRequestAnimationFrame ||
//change express render engine to mustache
var express = require('express'),
app = express.createServer(),
port = 1234,
mustache = require('mustache');
app.register('.html', {
render: function(str, options){
return mustache.to_html(str, options.locals);
}