lyb-pixi-js 1.11.25 → 1.11.27
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/LibPixiEvent.js +2 -2
- package/Utils/LibPixiFilter.js +4 -0
- package/lyb-pixi.js +21 -5
- package/package.json +1 -1
package/Utils/LibPixiEvent.js
CHANGED
|
@@ -21,7 +21,7 @@ const debounceImmediate = (func, wait) => {
|
|
|
21
21
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiEvent-事件注册
|
|
22
22
|
*/
|
|
23
23
|
export const libPixiEvent = (v, eventName, callback, params = {}) => {
|
|
24
|
-
const { once = false, debounce = false, debounceTime = 1000, preventDragClick = false } = params;
|
|
24
|
+
const { once = false, debounce = false, debounceTime = 1000, preventDragClick = false, } = params;
|
|
25
25
|
v.cursor = "pointer";
|
|
26
26
|
v.eventMode = "static";
|
|
27
27
|
let lastX = 0;
|
|
@@ -40,7 +40,7 @@ export const libPixiEvent = (v, eventName, callback, params = {}) => {
|
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
const fn = (e) => {
|
|
43
|
-
if (isDragging &&
|
|
43
|
+
if (isDragging && ["pointertap", "pointerup"].includes(eventName))
|
|
44
44
|
return;
|
|
45
45
|
if (e.button === 2)
|
|
46
46
|
return;
|
package/Utils/LibPixiFilter.js
CHANGED
|
@@ -22,6 +22,10 @@ export const libPixiFilter = (filterName, v) => {
|
|
|
22
22
|
filter = new ColorMatrixFilter();
|
|
23
23
|
filter.contrast(v, false);
|
|
24
24
|
}
|
|
25
|
+
else if (filterName === "saturate") {
|
|
26
|
+
filter = new ColorMatrixFilter();
|
|
27
|
+
filter.saturate(v, false);
|
|
28
|
+
}
|
|
25
29
|
else {
|
|
26
30
|
throw new Error("未知滤镜名称");
|
|
27
31
|
}
|
package/lyb-pixi.js
CHANGED
|
@@ -1908,10 +1908,18 @@
|
|
|
1908
1908
|
var implementation = implementation$1;
|
|
1909
1909
|
var functionBind = Function.prototype.bind || implementation;
|
|
1910
1910
|
var functionCall = Function.prototype.call;
|
|
1911
|
-
var functionApply
|
|
1911
|
+
var functionApply;
|
|
1912
|
+
var hasRequiredFunctionApply;
|
|
1913
|
+
function requireFunctionApply() {
|
|
1914
|
+
if (hasRequiredFunctionApply)
|
|
1915
|
+
return functionApply;
|
|
1916
|
+
hasRequiredFunctionApply = 1;
|
|
1917
|
+
functionApply = Function.prototype.apply;
|
|
1918
|
+
return functionApply;
|
|
1919
|
+
}
|
|
1912
1920
|
var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
1913
1921
|
var bind$2 = functionBind;
|
|
1914
|
-
var $apply$1 =
|
|
1922
|
+
var $apply$1 = requireFunctionApply();
|
|
1915
1923
|
var $call$2 = functionCall;
|
|
1916
1924
|
var $reflectApply = reflectApply;
|
|
1917
1925
|
var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
|
|
@@ -2034,7 +2042,7 @@
|
|
|
2034
2042
|
var getProto = requireGetProto();
|
|
2035
2043
|
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
2036
2044
|
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
2037
|
-
var $apply =
|
|
2045
|
+
var $apply = requireFunctionApply();
|
|
2038
2046
|
var $call = functionCall;
|
|
2039
2047
|
var needsEval = {};
|
|
2040
2048
|
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
@@ -48798,7 +48806,12 @@ void main(void)\r
|
|
|
48798
48806
|
};
|
|
48799
48807
|
};
|
|
48800
48808
|
const libPixiEvent = (v2, eventName, callback, params = {}) => {
|
|
48801
|
-
const {
|
|
48809
|
+
const {
|
|
48810
|
+
once = false,
|
|
48811
|
+
debounce = false,
|
|
48812
|
+
debounceTime = 1e3,
|
|
48813
|
+
preventDragClick = false
|
|
48814
|
+
} = params;
|
|
48802
48815
|
v2.cursor = "pointer";
|
|
48803
48816
|
v2.eventMode = "static";
|
|
48804
48817
|
let lastX = 0;
|
|
@@ -48817,7 +48830,7 @@ void main(void)\r
|
|
|
48817
48830
|
});
|
|
48818
48831
|
}
|
|
48819
48832
|
const fn = (e2) => {
|
|
48820
|
-
if (isDragging &&
|
|
48833
|
+
if (isDragging && ["pointertap", "pointerup"].includes(eventName))
|
|
48821
48834
|
return;
|
|
48822
48835
|
if (e2.button === 2)
|
|
48823
48836
|
return;
|
|
@@ -54543,6 +54556,9 @@ void main(void)\r
|
|
|
54543
54556
|
} else if (filterName === "contrast") {
|
|
54544
54557
|
filter = new ColorMatrixFilter();
|
|
54545
54558
|
filter.contrast(v2, false);
|
|
54559
|
+
} else if (filterName === "saturate") {
|
|
54560
|
+
filter = new ColorMatrixFilter();
|
|
54561
|
+
filter.saturate(v2, false);
|
|
54546
54562
|
} else {
|
|
54547
54563
|
throw new Error("未知滤镜名称");
|
|
54548
54564
|
}
|