[]龙骨动画残影
请问,为什么我的龙骨动画导入laya后,在动画片段转换之间(如第0个到第1个)会有残影?动画资源是直接用龙骨的官方DEMO转的。部分代码片段如下:
private _onAnimationCreated(ani)
{
console.log("ani created:" + ani);
this._hero = ani;
this.addChild(this._hero);
this._hero.pos(300, 400);
this._hero.scale(0.3, 0.3);
this._hero.on(Laya.Event.STOPPED, this, this._onPlayed);
this._play();
}
private _play()
{
if (this._curAction >= this._hero.getAnimNum())
{
this._curAction = 0;
}
this._hero.play(this._curAction, false);
++this._curAction;
}
private _onPlayed()
{
console.log("played");
this._play();
}
private _onAnimationCreated(ani)
{
console.log("ani created:" + ani);
this._hero = ani;
this.addChild(this._hero);
this._hero.pos(300, 400);
this._hero.scale(0.3, 0.3);
this._hero.on(Laya.Event.STOPPED, this, this._onPlayed);
this._play();
}
private _play()
{
if (this._curAction >= this._hero.getAnimNum())
{
this._curAction = 0;
}
this._hero.play(this._curAction, false);
++this._curAction;
}
private _onPlayed()
{
console.log("played");
this._play();
}
没有找到相关结果
已邀请:
要回复问题请先登录
2 个回复
cuixueying
赞同来自: saintEvol
这样不大好查问题,希望可以单独把有重影问题的示例提取一下,只要可以重现问题就好,上传附件,我们安排测试排查下。另外告知下您的引擎版本,谢谢!
问题补充:
闪的问题确实存在,我们已经修复,2种方式可以避免
1、暂时规避,修改项目逻辑
2、替换引擎库
参考附件,将ts项目libs下的laya.ani.js替换成附件的文件重新发布即可!
saintEvol
赞同来自: