lyb-pixi-js 1.9.0 → 1.9.2

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.
@@ -15,6 +15,8 @@ export interface LibPixiScrollContainerYParams {
15
15
  scrollbarWidth?: number;
16
16
  /** 滚动条颜色 */
17
17
  scrollbarColor?: string;
18
+ /** 滚动触发 */
19
+ onScroll: (y: number) => void;
18
20
  }
19
21
  /** @description 支持鼠标滚轮滚动、鼠标拖动、手指滑动,支持惯性滚动及回弹
20
22
  * @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiScrollContainerY-Y 轴滚动容器
@@ -46,6 +48,8 @@ export declare class LibPixiScrollContainerY extends LibPixiContainer {
46
48
  private _scrollbar;
47
49
  /** 滚动条颜色 */
48
50
  private _scrollbarColor;
51
+ /** 滚动触发 */
52
+ private _onScroll;
49
53
  constructor(params: LibPixiScrollContainerYParams);
50
54
  /** @description 设置滚动容器可视区宽高
51
55
  * @param width 宽度
@@ -1,14 +1,14 @@
1
1
  import { Container } from "pixi.js";
2
2
  import { gsap } from "gsap";
3
- import { LibPixiRectangle } from "../Base/LibPixiRectangle";
4
3
  import { libPixiEvent } from "../../Utils/LibPixiEvent";
5
4
  import { LibPixiContainer } from "../Base/LibPixiContainer";
5
+ import { LibPixiRectangle } from "../Base/LibPixiRectangle";
6
6
  /** @description 支持鼠标滚轮滚动、鼠标拖动、手指滑动,支持惯性滚动及回弹
7
7
  * @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiScrollContainerY-Y 轴滚动容器
8
8
  */
