Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 598 Bytes

README.md

File metadata and controls

25 lines (20 loc) · 598 Bytes

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();
})