-
-
Save Nek/3135008 to your computer and use it in GitHub Desktop.
created for livecoding - http://livecoding.gabrielflor.it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.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() { | |
//ensure that canvas is created only once, 'cause the DOM is persistent | |
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