스프라이트 시트를 가지고 있기 때문에 거의 모든 곳을 찾지도 않았고 튜토리얼을 찾을 수도없고 작동하지도 않습니다. 어떤 점을 지적 해 주실 수 있습니까? canvas에 anythign이 표시되지 않습니다.
var result = queue.getResult ("avatar1");CreateJs EaselJS 스프라이트 시트 프레임이 작동하지 않습니다.
var data=
{
images: [ result],
// The 5th value is the image index per the list defined in "images" (defaults to 0).
frames: [
// x, y, width, height, imageIndex, regX, regY
//head_south":{"x":120,"h":20,"y":138,"w":15}
[120,138,15,20],
[64,0,15,20,2],
],
animations: {
show: { frames: [0,1], next: true, frequency: 1 }
}
};
var sp = new createjs.SpriteSheet(data);
createjs.Ticker.setFPS(60);
var sprite_anim = new createjs.BitmapAnimation(sp,"show");
sprite_anim.x=100;
sprite_anim.y=100;
stage.addChild(this.sprite_anim);
sprite_anim.play("show");
sprite_anim.gotoAndPlay('show');
.이 질문에 .Closing 당신의 conern에 대한 모든 감사하지만 여전히 행운. –
4 인수 [120,138,15,20, 5 인자 [64, 0,15,20,2] gloabal되지 않습니다 varaiable의 isssue 것 같아요. 그래서 변수를 글로벌 만든 다음 "js 형식 오류"와 같은 뭔가를 준 그래서 나는 4 arugment 또는 7 걸리는 알아 냈지만 5가 아니기 때문에 나는 그것을 바꿨다. 4, 지금은 잘 작동합니다. 관심을 가져 주셔서 감사합니다. –