bard-legends-framework 0.7.26 → 0.7.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/dist/pixi/display-object/filters/base-filters/blur.filter.d.ts +1 -1
- package/dist/pixi/display-object/filters/base-filters/blur.filter.js +13 -10
- package/dist/pixi/display-object/filters/base-filters/blur.filter.js.map +1 -1
- package/dist/pixi/display-object/filters/base-filters/expand-with-color.filter.js +12 -9
- package/dist/pixi/display-object/filters/base-filters/expand-with-color.filter.js.map +1 -1
- package/dist/pixi/display-object/filters/composite-filters/glow-filter.js +2 -0
- package/dist/pixi/display-object/filters/composite-filters/glow-filter.js.map +1 -1
- package/dist/pixi/display-object/filters/templates/checking-neighbors.template.js +3 -1
- package/dist/pixi/display-object/filters/templates/checking-neighbors.template.js.map +1 -1
- package/dist/pixi/display-object/filters/templates/plane.template.js +2 -0
- package/dist/pixi/display-object/filters/templates/plane.template.js.map +1 -1
- package/package.json +1 -1
- package/package.json.bak +1 -1
|
@@ -24,8 +24,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.BlurFilter = void 0;
|
|
27
|
-
const PIXI = __importStar(require("pixi.js"));
|
|
28
27
|
const helpers_lib_1 = require("helpers-lib");
|
|
28
|
+
const PIXI = __importStar(require("pixi.js"));
|
|
29
|
+
const game_1 = require("../../../game");
|
|
29
30
|
const gaussian_values_helper_1 = require("../helpers/gaussian-values.helper");
|
|
30
31
|
class BlurFilterPass extends PIXI.Filter {
|
|
31
32
|
static getVertexShader() {
|
|
@@ -73,9 +74,10 @@ class BlurFilterPass extends PIXI.Filter {
|
|
|
73
74
|
constructor(strength, horizontal) {
|
|
74
75
|
super(BlurFilterPass.getVertexShader(), BlurFilterPass.getFragmentShader(gaussian_values_helper_1.GaussianValuesHelper.getValuesForLinearSamplingGauss(strength), horizontal));
|
|
75
76
|
this.horizontal = horizontal;
|
|
77
|
+
this.resolution = game_1.RESOLUTION;
|
|
76
78
|
}
|
|
77
79
|
apply(filterManager, input, output, clearMode) {
|
|
78
|
-
this.uniforms.pixelSize = this.horizontal ? 1 / input.width : 1 / input.height;
|
|
80
|
+
this.uniforms.pixelSize = this.horizontal ? 1 / (input.width * game_1.RESOLUTION) : 1 / (input.height * game_1.RESOLUTION);
|
|
79
81
|
filterManager.applyFilter(this, input, output, clearMode);
|
|
80
82
|
}
|
|
81
83
|
}
|
|
@@ -83,16 +85,17 @@ class BlurFilter extends PIXI.Filter {
|
|
|
83
85
|
constructor(strength = new helpers_lib_1.Vector(2, 2)) {
|
|
84
86
|
super();
|
|
85
87
|
this.strength = strength;
|
|
86
|
-
this.
|
|
87
|
-
this.
|
|
88
|
-
if (strength.x < 0 || strength.y < 0) {
|
|
89
|
-
throw new Error('BlurFilterLinearSampling: Strength must be greater than 0');
|
|
88
|
+
this.resolution = game_1.RESOLUTION;
|
|
89
|
+
this.strength = new helpers_lib_1.Vector(Math.floor(this.strength.x), Math.floor(this.strength.y)).multiplyNumber(game_1.RESOLUTION);
|
|
90
|
+
if (this.strength.x < 0 || this.strength.y < 0) {
|
|
91
|
+
throw new Error('BlurFilterLinearSampling: Strength * Resolution must be greater than 0');
|
|
90
92
|
}
|
|
91
|
-
else if (strength.x > 100 || strength.y > 100) {
|
|
92
|
-
throw new Error('BlurFilterLinearSampling: Strength cannot be higher than 100');
|
|
93
|
+
else if (this.strength.x > 100 || this.strength.y > 100) {
|
|
94
|
+
throw new Error('BlurFilterLinearSampling: Strength * Resolution cannot be higher than 100');
|
|
93
95
|
}
|
|
94
|
-
|
|
95
|
-
this.
|
|
96
|
+
this.horizontalFilter = new BlurFilterPass(this.strength.x, true);
|
|
97
|
+
this.verticalFilter = new BlurFilterPass(this.strength.y, false);
|
|
98
|
+
this.padding = Math.max(this.strength.x, this.strength.y);
|
|
96
99
|
}
|
|
97
100
|
apply(filterManager, input, output, clearMode) {
|
|
98
101
|
let renderTarget = filterManager.getFilterTexture();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blur.filter.js","sourceRoot":"","sources":["../../../../../src/pixi/display-object/filters/base-filters/blur.filter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAgC;AAEhC,
|
|
1
|
+
{"version":3,"file":"blur.filter.js","sourceRoot":"","sources":["../../../../../src/pixi/display-object/filters/base-filters/blur.filter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAmD;AACnD,8CAAgC;AAEhC,wCAA2C;AAC3C,8EAAgG;AAEhG,MAAM,cAAe,SAAQ,IAAI,CAAC,MAAM;IAC9B,MAAM,CAAC,eAAe;QAC5B,OAAO;;;;;;;;;;;;KAYN,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,iBAAiB,CAAC,WAAoC,EAAE,YAAqB;QAC1F,IAAI,MAAM,GAAG;;;;;;;;;;;;8DAY6C,0BAAY,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;sBAC7F,CAAC;QAEnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC5C,IAAI,YAAY,GAAG,QAAQ,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,GAAG,CAAC;YAC3E,MAAM,IAAI;mBACG,0BAAY,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;kBAClD,YAAY,KAAK,0BAAY,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;kBACtE,YAAY,YAAY,0BAAY,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,kBAAkB,CAAC;QAC9G,CAAC;QAED,MAAM,IAAI;;KAET,CAAC;QACF,O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AC;CACF;AA1CD,gCA0CC"}
|
|
@@ -26,6 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.ExpandWithColorFilter = void 0;
|
|
27
27
|
const helpers_lib_1 = require("helpers-lib");
|
|
28
28
|
const PIXI = __importStar(require("pixi.js"));
|
|
29
|
+
const game_1 = require("../../../game");
|
|
29
30
|
class ExpandWithColorFilter extends PIXI.Filter {
|
|
30
31
|
static getVertexShader() {
|
|
31
32
|
return `
|
|
@@ -75,24 +76,26 @@ class ExpandWithColorFilter extends PIXI.Filter {
|
|
|
75
76
|
return shader;
|
|
76
77
|
}
|
|
77
78
|
constructor(expand, color) {
|
|
78
|
-
super(ExpandWithColorFilter.getVertexShader(), ExpandWithColorFilter.getFragmentShader(expand));
|
|
79
|
+
super(ExpandWithColorFilter.getVertexShader(), ExpandWithColorFilter.getFragmentShader(expand * game_1.RESOLUTION));
|
|
79
80
|
this.expand = expand;
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
this.resolution = game_1.RESOLUTION;
|
|
82
|
+
this.expand = expand * game_1.RESOLUTION;
|
|
83
|
+
if (this.expand < 0) {
|
|
84
|
+
throw new Error('ExpandWithColorFilter: Expand * resolution cannot be smaller than 0');
|
|
82
85
|
}
|
|
83
|
-
else if (expand > 10) {
|
|
84
|
-
throw new Error('ExpandWithColorFilter: Expand cannot be higher than 10');
|
|
86
|
+
else if (this.expand > 10) {
|
|
87
|
+
throw new Error('ExpandWithColorFilter: Expand * resolution cannot be higher than 10');
|
|
85
88
|
}
|
|
86
|
-
if (!helpers_lib_1.Comparator.isInteger(expand)) {
|
|
87
|
-
expand = Math.floor(expand);
|
|
89
|
+
if (!helpers_lib_1.Comparator.isInteger(this.expand)) {
|
|
90
|
+
this.expand = Math.floor(this.expand);
|
|
88
91
|
}
|
|
89
92
|
let normalizedColor = helpers_lib_1.ColorHelper.normalize(color);
|
|
90
93
|
this.uniforms.color = new Float32Array([normalizedColor.red, normalizedColor.green, normalizedColor.blue]);
|
|
91
94
|
this.uniforms.expandSquared = this.expand * this.expand;
|
|
92
|
-
this.padding = expand;
|
|
95
|
+
this.padding = this.expand;
|
|
93
96
|
}
|
|
94
97
|
apply(filterManager, input, output, clearMode) {
|
|
95
|
-
this.uniforms.pixelSize = new Float32Array([1 / input.width, 1 / input.height]);
|
|
98
|
+
this.uniforms.pixelSize = new Float32Array([1 / (input.width * game_1.RESOLUTION), 1 / (input.height * game_1.RESOLUTION)]);
|
|
96
99
|
filterManager.applyFilter(this, input, output, clearMode);
|
|
97
100
|
}
|
|
98
101
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expand-with-color.filter.js","sourceRoot":"","sources":["../../../../../src/pixi/display-object/filters/base-filters/expand-with-color.filter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8E;AAC9E,8CAAgC;AAEhC,MAAa,qBAAsB,SAAQ,IAAI,CAAC,MAAM;IAC5C,MAAM,CAAC,eAAe;QAC5B,OAAO;;;;;;;;;;;;KAYN,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,iBAAiB,CAAC,MAAc;QAC7C,IAAI,MAAM,GAAG;;;;;;;;;kCASiB,CAAC;QAE/B,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;YACf,MAAM,IAAI;0BACU,0BAAY,CAAC,aAAa,CAAC,MAAM,CAAC,UAAU,0BAAY,CAAC,aAAa,CAAC,MAAM,CAAC;4BAC5E,0BAAY,CAAC,aAAa,CAAC,MAAM,CAAC,UAAU,0BAAY,CAAC,aAAa,CAAC,MAAM,CAAC;;;;;UAKhG,CAAC;QACP,CAAC;aAAM,CAAC;YACN,MAAM,IAAI;;sCAEsB,CAAC;QACnC,CAAC;QAED,kBAAkB;QAClB,MAAM,IAAI;;QAEN,CAAC;QAEL,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,YAAoB,MAAc,EAAE,KAAe;QACjD,KAAK,CAAC,qBAAqB,CAAC,eAAe,EAAE,EAAE,qBAAqB,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"expand-with-color.filter.js","sourceRoot":"","sources":["../../../../../src/pixi/display-object/filters/base-filters/expand-with-color.filter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8E;AAC9E,8CAAgC;AAEhC,wCAA2C;AAE3C,MAAa,qBAAsB,SAAQ,IAAI,CAAC,MAAM;IAC5C,MAAM,CAAC,eAAe;QAC5B,OAAO;;;;;;;;;;;;KAYN,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,iBAAiB,CAAC,MAAc;QAC7C,IAAI,MAAM,GAAG;;;;;;;;;kCASiB,CAAC;QAE/B,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;YACf,MAAM,IAAI;0BACU,0BAAY,CAAC,aAAa,CAAC,MAAM,CAAC,UAAU,0BAAY,CAAC,aAAa,CAAC,MAAM,CAAC;4BAC5E,0BAAY,CAAC,aAAa,CAAC,MAAM,CAAC,UAAU,0BAAY,CAAC,aAAa,CAAC,MAAM,CAAC;;;;;UAKhG,CAAC;QACP,CAAC;aAAM,CAAC;YACN,MAAM,IAAI;;sCAEsB,CAAC;QACnC,CAAC;QAED,kBAAkB;QAClB,MAAM,IAAI;;QAEN,CAAC;QAEL,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,YAAoB,MAAc,EAAE,KAAe;QACjD,KAAK,CAAC,qBAAqB,CAAC,eAAe,EAAE,EAAE,qBAAqB,CAAC,iBAAiB,CAAC,MAAM,GAAG,iBAAU,CAAC,CAAC,CAAC;QAD3F,WAAM,GAAN,MAAM,CAAQ;QAEhC,IAAI,CAAC,UAAU,GAAG,iBAAU,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,GAAG,iBAAU,CAAC;QAElC,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAC;QACzF,CAAC;aAAM,IAAI,IAAI,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAC;QACzF,CAAC;QAED,IAAI,CAAC,wBAAU,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;YACvC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACxC,CAAC;QAED,IAAI,eAAe,GAAG,yBAAW,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACnD,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,IAAI,YAAY,CAAC,CAAC,eAAe,CAAC,GAAG,EAAE,eAAe,CAAC,KAAK,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;QAC3G,IAAI,CAAC,QAAQ,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAExD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED,KAAK,CACH,aAAgC,EAChC,KAAyB,EACzB,MAA0B,EAC1B,SAA2B;QAE3B,IAAI,CAAC,QAAQ,CAAC,SAAS,GAAG,IAAI,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,iBAAU,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,iBAAU,CAAC,CAAC,CAAC,CAAC;QAC9G,aAAa,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IAC5D,CAAC;CACF;AAnFD,sDAmFC"}
|
|
@@ -27,11 +27,13 @@ exports.GlowFilter = void 0;
|
|
|
27
27
|
const helpers_lib_1 = require("helpers-lib");
|
|
28
28
|
const PIXI = __importStar(require("pixi.js"));
|
|
29
29
|
const __1 = require("../../..");
|
|
30
|
+
const game_1 = require("../../../game");
|
|
30
31
|
const blur_filter_1 = require("../base-filters/blur.filter");
|
|
31
32
|
const expand_with_color_filter_1 = require("../base-filters/expand-with-color.filter");
|
|
32
33
|
class GlowFilter extends PIXI.Filter {
|
|
33
34
|
constructor(partialOptions) {
|
|
34
35
|
super();
|
|
36
|
+
this.resolution = game_1.RESOLUTION;
|
|
35
37
|
let options = {
|
|
36
38
|
blurRadius: 1,
|
|
37
39
|
expand: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glow-filter.js","sourceRoot":"","sources":["../../../../../src/pixi/display-object/filters/composite-filters/glow-filter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8D;AAC9D,8CAAgC;AAEhC,gCAAkD;AAClD,6DAAyD;AACzD,uFAAiF;AAEjF,MAAa,UAAW,SAAQ,IAAI,CAAC,MAAM;IAIzC,YAAY,cAAqC;QAC/C,KAAK,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"glow-filter.js","sourceRoot":"","sources":["../../../../../src/pixi/display-object/filters/composite-filters/glow-filter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8D;AAC9D,8CAAgC;AAEhC,gCAAkD;AAClD,wCAA2C;AAC3C,6DAAyD;AACzD,uFAAiF;AAEjF,MAAa,UAAW,SAAQ,IAAI,CAAC,MAAM;IAIzC,YAAY,cAAqC;QAC/C,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,UAAU,GAAG,iBAAU,CAAC;QAE7B,IAAI,OAAO,GAAgB;YACzB,UAAU,EAAE,CAAC;YACb,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,yBAAW,CAAC,KAAK;YACxB,SAAS,EAAE,aAAS,CAAC,MAAM;YAC3B,GAAG,cAAc;SAClB,CAAC;QAEF,IAAI,CAAC,qBAAqB,GAAG,IAAI,gDAAqB,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QAEtF,IAAI,gBAAgB,GAAG,wBAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC;YAC5D,CAAC,CAAC,IAAI,oBAAM,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC;YACpD,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;QACvB,IAAI,CAAC,UAAU,GAAG,IAAI,wBAAU,CAAC,gBAAgB,CAAC,CAAC;QAEnD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;QACjF,IAAI,CAAC,UAAU,CAAC,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;IACtD,CAAC;IAED,KAAK,CACH,aAAgC,EAChC,KAAyB,EACzB,MAA0B,EAC1B,SAA2B;QAE3B,IAAI,YAAY,GAAG,aAAa,CAAC,gBAAgB,EAAE,CAAC;QAEpD,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,aAAa,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC7F,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,aAAa,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;QAEtE,aAAa,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAClD,CAAC;CACF;AAxCD,gCAwCC"}
|
|
@@ -25,6 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.CheckingNeighborsTemplate = void 0;
|
|
27
27
|
const PIXI = __importStar(require("pixi.js"));
|
|
28
|
+
const game_1 = require("../../../game");
|
|
28
29
|
class CheckingNeighborsTemplate extends PIXI.Filter {
|
|
29
30
|
static getVertexShader() {
|
|
30
31
|
return `
|
|
@@ -62,9 +63,10 @@ class CheckingNeighborsTemplate extends PIXI.Filter {
|
|
|
62
63
|
}
|
|
63
64
|
constructor() {
|
|
64
65
|
super(CheckingNeighborsTemplate.getVertexShader(), CheckingNeighborsTemplate.getFragmentShader());
|
|
66
|
+
this.resolution = game_1.RESOLUTION;
|
|
65
67
|
}
|
|
66
68
|
apply(filterManager, input, output, clearMode) {
|
|
67
|
-
this.uniforms.pixelSize = new Float32Array([1 / input.width, 1 / input.height]);
|
|
69
|
+
this.uniforms.pixelSize = new Float32Array([1 / (input.width * game_1.RESOLUTION), 1 / (input.height * game_1.RESOLUTION)]);
|
|
68
70
|
filterManager.applyFilter(this, input, output, clearMode);
|
|
69
71
|
}
|
|
70
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checking-neighbors.template.js","sourceRoot":"","sources":["../../../../../src/pixi/display-object/filters/templates/checking-neighbors.template.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAgC;AAEhC,MAAa,yBAA0B,SAAQ,IAAI,CAAC,MAAM;IAChD,MAAM,CAAC,eAAe;QAC5B,OAAO;;;;;;;;;;;;KAYN,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,iBAAiB;QAC9B,OAAO;;;;;;;;;;;;;;;;KAgBN,CAAC;IACJ,CAAC;IAED;QACE,KAAK,CAAC,yBAAyB,CAAC,eAAe,EAAE,EAAE,yBAAyB,CAAC,iBAAiB,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"checking-neighbors.template.js","sourceRoot":"","sources":["../../../../../src/pixi/display-object/filters/templates/checking-neighbors.template.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAgC;AAEhC,wCAA2C;AAE3C,MAAa,yBAA0B,SAAQ,IAAI,CAAC,MAAM;IAChD,MAAM,CAAC,eAAe;QAC5B,OAAO;;;;;;;;;;;;KAYN,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,iBAAiB;QAC9B,OAAO;;;;;;;;;;;;;;;;KAgBN,CAAC;IACJ,CAAC;IAED;QACE,KAAK,CAAC,yBAAyB,CAAC,eAAe,EAAE,EAAE,yBAAyB,CAAC,iBAAiB,EAAE,CAAC,CAAC;QAClG,IAAI,CAAC,UAAU,GAAG,iBAAU,CAAC;IAC/B,CAAC;IAED,KAAK,CACH,aAAgC,EAChC,KAAyB,EACzB,MAA0B,EAC1B,SAA2B;QAE3B,IAAI,CAAC,QAAQ,CAAC,SAAS,GAAG,IAAI,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,iBAAU,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,iBAAU,CAAC,CAAC,CAAC,CAAC;QAC9G,aAAa,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IAC5D,CAAC;CACF;AAnDD,8DAmDC"}
|
|
@@ -25,6 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.PlaneTemplate = void 0;
|
|
27
27
|
const PIXI = __importStar(require("pixi.js"));
|
|
28
|
+
const game_1 = require("../../../game");
|
|
28
29
|
class PlaneTemplate extends PIXI.Filter {
|
|
29
30
|
static getVertexShader() {
|
|
30
31
|
return `
|
|
@@ -54,6 +55,7 @@ class PlaneTemplate extends PIXI.Filter {
|
|
|
54
55
|
}
|
|
55
56
|
constructor() {
|
|
56
57
|
super(PlaneTemplate.getVertexShader(), PlaneTemplate.getFragmentShader());
|
|
58
|
+
this.resolution = game_1.RESOLUTION;
|
|
57
59
|
}
|
|
58
60
|
apply(filterManager, input, output, clearMode) {
|
|
59
61
|
filterManager.applyFilter(this, input, output, clearMode);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plane.template.js","sourceRoot":"","sources":["../../../../../src/pixi/display-object/filters/templates/plane.template.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAgC;AAEhC,MAAa,aAAc,SAAQ,IAAI,CAAC,MAAM;IACpC,MAAM,CAAC,eAAe;QAC5B,OAAO;;;;;;;;;;;;KAYN,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,iBAAiB;QAC9B,OAAO;;;;;;;;KAQN,CAAC;IACJ,CAAC;IAED;QACE,KAAK,CAAC,aAAa,CAAC,eAAe,EAAE,EAAE,aAAa,CAAC,iBAAiB,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"plane.template.js","sourceRoot":"","sources":["../../../../../src/pixi/display-object/filters/templates/plane.template.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAgC;AAEhC,wCAA2C;AAE3C,MAAa,aAAc,SAAQ,IAAI,CAAC,MAAM;IACpC,MAAM,CAAC,eAAe;QAC5B,OAAO;;;;;;;;;;;;KAYN,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,iBAAiB;QAC9B,OAAO;;;;;;;;KAQN,CAAC;IACJ,CAAC;IAED;QACE,KAAK,CAAC,aAAa,CAAC,eAAe,EAAE,EAAE,aAAa,CAAC,iBAAiB,EAAE,CAAC,CAAC;QAC1E,IAAI,CAAC,UAAU,GAAG,iBAAU,CAAC;IAC/B,CAAC;IAED,KAAK,CACH,aAAgC,EAChC,KAAyB,EACzB,MAA0B,EAC1B,SAA2B;QAE3B,aAAa,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IAC5D,CAAC;CACF;AA1CD,sCA0CC"}
|
package/package.json
CHANGED