9
9
  export class LibPixiScrollContainerY extends LibPixiContainer {
10
10
  constructor(params) {
11
- const { width, height, scrollbar = false, scrollContent, scrollbarRgiht, scrollbarWidth = 10, scrollbarColor = "#ffffff", } = params;
11
+ const { width, height, scrollbar = false, scrollContent, scrollbarRgiht, scrollbarWidth = 10, scrollbarColor = "#ffffff", onScroll, } = params;
12
12
  super(width, height);
13
13
  /** 开始位置 */
14
14
  this._startY = 0;
@@ -28,6 +28,7 @@ export class LibPixiScrollContainerY extends LibPixiContainer {
28
28
  this._scrollbarDragOffset = 0;
29
29
  this._scrollContent = scrollContent;
30
30
  this._scrollbarColor = scrollbarColor;
31
+ this._onScroll = onScroll;
31
32
  // 创建内容容器
32
33
  this._content = new Container();
33
34
  this.addChild(this._content);
@@ -247,6 +248,7 @@ export class LibPixiScrollContainerY extends LibPixiContainer {
247
248
  const scrollY = Math.min(Math.max(-this._content.y, 0), maxScrollY);
248
249
  const barY = (scrollY / maxScrollY) * (viewHeight - barHeight);
249
250
  this._scrollbar.y = barY;
251
+ this._onScroll(this._content.y);
250
252
  }
251
253
  /** @description 更新滚动条大小 */
252
254
  _updateScrollbarSize() {
@@ -1,4 +1,5 @@
1
1
  import { libJsNumComma } from "lyb-js/Formatter/LibJsNumComma.js";
2
+ import gsap from "gsap";
2
3
  /** @description 数值递增动画
3
4
  * @param params 动画参数
4
5
  * @returns 设置为目标值并停止动画
@@ -1,4 +1,5 @@
1
1
  import { libPixiEvent } from "./LibPixiEvent";
2
+ import gsap from "gsap";
2
3
  /** @description 按下放大
3
4
  * @param container 要放大的容器
4
5
  * @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiDownScaleAnimation-按下放大
package/lyb-pixi.js CHANGED
@@ -1315,7 +1315,7 @@
1315
1315
  var ys = arrObjKeys(obj, inspect2);
1316
1316
  var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
1317
1317
  var protoTag = obj instanceof Object ? "" : "null prototype";
1318
- var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr$1(obj), 8, -1) : protoTag ? "Object" : "";
1318
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
1319
1319
  var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
1320
1320
  var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat$1.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
1321
1321
  if (ys.length === 0) {
@@ -1337,25 +1337,25 @@
1337
1337
  return $replace$1.call(String(s2), /"/g, """);
1338
1338
  }
1339
1339
  function isArray$3(obj) {
1340
- return toStr$1(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1340
+ return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1341
1341
  }
1342
1342
  function isDate(obj) {
1343
- return toStr$1(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1343
+ return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1344
1344
  }
1345
1345
  function isRegExp$1(obj) {
1346
- return toStr$1(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1346
+ return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1347
1347
  }
1348
1348
  function isError(obj) {
1349
- return toStr$1(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1349
+ return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1350
1350
  }
1351
1351
  function isString(obj) {
1352
- return toStr$1(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1352
+ return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1353
1353
  }
1354
1354
  function isNumber(obj) {
1355
- return toStr$1(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1355
+ return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1356
1356
  }
1357
1357
  function isBoolean(obj) {
1358
- return toStr$1(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1358
+ return toStr(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1359
1359
  }
1360
1360
  function isSymbol(obj) {
1361
1361
  if (hasShammedSymbols) {
@@ -1391,7 +1391,7 @@
1391
1391
  function has$3(obj, key) {
1392
1392
  return hasOwn$1.call(obj, key);
1393
1393
  }
1394
- function toStr$1(obj) {
1394
+ function toStr(obj) {
1395
1395
  return objectToString.call(obj);
1396
1396
  }
1397
1397
  function nameOf(f2) {
@@ -1700,7 +1700,7 @@
1700
1700
  var uri = URIError;
1701
1701
  var abs$1 = Math.abs;
1702
1702
  var floor$1 = Math.floor;
1703
- var max$2 = Math.max;
1703
+ var max$1 = Math.max;
1704
1704
  var min$1 = Math.min;
1705
1705
  var pow$1 = Math.pow;
1706
1706
  var round$2 = Math.round;
@@ -1833,78 +1833,102 @@
1833
1833
  Object_getPrototypeOf = $Object2.getPrototypeOf || null;
1834
1834
  return Object_getPrototypeOf;
1835
1835
  }
1836
- var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
1837
- var toStr = Object.prototype.toString;
1838
- var max$1 = Math.max;
1839
- var funcType = "[object Function]";
1840
- var concatty = function concatty2(a2, b2) {
1841
- var arr = [];
1842
- for (var i2 = 0; i2 < a2.length; i2 += 1) {
1843
- arr[i2] = a2[i2];
1844
- }
1845
- for (var j2 = 0; j2 < b2.length; j2 += 1) {
1846
- arr[j2 + a2.length] = b2[j2];
1847
- }
1848
- return arr;
1849
- };
1850
- var slicy = function slicy2(arrLike, offset) {
1851
- var arr = [];
1852
- for (var i2 = offset || 0, j2 = 0; i2 < arrLike.length; i2 += 1, j2 += 1) {
1853
- arr[j2] = arrLike[i2];
1854
- }
1855
- return arr;
1856
- };
1857
- var joiny = function(arr, joiner) {
1858
- var str = "";
1859
- for (var i2 = 0; i2 < arr.length; i2 += 1) {
1860
- str += arr[i2];
1861
- if (i2 + 1 < arr.length) {
1862
- str += joiner;
1836
+ var implementation;
1837
+ var hasRequiredImplementation;
1838
+ function requireImplementation() {
1839
+ if (hasRequiredImplementation)
1840
+ return implementation;
1841
+ hasRequiredImplementation = 1;
1842
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
1843
+ var toStr2 = Object.prototype.toString;
1844
+ var max2 = Math.max;
1845
+ var funcType = "[object Function]";
1846
+ var concatty = function concatty2(a2, b2) {
1847
+ var arr = [];
1848
+ for (var i2 = 0; i2 < a2.length; i2 += 1) {
1849
+ arr[i2] = a2[i2];
1863
1850
  }
1864
- }
1865
- return str;
1866
- };
1867
- var implementation$1 = function bind2(that) {
1868
- var target = this;
1869
- if (typeof target !== "function" || toStr.apply(target) !== funcType) {
1870
- throw new TypeError(ERROR_MESSAGE + target);
1871
- }
1872
- var args = slicy(arguments, 1);
1873
- var bound;
1874
- var binder = function() {
1875
- if (this instanceof bound) {
1876
- var result = target.apply(
1877
- this,
1878
- concatty(args, arguments)
1879
- );
1880
- if (Object(result) === result) {
1881
- return result;
1851
+ for (var j2 = 0; j2 < b2.length; j2 += 1) {
1852
+ arr[j2 + a2.length] = b2[j2];
1853
+ }
1854
+ return arr;
1855
+ };
1856
+ var slicy = function slicy2(arrLike, offset) {
1857
+ var arr = [];
1858
+ for (var i2 = offset || 0, j2 = 0; i2 < arrLike.length; i2 += 1, j2 += 1) {
1859
+ arr[j2] = arrLike[i2];
1860
+ }
1861
+ return arr;
1862
+ };
1863
+ var joiny = function(arr, joiner) {
1864
+ var str = "";
1865
+ for (var i2 = 0; i2 < arr.length; i2 += 1) {
1866
+ str += arr[i2];
1867
+ if (i2 + 1 < arr.length) {
1868
+ str += joiner;
1882
1869
  }
1883
- return this;
1884
1870
  }
1885
- return target.apply(
1886
- that,
1887
- concatty(args, arguments)
1888
- );
1871
+ return str;
1889
1872
  };
1890
- var boundLength = max$1(0, target.length - args.length);
1891
- var boundArgs = [];
1892
- for (var i2 = 0; i2 < boundLength; i2++) {
1893
- boundArgs[i2] = "$" + i2;
1894
- }
1895
- bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
1896
- if (target.prototype) {
1897
- var Empty = function Empty2() {
1873
+ implementation = function bind2(that) {
1874
+ var target = this;
1875
+ if (typeof target !== "function" || toStr2.apply(target) !== funcType) {
1876
+ throw new TypeError(ERROR_MESSAGE + target);
1877
+ }
1878
+ var args = slicy(arguments, 1);
1879
+ var bound;
1880
+ var binder = function() {
1881
+ if (this instanceof bound) {
1882
+ var result = target.apply(
1883
+ this,
1884
+ concatty(args, arguments)
1885
+ );
1886
+ if (Object(result) === result) {
1887
+ return result;
1888
+ }
1889
+ return this;
1890
+ }
1891
+ return target.apply(
1892
+ that,
1893
+ concatty(args, arguments)
1894
+ );
1898
1895
  };
1899
- Empty.prototype = target.prototype;
1900
- bound.prototype = new Empty();
1901
- Empty.prototype = null;
1902
- }
1903
- return bound;
1904
- };
1905
- var implementation = implementation$1;
1906
- var functionBind = Function.prototype.bind || implementation;
1907
- var functionCall = Function.prototype.call;
1896
+ var boundLength = max2(0, target.length - args.length);
1897
+ var boundArgs = [];
1898
+ for (var i2 = 0; i2 < boundLength; i2++) {
1899
+ boundArgs[i2] = "$" + i2;
1900
+ }
1901
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
1902
+ if (target.prototype) {
1903
+ var Empty = function Empty2() {
1904
+ };
1905
+ Empty.prototype = target.prototype;
1906
+ bound.prototype = new Empty();
1907
+ Empty.prototype = null;
1908
+ }
1909
+ return bound;
1910
+ };
1911
+ return implementation;
1912
+ }
1913
+ var functionBind;
1914
+ var hasRequiredFunctionBind;
1915
+ function requireFunctionBind() {
1916
+ if (hasRequiredFunctionBind)
1917
+ return functionBind;
1918
+ hasRequiredFunctionBind = 1;
1919
+ var implementation2 = requireImplementation();
1920
+ functionBind = Function.prototype.bind || implementation2;
1921
+ return functionBind;
1922
+ }
1923
+ var functionCall;
1924
+ var hasRequiredFunctionCall;
1925
+ function requireFunctionCall() {
1926
+ if (hasRequiredFunctionCall)
1927
+ return functionCall;
1928
+ hasRequiredFunctionCall = 1;
1929
+ functionCall = Function.prototype.call;
1930
+ return functionCall;
1931
+ }
1908
1932
  var functionApply;
1909
1933
  var hasRequiredFunctionApply;
1910
1934
  function requireFunctionApply() {
@@ -1915,14 +1939,14 @@
1915
1939
  return functionApply;
1916
1940
  }
1917
1941
  var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
1918
- var bind$2 = functionBind;
1942
+ var bind$2 = requireFunctionBind();
1919
1943
  var $apply$1 = requireFunctionApply();
1920
- var $call$2 = functionCall;
1944
+ var $call$2 = requireFunctionCall();
1921
1945
  var $reflectApply = reflectApply;
1922
1946
  var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
1923
- var bind$1 = functionBind;
1947
+ var bind$1 = requireFunctionBind();
1924
1948
  var $TypeError$4 = type;
1925
- var $call$1 = functionCall;
1949
+ var $call$1 = requireFunctionCall();
1926
1950
  var $actualApply = actualApply;
1927
1951
  var callBindApplyHelpers = function callBindBasic2(args) {
1928
1952
  if (args.length < 1 || typeof args[0] !== "function") {
@@ -1991,7 +2015,7 @@
1991
2015
  hasRequiredHasown = 1;
1992
2016
  var call = Function.prototype.call;
1993
2017
  var $hasOwn = Object.prototype.hasOwnProperty;
1994
- var bind2 = functionBind;
2018
+ var bind2 = requireFunctionBind();
1995
2019
  hasown = bind2.call(call, $hasOwn);
1996
2020
  return hasown;
1997
2021
  }
@@ -2006,7 +2030,7 @@
2006
2030
  var $URIError = uri;
2007
2031
  var abs = abs$1;
2008
2032
  var floor = floor$1;
2009
- var max = max$2;
2033
+ var max = max$1;
2010
2034
  var min = min$1;
2011
2035
  var pow = pow$1;
2012
2036
  var round$1 = round$2;
@@ -2040,7 +2064,7 @@
2040
2064
  var $ObjectGPO = requireObject_getPrototypeOf();
2041
2065
  var $ReflectGPO = requireReflect_getPrototypeOf();
2042
2066
  var $apply = requireFunctionApply();
2043
- var $call = functionCall;
2067
+ var $call = requireFunctionCall();
2044
2068
  var needsEval = {};
2045
2069
  var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
2046
2070
  var INTRINSICS = {
@@ -2210,7 +2234,7 @@
2210
2234
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
2211
2235
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
2212
2236
  };
2213
- var bind = functionBind;
2237
+ var bind = requireFunctionBind();
2214
2238
  var hasOwn = requireHasown();
2215
2239
  var $concat = bind.call($call, Array.prototype.concat);
2216
2240
  var $spliceApply = bind.call($apply, Array.prototype.splice);
@@ -25751,7 +25775,7 @@ void main(void)\r
25751
25775
  return _isFunction(value) || _isString(value);
25752
25776
  }, _isTypedArray = typeof ArrayBuffer === "function" && ArrayBuffer.isView || function() {
25753
25777
  }, _isArray = Array.isArray, _strictNumExp = /(?:-?\.?\d|\.)+/gi, _numExp = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, _numWithUnitExp = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, _complexStringNumExp = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, _relExp = /[+-]=-?[.\d]+/, _delimitedValueExp = /[^,'"\[\]\s]+/gi, _unitExp = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, _globalTimeline, _win$1, _coreInitted, _doc$1, _globals = {}, _installScope = {}, _coreReady, _install = function _install2(scope) {
25754
- return (_installScope = _merge(scope, _globals)) && gsap$1;
25778
+ return (_installScope = _merge(scope, _globals)) && gsap;
25755
25779
  }, _missingPlugin = function _missingPlugin2(property, value) {
25756
25780
  return console.warn("Invalid property", property, "set to", value, "Missing plugin? gsap.registerPlugin()");
25757
25781
  }, _warn = function _warn2(message, suppress) {
@@ -26379,7 +26403,7 @@ void main(void)\r
26379
26403
  name = (name === "css" ? "CSS" : name.charAt(0).toUpperCase() + name.substr(1)) + "Plugin";
26380
26404
  }
26381
26405
  _addGlobal(name, Plugin);
26382
- config.register && config.register(gsap$1, Plugin, PropTween);
26406
+ config.register && config.register(gsap, Plugin, PropTween);
26383
26407
  } else {
26384
26408
  _registerPluginQueue.push(config);
26385
26409
  }
@@ -26556,8 +26580,8 @@ void main(void)\r
26556
26580
  if (!_coreInitted && _windowExists$1()) {
26557
26581
  _win$1 = _coreInitted = window;
26558
26582
  _doc$1 = _win$1.document || {};
26559
- _globals.gsap = gsap$1;
26560
- (_win$1.gsapVersions || (_win$1.gsapVersions = [])).push(gsap$1.version);
26583
+ _globals.gsap = gsap;
26584
+ (_win$1.gsapVersions || (_win$1.gsapVersions = [])).push(gsap.version);
26561
26585
  _install(_installScope || _win$1.GreenSockGlobals || !_win$1.gsap && _win$1 || {});
26562
26586
  _registerPluginQueue.forEach(_createPlugin);
26563
26587
  }
@@ -28423,7 +28447,7 @@ void main(void)\r
28423
28447
  target = toArray(target);
28424
28448
  if (target.length > 1) {
28425
28449
  var setters = target.map(function(t2) {
28426
- return gsap$1.quickSetter(t2, property, unit);
28450
+ return gsap.quickSetter(t2, property, unit);
28427
28451
  }), l2 = setters.length;
28428
28452
  return function(value) {
28429
28453
  var i2 = l2;
@@ -28446,7 +28470,7 @@ void main(void)\r
28446
28470
  },
28447
28471
  quickTo: function quickTo(target, property, vars) {
28448
28472
  var _merge2;
28449
- var tween = gsap$1.to(target, _merge((_merge2 = {}, _merge2[property] = "+=0.1", _merge2.paused = true, _merge2), vars || {})), func = function func2(value, start, startIsRelative) {
28473
+ var tween = gsap.to(target, _merge((_merge2 = {}, _merge2[property] = "+=0.1", _merge2.paused = true, _merge2), vars || {})), func = function func2(value, start, startIsRelative) {
28450
28474
  return tween.resetTo(property, value, start, startIsRelative);
28451
28475
  };
28452
28476
  func.tween = tween;
@@ -28632,7 +28656,7 @@ void main(void)\r
28632
28656
  }
28633
28657
  };
28634
28658
  };
28635
- var gsap$1 = _gsap.registerPlugin({
28659
+ var gsap = _gsap.registerPlugin({
28636
28660
  name: "attr",
28637
28661
  init: function init2(target, vars, tween, index, targets) {
28638
28662
  var p2, pt, v2;
@@ -28661,7 +28685,7 @@ void main(void)\r
28661
28685
  }
28662
28686
  }
28663
28687
  }, _buildModifierPlugin("roundProps", _roundModifier), _buildModifierPlugin("modifiers"), _buildModifierPlugin("snap", snap)) || _gsap;
28664
- Tween.version = Timeline$1.version = gsap$1.version = "3.12.5";
28688
+ Tween.version = Timeline$1.version = gsap.version = "3.12.5";
28665
28689
  _coreReady = 1;
28666
28690
  _windowExists$1() && _wake();
28667
28691
  _easeMap.Power0;
@@ -28789,7 +28813,7 @@ void main(void)\r
28789
28813
  revert: _revertStyle,
28790
28814
  save: _saveStyle
28791
28815
  };
28792
- target._gsap || gsap$1.core.getCache(target);
28816
+ target._gsap || gsap.core.getCache(target);
28793
28817
  properties && properties.split(",").forEach(function(p2) {
28794
28818
  return saver.save(p2);
28795
28819
  });
@@ -28822,7 +28846,7 @@ void main(void)\r
28822
28846
  _transformOriginProp = _transformProp + "Origin";
28823
28847
  _tempDiv.style.cssText = "border-width:0;line-height:0;position:absolute;padding:0";
28824
28848
  _supports3D = !!_checkPropPrefix("perspective");
28825
- _reverting = gsap$1.core.reverting;
28849
+ _reverting = gsap.core.reverting;
28826
28850
  _pluginInitted = 1;
28827
28851
  }
28828
28852
  }, _getBBoxHack = function _getBBoxHack2(swapIfPossible) {
@@ -29696,8 +29720,8 @@ void main(void)\r
29696
29720
  _getMatrix
29697
29721
  }
29698
29722
  };
29699
- gsap$1.utils.checkPrefix = _checkPropPrefix;
29700
- gsap$1.core.getStyleSaver = _getStyleSaver;
29723
+ gsap.utils.checkPrefix = _checkPropPrefix;
29724
+ gsap.core.getStyleSaver = _getStyleSaver;
29701
29725
  (function(positionAndScale, rotation, others, aliases) {
29702
29726
  var all = _forEachName(positionAndScale + "," + rotation + "," + others, function(name) {
29703
29727
  _transformProps[name] = 1;
@@ -29715,8 +29739,8 @@ void main(void)\r
29715
29739
  _forEachName("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective", function(name) {
29716
29740
  _config.units[name] = "px";
29717
29741
  });
29718
- gsap$1.registerPlugin(CSSPlugin);
29719
- var gsapWithCSS = gsap$1.registerPlugin(CSSPlugin) || gsap$1;
29742
+ gsap.registerPlugin(CSSPlugin);
29743
+ var gsapWithCSS = gsap.registerPlugin(CSSPlugin) || gsap;
29720
29744
  gsapWithCSS.core.Tween;
29721
29745
  class LibPixiRectBgColor extends Graphics {
29722
29746
  constructor(options) {
@@ -49241,7 +49265,8 @@ void main(void)\r
49241
49265
  scrollContent,
49242
49266
  scrollbarRgiht,
49243
49267
  scrollbarWidth = 10,
49244
- scrollbarColor = "#ffffff"
49268
+ scrollbarColor = "#ffffff",
49269
+ onScroll
49245
49270
  } = params;
49246
49271
  super(width, height);
49247
49272
  this._startY = 0;
@@ -49254,6 +49279,7 @@ void main(void)\r
49254
49279
  this._scrollbarDragOffset = 0;
49255
49280
  this._scrollContent = scrollContent;
49256
49281
  this._scrollbarColor = scrollbarColor;
49282
+ this._onScroll = onScroll;
49257
49283
  this._content = new Container();
49258
49284
  this.addChild(this._content);
49259
49285
  this._content.addChild(this._scrollContent);
@@ -49461,6 +49487,7 @@ void main(void)\r
49461
49487
  const scrollY = Math.min(Math.max(-this._content.y, 0), maxScrollY);
49462
49488
  const barY = scrollY / maxScrollY * (viewHeight - barHeight);
49463
49489
  this._scrollbar.y = barY;
49490
+ this._onScroll(this._content.y);
49464
49491
  }
49465
49492
  /** @description 更新滚动条大小 */
49466
49493
  _updateScrollbarSize() {
@@ -55040,8 +55067,8 @@ void main(void){
55040
55067
  const LibPixiDigitalIncreasingAnimation = (params) => {
55041
55068
  const { value, onChange, onComplete, startValue = 0, duration = 4 } = params;
55042
55069
  const animatedValue = { value: startValue };
55043
- gsap.killTweensOf(animatedValue);
55044
- const amountAnimation = gsap.to(animatedValue, {
55070
+ gsapWithCSS.killTweensOf(animatedValue);
55071
+ const amountAnimation = gsapWithCSS.to(animatedValue, {
55045
55072
  value,
55046
55073
  duration,
55047
55074
  ease: "linear",
@@ -55056,7 +55083,7 @@ void main(void){
55056
55083
  };
55057
55084
  const LibPixiDownScaleAnimation = (container) => {
55058
55085
  libPixiEvent(container, "pointerdown", () => {
55059
- gsap.to(container, {
55086
+ gsapWithCSS.to(container, {
55060
55087
  duration: 0.1,
55061
55088
  pixi: {
55062
55089
  scale: 1.1
@@ -55064,7 +55091,7 @@ void main(void){
55064
55091
  });
55065
55092
  });
55066
55093
  libPixiEvent(container, "pointerup", () => {
55067
- gsap.to(container, {
55094
+ gsapWithCSS.to(container, {
55068
55095
  duration: 0.1,
55069
55096
  pixi: {
55070
55097
  scale: 1
@@ -55072,7 +55099,7 @@ void main(void){
55072
55099
  });
55073
55100
  });
55074
55101
  libPixiEvent(container, "pointerleave", () => {
55075
- gsap.to(container, {
55102
+ gsapWithCSS.to(container, {
55076
55103
  duration: 0.1,
55077
55104
  pixi: {
55078
55105
  scale: 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lyb-pixi-js",
3
- "version": "1.9.0",
3
+ "version": "1.9.2",
4
4
  "description": "自用Pixi.JS方法库",
5
5
  "license": "ISC",
6
6
  "exports": {