xxxxxxxxxx
var catSpriteSheet;
var catAnimation;
var catSprite;
var loaded = false;
function preload() {
//Load the explode sprite sheet using frame width, height and number of frames
catSpriteSheet = loadSpriteSheet('emotions-edit.png', 108, 110, 14);
catAnimation = loadAnimation(catSpriteSheet);
loaded = true;
}
function setup(){
createCanvas(400,400);
}
function draw() {
clear();
background(255);
//draw the sprite
if(loaded){
animation(catAnimation, width/2,height/2);
}
}