lyb-pixi-js 1.3.6 → 1.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Components/Base/LibPixiSpine.d.ts +0 -1
- package/Components/Base/LibPixiSpine.js +5 -2
- package/lyb-pixi.js +143 -145
- package/package.json +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Assets, Ticker } from "pixi.js";
|
|
2
2
|
import { Spine } from "@pixi-spine/runtime-3.8";
|
|
3
3
|
import gsap from "gsap";
|
|
4
|
-
import "pixi-spine";
|
|
5
4
|
/** @description 自定义 Spine 动画
|
|
6
5
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiSpine-动画
|
|
7
6
|
*/
|
|
@@ -74,10 +73,14 @@ export class LibPixiSpine extends Spine {
|
|
|
74
73
|
/** @description 销毁动画及挂点 */
|
|
75
74
|
destroyAll() {
|
|
76
75
|
Ticker.system.remove(this._loopFn);
|
|
77
|
-
this.destroy();
|
|
76
|
+
this.destroy({ children: true });
|
|
78
77
|
}
|
|
79
78
|
/** @description 更新渲染 */
|
|
80
79
|
_loop() {
|
|
80
|
+
if (this.destroyed) {
|
|
81
|
+
Ticker.system.remove(this._loopFn);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
81
84
|
this.update(Ticker.system.deltaMS / 1000);
|
|
82
85
|
this._updateFollowPoint();
|
|
83
86
|
}
|