toufali / Spine-EaselJS

Rendering a Spine animation with EaselJS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spine-EaselJS

Rendering a Spine animation with EaselJS

Spine-EaselJS Demo

Spine Animation Example

var stage = new createjs.Stage('myCanvas');
var dragon = new createjs.Spine("res/sceletons/dragon/dragon.atlas", "res/sceletons/dragon/dragon.json");
dragon.setTransform(300, 220, 0.5, 0.5);
dragon.onComplete = function(){
  console.log(dragon);
  dragon.state.setAnimationByName(0, 'flying', true);
  stage.addChild(dragon);
}
stage.addChild(dragon);
createjs.Ticker.on("tick", function(e){
  dragon.update(e);
  stage.update();
})

About

Rendering a Spine animation with EaselJS


Languages

Language:JavaScript 58.9%Language:CoffeeScript 36.4%Language:HTML 4.7%