Skip to content

Instantly share code, notes, and snippets.

Created July 18, 2012 08:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/3135000 to your computer and use it in GitHub Desktop.
Save anonymous/3135000 to your computer and use it in GitHub Desktop.
created by livecoding - http://livecoding.gabrielflor.it
// only retrieve above script once
$.ajaxSetup({
cache: true
});
var s1 = $.getScript('https://raw.github.com/Animatron/player/master/vendor/matrix.js');
var s2 = $.getScript('https://raw.github.com/Animatron/player/master/anm.player.js');
var s3 = $.getScript('https://raw.github.com/Animatron/player/master/anm.builder.js');
//var s4 = $.getScript('https://raw.github.com/Animatron/player/master/anm.collisions.js');
$.when( s1, s2, s3 ).then(function() {
var d = $("#display");
var canv = d.find("canvas");
if (canv.length === 0) canv = $("<canvas id='test' width='300' height='300'/>").appendTo(d);
var b = Builder._$;
createPlayer('test').load(
b().rect([22, 20], 10).move([100, 100])
).play();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment