lyb-pixi-js 1.11.4 → 1.11.5

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.
@@ -0,0 +1,9 @@
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;
@@ -0,0 +1,29 @@
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
+ };
@@ -0,0 +1,7 @@
1
+ import { Container } from "pixi.js";
2
+ /** @description 触发后代监听
3
+ * @param container 容器
4
+ * @param event 事件名称
5
+ * @param payload 事件携带数据
6
+ */
7
+ export declare const LibEmitContainerEvent: (container: Container, event: string, payload?: any) => void;
@@ -0,0 +1,13 @@
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
+ };
@@ -15,6 +15,8 @@ export declare class LibPixiDialog extends LibPixiBaseContainer {
15
15
  /** 动画时长 */
16
16
  static durationIn: number;
17
17
  static durationOut: number;
18
+ /** 是否支持横竖版 */
19
+ static adaptation: boolean;
18
20
  /** 蒙版UI */
19
21
  private _maskUI;
20
22
  /** 内容容器 */
@@ -63,7 +63,7 @@ export class LibPixiDialog extends LibPixiBaseContainer {
63
63
  duration: LibPixiDialog.durationIn,
64
64
  alpha: 1,
65
65
  });
66
- const resize = new LibJsResizeWatcher();
66
+ const resize = new LibJsResizeWatcher(LibPixiDialog.adaptation ? "hv" : "h");
67
67
  this._offResize = resize.on((w, h) => {
68
68
  const halfW = 1920 / 2;
69
69
  const halfH = 1080 / 2;
@@ -125,3 +125,5 @@ LibPixiDialog.bgAlpha = 0.5;
125
125
  /** 动画时长 */
126
126
  LibPixiDialog.durationIn = 0.5;
127
127
  LibPixiDialog.durationOut = 0.5;
128
+ /** 是否支持横竖版 */
129
+ LibPixiDialog.adaptation = true;
package/lyb-pixi.js CHANGED
@@ -1336,29 +1336,26 @@
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
- }
1342
1339
  function isArray$3(obj) {
1343
- return toStr(obj) === "[object Array]" && canTrustToString(obj);
1340
+ return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1344
1341
  }
1345
1342
  function isDate(obj) {
1346
- return toStr(obj) === "[object Date]" && canTrustToString(obj);
1343
+ return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1347
1344
  }
1348
1345
  function isRegExp$1(obj) {
1349
- return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
1346
+ return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1350
1347
  }
1351
1348
  function isError(obj) {
1352
- return toStr(obj) === "[object Error]" && canTrustToString(obj);
1349
+ return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1353
1350
  }
1354
1351
  function isString(obj) {
1355
- return toStr(obj) === "[object String]" && canTrustToString(obj);
1352
+ return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1356
1353
  }
1357
1354
  function isNumber(obj) {
1358
- return toStr(obj) === "[object Number]" && canTrustToString(obj);
1355
+ return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1359
1356
  }
1360
1357
  function isBoolean(obj) {
1361
- return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
1358
+ return toStr(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1362
1359
  }
1363
1360
  function isSymbol(obj) {
1364
1361
  if (hasShammedSymbols) {
@@ -2096,7 +2093,6 @@
2096
2093
  "%eval%": eval,
2097
2094
  // eslint-disable-line no-eval
2098
2095
  "%EvalError%": $EvalError,
2099
- "%Float16Array%": typeof Float16Array === "undefined" ? undefined$1 : Float16Array,
2100
2096
  "%Float32Array%": typeof Float32Array === "undefined" ? undefined$1 : Float32Array,
2101
2097
  "%Float64Array%": typeof Float64Array === "undefined" ? undefined$1 : Float64Array,
2102
2098
  "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined$1 : FinalizationRegistry,
@@ -2350,14 +2346,11 @@
2350
2346
  var $indexOf = callBindBasic([GetIntrinsic$2("%String.prototype.indexOf%")]);
2351
2347
  var callBound$2 = function callBoundIntrinsic(name, allowMissing) {
2352
2348
  var intrinsic = (
2353
- /** @type {(this: unknown, ...args: unknown[]) => unknown} */
2349
+ /** @type {Parameters<typeof callBindBasic>[0][0]} */
2354
2350
  GetIntrinsic$2(name, !!allowMissing)
2355
2351
  );
2356
2352
  if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
2357
- return callBindBasic(
2358
- /** @type {const} */
2359
- [intrinsic]
2360
- );
2353
+ return callBindBasic([intrinsic]);
2361
2354
  }
2362
2355
  return intrinsic;
2363
2356
  };
@@ -10978,7 +10971,7 @@ void main(void)
10978
10971
  */
10979
10972
  run(options) {
10980
10973
  const { renderer } = this;
10981
- 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);
10974
+ renderer.runners.init.emit(renderer.options), options.hello && console.log(`PixiJS 7.4.2 - ${renderer.rendererLogId} - https://pixijs.com`), renderer.resize(renderer.screen.width, renderer.screen.height);
10982
10975
  }
10983
10976
  destroy() {
10984
10977
  }
@@ -18229,8 +18222,7 @@ void main()
18229
18222
  if (keys.forEach((key2) => {
18230
18223
  this._cacheMap.set(key2, cachedAssets);
18231
18224
  }), cacheKeys.forEach((key2) => {
18232
- const val = cacheableAssets ? cacheableAssets[key2] : value;
18233
- this._cache.has(key2) && this._cache.get(key2) !== val && console.warn("[Cache] already has key:", key2), this._cache.set(key2, cacheableAssets[key2]);
18225
+ this._cache.has(key2) && this._cache.get(key2) !== value && console.warn("[Cache] already has key:", key2), this._cache.set(key2, cacheableAssets[key2]);
18234
18226
  }), value instanceof Texture) {
18235
18227
  const texture = value;
18236
18228
  keys.forEach((key2) => {
@@ -25746,11 +25738,12 @@ void main(void)\r
25746
25738
  subClass.__proto__ = superClass;
25747
25739
  }
25748
25740
  /*!
25749
- * GSAP 3.13.0
25741
+ * GSAP 3.12.5
25750
25742
  * https://gsap.com
25751
25743
  *
25752
- * @license Copyright 2008-2025, GreenSock. All rights reserved.
25753
- * Subject to the terms at https://gsap.com/standard-license
25744
+ * @license Copyright 2008-2024, GreenSock. All rights reserved.
25745
+ * Subject to the terms at https://gsap.com/standard-license or for
25746
+ * Club GSAP members, the agreement issued with that membership.
25754
25747
  * @author: Jack Doyle, jack@greensock.com
25755
25748
  */
25756
25749
  var _config = {
@@ -25841,11 +25834,9 @@ void main(void)\r
25841
25834
  tween = a2[i2];
25842
25835
  tween && tween._lazy && (tween.render(tween._lazy[0], tween._lazy[1], true)._lazy = 0);
25843
25836
  }
25844
- }, _isRevertWorthy = function _isRevertWorthy2(animation) {
25845
- return !!(animation._initted || animation._startAt || animation.add);
25846
25837
  }, _lazySafeRender = function _lazySafeRender2(animation, time, suppressEvents, force) {
25847
25838
  _lazyTweens.length && !_reverting$1 && _lazyRender();
25848
- animation.render(time, suppressEvents, force || !!(_reverting$1 && time < 0 && _isRevertWorthy(animation)));
25839
+ animation.render(time, suppressEvents, force || _reverting$1 && time < 0 && (animation._initted || animation._startAt));
25849
25840
  _lazyTweens.length && !_reverting$1 && _lazyRender();
25850
25841
  }, _numericIfPossible = function _numericIfPossible2(value) {
25851
25842
  var n2 = parseFloat(value);
@@ -25968,7 +25959,7 @@ void main(void)\r
25968
25959
  }, _elapsedCycleDuration = function _elapsedCycleDuration2(animation) {
25969
25960
  return animation._repeat ? _animationCycle(animation._tTime, animation = animation.duration() + animation._rDelay) * animation : 0;
25970
25961
  }, _animationCycle = function _animationCycle2(tTime, cycleDuration) {
25971
- var whole = Math.floor(tTime = _roundPrecise(tTime / cycleDuration));
25962
+ var whole = Math.floor(tTime /= cycleDuration);
25972
25963
  return tTime && whole === tTime ? whole - 1 : whole;
25973
25964
  }, _parentToChildTotalTime = function _parentToChildTotalTime2(parentTime, child) {
25974
25965
  return (parentTime - child._start) * child._ts + (child._ts >= 0 ? 0 : child._dirty ? child.totalDuration() : child._tDur);
@@ -26749,7 +26740,7 @@ void main(void)\r
26749
26740
  }, easeOut);
26750
26741
  })(7.5625, 2.75);
