@codingfactory/mediables-vue 2.4.17 → 2.4.19
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/{PixiFrameExporter-DpA_aGpS.js → PixiFrameExporter-Ovg5_owp.js} +2 -2
- package/dist/{PixiFrameExporter-DpA_aGpS.js.map → PixiFrameExporter-Ovg5_owp.js.map} +1 -1
- package/dist/{PixiFrameExporter-dT2uNWrS.cjs → PixiFrameExporter-RBbYifm4.cjs} +2 -2
- package/dist/{PixiFrameExporter-dT2uNWrS.cjs.map → PixiFrameExporter-RBbYifm4.cjs.map} +1 -1
- package/dist/components/ImageEditorModal.vue.d.ts +1 -2
- package/dist/editor-BIDFjsrP.cjs +42 -0
- package/dist/editor-BIDFjsrP.cjs.map +1 -0
- package/dist/{editor-COzKP3ld.js → editor-BfdrdqUU.js} +94 -84
- package/dist/editor-BfdrdqUU.js.map +1 -0
- package/dist/{index-C_lYGySf.cjs → index-DM7D7H0K.cjs} +4 -4
- package/dist/index-DM7D7H0K.cjs.map +1 -0
- package/dist/{index-BGiY-ZYy.js → index-RIK4lle5.js} +12 -16
- package/dist/index-RIK4lle5.js.map +1 -0
- package/dist/mediables-vanilla.cjs +1 -1
- package/dist/mediables-vanilla.mjs +1 -1
- package/dist/mediables-vue.cjs +1 -1
- package/dist/mediables-vue.mjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/editor-2u2tIKvW.cjs +0 -42
- package/dist/editor-2u2tIKvW.cjs.map +0 -1
- package/dist/editor-COzKP3ld.js.map +0 -1
- package/dist/index-BGiY-ZYy.js.map +0 -1
- package/dist/index-C_lYGySf.cjs.map +0 -1
|
@@ -325,13 +325,13 @@ class Pe extends U {
|
|
|
325
325
|
let F = i / M;
|
|
326
326
|
r && (F = Math.min(1, F)), l = Math.round(o * F), c = Math.round(n * F);
|
|
327
327
|
}
|
|
328
|
-
const d = this.sprite, h = d.x, p = d.y,
|
|
328
|
+
const d = this.sprite, h = d.x, p = d.y, f = d.scale.x, _ = d.scale.y, g = d.width, y = d.height;
|
|
329
329
|
if (g <= 0 || y <= 0)
|
|
330
330
|
return null;
|
|
331
331
|
const v = l / g, x = c / y;
|
|
332
332
|
let P = null;
|
|
333
333
|
try {
|
|
334
|
-
if (d.x = 0, d.y = 0, d.scale.x =
|
|
334
|
+
if (d.x = 0, d.y = 0, d.scale.x = f * v, d.scale.y = _ * x, P = a.RenderTexture.create({
|
|
335
335
|
width: Math.ceil(l),
|
|
336
336
|
height: Math.ceil(c),
|
|
337
337
|
resolution: 1
|
|
@@ -353,7 +353,7 @@ class Pe extends U {
|
|
|
353
353
|
} catch {
|
|
354
354
|
return null;
|
|
355
355
|
} finally {
|
|
356
|
-
d.x = h, d.y = p, d.scale.x =
|
|
356
|
+
d.x = h, d.y = p, d.scale.x = f, d.scale.y = _, P && P.destroy(!0);
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
/**
|
|
@@ -766,7 +766,7 @@ const X = class X extends U {
|
|
|
766
766
|
const d = l.width / 3, h = l.height / 3;
|
|
767
767
|
for (let y = 1; y <= 2; y++)
|
|
768
768
|
n.beginPath(), n.moveTo(l.x + d * y, l.y), n.lineTo(l.x + d * y, l.y + l.height), n.stroke(), n.beginPath(), n.moveTo(l.x, l.y + h * y), n.lineTo(l.x + l.width, l.y + h * y), n.stroke();
|
|
769
|
-
const p = this.HANDLE_SIZE,
|
|
769
|
+
const p = this.HANDLE_SIZE, f = [
|
|
770
770
|
{ x: l.x, y: l.y, m: "resize-nw" },
|
|
771
771
|
{ x: l.x + l.width, y: l.y, m: "resize-ne" },
|
|
772
772
|
{ x: l.x, y: l.y + l.height, m: "resize-sw" },
|
|
@@ -776,7 +776,7 @@ const X = class X extends U {
|
|
|
776
776
|
{ x: l.x + l.width / 2, y: l.y + l.height, m: "s" },
|
|
777
777
|
{ x: l.x, y: l.y + l.height / 2, m: "w" },
|
|
778
778
|
{ x: l.x + l.width, y: l.y + l.height / 2, m: "e" }
|
|
779
|
-
], g = [...
|
|
779
|
+
], g = [...f, ..._];
|
|
780
780
|
for (const y of g) {
|
|
781
781
|
const v = this._hoverMode === y.m, x = v ? p + 4 : p;
|
|
782
782
|
n.beginPath(), n.rect(y.x - x / 2, y.y - x / 2, x, x), n.fillStyle = v ? "#4da3ff" : "#ffffff", n.strokeStyle = "rgba(0,0,0,0.6)", n.lineWidth = 1, n.fill(), n.stroke();
|
|
@@ -863,8 +863,18 @@ const X = class X extends U {
|
|
|
863
863
|
if (!e || !t) return;
|
|
864
864
|
let i = this.state.get("crop.rect");
|
|
865
865
|
if (!i) {
|
|
866
|
-
|
|
867
|
-
|
|
866
|
+
this.state.get("crop.shape") === "circle" && this.state.set("crop.aspect", "1:1");
|
|
867
|
+
const o = this.state.get("crop.aspect"), n = this._getAspectRatio(o);
|
|
868
|
+
let l, c;
|
|
869
|
+
if (n) {
|
|
870
|
+
const p = t.width * 0.9, f = t.height * 0.9;
|
|
871
|
+
p / f > n ? (c = f, l = c * n) : (l = p, c = l / n);
|
|
872
|
+
} else {
|
|
873
|
+
const p = Math.min(e.screen.width, e.screen.height) * 0.7;
|
|
874
|
+
l = p, c = p;
|
|
875
|
+
}
|
|
876
|
+
const d = t.x + (t.width - l) / 2, h = t.y + (t.height - c) / 2;
|
|
877
|
+
i = { x: d, y: h, width: l, height: c }, this.state.set("crop.rect", i), o !== "free" && this.constrainCropRect();
|
|
868
878
|
}
|
|
869
879
|
const r = e.stage;
|
|
870
880
|
r.eventMode = "static", r.hitArea = e.screen, r.cursor = "crosshair", r.on("pointerdown", this._onPointerDown), r.on("pointermove", this._onPointerMove), r.on("pointerup", this._onPointerUp), r.on("pointerupoutside", this._onPointerUp), this.state.set("mode", "crop"), this.drawOverlay(), this.emit("enabled");
|
|
@@ -890,16 +900,16 @@ const X = class X extends U {
|
|
|
890
900
|
const e = this.renderer.app, t = this.renderer.sprite, i = this.renderer.originalTexture, r = this.state.get("crop.rect");
|
|
891
901
|
if (!r || !t || !e || !i) return null;
|
|
892
902
|
const a = window.PIXI, o = this.renderer.zoom, n = i.width / t.width, l = i.height / t.height, c = (r.x - t.x) * n, d = (r.y - t.y) * l;
|
|
893
|
-
let h = Math.round(Math.max(1, r.width * n)), p = Math.round(Math.max(1, r.height * l)),
|
|
903
|
+
let h = Math.round(Math.max(1, r.width * n)), p = Math.round(Math.max(1, r.height * l)), f = Math.round(c), _ = Math.round(d);
|
|
894
904
|
if (h <= 0 || p <= 0) return null;
|
|
895
905
|
const g = new a.Container(), y = new a.Sprite(i);
|
|
896
906
|
if (this.state.get("crop.shape") === "circle") {
|
|
897
|
-
const $ = Math.round(Math.max(h, p)), _e =
|
|
898
|
-
|
|
907
|
+
const $ = Math.round(Math.max(h, p)), _e = f + h / 2, xe = _ + p / 2;
|
|
908
|
+
f = Math.round(_e - $ / 2), _ = Math.round(xe - $ / 2), h = p = $;
|
|
899
909
|
const R = new a.Graphics();
|
|
900
910
|
typeof R.circle == "function" && typeof R.fill == "function" ? R.circle(h / 2, p / 2, h / 2).fill(16777215) : (R.beginFill(16777215, 1), R.drawCircle(h / 2, p / 2, h / 2), R.endFill()), y.mask = R, g.addChild(R);
|
|
901
911
|
}
|
|
902
|
-
y.x = -
|
|
912
|
+
y.x = -f, y.y = -_, g.addChild(y);
|
|
903
913
|
const x = a.RenderTexture.create({ width: h, height: p });
|
|
904
914
|
e.renderer.render({
|
|
905
915
|
container: g,
|
|
@@ -911,11 +921,11 @@ const X = class X extends U {
|
|
|
911
921
|
const S = new a.Sprite(x);
|
|
912
922
|
e.stage.addChild(S), this.renderer.sprite = S, this.renderer.fitScale = this.renderer.getFitScaleFor(x), this.renderer.setZoom(o, { keepCenter: !1 }), this.renderer.applyViewTransform(), this.renderer.render();
|
|
913
923
|
const T = this.state.get("crop.appliedRect"), F = T && Number.isFinite(T.x) && Number.isFinite(T.y) && Number.isFinite(T.width) && Number.isFinite(T.height) ? {
|
|
914
|
-
x: Math.round(T.x +
|
|
924
|
+
x: Math.round(T.x + f),
|
|
915
925
|
y: Math.round(T.y + _),
|
|
916
926
|
width: h,
|
|
917
927
|
height: p
|
|
918
|
-
} : { x:
|
|
928
|
+
} : { x: f, y: _, width: h, height: p }, B = this.state.get("crop.shape") || "free", V = this.state.get("crop.aspect") || "free";
|
|
919
929
|
return this.disable(), this.state.set("crop.appliedRect", F), this.state.set("crop.appliedShape", B), this.state.set("crop.appliedAspect", V), this.emit("applied", { width: h, height: p }), { texture: x, preservedZoom: o };
|
|
920
930
|
}
|
|
921
931
|
/**
|
|
@@ -931,14 +941,14 @@ const X = class X extends U {
|
|
|
931
941
|
const o = window.PIXI, n = this.renderer.zoom;
|
|
932
942
|
let l = Math.round(Math.max(1, e.width)), c = Math.round(Math.max(1, e.height)), d = Math.round(e.x), h = Math.round(e.y);
|
|
933
943
|
if (l <= 0 || c <= 0) return null;
|
|
934
|
-
const p = new o.Container(),
|
|
944
|
+
const p = new o.Container(), f = new o.Sprite(a);
|
|
935
945
|
if (t === "circle") {
|
|
936
946
|
const v = Math.round(Math.max(l, c)), x = d + l / 2, P = h + c / 2;
|
|
937
947
|
d = Math.round(x - v / 2), h = Math.round(P - v / 2), l = c = v;
|
|
938
948
|
const S = new o.Graphics();
|
|
939
|
-
typeof S.circle == "function" && typeof S.fill == "function" ? S.circle(l / 2, c / 2, l / 2).fill(16777215) : (S.beginFill(16777215, 1), S.drawCircle(l / 2, c / 2, l / 2), S.endFill()),
|
|
949
|
+
typeof S.circle == "function" && typeof S.fill == "function" ? S.circle(l / 2, c / 2, l / 2).fill(16777215) : (S.beginFill(16777215, 1), S.drawCircle(l / 2, c / 2, l / 2), S.endFill()), f.mask = S, p.addChild(S);
|
|
940
950
|
}
|
|
941
|
-
|
|
951
|
+
f.x = -d, f.y = -h, p.addChild(f);
|
|
942
952
|
const _ = o.RenderTexture.create({ width: l, height: c });
|
|
943
953
|
i.renderer.render({ container: p, target: _, clear: !0 }), p.destroy({ children: !0 });
|
|
944
954
|
const g = this.renderer.originalTexture;
|
|
@@ -1121,8 +1131,8 @@ function he({ id: s, label: e, min: t = 0, max: i = 1, step: r = 0.01, value: a
|
|
|
1121
1131
|
step: String(r),
|
|
1122
1132
|
value: String(a),
|
|
1123
1133
|
onInput: (h) => {
|
|
1124
|
-
const p = parseFloat(h.target.value),
|
|
1125
|
-
|
|
1134
|
+
const p = parseFloat(h.target.value), f = l.querySelector(".slider-value");
|
|
1135
|
+
f && (f.textContent = Z(p)), o == null || o(p);
|
|
1126
1136
|
}
|
|
1127
1137
|
});
|
|
1128
1138
|
return l.appendChild(c), l.appendChild(d), l.setValue = (h) => {
|
|
@@ -2344,8 +2354,8 @@ class tt {
|
|
|
2344
2354
|
className: `active-filter-item ${r ? "selected" : ""}`,
|
|
2345
2355
|
"data-active-filter": e,
|
|
2346
2356
|
"data-testid": `active-filter-${e}`,
|
|
2347
|
-
onClick: (
|
|
2348
|
-
|
|
2357
|
+
onClick: (f) => {
|
|
2358
|
+
f.target.closest(".filter-item-actions") || this._handleSelect(e);
|
|
2349
2359
|
}
|
|
2350
2360
|
}), o = u("div", { className: "filter-item-header" }), n = u("span", { className: "filter-item-name" }, t.name), l = u("div", { className: "filter-item-actions" }), c = C({
|
|
2351
2361
|
icon: be,
|
|
@@ -2971,7 +2981,7 @@ const k = /* @__PURE__ */ new Map(), Y = /* @__PURE__ */ new Map();
|
|
|
2971
2981
|
function rt(s, e) {
|
|
2972
2982
|
return !Array.isArray(s.mediaTargets) || s.mediaTargets.length === 0 ? !0 : s.mediaTargets.includes(e);
|
|
2973
2983
|
}
|
|
2974
|
-
function
|
|
2984
|
+
function m(s) {
|
|
2975
2985
|
var e;
|
|
2976
2986
|
return k.has(s.id), k.set(s.id, s), Y.has(s.category) || Y.set(s.category, []), (e = Y.get(s.category)) == null || e.push(s.id), s;
|
|
2977
2987
|
}
|
|
@@ -2986,7 +2996,7 @@ function at() {
|
|
|
2986
2996
|
(t) => /Filter$/.test(t[0]) && typeof t[1] == "function"
|
|
2987
2997
|
).forEach(([t, i]) => {
|
|
2988
2998
|
const r = t.replace(/Filter$/, "").replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
2989
|
-
k.has(r) ||
|
|
2999
|
+
k.has(r) || m({
|
|
2990
3000
|
id: r,
|
|
2991
3001
|
name: t.replace(/Filter$/, ""),
|
|
2992
3002
|
category: "unlisted",
|
|
@@ -3040,7 +3050,7 @@ function ct() {
|
|
|
3040
3050
|
}
|
|
3041
3051
|
if (typeof window < "u") {
|
|
3042
3052
|
window.__DEBUG_FILTERS_LIST = Array.from(k.keys()), window.getAllFilters = H, window.getFilter = st, window.getFiltersByCategory = ot, window.getRegisteredFilters = ct;
|
|
3043
|
-
const s =
|
|
3053
|
+
const s = m;
|
|
3044
3054
|
window.registerFilter = (e) => {
|
|
3045
3055
|
const t = s(e);
|
|
3046
3056
|
return window.__DEBUG_FILTERS_LIST = Array.from(k.keys()), t;
|
|
@@ -3096,7 +3106,7 @@ function pt(s) {
|
|
|
3096
3106
|
function ae(s, e) {
|
|
3097
3107
|
s.reset(), s.brightness(e.brightness, !0), s.contrast(e.contrast, !0), s.saturate(e.saturation, !0);
|
|
3098
3108
|
}
|
|
3099
|
-
|
|
3109
|
+
m({
|
|
3100
3110
|
id: "adjustment",
|
|
3101
3111
|
name: "Adjustment",
|
|
3102
3112
|
category: "adjust",
|
|
@@ -3281,7 +3291,7 @@ function bt(s) {
|
|
|
3281
3291
|
function oe(s, e) {
|
|
3282
3292
|
s.reset(), e.brightness !== 1 && s.brightness(e.brightness, !0), e.contrast !== 1 && s.contrast(e.contrast, !0), e.saturation !== 1 && s.saturate(e.saturation, !0), e.hue !== 0 && s.hue(e.hue, !0), e.sepia > 0 && s.sepia(!0), e.negative && s.negative(!0);
|
|
3283
3293
|
}
|
|
3284
|
-
|
|
3294
|
+
m({
|
|
3285
3295
|
id: "adjustment-advanced",
|
|
3286
3296
|
name: "Advanced Adjustment",
|
|
3287
3297
|
category: "adjust",
|
|
@@ -3379,7 +3389,7 @@ f({
|
|
|
3379
3389
|
}
|
|
3380
3390
|
]
|
|
3381
3391
|
});
|
|
3382
|
-
|
|
3392
|
+
m({
|
|
3383
3393
|
id: "alpha",
|
|
3384
3394
|
name: "Alpha",
|
|
3385
3395
|
category: "adjust",
|
|
@@ -3423,7 +3433,7 @@ f({
|
|
|
3423
3433
|
}
|
|
3424
3434
|
]
|
|
3425
3435
|
});
|
|
3426
|
-
|
|
3436
|
+
m({
|
|
3427
3437
|
id: "blur",
|
|
3428
3438
|
name: "Blur",
|
|
3429
3439
|
category: "blur",
|
|
@@ -3486,7 +3496,7 @@ f({
|
|
|
3486
3496
|
}
|
|
3487
3497
|
]
|
|
3488
3498
|
});
|
|
3489
|
-
|
|
3499
|
+
m({
|
|
3490
3500
|
id: "color-matrix",
|
|
3491
3501
|
name: "Color Matrix",
|
|
3492
3502
|
category: "advanced",
|
|
@@ -3574,7 +3584,7 @@ f({
|
|
|
3574
3584
|
]
|
|
3575
3585
|
});
|
|
3576
3586
|
const { ColorOverlayFilter: yt } = b;
|
|
3577
|
-
|
|
3587
|
+
m({
|
|
3578
3588
|
id: "colorOverlay",
|
|
3579
3589
|
name: "Color Overlay",
|
|
3580
3590
|
category: "color",
|
|
@@ -3638,7 +3648,7 @@ f({
|
|
|
3638
3648
|
}
|
|
3639
3649
|
]
|
|
3640
3650
|
});
|
|
3641
|
-
|
|
3651
|
+
m({
|
|
3642
3652
|
id: "drop-shadow",
|
|
3643
3653
|
name: "Drop Shadow",
|
|
3644
3654
|
category: "effects",
|
|
@@ -3821,7 +3831,7 @@ f({
|
|
|
3821
3831
|
]
|
|
3822
3832
|
});
|
|
3823
3833
|
const { ColorMatrixFilter: _t } = w;
|
|
3824
|
-
|
|
3834
|
+
m({
|
|
3825
3835
|
id: "grayscale",
|
|
3826
3836
|
name: "Grayscale",
|
|
3827
3837
|
category: "color",
|
|
@@ -3874,7 +3884,7 @@ function ne(s, e) {
|
|
|
3874
3884
|
s.reset(), s.greyscale(e);
|
|
3875
3885
|
}
|
|
3876
3886
|
const { HslAdjustmentFilter: xt } = b;
|
|
3877
|
-
|
|
3887
|
+
m({
|
|
3878
3888
|
id: "hsl-adjustment",
|
|
3879
3889
|
name: "HSL Adjustment",
|
|
3880
3890
|
category: "color",
|
|
@@ -3984,7 +3994,7 @@ f({
|
|
|
3984
3994
|
]
|
|
3985
3995
|
});
|
|
3986
3996
|
const { KawaseBlurFilter: Ct } = b;
|
|
3987
|
-
|
|
3997
|
+
m({
|
|
3988
3998
|
id: "kawase-blur",
|
|
3989
3999
|
name: "Kawase Blur",
|
|
3990
4000
|
category: "blur",
|
|
@@ -4102,7 +4112,7 @@ f({
|
|
|
4102
4112
|
]
|
|
4103
4113
|
});
|
|
4104
4114
|
const { MotionBlurFilter: wt } = b;
|
|
4105
|
-
|
|
4115
|
+
m({
|
|
4106
4116
|
id: "motion-blur",
|
|
4107
4117
|
name: "Motion Blur",
|
|
4108
4118
|
category: "blur",
|
|
@@ -4210,7 +4220,7 @@ f({
|
|
|
4210
4220
|
]
|
|
4211
4221
|
});
|
|
4212
4222
|
const { RadialBlurFilter: St } = b;
|
|
4213
|
-
|
|
4223
|
+
m({
|
|
4214
4224
|
id: "radial-blur",
|
|
4215
4225
|
name: "Radial Blur",
|
|
4216
4226
|
category: "blur",
|
|
@@ -4334,7 +4344,7 @@ f({
|
|
|
4334
4344
|
]
|
|
4335
4345
|
});
|
|
4336
4346
|
const { TiltShiftFilter: vt } = b;
|
|
4337
|
-
|
|
4347
|
+
m({
|
|
4338
4348
|
id: "tilt-shift",
|
|
4339
4349
|
name: "Tilt Shift",
|
|
4340
4350
|
category: "blur",
|
|
@@ -4462,7 +4472,7 @@ f({
|
|
|
4462
4472
|
]
|
|
4463
4473
|
});
|
|
4464
4474
|
const { ZoomBlurFilter: kt } = b;
|
|
4465
|
-
|
|
4475
|
+
m({
|
|
4466
4476
|
id: "zoom-blur",
|
|
4467
4477
|
name: "Zoom Blur",
|
|
4468
4478
|
category: "blur",
|
|
@@ -4589,7 +4599,7 @@ f({
|
|
|
4589
4599
|
]
|
|
4590
4600
|
});
|
|
4591
4601
|
const { ColorGradientFilter: le } = b;
|
|
4592
|
-
|
|
4602
|
+
m({
|
|
4593
4603
|
id: "color-gradient",
|
|
4594
4604
|
name: "Color Gradient",
|
|
4595
4605
|
category: "color",
|
|
@@ -4676,8 +4686,8 @@ f({
|
|
|
4676
4686
|
// Will be adjusted later
|
|
4677
4687
|
alpha: 1,
|
|
4678
4688
|
color: (() => {
|
|
4679
|
-
const h = Math.floor(Math.random() * 255), p = Math.floor(Math.random() * 255),
|
|
4680
|
-
return h << 16 | p << 8 |
|
|
4689
|
+
const h = Math.floor(Math.random() * 255), p = Math.floor(Math.random() * 255), f = Math.floor(Math.random() * 255);
|
|
4690
|
+
return h << 16 | p << 8 | f;
|
|
4681
4691
|
})()
|
|
4682
4692
|
};
|
|
4683
4693
|
if (o.length > 0) {
|
|
@@ -4718,14 +4728,14 @@ f({
|
|
|
4718
4728
|
color: typeof p.color == "string" ? parseInt(p.color.replace("#", "0x")) : p.color,
|
|
4719
4729
|
alpha: p.alpha
|
|
4720
4730
|
}));
|
|
4721
|
-
h.sort((p,
|
|
4731
|
+
h.sort((p, f) => p.offset - f.offset), this.stops = h;
|
|
4722
4732
|
}
|
|
4723
4733
|
break;
|
|
4724
4734
|
default:
|
|
4725
4735
|
if (/colorStops\[\d+\]\..*/.test(i)) {
|
|
4726
4736
|
const h = i.match(/colorStops\[(\d+)\]\.(.*)/);
|
|
4727
4737
|
if (h) {
|
|
4728
|
-
const [p,
|
|
4738
|
+
const [p, f, _] = h, g = parseInt(f), y = [...this.stops];
|
|
4729
4739
|
if (g >= 0 && g < y.length)
|
|
4730
4740
|
return _ === "color" && typeof r == "string" ? y[g].color = parseInt(r.replace("#", "0x")) : (_ === "offset" || _ === "alpha") && (y[g][_] = r), this.stops = y, this.stops.sort((v, x) => v.offset - x.offset), a.colorStops = this.getColorStopsForUI(), !0;
|
|
4731
4741
|
}
|
|
@@ -4832,7 +4842,7 @@ f({
|
|
|
4832
4842
|
}
|
|
4833
4843
|
]
|
|
4834
4844
|
});
|
|
4835
|
-
|
|
4845
|
+
m({
|
|
4836
4846
|
id: "color-map",
|
|
4837
4847
|
name: "Color Map",
|
|
4838
4848
|
category: "color",
|
|
@@ -4916,7 +4926,7 @@ f({
|
|
|
4916
4926
|
]
|
|
4917
4927
|
});
|
|
4918
4928
|
const Pt = b.ColorReplaceFilter;
|
|
4919
|
-
|
|
4929
|
+
m({
|
|
4920
4930
|
id: "color-replace",
|
|
4921
4931
|
name: "Color Replace",
|
|
4922
4932
|
category: "color",
|
|
@@ -4997,7 +5007,7 @@ f({
|
|
|
4997
5007
|
]
|
|
4998
5008
|
});
|
|
4999
5009
|
const Mt = b.MultiColorReplaceFilter;
|
|
5000
|
-
|
|
5010
|
+
m({
|
|
5001
5011
|
id: "multi-color-replace",
|
|
5002
5012
|
name: "Multi-Color Replace",
|
|
5003
5013
|
category: "color",
|
|
@@ -5134,7 +5144,7 @@ f({
|
|
|
5134
5144
|
]
|
|
5135
5145
|
});
|
|
5136
5146
|
const { RGBSplitFilter: Ft } = b;
|
|
5137
|
-
|
|
5147
|
+
m({
|
|
5138
5148
|
id: "rgb-split",
|
|
5139
5149
|
name: "RGB Split",
|
|
5140
5150
|
category: "color",
|
|
@@ -5268,7 +5278,7 @@ f({
|
|
|
5268
5278
|
]
|
|
5269
5279
|
});
|
|
5270
5280
|
const { AdvancedBloomFilter: At } = b;
|
|
5271
|
-
|
|
5281
|
+
m({
|
|
5272
5282
|
id: "advanced-bloom",
|
|
5273
5283
|
name: "Advanced Bloom",
|
|
5274
5284
|
category: "light",
|
|
@@ -5424,7 +5434,7 @@ f({
|
|
|
5424
5434
|
]
|
|
5425
5435
|
});
|
|
5426
5436
|
const zt = b.AsciiFilter;
|
|
5427
|
-
|
|
5437
|
+
m({
|
|
5428
5438
|
id: "ascii",
|
|
5429
5439
|
name: "ASCII",
|
|
5430
5440
|
category: "stylize",
|
|
@@ -5503,7 +5513,7 @@ f({
|
|
|
5503
5513
|
]
|
|
5504
5514
|
});
|
|
5505
5515
|
const Rt = b.BackdropBlurFilter;
|
|
5506
|
-
|
|
5516
|
+
m({
|
|
5507
5517
|
id: "backdrop-blur",
|
|
5508
5518
|
name: "Backdrop Blur",
|
|
5509
5519
|
category: "blur",
|
|
@@ -5610,7 +5620,7 @@ f({
|
|
|
5610
5620
|
]
|
|
5611
5621
|
});
|
|
5612
5622
|
const { BevelFilter: Nt } = b;
|
|
5613
|
-
|
|
5623
|
+
m({
|
|
5614
5624
|
id: "bevel",
|
|
5615
5625
|
name: "Bevel",
|
|
5616
5626
|
category: "effects",
|
|
@@ -5738,7 +5748,7 @@ f({
|
|
|
5738
5748
|
]
|
|
5739
5749
|
});
|
|
5740
5750
|
const { BloomFilter: Tt } = b;
|
|
5741
|
-
|
|
5751
|
+
m({
|
|
5742
5752
|
id: "bloom",
|
|
5743
5753
|
name: "Bloom/Glow",
|
|
5744
5754
|
category: "light",
|
|
@@ -5850,7 +5860,7 @@ f({
|
|
|
5850
5860
|
]
|
|
5851
5861
|
});
|
|
5852
5862
|
const { BulgePinchFilter: It } = b;
|
|
5853
|
-
|
|
5863
|
+
m({
|
|
5854
5864
|
id: "bulge-pinch",
|
|
5855
5865
|
// ID must match what the application expects
|
|
5856
5866
|
name: "Bulge/Pinch",
|
|
@@ -5952,7 +5962,7 @@ const { ConvolutionFilter: Et } = b, O = {
|
|
|
5952
5962
|
sobelHorizontal: [1, 2, 1, 0, 0, 0, -1, -2, -1],
|
|
5953
5963
|
sobelVertical: [1, 0, -1, 2, 0, -2, 1, 0, -1]
|
|
5954
5964
|
};
|
|
5955
|
-
|
|
5965
|
+
m({
|
|
5956
5966
|
id: "convolution",
|
|
5957
5967
|
name: "Convolution Matrix",
|
|
5958
5968
|
category: "effects",
|
|
@@ -6188,7 +6198,7 @@ f({
|
|
|
6188
6198
|
]
|
|
6189
6199
|
});
|
|
6190
6200
|
const { CrossHatchFilter: Xt } = b;
|
|
6191
|
-
|
|
6201
|
+
m({
|
|
6192
6202
|
id: "cross-hatch",
|
|
6193
6203
|
name: "Cross Hatch",
|
|
6194
6204
|
category: "stylize",
|
|
@@ -6210,7 +6220,7 @@ f({
|
|
|
6210
6220
|
// No UI controls since CrossHatchFilter has no parameters
|
|
6211
6221
|
controls: []
|
|
6212
6222
|
});
|
|
6213
|
-
|
|
6223
|
+
m({
|
|
6214
6224
|
id: "crt",
|
|
6215
6225
|
name: "CRT Screen",
|
|
6216
6226
|
category: "stylize",
|
|
@@ -6395,7 +6405,7 @@ f({
|
|
|
6395
6405
|
]
|
|
6396
6406
|
});
|
|
6397
6407
|
const Yt = w.DisplacementFilter, Bt = w.Sprite, K = w.Texture;
|
|
6398
|
-
|
|
6408
|
+
m({
|
|
6399
6409
|
id: "displacement",
|
|
6400
6410
|
// ID must match what the application expects
|
|
6401
6411
|
name: "Displacement Map",
|
|
@@ -6493,7 +6503,7 @@ f({
|
|
|
6493
6503
|
}
|
|
6494
6504
|
]
|
|
6495
6505
|
});
|
|
6496
|
-
|
|
6506
|
+
m({
|
|
6497
6507
|
id: "dot",
|
|
6498
6508
|
name: "Dot Screen",
|
|
6499
6509
|
category: "stylize",
|
|
@@ -6568,7 +6578,7 @@ f({
|
|
|
6568
6578
|
]
|
|
6569
6579
|
});
|
|
6570
6580
|
const { EmbossFilter: Ot } = b;
|
|
6571
|
-
|
|
6581
|
+
m({
|
|
6572
6582
|
id: "emboss",
|
|
6573
6583
|
name: "Emboss",
|
|
6574
6584
|
category: "stylize",
|
|
@@ -6623,7 +6633,7 @@ const { GlitchFilter: Lt } = b, I = {
|
|
|
6623
6633
|
CLAMP: 3,
|
|
6624
6634
|
MIRROR: 4
|
|
6625
6635
|
};
|
|
6626
|
-
|
|
6636
|
+
m({
|
|
6627
6637
|
id: "glitch",
|
|
6628
6638
|
name: "Glitch",
|
|
6629
6639
|
category: "effects",
|
|
@@ -6872,7 +6882,7 @@ f({
|
|
|
6872
6882
|
]
|
|
6873
6883
|
});
|
|
6874
6884
|
const { GlowFilter: Dt } = b;
|
|
6875
|
-
|
|
6885
|
+
m({
|
|
6876
6886
|
id: "glow",
|
|
6877
6887
|
name: "Glow",
|
|
6878
6888
|
category: "light",
|
|
@@ -7007,7 +7017,7 @@ f({
|
|
|
7007
7017
|
]
|
|
7008
7018
|
});
|
|
7009
7019
|
const { GodrayFilter: Ut } = b;
|
|
7010
|
-
|
|
7020
|
+
m({
|
|
7011
7021
|
id: "godray",
|
|
7012
7022
|
name: "Godray",
|
|
7013
7023
|
category: "light",
|
|
@@ -7169,7 +7179,7 @@ f({
|
|
|
7169
7179
|
]
|
|
7170
7180
|
});
|
|
7171
7181
|
const Vt = b.SimpleLightmapFilter, ce = w.Texture;
|
|
7172
|
-
|
|
7182
|
+
m({
|
|
7173
7183
|
id: "lightmap",
|
|
7174
7184
|
name: "Lightmap",
|
|
7175
7185
|
category: "light",
|
|
@@ -7213,18 +7223,18 @@ f({
|
|
|
7213
7223
|
h.textureType = d;
|
|
7214
7224
|
const p = document.createElement("canvas");
|
|
7215
7225
|
p.width = 256, p.height = 256;
|
|
7216
|
-
const
|
|
7217
|
-
if (
|
|
7226
|
+
const f = p.getContext("2d");
|
|
7227
|
+
if (f) {
|
|
7218
7228
|
if (d === "spotlight") {
|
|
7219
|
-
|
|
7220
|
-
const g =
|
|
7221
|
-
g.addColorStop(0, "white"), g.addColorStop(0.5, "rgba(255, 255, 255, 0.5)"), g.addColorStop(1, "rgba(0, 0, 0, 0)"),
|
|
7229
|
+
f.fillStyle = "black", f.fillRect(0, 0, 256, 256);
|
|
7230
|
+
const g = f.createRadialGradient(128, 128, 5, 128, 128, 80);
|
|
7231
|
+
g.addColorStop(0, "white"), g.addColorStop(0.5, "rgba(255, 255, 255, 0.5)"), g.addColorStop(1, "rgba(0, 0, 0, 0)"), f.fillStyle = g, f.beginPath(), f.arc(128, 128, 100, 0, Math.PI * 2), f.fill();
|
|
7222
7232
|
} else if (d === "softlight") {
|
|
7223
|
-
const g =
|
|
7224
|
-
g.addColorStop(0, "white"), g.addColorStop(0.3, "rgba(220, 220, 220, 1)"), g.addColorStop(0.7, "rgba(150, 150, 150, 1)"), g.addColorStop(1, "rgba(80, 80, 80, 1)"),
|
|
7233
|
+
const g = f.createLinearGradient(0, 0, 256, 256);
|
|
7234
|
+
g.addColorStop(0, "white"), g.addColorStop(0.3, "rgba(220, 220, 220, 1)"), g.addColorStop(0.7, "rgba(150, 150, 150, 1)"), g.addColorStop(1, "rgba(80, 80, 80, 1)"), f.fillStyle = g, f.fillRect(0, 0, 256, 256);
|
|
7225
7235
|
} else {
|
|
7226
|
-
const g =
|
|
7227
|
-
g.addColorStop(0, "white"), g.addColorStop(0.3, "rgba(220, 220, 220, 1)"), g.addColorStop(0.6, "rgba(150, 150, 150, 1)"), g.addColorStop(1, "black"),
|
|
7236
|
+
const g = f.createRadialGradient(128, 128, 10, 128, 128, 160);
|
|
7237
|
+
g.addColorStop(0, "white"), g.addColorStop(0.3, "rgba(220, 220, 220, 1)"), g.addColorStop(0.6, "rgba(150, 150, 150, 1)"), g.addColorStop(1, "black"), f.fillStyle = g, f.fillRect(0, 0, 256, 256);
|
|
7228
7238
|
}
|
|
7229
7239
|
const _ = ce.from(p);
|
|
7230
7240
|
if (this.lightMap = _, this.enabled !== void 0) {
|
|
@@ -7300,7 +7310,7 @@ f({
|
|
|
7300
7310
|
]
|
|
7301
7311
|
});
|
|
7302
7312
|
const { NoiseFilter: jt } = w;
|
|
7303
|
-
|
|
7313
|
+
m({
|
|
7304
7314
|
id: "noise",
|
|
7305
7315
|
name: "Noise",
|
|
7306
7316
|
category: "effects",
|
|
@@ -7385,7 +7395,7 @@ f({
|
|
|
7385
7395
|
]
|
|
7386
7396
|
});
|
|
7387
7397
|
const { OldFilmFilter: qt } = b;
|
|
7388
|
-
|
|
7398
|
+
m({
|
|
7389
7399
|
id: "old-film",
|
|
7390
7400
|
name: "Old Film",
|
|
7391
7401
|
category: "effects",
|
|
@@ -7574,7 +7584,7 @@ f({
|
|
|
7574
7584
|
]
|
|
7575
7585
|
});
|
|
7576
7586
|
const { OutlineFilter: Ht } = b;
|
|
7577
|
-
|
|
7587
|
+
m({
|
|
7578
7588
|
id: "outline",
|
|
7579
7589
|
name: "Outline",
|
|
7580
7590
|
category: "effects",
|
|
@@ -7674,7 +7684,7 @@ f({
|
|
|
7674
7684
|
]
|
|
7675
7685
|
});
|
|
7676
7686
|
const { PixelateFilter: $t } = b;
|
|
7677
|
-
|
|
7687
|
+
m({
|
|
7678
7688
|
id: "pixelate",
|
|
7679
7689
|
name: "Pixelate",
|
|
7680
7690
|
category: "effects",
|
|
@@ -7765,7 +7775,7 @@ f({
|
|
|
7765
7775
|
]
|
|
7766
7776
|
});
|
|
7767
7777
|
const { ReflectionFilter: Wt } = b;
|
|
7768
|
-
|
|
7778
|
+
m({
|
|
7769
7779
|
id: "reflection",
|
|
7770
7780
|
// ID must match what the application expects
|
|
7771
7781
|
name: "Reflection",
|
|
@@ -7933,7 +7943,7 @@ f({
|
|
|
7933
7943
|
]
|
|
7934
7944
|
});
|
|
7935
7945
|
const { ShockwaveFilter: Zt } = b;
|
|
7936
|
-
|
|
7946
|
+
m({
|
|
7937
7947
|
id: "shockwave",
|
|
7938
7948
|
// ID must match what the application expects
|
|
7939
7949
|
name: "Shockwave",
|
|
@@ -7952,8 +7962,8 @@ f({
|
|
|
7952
7962
|
time: c
|
|
7953
7963
|
});
|
|
7954
7964
|
return d._customParams = { ...s }, d.animating = s.animating ?? !1, d.updateUIParam = function(h, p) {
|
|
7955
|
-
const
|
|
7956
|
-
switch (this._customParams =
|
|
7965
|
+
const f = this._customParams || {};
|
|
7966
|
+
switch (this._customParams = f, f[h] = p, h) {
|
|
7957
7967
|
case "centerX":
|
|
7958
7968
|
this.center || (this.center = { x: 0.5, y: 0.5 }), this.center.x = p;
|
|
7959
7969
|
break;
|
|
@@ -8085,7 +8095,7 @@ f({
|
|
|
8085
8095
|
]
|
|
8086
8096
|
});
|
|
8087
8097
|
const { SimplexNoiseFilter: Gt } = b;
|
|
8088
|
-
|
|
8098
|
+
m({
|
|
8089
8099
|
id: "simplex-noise",
|
|
8090
8100
|
name: "Simplex Noise",
|
|
8091
8101
|
category: "effects",
|
|
@@ -8343,7 +8353,7 @@ class Kt extends w.Filter {
|
|
|
8343
8353
|
}
|
|
8344
8354
|
}
|
|
8345
8355
|
}
|
|
8346
|
-
|
|
8356
|
+
m({
|
|
8347
8357
|
id: "twist",
|
|
8348
8358
|
name: "Twist",
|
|
8349
8359
|
category: "distortion",
|
|
@@ -8465,7 +8475,7 @@ class Jt extends Qt {
|
|
|
8465
8475
|
typeof e == "string" ? (this._colorValue = e, this._colorRgb = q(e)) : (this._colorValue = "#" + e.toString(16).padStart(6, "0"), this._colorRgb = q(e)), this.updateVignette();
|
|
8466
8476
|
}
|
|
8467
8477
|
}
|
|
8468
|
-
|
|
8478
|
+
m({
|
|
8469
8479
|
id: "vignette",
|
|
8470
8480
|
name: "Vignette",
|
|
8471
8481
|
category: "effects",
|
|
@@ -8571,6 +8581,6 @@ export {
|
|
|
8571
8581
|
H as g,
|
|
8572
8582
|
ri as h,
|
|
8573
8583
|
ai as i,
|
|
8574
|
-
|
|
8584
|
+
m as r
|
|
8575
8585
|
};
|
|
8576
|
-
//# sourceMappingURL=editor-
|
|
8586
|
+
//# sourceMappingURL=editor-BfdrdqUU.js.map
|