// 加载动画
loadAni(): void {
var aniPath = this.ANIS[this.fishIndex];
this.mFactory = new Laya.Templet();
this.mFactory.on(Laya.Event.COMPLETE, this, this.parseComplete);
this.mFactory.loadAni(aniPath);
}
// 动画解析完成,添加到舞台,并且开始swim
parseComplete(): void {
this.mArmature = this.mFactory.buildArmature(0);
this.mArmature.x = 0;
this.mArmature.y = 0;
this.addChild(this.mArmature);
this.mArmature.play(this.SWIM_RIGHT_ANI_NAME, true);
Laya.timer.frameLoop(1, this, this.swim);
}
在大部分浏览器都是OK的,但是在部分浏览器中,骨骼动画并不完整,动画的.sk文件也加载成功。
请问大家这个兼容性问题嘛?一直不知道怎么解决。一条鱼在游动,但是在浏览器里只有一个鱼眼,感觉也还在做动作。
动画是spine动画,用IDE的工具转换的。