26751
26742
  _insertEase("Expo", function(p2) {
26752
- return Math.pow(2, 10 * (p2 - 1)) * p2 + p2 * p2 * p2 * p2 * p2 * p2 * (1 - p2);
26743
+ return p2 ? Math.pow(2, 10 * (p2 - 1)) : 0;
26753
26744
  });
26754
26745
  _insertEase("Circ", function(p2) {
26755
26746
  return -(_sqrt(1 - p2 * p2) - 1);
@@ -26846,7 +26837,7 @@ void main(void)\r
26846
26837
  return arguments.length ? this.totalTime(Math.min(this.totalDuration(), value + _elapsedCycleDuration(this)) % (this._dur + this._rDelay) || (value ? this._dur : 0), suppressEvents) : this._time;
26847
26838
  };
26848
26839
  _proto.totalProgress = function totalProgress(value, suppressEvents) {
26849
- 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;
26840
+ return arguments.length ? this.totalTime(this.totalDuration() * value, suppressEvents) : this.totalDuration() ? Math.min(1, this._tTime / this._tDur) : this.rawTime() > 0 ? 1 : 0;
26850
26841
  };
26851
26842
  _proto.progress = function progress(value, suppressEvents) {
26852
26843
  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;
@@ -26865,7 +26856,7 @@ void main(void)\r
26865
26856
  var tTime = this.parent && this._ts ? _parentToChildTotalTime(this.parent._time, this) : this._tTime;
26866
26857
  this._rts = +value || 0;
26867
26858
  this._ts = this._ps || value === -_tinyNum ? 0 : this._rts;
26868
- this.totalTime(_clamp(-Math.abs(this._delay), this.totalDuration(), tTime), suppressEvents !== false);
26859
+ this.totalTime(_clamp(-Math.abs(this._delay), this._tDur, tTime), suppressEvents !== false);
26869
26860
  _setEnd(this);
26870
26861
  return _recacheAncestors(this);
26871
26862
  };
@@ -26908,7 +26899,7 @@ void main(void)\r
26908
26899
  }
