lyb-pixi-js 1.11.26 → 1.11.28
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/LibPixiFilter.d.ts +1 -1
- package/Utils/LibPixiFilter.js +4 -0
- package/lyb-pixi.js +15 -4
- package/package.json +1 -1
package/Utils/LibPixiFilter.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @description 设置滤镜 */
|
|
2
2
|
import { ColorMatrixFilter, BlurFilter } from "pixi.js";
|
|
3
|
-
export type LibPixiSetFilterFilterName = "brightness" | "blur" | "desaturate" | "contrast";
|
|
3
|
+
export type LibPixiSetFilterFilterName = "brightness" | "blur" | "desaturate" | "contrast" | "saturate";
|
|
4
4
|
/** @description 滤镜
|
|
5
5
|
* @param filterName 滤镜名称
|
|
6
6
|
* @param v 滤镜值
|
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
|
@@ -1907,7 +1907,15 @@
|
|
|
1907
1907
|
};
|
|
1908
1908
|
var implementation = implementation$1;
|
|
1909
1909
|
var functionBind = Function.prototype.bind || implementation;
|
|
1910
|
-
var functionCall
|
|
1910
|
+
var functionCall;
|
|
1911
|
+
var hasRequiredFunctionCall;
|
|
1912
|
+
function requireFunctionCall() {
|
|
1913
|
+
if (hasRequiredFunctionCall)
|
|
1914
|
+
return functionCall;
|
|
1915
|
+
hasRequiredFunctionCall = 1;
|
|
1916
|
+
functionCall = Function.prototype.call;
|
|
1917
|
+
return functionCall;
|
|
1918
|
+
}
|
|
1911
1919
|
var functionApply;
|
|
1912
1920
|
var hasRequiredFunctionApply;
|
|
1913
1921
|
function requireFunctionApply() {
|
|
@@ -1920,12 +1928,12 @@
|
|
|
1920
1928
|
var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
1921
1929
|
var bind$2 = functionBind;
|
|
1922
1930
|
var $apply$1 = requireFunctionApply();
|
|
1923
|
-
var $call$2 =
|
|
1931
|
+
var $call$2 = requireFunctionCall();
|
|
1924
1932
|
var $reflectApply = reflectApply;
|
|
1925
1933
|
var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
|
|
1926
1934
|
var bind$1 = functionBind;
|
|
1927
1935
|
var $TypeError$4 = type;
|
|
1928
|
-
var $call$1 =
|
|
1936
|
+
var $call$1 = requireFunctionCall();
|
|
1929
1937
|
var $actualApply = actualApply;
|
|
1930
1938
|
var callBindApplyHelpers = function callBindBasic2(args) {
|
|
1931
1939
|
if (args.length < 1 || typeof args[0] !== "function") {
|
|
@@ -2043,7 +2051,7 @@
|
|
|
2043
2051
|
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
2044
2052
|
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
2045
2053
|
var $apply = requireFunctionApply();
|
|
2046
|
-
var $call =
|
|
2054
|
+
var $call = requireFunctionCall();
|
|
2047
2055
|
var needsEval = {};
|
|
2048
2056
|
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
2049
2057
|
var INTRINSICS = {
|
|
@@ -54556,6 +54564,9 @@ void main(void)\r
|
|
|
54556
54564
|
} else if (filterName === "contrast") {
|
|
54557
54565
|
filter = new ColorMatrixFilter();
|
|
54558
54566
|
filter.contrast(v2, false);
|
|
54567
|
+
} else if (filterName === "saturate") {
|
|
54568
|
+
filter = new ColorMatrixFilter();
|
|
54569
|
+
filter.saturate(v2, false);
|
|
54559
54570
|
} else {
|
|
54560
54571
|
throw new Error("未知滤镜名称");
|
|
54561
54572
|
}
|