Skip to content

Frame.js

dannyx0 edited this page Aug 10, 2012 · 2 revisions

Frame.js is a simple polyfill for window.requestAnimationFrame.

Quick Start

JavaScript

require(["Frame"], function (frame) {

	frame.start(); // starts requestAnimationFrame

	// Animation Frame
	frame.step = function (f) {
		// Do cool things with animations here.
	};

	window.setTimeout(function () {
		frame.stop(); // stops requestAnimationFrame
	}, 5000);

});

Clone this wiki locally