* 使用过程中发现的两个低级错误
laya.spine.js:
SpineTemplet_3_x 和SpineTemplet_4_0 这两个类的loop方法里有一些问题,assetManager的错误检测应为放在完成检测之前吧,这样会导致真的发生了加载错误,因为parseSpineAni会报错,导致ERROR事件也抛不出去。
private loop() {
if (this.assetManager.isLoadingComplete()) {
this.parseSpineAni();
return;
}
if (this.assetManager.hasErrors()) {
this.event(Event.ERROR, "load failed:" + this.assetManager.getErrors());
return;
}
Laya.timer.frameOnce(1, this, this.loop);
}
==========================================================================
spine-core-3.7.js问题:
代理里有语法错误,state !== status
[code] }, (state, responseText) => {
this.errors[path] = `Couldn't load texture atlas ${path}: status ${status}, ${responseText}`;
if (error)
error(path, `Couldn't load texture atlas ${path}: status ${status}, ${responseText}`);
this.toLoad--;
this.loaded++;
});[/code]