easeljsとスプライトシートを使ってアニメーションを使いたいゲームを作っています。以下のコード コードを使用してこれを行いましたが、アニメーションがキャンバスに表示されないようです。エラーも出ないので不思議です。私は何を間違っていますか?
私のコード:
stage = new createjs.Stage(canvas);
sprite = new createjs.SpriteSheet({
"images": ["./images/vos.png"],
"frames": [[0, 0, 32, 32, 0, 0, 0],
[32, 0, 32, 32, 0, 0, 0],
[64, 0, 32, 32, 0, 0, 0],
[96, 0, 32, 32, 0, 0, 0]],
"animations": {"all": {"frames": [0, 1, 2, 3, 2, 1, 0]}
}
});
vos = new createjs.BitmapAnimation(sprite);
vos.x = 32 + (Math.random() * (canvas.width - 64));
vos.y = 32 + (Math.random() * (canvas.height - 64));
speed=8;
createjs.Ticker.addListener(window);
createjs.Ticker.setFPS(24);
stage.addChild(vos);
vos.gotoAndPlay('all');