lyb-pixi-js 1.10.2 → 1.10.4
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.
|
@@ -28,7 +28,7 @@ export class LibPixiScrollContainerX extends LibPixiContainer {
|
|
|
28
28
|
//创建右边距
|
|
29
29
|
const rightMarginBox = new Sprite();
|
|
30
30
|
this._content.addChild(rightMarginBox);
|
|
31
|
-
rightMarginBox.
|
|
31
|
+
rightMarginBox.width = this._content.width + rightMargin;
|
|
32
32
|
// 创建遮罩
|
|
33
33
|
this._maskGraphics = new Graphics();
|
|
34
34
|
this.addChild(this._maskGraphics);
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Container } from "pixi.js";
|
|
2
2
|
import { LibPixiBaseContainer } from "./LibPixiBaseContainer";
|
|
3
3
|
interface Params {
|
|
4
|
-
/** 黑色背景透明度 */
|
|
5
|
-
bgAlpha?: number;
|
|
6
4
|
/** 是否需要显示黑色背景 */
|
|
7
5
|
needBg?: boolean;
|
|
8
6
|
/** 竖版初始大小 */
|
|
@@ -12,6 +10,11 @@ interface Params {
|
|
|
12
10
|
}
|
|
13
11
|
/** @description 弹窗组件 */
|
|
14
12
|
export declare class LibPixiDialog extends LibPixiBaseContainer {
|
|
13
|
+
/** 黑色背景透明度 */
|
|
14
|
+
static bgAlpha: number;
|
|
15
|
+
/** 动画时长 */
|
|
16
|
+
static durationIn: number;
|
|
17
|
+
static durationOut: number;
|
|
15
18
|
/** 蒙版UI */
|
|
16
19
|
private _maskUI;
|
|
17
20
|
/** 内容容器 */
|
|
@@ -20,8 +23,6 @@ export declare class LibPixiDialog extends LibPixiBaseContainer {
|
|
|
20
23
|
private _size;
|
|
21
24
|
/** 竖版初始大小 */
|
|
22
25
|
private _initialSize;
|
|
23
|
-
/** 黑色背景透明度 */
|
|
24
|
-
private _bgAlpha;
|
|
25
26
|
/** 是否处于关闭动画状态 */
|
|
26
27
|
private _isCloseAnimating;
|
|
27
28
|
constructor(params?: Params);
|
|
@@ -18,13 +18,10 @@ export class LibPixiDialog extends LibPixiBaseContainer {
|
|
|
18
18
|
super();
|
|
19
19
|
/** 当前大小 */
|
|
20
20
|
this._size = 1;
|
|
21
|
-
/** 黑色背景透明度 */
|
|
22
|
-
this._bgAlpha = 0.5;
|
|
23
21
|
/** 是否处于关闭动画状态 */
|
|
24
22
|
this._isCloseAnimating = false;
|
|
25
|
-
const {
|
|
23
|
+
const { size = 1, onClickMask, needBg = true } = params || {};
|
|
26
24
|
this._initialSize = size;
|
|
27
|
-
this._bgAlpha = bgAlpha;
|
|
28
25
|
//蒙版
|
|
29
26
|
this._maskUI = new LibPixiRectBgColor({
|
|
30
27
|
width: 2700,
|
|
@@ -56,11 +53,11 @@ export class LibPixiDialog extends LibPixiBaseContainer {
|
|
|
56
53
|
this._dialogContainer.scale.set(0);
|
|
57
54
|
this._dialogContainer.alpha = 0;
|
|
58
55
|
gsap.to(this._maskUI, {
|
|
59
|
-
duration:
|
|
60
|
-
alpha:
|
|
56
|
+
duration: LibPixiDialog.durationIn,
|
|
57
|
+
alpha: LibPixiDialog.bgAlpha,
|
|
61
58
|
});
|
|
62
59
|
gsap.to(this._dialogContainer, {
|
|
63
|
-
duration:
|
|
60
|
+
duration: LibPixiDialog.durationIn,
|
|
64
61
|
alpha: 1,
|
|
65
62
|
});
|
|
66
63
|
this._onResize((w, h) => {
|
|
@@ -85,7 +82,7 @@ export class LibPixiDialog extends LibPixiBaseContainer {
|
|
|
85
82
|
}
|
|
86
83
|
}
|
|
87
84
|
gsap.to(this._dialogContainer.scale, {
|
|
88
|
-
duration:
|
|
85
|
+
duration: LibPixiDialog.durationIn,
|
|
89
86
|
ease: "back.out",
|
|
90
87
|
x: this._size,
|
|
91
88
|
y: this._size,
|
|
@@ -99,21 +96,26 @@ export class LibPixiDialog extends LibPixiBaseContainer {
|
|
|
99
96
|
return;
|
|
100
97
|
this._isCloseAnimating = true;
|
|
101
98
|
gsap.to(this._dialogContainer.scale, {
|
|
102
|
-
duration:
|
|
99
|
+
duration: LibPixiDialog.durationOut,
|
|
103
100
|
ease: "back.in",
|
|
104
101
|
x: 0,
|
|
105
102
|
y: 0,
|
|
106
103
|
});
|
|
107
104
|
gsap.to(this._dialogContainer, {
|
|
108
|
-
duration:
|
|
109
|
-
delay:
|
|
105
|
+
duration: LibPixiDialog.durationOut,
|
|
106
|
+
delay: LibPixiDialog.durationOut / 2,
|
|
110
107
|
alpha: 0,
|
|
111
108
|
});
|
|
112
109
|
yield gsap.to(this._maskUI, {
|
|
113
|
-
duration:
|
|
114
|
-
delay:
|
|
110
|
+
duration: LibPixiDialog.durationOut,
|
|
111
|
+
delay: LibPixiDialog.durationOut / 2,
|
|
115
112
|
alpha: 0,
|
|
116
113
|
});
|
|
117
114
|
});
|
|
118
115
|
}
|
|
119
116
|
}
|
|
117
|
+
/** 黑色背景透明度 */
|
|
118
|
+
LibPixiDialog.bgAlpha = 0.5;
|
|
119
|
+
/** 动画时长 */
|
|
120
|
+
LibPixiDialog.durationIn = 0.5;
|
|
121
|
+
LibPixiDialog.durationOut = 0.5;
|
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
|
|
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
|
|
1340
|
+
return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1341
1341
|
}
|
|
1342
1342
|
function isDate(obj) {
|
|
1343
|
-
return toStr
|
|
1343
|
+
return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1344
1344
|
}
|
|
1345
1345
|
function isRegExp$1(obj) {
|
|
1346
|
-
return toStr
|
|
1346
|
+
return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1347
1347
|
}
|
|
1348
1348
|
function isError(obj) {
|
|
1349
|
-
return toStr
|
|
1349
|
+
return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1350
1350
|
}
|
|
1351
1351
|
function isString(obj) {
|
|
1352
|
-
return toStr
|
|
1352
|
+
return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1353
1353
|
}
|
|
1354
1354
|
function isNumber(obj) {
|
|
1355
|
-
return toStr
|
|
1355
|
+
return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1356
1356
|
}
|
|
1357
1357
|
function isBoolean(obj) {
|
|
1358
|
-
return toStr
|
|
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
|
|
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$
|
|
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,77 +1833,93 @@
|
|
|
1833
1833
|
Object_getPrototypeOf = $Object2.getPrototypeOf || null;
|
|
1834
1834
|
return Object_getPrototypeOf;
|
|
1835
1835
|
}
|
|
1836
|
-
var
|
|
1837
|
-
var
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
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
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
if (
|
|
1881
|
-
|
|
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
|
|
1886
|
-
that,
|
|
1887
|
-
concatty(args, arguments)
|
|
1888
|
-
);
|
|
1871
|
+
return str;
|
|
1889
1872
|
};
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
var
|
|
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
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
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
|
+
}
|
|
1907
1923
|
var functionCall;
|
|
1908
1924
|
var hasRequiredFunctionCall;
|
|
1909
1925
|
function requireFunctionCall() {
|
|
@@ -1923,12 +1939,12 @@
|
|
|
1923
1939
|
return functionApply;
|
|
1924
1940
|
}
|
|
1925
1941
|
var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
1926
|
-
var bind$2 =
|
|
1942
|
+
var bind$2 = requireFunctionBind();
|
|
1927
1943
|
var $apply$1 = requireFunctionApply();
|
|
1928
1944
|
var $call$2 = requireFunctionCall();
|
|
1929
1945
|
var $reflectApply = reflectApply;
|
|
1930
1946
|
var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
|
|
1931
|
-
var bind$1 =
|
|
1947
|
+
var bind$1 = requireFunctionBind();
|
|
1932
1948
|
var $TypeError$4 = type;
|
|
1933
1949
|
var $call$1 = requireFunctionCall();
|
|
1934
1950
|
var $actualApply = actualApply;
|
|
@@ -1999,7 +2015,7 @@
|
|
|
1999
2015
|
hasRequiredHasown = 1;
|
|
2000
2016
|
var call = Function.prototype.call;
|
|
2001
2017
|
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
2002
|
-
var bind2 =
|
|
2018
|
+
var bind2 = requireFunctionBind();
|
|
2003
2019
|
hasown = bind2.call(call, $hasOwn);
|
|
2004
2020
|
return hasown;
|
|
2005
2021
|
}
|
|
@@ -2014,7 +2030,7 @@
|
|
|
2014
2030
|
var $URIError = uri;
|
|
2015
2031
|
var abs = abs$1;
|
|
2016
2032
|
var floor = floor$1;
|
|
2017
|
-
var max = max$
|
|
2033
|
+
var max = max$1;
|
|
2018
2034
|
var min = min$1;
|
|
2019
2035
|
var pow = pow$1;
|
|
2020
2036
|
var round$1 = round$2;
|
|
@@ -2218,7 +2234,7 @@
|
|
|
2218
2234
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2219
2235
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2220
2236
|
};
|
|
2221
|
-
var bind =
|
|
2237
|
+
var bind = requireFunctionBind();
|
|
2222
2238
|
var hasOwn = requireHasown();
|
|
2223
2239
|
var $concat = bind.call($call, Array.prototype.concat);
|
|
2224
2240
|
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
@@ -49112,7 +49128,7 @@ void main(void)\r
|
|
|
49112
49128
|
this._content.addChild(this._scrollContent);
|
|
49113
49129
|
const rightMarginBox = new Sprite();
|
|
49114
49130
|
this._content.addChild(rightMarginBox);
|
|
49115
|
-
rightMarginBox.
|
|
49131
|
+
rightMarginBox.width = this._content.width + rightMargin;
|
|
49116
49132
|
this._maskGraphics = new Graphics();
|
|
49117
49133
|
this.addChild(this._maskGraphics);
|
|
49118
49134
|
this._maskGraphics.clear();
|