26909
26900
  var prevIsReverting = _reverting$1;
26910
26901
  _reverting$1 = config2;
26911
- if (_isRevertWorthy(this)) {
26902
+ if (this._initted || this._startAt) {
26912
26903
  this.timeline && this.timeline.revert(config2);
26913
26904
  this.totalTime(-0.01, config2.suppressEvents);
26914
26905
  }
@@ -26951,9 +26942,7 @@ void main(void)\r
26951
26942
  return this.totalTime(_parsePosition(this, position), _isNotFalse(suppressEvents));
26952
26943
  };
26953
26944
  _proto.restart = function restart(includeDelay, suppressEvents) {
26954
- this.play().totalTime(includeDelay ? -this._delay : 0, _isNotFalse(suppressEvents));
26955
- this._dur || (this._zTime = -_tinyNum);
26956
- return this;
26945
+ return this.play().totalTime(includeDelay ? -this._delay : 0, _isNotFalse(suppressEvents));
26957
26946
  };
26958
26947
  _proto.play = function play(from, suppressEvents) {
26959
26948
  from != null && this.seek(from, suppressEvents);
@@ -27130,9 +27119,8 @@ void main(void)\r
27130
27119
  iteration = this._repeat;
27131
27120
  time = dur;
27132
27121
  } else {
27133
- prevIteration = _roundPrecise(tTime / cycleDuration);
27134
- iteration = ~~prevIteration;
27135
- if (iteration && iteration === prevIteration) {
27122
+ iteration = ~~(tTime / cycleDuration);
27123
+ if (iteration && iteration === tTime / cycleDuration) {
27136
27124
  time = dur;
27137
27125
  iteration--;
27138
27126
  }
@@ -27186,7 +27174,7 @@ void main(void)\r
27186
27174
  this._zTime = totalTime;
27187
27175
  prevTime = 0;
27188
27176
  }
27189
- if (!prevTime && tTime && !suppressEvents && !prevIteration) {
27177
+ if (!prevTime && time && !suppressEvents && !iteration) {
27190
27178
  _callback(this, "onStart");
27191
27179
  if (this._tTime !== tTime) {
27192
27180
  return this;
@@ -27218,7 +27206,7 @@ void main(void)\r
27218
27206
  if (child.parent !== this) {
27219
27207
  return this.render(totalTime, suppressEvents, force);
27220
27208
  }
27221
- 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));
27209
+ 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._initted || child._startAt));
27222
27210
  if (time !== this._time || !this._ts && !prevPaused) {
27223
27211
  pauseTween = 0;
27224
27212
  next && (tTime += this._zTime = adjustedTime ? -_tinyNum : _tinyNum);
@@ -27315,7 +27303,7 @@ void main(void)\r
27315
27303
  if (_isFunction(child)) {
27316
27304
  return this.killTweensOf(child);
27317
27305
  }
27318
- child.parent === this && _removeLinkedListItem(this, child);
27306
+ _removeLinkedListItem(this, child);
27319
27307
  if (child === this._recent) {
27320
27308
  this._recent = this._last;
27321
27309
  }
@@ -27917,7 +27905,7 @@ void main(void)\r
27917
27905
  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;
27918
27906
  if (!dur) {
27919
27907
  _renderZeroDurationTween(this, totalTime, suppressEvents, force);
27920
- } else if (tTime !== this._tTime || !totalTime || force || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== isNegative || this._lazy) {
27908
+ } else if (tTime !== this._tTime || !totalTime || force || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== isNegative) {
27921
27909
  time = tTime;
27922
27910
  timeline = this.timeline;
27923
27911
  if (this._repeat) {
@@ -27930,14 +27918,12 @@ void main(void)\r
27930
27918
  iteration = this._repeat;
27931
27919
  time = dur;
27932
27920
  } else {
27933
- prevIteration = _roundPrecise(tTime / cycleDuration);
27934
- iteration = ~~prevIteration;
27935
- if (iteration && iteration === prevIteration) {
27921
+ iteration = ~~(tTime / cycleDuration);
27922
+ if (iteration && iteration === _roundPrecise(tTime / cycleDuration)) {
27936
27923
  time = dur;
27937
27924
  iteration--;
27938
- } else if (time > dur) {
27939
- time = dur;
27940
27925
  }
27926
+ time > dur && (time = dur);
27941
27927
  }
27942
27928
  isYoyo = this._yoyo && iteration & 1;
27943
27929
  if (isYoyo) {
@@ -27951,7 +27937,7 @@ void main(void)\r
27951
27937
  }
27952
27938
  if (iteration !== prevIteration) {
27953
27939
  timeline && this._yEase && _propagateYoyoEase(timeline, isYoyo);
27954
- if (this.vars.repeatRefresh && !isYoyo && !this._lock && time !== cycleDuration && this._initted) {
27940
+ if (this.vars.repeatRefresh && !isYoyo && !this._lock && this._time !== cycleDuration && this._initted) {
27955
27941
  this._lock = force = 1;
27956
27942
  this.render(_roundPrecise(cycleDuration * iteration), true).invalidate()._lock = 0;
27957
27943
  }
@@ -27979,7 +27965,7 @@ void main(void)\r
27979
27965
  if (this._from) {
27980
27966
  this.ratio = ratio = 1 - ratio;
27981
27967
  }
27982
- if (!prevTime && tTime && !suppressEvents && !prevIteration) {
27968
+ if (time && !prevTime && !suppressEvents && !iteration) {
27983
27969
  _callback(this, "onStart");
27984
27970
  if (this._tTime !== tTime) {
27985
27971
  return this;
@@ -28036,8 +28022,7 @@ void main(void)\r
28036
28022
  }
28037
28023
  if (!targets && (!vars || vars === "all")) {
28038
28024
  this._lazy = this._pt = 0;
28039
- this.parent ? _interrupt(this) : this.scrollTrigger && this.scrollTrigger.kill(!!_reverting$1);
28040
- return this;
28025
+ return this.parent ? _interrupt(this) : this;
28041
28026
  }
28042
28027
  if (this.timeline) {
28043
28028
  var tDur = this.timeline.totalDuration();
@@ -28484,8 +28469,8 @@ void main(void)\r
28484
28469
  };
28485
28470
  },
28486
28471
  quickTo: function quickTo(target, property, vars) {
28487
- var _setDefaults2;
28488
- 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) {
28472
+ var _merge2;
28473
+ var tween = gsap.to(target, _merge((_merge2 = {}, _merge2[property] = "+=0.1", _merge2.paused = true, _merge2), vars || {})), func = function func2(value, start, startIsRelative) {
28489
28474
  return tween.resetTo(property, value, start, startIsRelative);
28490
28475
  };
28491
28476
  func.tween = tween;
@@ -28647,7 +28632,6 @@ void main(void)\r
28647
28632
  }, _buildModifierPlugin = function _buildModifierPlugin2(name, modifier) {
28648
28633
  return {
28649
28634
  name,
28650
- headless: 1,
28651
28635
  rawVars: 1,
28652
28636
  //don't pre-process function-based values or "random()" strings.
28653
28637
  init: function init2(target, vars, tween) {
@@ -28694,7 +28678,6 @@ void main(void)\r
28694
28678
  }
28695
28679
  }, {
28696
28680
  name: "endArray",
28697
- headless: 1,
28698
28681
  init: function init2(target, value) {
28699
28682
  var i2 = value.length;
28700
28683
  while (i2--) {
@@ -28702,7 +28685,7 @@ void main(void)\r
28702
28685
  }
28703
28686
  }
28704
28687
  }, _buildModifierPlugin("roundProps", _roundModifier), _buildModifierPlugin("modifiers"), _buildModifierPlugin("snap", snap)) || _gsap;
28705
- Tween.version = Timeline$1.version = gsap.version = "3.13.0";
28688
+ Tween.version = Timeline$1.version = gsap.version = "3.12.5";
28706
28689
  _coreReady = 1;
28707
28690
  _windowExists$1() && _wake();
28708
28691
  _easeMap.Power0;
@@ -28724,11 +28707,12 @@ void main(void)\r
28724
28707
  _easeMap.Expo;
28725
28708
  _easeMap.Circ;
28726
28709
  /*!
28727
- * CSSPlugin 3.13.0
28710
+ * CSSPlugin 3.12.5
28728
28711
  * https://gsap.com
28729
28712
  *
28730
- * Copyright 2008-2025, GreenSock. All rights reserved.
28731
- * Subject to the terms at https://gsap.com/standard-license
28713
+ * Copyright 2008-2024, GreenSock. All rights reserved.
28714
+ * Subject to the terms at https://gsap.com/standard-license or for
28715
+ * Club GSAP members, the agreement issued with that membership.
28732
28716
  * @author: Jack Doyle, jack@greensock.com
28733
28717
  */
28734
28718
  var _win, _doc, _docElement, _pluginInitted, _tempDiv, _recentSetterPlugin, _reverting, _windowExists = function _windowExists2() {
@@ -28801,13 +28785,7 @@ void main(void)\r
28801
28785
  }, _revertStyle = function _revertStyle2() {
28802
28786
  var props = this.props, target = this.target, style = target.style, cache = target._gsap, i2, p2;
28803
28787
  for (i2 = 0; i2 < props.length; i2 += 3) {
28804
- if (!props[i2 + 1]) {
28805
- props[i2 + 2] ? style[props[i2]] = props[i2 + 2] : style.removeProperty(props[i2].substr(0, 2) === "--" ? props[i2] : props[i2].replace(_capsExp, "-$1").toLowerCase());
28806
- } else if (props[i2 + 1] === 2) {
28807
- target[props[i2]](props[i2 + 2]);
28808
- } else {
28809
- target[props[i2]] = props[i2 + 2];
28810
- }
28788
+ props[i2 + 1] ? target[props[i2]] = props[i2 + 2] : props[i2 + 2] ? style[props[i2]] = props[i2 + 2] : style.removeProperty(props[i2].substr(0, 2) === "--" ? props[i2] : props[i2].replace(_capsExp, "-$1").toLowerCase());
28811
28789
  }
28812
28790
  if (this.tfm) {
28813
28791
  for (p2 in this.tfm) {
@@ -28836,7 +28814,7 @@ void main(void)\r
28836
28814
  save: _saveStyle
28837
28815
  };
28838
28816
  target._gsap || gsap.core.getCache(target);
28839
- properties && target.style && target.nodeType && properties.split(",").forEach(function(p2) {
28817
+ properties && properties.split(",").forEach(function(p2) {
28840
28818
  return saver.save(p2);
28841
28819
  });
28842
28820
  return saver;
@@ -28871,17 +28849,30 @@ void main(void)\r
28871
28849
  _reverting = gsap.core.reverting;
28872
28850
  _pluginInitted = 1;
28873
28851
  }
28874
- }, _getReparentedCloneBBox = function _getReparentedCloneBBox2(target) {
28875
- var owner = target.ownerSVGElement, svg = _createElement("svg", owner && owner.getAttribute("xmlns") || "http://www.w3.org/2000/svg"), clone2 = target.cloneNode(true), bbox;
28876
- clone2.style.display = "block";
28877
- svg.appendChild(clone2);
28852
+ }, _getBBoxHack = function _getBBoxHack2(swapIfPossible) {
28853
+ var svg = _createElement("svg", this.ownerSVGElement && this.ownerSVGElement.getAttribute("xmlns") || "http://www.w3.org/2000/svg"), oldParent = this.parentNode, oldSibling = this.nextSibling, oldCSS = this.style.cssText, bbox;
28878
28854
  _docElement.appendChild(svg);
28879
- try {
28880
- bbox = clone2.getBBox();
28881
- } catch (e2) {
28855
+ svg.appendChild(this);
28856
+ this.style.display = "block";
28857
+ if (swapIfPossible) {
28858
+ try {
28859
+ bbox = this.getBBox();
28860
+ this._gsapBBox = this.getBBox;
28861
+ this.getBBox = _getBBoxHack2;
28862
+ } catch (e2) {
28863
+ }
28864
+ } else if (this._gsapBBox) {
28865
+ bbox = this._gsapBBox();
28866
+ }
28867
+ if (oldParent) {
28868
+ if (oldSibling) {
28869
+ oldParent.insertBefore(this, oldSibling);
28870
+ } else {
28871
+ oldParent.appendChild(this);
28872
+ }
28882
28873
  }
28883
- svg.removeChild(clone2);
28884
28874
  _docElement.removeChild(svg);
28875
+ this.style.cssText = oldCSS;
28885
28876
  return bbox;
28886
28877
  }, _getAttributeFallbacks = function _getAttributeFallbacks2(target, attributesArray) {
28887
28878
  var i2 = attributesArray.length;
@@ -28891,14 +28882,13 @@ void main(void)\r
28891
28882
  }
28892
28883
  }
28893
28884
  }, _getBBox = function _getBBox2(target) {
28894
- var bounds, cloned;
28885
+ var bounds;
28895
28886
  try {
28896
28887
  bounds = target.getBBox();
28897
28888
  } catch (error) {
28898
- bounds = _getReparentedCloneBBox(target);
28899
- cloned = 1;
28889
+ bounds = _getBBoxHack.call(target, true);
28900
28890
  }
28901
- bounds && (bounds.width || bounds.height) || cloned || (bounds = _getReparentedCloneBBox(target));
28891
+ bounds && (bounds.width || bounds.height) || target.getBBox === _getBBoxHack || (bounds = _getBBoxHack.call(target, true));
28902
28892
  return bounds && !bounds.width && !bounds.x && !bounds.y ? {
28903
28893
  x: +_getAttributeFallbacks(target, ["x", "cx", "x1"]) || 0,
28904
28894
  y: +_getAttributeFallbacks(target, ["y", "cy", "y1"]) || 0,
@@ -28949,7 +28939,7 @@ void main(void)\r
28949
28939
  return _round(toPercent ? curValue / px * amount : curValue / 100 * px);
28950
28940
  }
28951
28941
  style[horizontal ? "width" : "height"] = amount + (toPixels ? curUnit : unit);
28952
- parent = unit !== "rem" && ~property.indexOf("adius") || unit === "em" && target.appendChild && !isRootSVG ? target : target.parentNode;
28942
+ parent = ~property.indexOf("adius") || unit === "em" && target.appendChild && !isRootSVG ? target : target.parentNode;
28953
28943
  if (isSVG) {
28954
28944
  parent = (target.ownerSVGElement || {}).parentNode;
28955
28945
  }
@@ -29014,9 +29004,6 @@ void main(void)\r
29014
29004
  pt.e = end;
29015
29005
  start += "";
29016
29006
  end += "";
29017
- if (end.substring(0, 6) === "var(--") {
29018
- end = _getComputedProperty(target, end.substring(4, end.indexOf(")")));
29019
- }
29020
29007
  if (end === "auto") {
29021
29008
  startValue = target.style[prop];
29022
29009
  target.style[prop] = end;
@@ -29110,7 +29097,6 @@ void main(void)\r
29110
29097
  _removeProperty(target, _transformProp);
29111
29098
  if (cache) {
29112
29099
  cache.svg && target.removeAttribute("transform");
29113
- style.scale = style.rotate = style.translate = "none";
29114
29100
  _parseTransform(target, 1);
29115
29101
  cache.uncache = 1;
29116
29102
  _removeIndependentTransforms(style);
@@ -29206,7 +29192,7 @@ void main(void)\r
29206
29192
  temp = style.display;
29207
29193
  style.display = "block";
29208
29194
  parent = target.parentNode;
29209
- if (!parent || !target.offsetParent && !target.getBoundingClientRect().width) {
29195
+ if (!parent || !target.offsetParent) {
29210
29196
  addedToDOM = 1;
29211
29197
  nextSibling = target.nextElementSibling;
29212
29198
  _docElement.appendChild(target);
@@ -29642,10 +29628,6 @@ void main(void)\r
29642
29628
  isTransformRelated = p2 in _transformProps;
29643
29629
  if (isTransformRelated) {
29644
29630
  this.styles.save(p2);
29645
- if (type2 === "string" && endValue.substring(0, 6) === "var(--") {
29646
- endValue = _getComputedProperty(target, endValue.substring(4, endValue.indexOf(")")));
29647
- endNum = parseFloat(endValue);
29648
- }
29649
29631
  if (!transformPropTween) {
29650
29632
  cache = target._gsap;
29651
29633
  cache.renderTransform && !vars.parseTransform || _parseTransform(target, vars.parseTransform);
@@ -29709,7 +29691,7 @@ void main(void)\r
29709
29691
  } else {
29710
29692
  _tweenComplexCSSString.call(this, target, p2, startValue, relative ? relative + endValue : endValue);
29711
29693
  }
29712
- 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]));
29694
+ isTransformRelated || (p2 in style ? inlineProps.push(p2, 0, style[p2]) : inlineProps.push(p2, 1, startValue || target[p2]));
29713
29695
  props.push(p2);
29714
29696
  }
29715
29697
  }
@@ -32916,11 +32898,7 @@ void main(void)\r
32916
32898
  /**
32917
32899
  * past Spine.globalDelayLimit
32918
32900
  */
32919
- GLOBAL_DELAY_LIMIT: 0,
32920
- /**
32921
- * shows error in console if atlas page loading somehow failed
32922
- */
32923
- REPORT_TEXTURE_LOADER_ERROR: true
32901
+ GLOBAL_DELAY_LIMIT: 0
32924
32902
  };
32925
32903
  const tempRgb = [0, 0, 0];
32926
32904
  class SpineSprite extends Sprite {
@@ -33315,9 +33293,6 @@ void main(void)\r
33315
33293
  * @private
33316
33294
  */
33317
33295
  createMesh(slot, attachment) {
33318
- if (!attachment.region && attachment.sequence) {
33319
- attachment.sequence.apply(slot, attachment);
33320
- }
33321
33296
  let region = attachment.region;
33322
33297
  if (slot.hackAttachment === attachment) {
33323
33298
  region = slot.hackRegion;
@@ -40025,16 +40000,9 @@ void main(void)\r
40025
40000
  };
40026
40001
  const makeSpineTextureAtlasLoaderFunctionFromPixiLoaderObject = (loader, atlasBasePath, imageMetadata) => {
40027
40002
  return async (pageName, textureLoadedCallback) => {
40028
- try {
40029
- const url = path.normalize([...atlasBasePath.split(path.sep), pageName].join(path.sep));
40030
- const texture = await loader.load({ src: url, data: imageMetadata });
40031
- textureLoadedCallback(texture.baseTexture);
40032
- } catch (e2) {
40033
- {
40034
- console.error("Spine: error in texture loader", e2);
40035
- }
40036
- textureLoadedCallback(null);
40037
- }
40003
+ const url = path.normalize([...atlasBasePath.split(path.sep), pageName].join(path.sep));
40004
+ const texture = await loader.load({ src: url, data: imageMetadata });
40005
+ textureLoadedCallback(texture.baseTexture);
40038
40006
  };
40039
40007
  };
40040
40008
  extensions$2.add(spineTextureAtlasLoader);
@@ -55456,10 +55424,10 @@ void main(void){
55456
55424
  }
55457
55425
  }
55458
55426
  /*!
55459
- * decimal.js v10.5.0
55427
+ * decimal.js v10.4.3
55460
55428
  * An arbitrary-precision Decimal type for JavaScript.
55461
55429
  * https://github.com/MikeMcl/decimal.js
55462
- * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
55430
+ * Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
55463
55431
  * MIT Licence
55464
55432
  */
55465
55433
  var EXP_LIMIT = 9e15, MAX_DIGITS = 1e9, NUMERALS = "0123456789abcdef", LN10 = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", PI = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", DEFAULTS = {
@@ -55728,7 +55696,7 @@ void main(void){
55728
55696
  return divide(x2.sinh(), x2.cosh(), Ctor.precision = pr, Ctor.rounding = rm);
55729
55697
  };
55730
55698
  P.inverseCosine = P.acos = function() {
55731
- var x2 = this, Ctor = x2.constructor, k2 = x2.abs().cmp(1), pr = Ctor.precision, rm = Ctor.rounding;
55699
+ var halfPi, x2 = this, Ctor = x2.constructor, k2 = x2.abs().cmp(1), pr = Ctor.precision, rm = Ctor.rounding;
55732
55700
  if (k2 !== -1) {
55733
55701
  return k2 === 0 ? x2.isNeg() ? getPi(Ctor, pr, rm) : new Ctor(0) : new Ctor(NaN);
55734
55702
  }
@@ -55736,10 +55704,11 @@ void main(void){
55736
55704
  return getPi(Ctor, pr + 4, rm).times(0.5);
55737
55705
  Ctor.precision = pr + 6;
55738
55706
  Ctor.rounding = 1;
55739
- x2 = new Ctor(1).minus(x2).div(x2.plus(1)).sqrt().atan();
55707
+ x2 = x2.asin();
55708
+ halfPi = getPi(Ctor, pr + 4, rm).times(0.5);
55740
55709
  Ctor.precision = pr;
55741
55710
  Ctor.rounding = rm;
55742
- return x2.times(2);
55711
+ return halfPi.minus(x2);
55743
55712
  };
55744
55713
  P.inverseHyperbolicCosine = P.acosh = function() {
55745
55714
  var pr, rm, x2 = this, Ctor = x2.constructor;
@@ -56951,16 +56920,14 @@ void main(void){
56951
56920
  function isOdd(n2) {
56952
56921
  return n2.d[n2.d.length - 1] & 1;
56953
56922
  }
56954
- function maxOrMin(Ctor, args, n2) {
56955
- var k2, y2, x2 = new Ctor(args[0]), i2 = 0;
56923
+ function maxOrMin(Ctor, args, ltgt) {
56924
+ var y2, x2 = new Ctor(args[0]), i2 = 0;
56956
56925
  for (; ++i2 < args.length; ) {
56957
56926
  y2 = new Ctor(args[i2]);
56958
56927
  if (!y2.s) {
56959
56928
  x2 = y2;
56960
56929
  break;
56961
- }
56962
- k2 = x2.cmp(y2);
56963
- if (k2 === n2 || k2 === 0 && x2.s === n2) {
56930
+ } else if (x2[ltgt](y2)) {
56964
56931
  x2 = y2;
56965
56932
  }
56966
56933
  }
@@ -57541,8 +57508,7 @@ void main(void){
57541
57508
  x2.d = [v2];
57542
57509
  }
57543
57510
  return;
57544
- }
57545
- if (v2 * 0 !== 0) {
57511
+ } else if (v2 * 0 !== 0) {
57546
57512
  if (!v2)
57547
57513
  x2.s = NaN;
57548
57514
  x2.e = NaN;
@@ -57550,28 +57516,18 @@ void main(void){
57550
57516
  return;
57551
57517
  }
57552
57518
  return parseDecimal(x2, v2.toString());
57519
+ } else if (t2 !== "string") {
57520
+ throw Error(invalidArgument + v2);
57553
57521
  }
57554
- if (t2 === "string") {
57555
- if ((i3 = v2.charCodeAt(0)) === 45) {
57522
+ if ((i3 = v2.charCodeAt(0)) === 45) {
57523
+ v2 = v2.slice(1);
57524
+ x2.s = -1;
57525
+ } else {
57526
+ if (i3 === 43)
57556
57527
  v2 = v2.slice(1);
57557
- x2.s = -1;
57558
- } else {
57559
- if (i3 === 43)
57560
- v2 = v2.slice(1);
57561
- x2.s = 1;
57562
- }
57563
- return isDecimal.test(v2) ? parseDecimal(x2, v2) : parseOther(x2, v2);
57564
- }
57565
- if (t2 === "bigint") {
57566
- if (v2 < 0) {
57567
- v2 = -v2;
57568
- x2.s = -1;
57569
- } else {
57570
- x2.s = 1;
57571
- }
57572
- return parseDecimal(x2, v2.toString());
57528
+ x2.s = 1;
57573
57529
  }
57574
- throw Error(invalidArgument + v2);
57530
+ return isDecimal.test(v2) ? parseDecimal(x2, v2) : parseOther(x2, v2);
57575
57531
  }
57576
57532
  Decimal2.prototype = P;
57577
57533
  Decimal2.ROUND_UP = 0;
@@ -57681,10 +57637,10 @@ void main(void){
57681
57637
  return new this(x2).log(10);
57682
57638
  }
57683
57639
  function max() {
57684
- return maxOrMin(this, arguments, -1);
57640
+ return maxOrMin(this, arguments, "lt");
57685
57641
  }
57686
57642
  function min() {
57687
- return maxOrMin(this, arguments, 1);
57643
+ return maxOrMin(this, arguments, "gt");
57688
57644
  }
57689
57645
  function mod(x2, y2) {
57690
57646
  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.4",
3
+ "version": "1.11.5",
4
4
  "description": "自用Pixi.JS方法库",
5
5
  "license": "ISC",
6
6
  "exports": {
@@ -37,7 +37,7 @@
37
37
  "decimal.js": "^10.4.3",
38
38
  "gsap": "^3.12.5",
39
39
  "howler": "^2.2.4",
40
- "lyb-js": "^1.6.4",
40
+ "lyb-js": "^1.6.5",
41
41
  "pixi-spine": "^4.0.4",
42
42
  "pixi.js": "^7.4.2",
43
43
  "vite": "^4.5.5"