lyb-pixi-js 1.11.1 → 1.11.3
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/Utils/LibPixiDialogManager/ui/LibPixiDialog.d.ts +1 -1
- package/Utils/LibPixiDialogManager/ui/LibPixiDialog.js +21 -19
- package/lyb-pixi.js +139 -95
- package/package.json +5 -3
- package/Utils/LibArrangeLinear.d.ts +0 -9
- package/Utils/LibArrangeLinear.js +0 -29
- package/Utils/LibEmitContainerEvent.d.ts +0 -7
- package/Utils/LibEmitContainerEvent.js +0 -13
|
@@ -26,7 +26,7 @@ export declare class LibPixiDialog extends LibPixiBaseContainer {
|
|
|
26
26
|
/** 是否处于关闭动画状态 */
|
|
27
27
|
private _isCloseAnimating;
|
|
28
28
|
/** 停止监听窗口 */
|
|
29
|
-
private _offResize
|
|
29
|
+
private _offResize?;
|
|
30
30
|
constructor(params?: Params);
|
|
31
31
|
/** @description 设置弹窗内容 */
|
|
32
32
|
setDialogContent(content: Container): void;
|
|
@@ -35,16 +35,34 @@ export class LibPixiDialog extends LibPixiBaseContainer {
|
|
|
35
35
|
this._maskUI.visible = needBg;
|
|
36
36
|
if (onClickMask) {
|
|
37
37
|
libPixiEvent(this._maskUI, "pointertap", () => {
|
|
38
|
+
var _a;
|
|
38
39
|
if (this._isCloseAnimating)
|
|
39
40
|
return;
|
|
40
41
|
onClickMask === null || onClickMask === void 0 ? void 0 : onClickMask();
|
|
41
|
-
this._offResize();
|
|
42
|
+
(_a = this._offResize) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
42
43
|
});
|
|
43
44
|
}
|
|
44
45
|
//弹窗内容容器
|
|
45
46
|
this._dialogContainer = new Container();
|
|
46
47
|
this.addChild(this._dialogContainer);
|
|
47
48
|
this._dialogContainer.eventMode = "static";
|
|
49
|
+
}
|
|
50
|
+
/** @description 设置弹窗内容 */
|
|
51
|
+
setDialogContent(content) {
|
|
52
|
+
this._dialogContainer.addChild(content);
|
|
53
|
+
const w = this._dialogContainer.width / 2;
|
|
54
|
+
const h = this._dialogContainer.height / 2;
|
|
55
|
+
this._dialogContainer.pivot.set(w, h);
|
|
56
|
+
this._dialogContainer.scale.set(0);
|
|
57
|
+
this._dialogContainer.alpha = 0;
|
|
58
|
+
gsap.to(this._maskUI, {
|
|
59
|
+
duration: LibPixiDialog.durationIn,
|
|
60
|
+
alpha: LibPixiDialog.bgAlpha,
|
|
61
|
+
});
|
|
62
|
+
gsap.to(this._dialogContainer, {
|
|
63
|
+
duration: LibPixiDialog.durationIn,
|
|
64
|
+
alpha: 1,
|
|
65
|
+
});
|
|
48
66
|
const resize = new LibJsResizeWatcher();
|
|
49
67
|
this._offResize = resize.on((w, h) => {
|
|
50
68
|
const halfW = 1920 / 2;
|
|
@@ -75,29 +93,13 @@ export class LibPixiDialog extends LibPixiBaseContainer {
|
|
|
75
93
|
});
|
|
76
94
|
});
|
|
77
95
|
}
|
|
78
|
-
/** @description 设置弹窗内容 */
|
|
79
|
-
setDialogContent(content) {
|
|
80
|
-
this._dialogContainer.addChild(content);
|
|
81
|
-
const w = this._dialogContainer.width / 2;
|
|
82
|
-
const h = this._dialogContainer.height / 2;
|
|
83
|
-
this._dialogContainer.pivot.set(w, h);
|
|
84
|
-
this._dialogContainer.scale.set(0);
|
|
85
|
-
this._dialogContainer.alpha = 0;
|
|
86
|
-
gsap.to(this._maskUI, {
|
|
87
|
-
duration: LibPixiDialog.durationIn,
|
|
88
|
-
alpha: LibPixiDialog.bgAlpha,
|
|
89
|
-
});
|
|
90
|
-
gsap.to(this._dialogContainer, {
|
|
91
|
-
duration: LibPixiDialog.durationIn,
|
|
92
|
-
alpha: 1,
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
96
|
/** @description 关闭 */
|
|
96
97
|
close() {
|
|
97
98
|
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
var _a;
|
|
98
100
|
if (this._isCloseAnimating)
|
|
99
101
|
return;
|
|
100
|
-
this._offResize();
|
|
102
|
+
(_a = this._offResize) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
101
103
|
this._isCloseAnimating = true;
|
|
102
104
|
gsap.to(this._dialogContainer.scale, {
|
|
103
105
|
duration: LibPixiDialog.durationOut,
|
package/lyb-pixi.js
CHANGED
|
@@ -1336,26 +1336,29 @@
|
|
|
1336
1336
|
function quote(s2) {
|
|
1337
1337
|
return $replace$1.call(String(s2), /"/g, """);
|
|
1338
1338
|
}
|
|
1339
|
+
function canTrustToString(obj) {
|
|
1340
|
+
return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
|
|
1341
|
+
}
|
|
1339
1342
|
function isArray$3(obj) {
|
|
1340
|
-
return toStr$1(obj) === "[object Array]" && (
|
|
1343
|
+
return toStr$1(obj) === "[object Array]" && canTrustToString(obj);
|
|
1341
1344
|
}
|
|
1342
1345
|
function isDate(obj) {
|
|
1343
|
-
return toStr$1(obj) === "[object Date]" && (
|
|
1346
|
+
return toStr$1(obj) === "[object Date]" && canTrustToString(obj);
|
|
1344
1347
|
}
|
|
1345
1348
|
function isRegExp$1(obj) {
|
|
1346
|
-
return toStr$1(obj) === "[object RegExp]" && (
|
|
1349
|
+
return toStr$1(obj) === "[object RegExp]" && canTrustToString(obj);
|
|
1347
1350
|
}
|
|
1348
1351
|
function isError(obj) {
|
|
1349
|
-
return toStr$1(obj) === "[object Error]" && (
|
|
1352
|
+
return toStr$1(obj) === "[object Error]" && canTrustToString(obj);
|
|
1350
1353
|
}
|
|
1351
1354
|
function isString(obj) {
|
|
1352
|
-
return toStr$1(obj) === "[object String]" && (
|
|
1355
|
+
return toStr$1(obj) === "[object String]" && canTrustToString(obj);
|
|
1353
1356
|
}
|
|
1354
1357
|
function isNumber(obj) {
|
|
1355
|
-
return toStr$1(obj) === "[object Number]" && (
|
|
1358
|
+
return toStr$1(obj) === "[object Number]" && canTrustToString(obj);
|
|
1356
1359
|
}
|
|
1357
1360
|
function isBoolean(obj) {
|
|
1358
|
-
return toStr$1(obj) === "[object Boolean]" && (
|
|
1361
|
+
return toStr$1(obj) === "[object Boolean]" && canTrustToString(obj);
|
|
1359
1362
|
}
|
|
1360
1363
|
function isSymbol(obj) {
|
|
1361
1364
|
if (hasShammedSymbols) {
|
|
@@ -2069,6 +2072,7 @@
|
|
|
2069
2072
|
"%eval%": eval,
|
|
2070
2073
|
// eslint-disable-line no-eval
|
|
2071
2074
|
"%EvalError%": $EvalError,
|
|
2075
|
+
"%Float16Array%": typeof Float16Array === "undefined" ? undefined$1 : Float16Array,
|
|
2072
2076
|
"%Float32Array%": typeof Float32Array === "undefined" ? undefined$1 : Float32Array,
|
|
2073
2077
|
"%Float64Array%": typeof Float64Array === "undefined" ? undefined$1 : Float64Array,
|
|
2074
2078
|
"%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined$1 : FinalizationRegistry,
|
|
@@ -2322,11 +2326,14 @@
|
|
|
2322
2326
|
var $indexOf = callBindBasic([GetIntrinsic$2("%String.prototype.indexOf%")]);
|
|
2323
2327
|
var callBound$2 = function callBoundIntrinsic(name, allowMissing) {
|
|
2324
2328
|
var intrinsic = (
|
|
2325
|
-
/** @type {
|
|
2329
|
+
/** @type {(this: unknown, ...args: unknown[]) => unknown} */
|
|
2326
2330
|
GetIntrinsic$2(name, !!allowMissing)
|
|
2327
2331
|
);
|
|
2328
2332
|
if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
|
|
2329
|
-
return callBindBasic(
|
|
2333
|
+
return callBindBasic(
|
|
2334
|
+
/** @type {const} */
|
|
2335
|
+
[intrinsic]
|
|
2336
|
+
);
|
|
2330
2337
|
}
|
|
2331
2338
|
return intrinsic;
|
|
2332
2339
|
};
|
|
@@ -10947,7 +10954,7 @@ void main(void)
|
|
|
10947
10954
|
*/
|
|
10948
10955
|
run(options) {
|
|
10949
10956
|
const { renderer } = this;
|
|
10950
|
-
renderer.runners.init.emit(renderer.options), options.hello && console.log(`PixiJS 7.4.
|
|
10957
|
+
renderer.runners.init.emit(renderer.options), options.hello && console.log(`PixiJS 7.4.3 - ${renderer.rendererLogId} - https://pixijs.com`), renderer.resize(renderer.screen.width, renderer.screen.height);
|
|
10951
10958
|
}
|
|
10952
10959
|
destroy() {
|
|
10953
10960
|
}
|
|
@@ -18198,7 +18205,8 @@ void main()
|
|
|
18198
18205
|
if (keys.forEach((key2) => {
|
|
18199
18206
|
this._cacheMap.set(key2, cachedAssets);
|
|
18200
18207
|
}), cacheKeys.forEach((key2) => {
|
|
18201
|
-
|
|
18208
|
+
const val = cacheableAssets ? cacheableAssets[key2] : value;
|
|
18209
|
+
this._cache.has(key2) && this._cache.get(key2) !== val && console.warn("[Cache] already has key:", key2), this._cache.set(key2, cacheableAssets[key2]);
|
|
18202
18210
|
}), value instanceof Texture) {
|
|
18203
18211
|
const texture = value;
|
|
18204
18212
|
keys.forEach((key2) => {
|
|
@@ -25714,12 +25722,11 @@ void main(void)\r
|
|
|
25714
25722
|
subClass.__proto__ = superClass;
|
|
25715
25723
|
}
|
|
25716
25724
|
/*!
|
|
25717
|
-
* GSAP 3.
|
|
25725
|
+
* GSAP 3.13.0
|
|
25718
25726
|
* https://gsap.com
|
|
25719
25727
|
*
|
|
25720
|
-
* @license Copyright 2008-
|
|
25721
|
-
* Subject to the terms at https://gsap.com/standard-license
|
|
25722
|
-
* Club GSAP members, the agreement issued with that membership.
|
|
25728
|
+
* @license Copyright 2008-2025, GreenSock. All rights reserved.
|
|
25729
|
+
* Subject to the terms at https://gsap.com/standard-license
|
|
25723
25730
|
* @author: Jack Doyle, jack@greensock.com
|
|
25724
25731
|
*/
|
|
25725
25732
|
var _config = {
|
|
@@ -25810,9 +25817,11 @@ void main(void)\r
|
|
|
25810
25817
|
tween = a2[i2];
|
|
25811
25818
|
tween && tween._lazy && (tween.render(tween._lazy[0], tween._lazy[1], true)._lazy = 0);
|
|
25812
25819
|
}
|
|
25820
|
+
}, _isRevertWorthy = function _isRevertWorthy2(animation) {
|
|
25821
|
+
return !!(animation._initted || animation._startAt || animation.add);
|
|
25813
25822
|
}, _lazySafeRender = function _lazySafeRender2(animation, time, suppressEvents, force) {
|
|
25814
25823
|
_lazyTweens.length && !_reverting$1 && _lazyRender();
|
|
25815
|
-
animation.render(time, suppressEvents, force || _reverting$1 && time < 0 && (animation
|
|
25824
|
+
animation.render(time, suppressEvents, force || !!(_reverting$1 && time < 0 && _isRevertWorthy(animation)));
|
|
25816
25825
|
_lazyTweens.length && !_reverting$1 && _lazyRender();
|
|
25817
25826
|
}, _numericIfPossible = function _numericIfPossible2(value) {
|
|
25818
25827
|
var n2 = parseFloat(value);
|
|
@@ -25935,7 +25944,7 @@ void main(void)\r
|
|
|
25935
25944
|
}, _elapsedCycleDuration = function _elapsedCycleDuration2(animation) {
|
|
25936
25945
|
return animation._repeat ? _animationCycle(animation._tTime, animation = animation.duration() + animation._rDelay) * animation : 0;
|
|
25937
25946
|
}, _animationCycle = function _animationCycle2(tTime, cycleDuration) {
|
|
25938
|
-
var whole = Math.floor(tTime
|
|
25947
|
+
var whole = Math.floor(tTime = _roundPrecise(tTime / cycleDuration));
|
|
25939
25948
|
return tTime && whole === tTime ? whole - 1 : whole;
|
|
25940
25949
|
}, _parentToChildTotalTime = function _parentToChildTotalTime2(parentTime, child) {
|
|
25941
25950
|
return (parentTime - child._start) * child._ts + (child._ts >= 0 ? 0 : child._dirty ? child.totalDuration() : child._tDur);
|
|
@@ -26716,7 +26725,7 @@ void main(void)\r
|
|
|
26716
26725
|
}, easeOut);
|
|
26717
26726
|
})(7.5625, 2.75);
|
|
26718
26727
|
_insertEase("Expo", function(p2) {
|
|
26719
|
-
return
|
|
26728
|
+
return Math.pow(2, 10 * (p2 - 1)) * p2 + p2 * p2 * p2 * p2 * p2 * p2 * (1 - p2);
|
|
26720
26729
|
});
|
|
26721
26730
|
_insertEase("Circ", function(p2) {
|
|
26722
26731
|
return -(_sqrt(1 - p2 * p2) - 1);
|
|
@@ -26813,7 +26822,7 @@ void main(void)\r
|
|
|
26813
26822
|
return arguments.length ? this.totalTime(Math.min(this.totalDuration(), value + _elapsedCycleDuration(this)) % (this._dur + this._rDelay) || (value ? this._dur : 0), suppressEvents) : this._time;
|
|
26814
26823
|
};
|
|
26815
26824
|
_proto.totalProgress = function totalProgress(value, suppressEvents) {
|
|
26816
|
-
return arguments.length ? this.totalTime(this.totalDuration() * value, suppressEvents) : this.totalDuration() ? Math.min(1, this._tTime / this._tDur) : this.rawTime()
|
|
26825
|
+
return arguments.length ? this.totalTime(this.totalDuration() * value, suppressEvents) : this.totalDuration() ? Math.min(1, this._tTime / this._tDur) : this.rawTime() >= 0 && this._initted ? 1 : 0;
|
|
26817
26826
|
};
|
|
26818
26827
|
_proto.progress = function progress(value, suppressEvents) {
|
|
26819
26828
|
return arguments.length ? this.totalTime(this.duration() * (this._yoyo && !(this.iteration() & 1) ? 1 - value : value) + _elapsedCycleDuration(this), suppressEvents) : this.duration() ? Math.min(1, this._time / this._dur) : this.rawTime() > 0 ? 1 : 0;
|
|
@@ -26832,7 +26841,7 @@ void main(void)\r
|
|
|
26832
26841
|
var tTime = this.parent && this._ts ? _parentToChildTotalTime(this.parent._time, this) : this._tTime;
|
|
26833
26842
|
this._rts = +value || 0;
|
|
26834
26843
|
this._ts = this._ps || value === -_tinyNum ? 0 : this._rts;
|
|
26835
|
-
this.totalTime(_clamp(-Math.abs(this._delay), this.
|
|
26844
|
+
this.totalTime(_clamp(-Math.abs(this._delay), this.totalDuration(), tTime), suppressEvents !== false);
|
|
26836
26845
|
_setEnd(this);
|
|
26837
26846
|
return _recacheAncestors(this);
|
|
26838
26847
|
};
|
|
@@ -26875,7 +26884,7 @@ void main(void)\r
|
|
|
26875
26884
|
}
|
|
26876
26885
|
var prevIsReverting = _reverting$1;
|
|
26877
26886
|
_reverting$1 = config2;
|
|
26878
|
-
if (this
|
|
26887
|
+
if (_isRevertWorthy(this)) {
|
|
26879
26888
|
this.timeline && this.timeline.revert(config2);
|
|
26880
26889
|
this.totalTime(-0.01, config2.suppressEvents);
|
|
26881
26890
|
}
|
|
@@ -26918,7 +26927,9 @@ void main(void)\r
|
|
|
26918
26927
|
return this.totalTime(_parsePosition(this, position), _isNotFalse(suppressEvents));
|
|
26919
26928
|
};
|
|
26920
26929
|
_proto.restart = function restart(includeDelay, suppressEvents) {
|
|
26921
|
-
|
|
26930
|
+
this.play().totalTime(includeDelay ? -this._delay : 0, _isNotFalse(suppressEvents));
|
|
26931
|
+
this._dur || (this._zTime = -_tinyNum);
|
|
26932
|
+
return this;
|
|
26922
26933
|
};
|
|
26923
26934
|
_proto.play = function play(from, suppressEvents) {
|
|
26924
26935
|
from != null && this.seek(from, suppressEvents);
|
|
@@ -27095,8 +27106,9 @@ void main(void)\r
|
|
|
27095
27106
|
iteration = this._repeat;
|
|
27096
27107
|
time = dur;
|
|
27097
27108
|
} else {
|
|
27098
|
-
|
|
27099
|
-
|
|
27109
|
+
prevIteration = _roundPrecise(tTime / cycleDuration);
|
|
27110
|
+
iteration = ~~prevIteration;
|
|
27111
|
+
if (iteration && iteration === prevIteration) {
|
|
27100
27112
|
time = dur;
|
|
27101
27113
|
iteration--;
|
|
27102
27114
|
}
|
|
@@ -27150,7 +27162,7 @@ void main(void)\r
|
|
|
27150
27162
|
this._zTime = totalTime;
|
|
27151
27163
|
prevTime = 0;
|
|
27152
27164
|
}
|
|
27153
|
-
if (!prevTime &&
|
|
27165
|
+
if (!prevTime && tTime && !suppressEvents && !prevIteration) {
|
|
27154
27166
|
_callback(this, "onStart");
|
|
27155
27167
|
if (this._tTime !== tTime) {
|
|
27156
27168
|
return this;
|
|
@@ -27182,7 +27194,7 @@ void main(void)\r
|
|
|
27182
27194
|
if (child.parent !== this) {
|
|
27183
27195
|
return this.render(totalTime, suppressEvents, force);
|
|
27184
27196
|
}
|
|
27185
|
-
child.render(child._ts > 0 ? (adjustedTime - child._start) * child._ts : (child._dirty ? child.totalDuration() : child._tDur) + (adjustedTime - child._start) * child._ts, suppressEvents, force || _reverting$1 && (child
|
|
27197
|
+
child.render(child._ts > 0 ? (adjustedTime - child._start) * child._ts : (child._dirty ? child.totalDuration() : child._tDur) + (adjustedTime - child._start) * child._ts, suppressEvents, force || _reverting$1 && _isRevertWorthy(child));
|
|
27186
27198
|
if (time !== this._time || !this._ts && !prevPaused) {
|
|
27187
27199
|
pauseTween = 0;
|
|
27188
27200
|
next && (tTime += this._zTime = adjustedTime ? -_tinyNum : _tinyNum);
|
|
@@ -27279,7 +27291,7 @@ void main(void)\r
|
|
|
27279
27291
|
if (_isFunction(child)) {
|
|
27280
27292
|
return this.killTweensOf(child);
|
|
27281
27293
|
}
|
|
27282
|
-
_removeLinkedListItem(this, child);
|
|
27294
|
+
child.parent === this && _removeLinkedListItem(this, child);
|
|
27283
27295
|
if (child === this._recent) {
|
|
27284
27296
|
this._recent = this._last;
|
|
27285
27297
|
}
|
|
@@ -27881,7 +27893,7 @@ void main(void)\r
|
|
|
27881
27893
|
var prevTime = this._time, tDur = this._tDur, dur = this._dur, isNegative = totalTime < 0, tTime = totalTime > tDur - _tinyNum && !isNegative ? tDur : totalTime < _tinyNum ? 0 : totalTime, time, pt, iteration, cycleDuration, prevIteration, isYoyo, ratio, timeline, yoyoEase;
|
|
27882
27894
|
if (!dur) {
|
|
27883
27895
|
_renderZeroDurationTween(this, totalTime, suppressEvents, force);
|
|
27884
|
-
} else if (tTime !== this._tTime || !totalTime || force || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== isNegative) {
|
|
27896
|
+
} else if (tTime !== this._tTime || !totalTime || force || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== isNegative || this._lazy) {
|
|
27885
27897
|
time = tTime;
|
|
27886
27898
|
timeline = this.timeline;
|
|
27887
27899
|
if (this._repeat) {
|
|
@@ -27894,12 +27906,14 @@ void main(void)\r
|
|
|
27894
27906
|
iteration = this._repeat;
|
|
27895
27907
|
time = dur;
|
|
27896
27908
|
} else {
|
|
27897
|
-
|
|
27898
|
-
|
|
27909
|
+
prevIteration = _roundPrecise(tTime / cycleDuration);
|
|
27910
|
+
iteration = ~~prevIteration;
|
|
27911
|
+
if (iteration && iteration === prevIteration) {
|
|
27899
27912
|
time = dur;
|
|
27900
27913
|
iteration--;
|
|
27914
|
+
} else if (time > dur) {
|
|
27915
|
+
time = dur;
|
|
27901
27916
|
}
|
|
27902
|
-
time > dur && (time = dur);
|
|
27903
27917
|
}
|
|
27904
27918
|
isYoyo = this._yoyo && iteration & 1;
|
|
27905
27919
|
if (isYoyo) {
|
|
@@ -27913,7 +27927,7 @@ void main(void)\r
|
|
|
27913
27927
|
}
|
|
27914
27928
|
if (iteration !== prevIteration) {
|
|
27915
27929
|
timeline && this._yEase && _propagateYoyoEase(timeline, isYoyo);
|
|
27916
|
-
if (this.vars.repeatRefresh && !isYoyo && !this._lock &&
|
|
27930
|
+
if (this.vars.repeatRefresh && !isYoyo && !this._lock && time !== cycleDuration && this._initted) {
|
|
27917
27931
|
this._lock = force = 1;
|
|
27918
27932
|
this.render(_roundPrecise(cycleDuration * iteration), true).invalidate()._lock = 0;
|
|
27919
27933
|
}
|
|
@@ -27941,7 +27955,7 @@ void main(void)\r
|
|
|
27941
27955
|
if (this._from) {
|
|
27942
27956
|
this.ratio = ratio = 1 - ratio;
|
|
27943
27957
|
}
|
|
27944
|
-
if (
|
|
27958
|
+
if (!prevTime && tTime && !suppressEvents && !prevIteration) {
|
|
27945
27959
|
_callback(this, "onStart");
|
|
27946
27960
|
if (this._tTime !== tTime) {
|
|
27947
27961
|
return this;
|
|
@@ -27998,7 +28012,8 @@ void main(void)\r
|
|
|
27998
28012
|
}
|
|
27999
28013
|
if (!targets && (!vars || vars === "all")) {
|
|
28000
28014
|
this._lazy = this._pt = 0;
|
|
28001
|
-
|
|
28015
|
+
this.parent ? _interrupt(this) : this.scrollTrigger && this.scrollTrigger.kill(!!_reverting$1);
|
|
28016
|
+
return this;
|
|
28002
28017
|
}
|
|
28003
28018
|
if (this.timeline) {
|
|
28004
28019
|
var tDur = this.timeline.totalDuration();
|
|
@@ -28445,8 +28460,8 @@ void main(void)\r
|
|
|
28445
28460
|
};
|
|
28446
28461
|
},
|
|
28447
28462
|
quickTo: function quickTo(target, property, vars) {
|
|
28448
|
-
var
|
|
28449
|
-
var tween = gsap.to(target,
|
|
28463
|
+
var _setDefaults2;
|
|
28464
|
+
var tween = gsap.to(target, _setDefaults((_setDefaults2 = {}, _setDefaults2[property] = "+=0.1", _setDefaults2.paused = true, _setDefaults2.stagger = 0, _setDefaults2), vars || {})), func = function func2(value, start, startIsRelative) {
|
|
28450
28465
|
return tween.resetTo(property, value, start, startIsRelative);
|
|
28451
28466
|
};
|
|
28452
28467
|
func.tween = tween;
|
|
@@ -28608,6 +28623,7 @@ void main(void)\r
|
|
|
28608
28623
|
}, _buildModifierPlugin = function _buildModifierPlugin2(name, modifier) {
|
|
28609
28624
|
return {
|
|
28610
28625
|
name,
|
|
28626
|
+
headless: 1,
|
|
28611
28627
|
rawVars: 1,
|
|
28612
28628
|
//don't pre-process function-based values or "random()" strings.
|
|
28613
28629
|
init: function init2(target, vars, tween) {
|
|
@@ -28654,6 +28670,7 @@ void main(void)\r
|
|
|
28654
28670
|
}
|
|
28655
28671
|
}, {
|
|
28656
28672
|
name: "endArray",
|
|
28673
|
+
headless: 1,
|
|
28657
28674
|
init: function init2(target, value) {
|
|
28658
28675
|
var i2 = value.length;
|
|
28659
28676
|
while (i2--) {
|
|
@@ -28661,7 +28678,7 @@ void main(void)\r
|
|
|
28661
28678
|
}
|
|
28662
28679
|
}
|
|
28663
28680
|
}, _buildModifierPlugin("roundProps", _roundModifier), _buildModifierPlugin("modifiers"), _buildModifierPlugin("snap", snap)) || _gsap;
|
|
28664
|
-
Tween.version = Timeline$1.version = gsap.version = "3.
|
|
28681
|
+
Tween.version = Timeline$1.version = gsap.version = "3.13.0";
|
|
28665
28682
|
_coreReady = 1;
|
|
28666
28683
|
_windowExists$1() && _wake();
|
|
28667
28684
|
_easeMap.Power0;
|
|
@@ -28683,12 +28700,11 @@ void main(void)\r
|
|
|
28683
28700
|
_easeMap.Expo;
|
|
28684
28701
|
_easeMap.Circ;
|
|
28685
28702
|
/*!
|
|
28686
|
-
* CSSPlugin 3.
|
|
28703
|
+
* CSSPlugin 3.13.0
|
|
28687
28704
|
* https://gsap.com
|
|
28688
28705
|
*
|
|
28689
|
-
* Copyright 2008-
|
|
28690
|
-
* Subject to the terms at https://gsap.com/standard-license
|
|
28691
|
-
* Club GSAP members, the agreement issued with that membership.
|
|
28706
|
+
* Copyright 2008-2025, GreenSock. All rights reserved.
|
|
28707
|
+
* Subject to the terms at https://gsap.com/standard-license
|
|
28692
28708
|
* @author: Jack Doyle, jack@greensock.com
|
|
28693
28709
|
*/
|
|
28694
28710
|
var _win, _doc, _docElement, _pluginInitted, _tempDiv, _recentSetterPlugin, _reverting, _windowExists = function _windowExists2() {
|
|
@@ -28761,7 +28777,13 @@ void main(void)\r
|
|
|
28761
28777
|
}, _revertStyle = function _revertStyle2() {
|
|
28762
28778
|
var props = this.props, target = this.target, style = target.style, cache = target._gsap, i2, p2;
|
|
28763
28779
|
for (i2 = 0; i2 < props.length; i2 += 3) {
|
|
28764
|
-
props[i2 + 1]
|
|
28780
|
+
if (!props[i2 + 1]) {
|
|
28781
|
+
props[i2 + 2] ? style[props[i2]] = props[i2 + 2] : style.removeProperty(props[i2].substr(0, 2) === "--" ? props[i2] : props[i2].replace(_capsExp, "-$1").toLowerCase());
|
|
28782
|
+
} else if (props[i2 + 1] === 2) {
|
|
28783
|
+
target[props[i2]](props[i2 + 2]);
|
|
28784
|
+
} else {
|
|
28785
|
+
target[props[i2]] = props[i2 + 2];
|
|
28786
|
+
}
|
|
28765
28787
|
}
|
|
28766
28788
|
if (this.tfm) {
|
|
28767
28789
|
for (p2 in this.tfm) {
|
|
@@ -28790,7 +28812,7 @@ void main(void)\r
|
|
|
28790
28812
|
save: _saveStyle
|
|
28791
28813
|
};
|
|
28792
28814
|
target._gsap || gsap.core.getCache(target);
|
|
28793
|
-
properties && properties.split(",").forEach(function(p2) {
|
|
28815
|
+
properties && target.style && target.nodeType && properties.split(",").forEach(function(p2) {
|
|
28794
28816
|
return saver.save(p2);
|
|
28795
28817
|
});
|
|
28796
28818
|
return saver;
|
|
@@ -28825,30 +28847,17 @@ void main(void)\r
|
|
|
28825
28847
|
_reverting = gsap.core.reverting;
|
|
28826
28848
|
_pluginInitted = 1;
|
|
28827
28849
|
}
|
|
28828
|
-
},
|
|
28829
|
-
var svg = _createElement("svg",
|
|
28850
|
+
}, _getReparentedCloneBBox = function _getReparentedCloneBBox2(target) {
|
|
28851
|
+
var owner = target.ownerSVGElement, svg = _createElement("svg", owner && owner.getAttribute("xmlns") || "http://www.w3.org/2000/svg"), clone2 = target.cloneNode(true), bbox;
|
|
28852
|
+
clone2.style.display = "block";
|
|
28853
|
+
svg.appendChild(clone2);
|
|
28830
28854
|
_docElement.appendChild(svg);
|
|
28831
|
-
|
|
28832
|
-
|
|
28833
|
-
|
|
28834
|
-
try {
|
|
28835
|
-
bbox = this.getBBox();
|
|
28836
|
-
this._gsapBBox = this.getBBox;
|
|
28837
|
-
this.getBBox = _getBBoxHack2;
|
|
28838
|
-
} catch (e2) {
|
|
28839
|
-
}
|
|
28840
|
-
} else if (this._gsapBBox) {
|
|
28841
|
-
bbox = this._gsapBBox();
|
|
28842
|
-
}
|
|
28843
|
-
if (oldParent) {
|
|
28844
|
-
if (oldSibling) {
|
|
28845
|
-
oldParent.insertBefore(this, oldSibling);
|
|
28846
|
-
} else {
|
|
28847
|
-
oldParent.appendChild(this);
|
|
28848
|
-
}
|
|
28855
|
+
try {
|
|
28856
|
+
bbox = clone2.getBBox();
|
|
28857
|
+
} catch (e2) {
|
|
28849
28858
|
}
|
|
28859
|
+
svg.removeChild(clone2);
|
|
28850
28860
|
_docElement.removeChild(svg);
|
|
28851
|
-
this.style.cssText = oldCSS;
|
|
28852
28861
|
return bbox;
|
|
28853
28862
|
}, _getAttributeFallbacks = function _getAttributeFallbacks2(target, attributesArray) {
|
|
28854
28863
|
var i2 = attributesArray.length;
|
|
@@ -28858,13 +28867,14 @@ void main(void)\r
|
|
|
28858
28867
|
}
|
|
28859
28868
|
}
|
|
28860
28869
|
}, _getBBox = function _getBBox2(target) {
|
|
28861
|
-
var bounds;
|
|
28870
|
+
var bounds, cloned;
|
|
28862
28871
|
try {
|
|
28863
28872
|
bounds = target.getBBox();
|
|
28864
28873
|
} catch (error) {
|
|
28865
|
-
bounds =
|
|
28874
|
+
bounds = _getReparentedCloneBBox(target);
|
|
28875
|
+
cloned = 1;
|
|
28866
28876
|
}
|
|
28867
|
-
bounds && (bounds.width || bounds.height) ||
|
|
28877
|
+
bounds && (bounds.width || bounds.height) || cloned || (bounds = _getReparentedCloneBBox(target));
|
|
28868
28878
|
return bounds && !bounds.width && !bounds.x && !bounds.y ? {
|
|
28869
28879
|
x: +_getAttributeFallbacks(target, ["x", "cx", "x1"]) || 0,
|
|
28870
28880
|
y: +_getAttributeFallbacks(target, ["y", "cy", "y1"]) || 0,
|
|
@@ -28915,7 +28925,7 @@ void main(void)\r
|
|
|
28915
28925
|
return _round(toPercent ? curValue / px * amount : curValue / 100 * px);
|
|
28916
28926
|
}
|
|
28917
28927
|
style[horizontal ? "width" : "height"] = amount + (toPixels ? curUnit : unit);
|
|
28918
|
-
parent = ~property.indexOf("adius") || unit === "em" && target.appendChild && !isRootSVG ? target : target.parentNode;
|
|
28928
|
+
parent = unit !== "rem" && ~property.indexOf("adius") || unit === "em" && target.appendChild && !isRootSVG ? target : target.parentNode;
|
|
28919
28929
|
if (isSVG) {
|
|
28920
28930
|
parent = (target.ownerSVGElement || {}).parentNode;
|
|
28921
28931
|
}
|
|
@@ -28980,6 +28990,9 @@ void main(void)\r
|
|
|
28980
28990
|
pt.e = end;
|
|
28981
28991
|
start += "";
|
|
28982
28992
|
end += "";
|
|
28993
|
+
if (end.substring(0, 6) === "var(--") {
|
|
28994
|
+
end = _getComputedProperty(target, end.substring(4, end.indexOf(")")));
|
|
28995
|
+
}
|
|
28983
28996
|
if (end === "auto") {
|
|
28984
28997
|
startValue = target.style[prop];
|
|
28985
28998
|
target.style[prop] = end;
|
|
@@ -29073,6 +29086,7 @@ void main(void)\r
|
|
|
29073
29086
|
_removeProperty(target, _transformProp);
|
|
29074
29087
|
if (cache) {
|
|
29075
29088
|
cache.svg && target.removeAttribute("transform");
|
|
29089
|
+
style.scale = style.rotate = style.translate = "none";
|
|
29076
29090
|
_parseTransform(target, 1);
|
|
29077
29091
|
cache.uncache = 1;
|
|
29078
29092
|
_removeIndependentTransforms(style);
|
|
@@ -29168,7 +29182,7 @@ void main(void)\r
|
|
|
29168
29182
|
temp = style.display;
|
|
29169
29183
|
style.display = "block";
|
|
29170
29184
|
parent = target.parentNode;
|
|
29171
|
-
if (!parent || !target.offsetParent) {
|
|
29185
|
+
if (!parent || !target.offsetParent && !target.getBoundingClientRect().width) {
|
|
29172
29186
|
addedToDOM = 1;
|
|
29173
29187
|
nextSibling = target.nextElementSibling;
|
|
29174
29188
|
_docElement.appendChild(target);
|
|
@@ -29604,6 +29618,10 @@ void main(void)\r
|
|
|
29604
29618
|
isTransformRelated = p2 in _transformProps;
|
|
29605
29619
|
if (isTransformRelated) {
|
|
29606
29620
|
this.styles.save(p2);
|
|
29621
|
+
if (type2 === "string" && endValue.substring(0, 6) === "var(--") {
|
|
29622
|
+
endValue = _getComputedProperty(target, endValue.substring(4, endValue.indexOf(")")));
|
|
29623
|
+
endNum = parseFloat(endValue);
|
|
29624
|
+
}
|
|
29607
29625
|
if (!transformPropTween) {
|
|
29608
29626
|
cache = target._gsap;
|
|
29609
29627
|
cache.renderTransform && !vars.parseTransform || _parseTransform(target, vars.parseTransform);
|
|
@@ -29667,7 +29685,7 @@ void main(void)\r
|
|
|
29667
29685
|
} else {
|
|
29668
29686
|
_tweenComplexCSSString.call(this, target, p2, startValue, relative ? relative + endValue : endValue);
|
|
29669
29687
|
}
|
|
29670
|
-
isTransformRelated || (p2 in style ? inlineProps.push(p2, 0, style[p2]) : inlineProps.push(p2, 1, startValue || target[p2]));
|
|
29688
|
+
isTransformRelated || (p2 in style ? inlineProps.push(p2, 0, style[p2]) : typeof target[p2] === "function" ? inlineProps.push(p2, 2, target[p2]()) : inlineProps.push(p2, 1, startValue || target[p2]));
|
|
29671
29689
|
props.push(p2);
|
|
29672
29690
|
}
|
|
29673
29691
|
}
|
|
@@ -32874,7 +32892,11 @@ void main(void)\r
|
|
|
32874
32892
|
/**
|
|
32875
32893
|
* past Spine.globalDelayLimit
|
|
32876
32894
|
*/
|
|
32877
|
-
GLOBAL_DELAY_LIMIT: 0
|
|
32895
|
+
GLOBAL_DELAY_LIMIT: 0,
|
|
32896
|
+
/**
|
|
32897
|
+
* shows error in console if atlas page loading somehow failed
|
|
32898
|
+
*/
|
|
32899
|
+
REPORT_TEXTURE_LOADER_ERROR: true
|
|
32878
32900
|
};
|
|
32879
32901
|
const tempRgb = [0, 0, 0];
|
|
32880
32902
|
class SpineSprite extends Sprite {
|
|
@@ -33269,6 +33291,9 @@ void main(void)\r
|
|
|
33269
33291
|
* @private
|
|
33270
33292
|
*/
|
|
33271
33293
|
createMesh(slot, attachment) {
|
|
33294
|
+
if (!attachment.region && attachment.sequence) {
|
|
33295
|
+
attachment.sequence.apply(slot, attachment);
|
|
33296
|
+
}
|
|
33272
33297
|
let region = attachment.region;
|
|
33273
33298
|
if (slot.hackAttachment === attachment) {
|
|
33274
33299
|
region = slot.hackRegion;
|
|
@@ -39976,9 +40001,16 @@ void main(void)\r
|
|
|
39976
40001
|
};
|
|
39977
40002
|
const makeSpineTextureAtlasLoaderFunctionFromPixiLoaderObject = (loader, atlasBasePath, imageMetadata) => {
|
|
39978
40003
|
return async (pageName, textureLoadedCallback) => {
|
|
39979
|
-
|
|
39980
|
-
|
|
39981
|
-
|
|
40004
|
+
try {
|
|
40005
|
+
const url = path.normalize([...atlasBasePath.split(path.sep), pageName].join(path.sep));
|
|
40006
|
+
const texture = await loader.load({ src: url, data: imageMetadata });
|
|
40007
|
+
textureLoadedCallback(texture.baseTexture);
|
|
40008
|
+
} catch (e2) {
|
|
40009
|
+
{
|
|
40010
|
+
console.error("Spine: error in texture loader", e2);
|
|
40011
|
+
}
|
|
40012
|
+
textureLoadedCallback(null);
|
|
40013
|
+
}
|
|
39982
40014
|
};
|
|
39983
40015
|
};
|
|
39984
40016
|
extensions$2.add(spineTextureAtlasLoader);
|
|
@@ -55396,10 +55428,10 @@ void main(void){
|
|
|
55396
55428
|
}
|
|
55397
55429
|
}
|
|
55398
55430
|
/*!
|
|
55399
|
-
* decimal.js v10.
|
|
55431
|
+
* decimal.js v10.5.0
|
|
55400
55432
|
* An arbitrary-precision Decimal type for JavaScript.
|
|
55401
55433
|
* https://github.com/MikeMcl/decimal.js
|
|
55402
|
-
* Copyright (c)
|
|
55434
|
+
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
55403
55435
|
* MIT Licence
|
|
55404
55436
|
*/
|
|
55405
55437
|
var EXP_LIMIT = 9e15, MAX_DIGITS = 1e9, NUMERALS = "0123456789abcdef", LN10 = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", PI = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", DEFAULTS = {
|
|
@@ -55668,7 +55700,7 @@ void main(void){
|
|
|
55668
55700
|
return divide(x2.sinh(), x2.cosh(), Ctor.precision = pr, Ctor.rounding = rm);
|
|
55669
55701
|
};
|
|
55670
55702
|
P.inverseCosine = P.acos = function() {
|
|
55671
|
-
var
|
|
55703
|
+
var x2 = this, Ctor = x2.constructor, k2 = x2.abs().cmp(1), pr = Ctor.precision, rm = Ctor.rounding;
|
|
55672
55704
|
if (k2 !== -1) {
|
|
55673
55705
|
return k2 === 0 ? x2.isNeg() ? getPi(Ctor, pr, rm) : new Ctor(0) : new Ctor(NaN);
|
|
55674
55706
|
}
|
|
@@ -55676,11 +55708,10 @@ void main(void){
|
|
|
55676
55708
|
return getPi(Ctor, pr + 4, rm).times(0.5);
|
|
55677
55709
|
Ctor.precision = pr + 6;
|
|
55678
55710
|
Ctor.rounding = 1;
|
|
55679
|
-
x2 = x2.
|
|
55680
|
-
halfPi = getPi(Ctor, pr + 4, rm).times(0.5);
|
|
55711
|
+
x2 = new Ctor(1).minus(x2).div(x2.plus(1)).sqrt().atan();
|
|
55681
55712
|
Ctor.precision = pr;
|
|
55682
55713
|
Ctor.rounding = rm;
|
|
55683
|
-
return
|
|
55714
|
+
return x2.times(2);
|
|
55684
55715
|
};
|
|
55685
55716
|
P.inverseHyperbolicCosine = P.acosh = function() {
|
|
55686
55717
|
var pr, rm, x2 = this, Ctor = x2.constructor;
|
|
@@ -56892,14 +56923,16 @@ void main(void){
|
|
|
56892
56923
|
function isOdd(n2) {
|
|
56893
56924
|
return n2.d[n2.d.length - 1] & 1;
|
|
56894
56925
|
}
|
|
56895
|
-
function maxOrMin(Ctor, args,
|
|
56896
|
-
var y2, x2 = new Ctor(args[0]), i2 = 0;
|
|
56926
|
+
function maxOrMin(Ctor, args, n2) {
|
|
56927
|
+
var k2, y2, x2 = new Ctor(args[0]), i2 = 0;
|
|
56897
56928
|
for (; ++i2 < args.length; ) {
|
|
56898
56929
|
y2 = new Ctor(args[i2]);
|
|
56899
56930
|
if (!y2.s) {
|
|
56900
56931
|
x2 = y2;
|
|
56901
56932
|
break;
|
|
56902
|
-
}
|
|
56933
|
+
}
|
|
56934
|
+
k2 = x2.cmp(y2);
|
|
56935
|
+
if (k2 === n2 || k2 === 0 && x2.s === n2) {
|
|
56903
56936
|
x2 = y2;
|
|
56904
56937
|
}
|
|
56905
56938
|
}
|
|
@@ -57480,7 +57513,8 @@ void main(void){
|
|
|
57480
57513
|
x2.d = [v2];
|
|
57481
57514
|
}
|
|
57482
57515
|
return;
|
|
57483
|
-
}
|
|
57516
|
+
}
|
|
57517
|
+
if (v2 * 0 !== 0) {
|
|
57484
57518
|
if (!v2)
|
|
57485
57519
|
x2.s = NaN;
|
|
57486
57520
|
x2.e = NaN;
|
|
@@ -57488,18 +57522,28 @@ void main(void){
|
|
|
57488
57522
|
return;
|
|
57489
57523
|
}
|
|
57490
57524
|
return parseDecimal(x2, v2.toString());
|
|
57491
|
-
} else if (t2 !== "string") {
|
|
57492
|
-
throw Error(invalidArgument + v2);
|
|
57493
57525
|
}
|
|
57494
|
-
if (
|
|
57495
|
-
|
|
57496
|
-
x2.s = -1;
|
|
57497
|
-
} else {
|
|
57498
|
-
if (i3 === 43)
|
|
57526
|
+
if (t2 === "string") {
|
|
57527
|
+
if ((i3 = v2.charCodeAt(0)) === 45) {
|
|
57499
57528
|
v2 = v2.slice(1);
|
|
57500
|
-
|
|
57529
|
+
x2.s = -1;
|
|
57530
|
+
} else {
|
|
57531
|
+
if (i3 === 43)
|
|
57532
|
+
v2 = v2.slice(1);
|
|
57533
|
+
x2.s = 1;
|
|
57534
|
+
}
|
|
57535
|
+
return isDecimal.test(v2) ? parseDecimal(x2, v2) : parseOther(x2, v2);
|
|
57536
|
+
}
|
|
57537
|
+
if (t2 === "bigint") {
|
|
57538
|
+
if (v2 < 0) {
|
|
57539
|
+
v2 = -v2;
|
|
57540
|
+
x2.s = -1;
|
|
57541
|
+
} else {
|
|
57542
|
+
x2.s = 1;
|
|
57543
|
+
}
|
|
57544
|
+
return parseDecimal(x2, v2.toString());
|
|
57501
57545
|
}
|
|
57502
|
-
|
|
57546
|
+
throw Error(invalidArgument + v2);
|
|
57503
57547
|
}
|
|
57504
57548
|
Decimal2.prototype = P;
|
|
57505
57549
|
Decimal2.ROUND_UP = 0;
|
|
@@ -57609,10 +57653,10 @@ void main(void){
|
|
|
57609
57653
|
return new this(x2).log(10);
|
|
57610
57654
|
}
|
|
57611
57655
|
function max() {
|
|
57612
|
-
return maxOrMin(this, arguments,
|
|
57656
|
+
return maxOrMin(this, arguments, -1);
|
|
57613
57657
|
}
|
|
57614
57658
|
function min() {
|
|
57615
|
-
return maxOrMin(this, arguments,
|
|
57659
|
+
return maxOrMin(this, arguments, 1);
|
|
57616
57660
|
}
|
|
57617
57661
|
function mod(x2, y2) {
|
|
57618
57662
|
return new this(x2).mod(y2);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lyb-pixi-js",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.3",
|
|
4
4
|
"description": "自用Pixi.JS方法库",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"exports": {
|
|
@@ -24,7 +24,9 @@
|
|
|
24
24
|
"lyb-pixi-js"
|
|
25
25
|
],
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@types/howler": "^2.2.12"
|
|
27
|
+
"@types/howler": "^2.2.12",
|
|
28
|
+
"@types/node": "^22.10.5",
|
|
29
|
+
"typescript": "^5.7.3"
|
|
28
30
|
},
|
|
29
31
|
"dependencies": {
|
|
30
32
|
"@pixi-spine/runtime-3.8": "^4.0.3",
|
|
@@ -35,7 +37,7 @@
|
|
|
35
37
|
"decimal.js": "^10.4.3",
|
|
36
38
|
"gsap": "^3.12.5",
|
|
37
39
|
"howler": "^2.2.4",
|
|
38
|
-
"lyb-js": "^1.4
|
|
40
|
+
"lyb-js": "^1.6.4",
|
|
39
41
|
"pixi-spine": "^4.0.4",
|
|
40
42
|
"pixi.js": "^7.4.2",
|
|
41
43
|
"vite": "^4.5.5"
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Container } from "pixi.js";
|
|
2
|
-
/**
|
|
3
|
-
* @description 按照指定方向(水平或垂直)排列元素,支持固定间隔或自定义每个间隔。
|
|
4
|
-
* @param items 要排列的元素数组。
|
|
5
|
-
* @param gap 元素之间的间隔,可以是固定间隔或自定义的间隔数组。
|
|
6
|
-
* @param direction 排列方向,"x"表示水平,"y"表示垂直,默认为水平。
|
|
7
|
-
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibArrangeLinear-间隔布局
|
|
8
|
-
*/
|
|
9
|
-
export declare const LibArrangeLinear: (items: Container[], gap: number | number[], direction?: "x" | "y") => void;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description 按照指定方向(水平或垂直)排列元素,支持固定间隔或自定义每个间隔。
|
|
3
|
-
* @param items 要排列的元素数组。
|
|
4
|
-
* @param gap 元素之间的间隔,可以是固定间隔或自定义的间隔数组。
|
|
5
|
-
* @param direction 排列方向,"x"表示水平,"y"表示垂直,默认为水平。
|
|
6
|
-
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibArrangeLinear-间隔布局
|
|
7
|
-
*/
|
|
8
|
-
export const LibArrangeLinear = (items, gap, direction = "x") => {
|
|
9
|
-
if (Array.isArray(gap)) {
|
|
10
|
-
if (gap.length !== items.length - 1) {
|
|
11
|
-
console.error(new Error("间隔的数组长度只能等于元素数组长度-1"));
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
let lastPosition = 0;
|
|
16
|
-
items.forEach((item, index) => {
|
|
17
|
-
const position = index === 0
|
|
18
|
-
? 0
|
|
19
|
-
: lastPosition + (Array.isArray(gap) ? gap[index - 1] : gap);
|
|
20
|
-
if (direction === "x") {
|
|
21
|
-
item.x = position;
|
|
22
|
-
lastPosition = item.x + item.width;
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
item.y = position;
|
|
26
|
-
lastPosition = item.y + item.height;
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/** @description 触发后代监听
|
|
2
|
-
* @param container 容器
|
|
3
|
-
* @param event 事件名称
|
|
4
|
-
* @param payload 事件携带数据
|
|
5
|
-
*/
|
|
6
|
-
export const LibEmitContainerEvent = (container, event, payload) => {
|
|
7
|
-
container.children.forEach((child) => {
|
|
8
|
-
child.emit(event, payload);
|
|
9
|
-
if ("children" in child) {
|
|
10
|
-
LibEmitContainerEvent(child, event, payload);
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
};
|