@tresjs/post-processing 2.4.0 → 3.0.0-next.0
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.
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @tresjs/post-processing
|
|
3
|
-
* version:
|
|
3
|
+
* version: v3.0.0-next.0
|
|
4
4
|
* (c) 2025
|
|
5
5
|
* description: Post-processing library for TresJS
|
|
6
6
|
* author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as
|
|
9
|
-
import { EffectComposer as he, RenderPass as Je, NormalPass as Ze, DepthDownsamplingPass as _e, EffectPass as Xe, BloomEffect as pe, DepthOfFieldEffect as me, GlitchEffect as
|
|
10
|
-
import { useTresContext as
|
|
11
|
-
import { HalfFloatType as
|
|
8
|
+
import { defineComponent as c, shallowRef as U, provide as He, computed as F, watch as g, onUnmounted as z, renderSlot as Ie, inject as Q, watchEffect as S, nextTick as ue, toRaw as fe } from "vue";
|
|
9
|
+
import { EffectComposer as he, RenderPass as Je, NormalPass as Ze, DepthDownsamplingPass as _e, EffectPass as Xe, BloomEffect as pe, DepthOfFieldEffect as me, GlitchEffect as I, GlitchMode as $e, NoiseEffect as ve, OutlineEffect as ge, PixelationEffect as xe, VignetteEffect as be, Effect as K, BlendFunction as J, ToneMappingEffect as we, ChromaticAberrationEffect as $, HueSaturationEffect as Se, ScanlineEffect as ee, ColorAverageEffect as te, LensDistortionEffect as Ae, ShockWaveEffect as ye, TiltShiftEffect as Me, DotScreenEffect as Te, SepiaEffect as Ce, DepthPickingPass as et, GodRaysEffect as oe, ColorDepthEffect as X, GridEffect as Ee, BrightnessContrastEffect as Pe, SMAAEffect as se, TextureEffect as Y, FXAAEffect as ae, ASCIIEffect as re, ASCIITexture as tt } from "postprocessing";
|
|
10
|
+
import { useTresContext as G, useTres as C, useLoop as ce, normalizeColor as ie } from "@tresjs/core";
|
|
11
|
+
import { HalfFloatType as E, Uniform as T, Vector2 as f, Vector3 as O, Mesh as je, SphereGeometry as ot, MeshBasicMaterial as Ve, OrthographicCamera as st, BufferGeometry as at, Float32BufferAttribute as De, ShaderMaterial as M, UniformsUtils as D, WebGLRenderTarget as L, NoBlending as rt, Clock as it, Color as q, MathUtils as y, DataTexture as nt, RedFormat as lt, FloatType as ut, MeshNormalMaterial as ct, NearestFilter as B, DepthTexture as dt, Vector4 as ft, RawShaderMaterial as ht, ColorManagement as pt, SRGBTransfer as mt, LinearToneMapping as vt, ReinhardToneMapping as gt, CineonToneMapping as xt, ACESFilmicToneMapping as bt, AgXToneMapping as wt, NeutralToneMapping as St, CustomToneMapping as At, Texture as Le, LinearFilter as yt, AdditiveBlending as Mt } from "three";
|
|
12
12
|
import { useDevicePixelRatio as Ye } from "@vueuse/core";
|
|
13
13
|
class Fe {
|
|
14
14
|
static isWebGL2Available() {
|
|
@@ -56,7 +56,7 @@ class Fe {
|
|
|
56
56
|
return console.warn("getWebGLErrorMessage() has been deprecated and will be removed in r178. Use getWebGL2ErrorMessage() instead."), this.getErrorMessage(1);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
const
|
|
59
|
+
const Z = Symbol("effectComposerPmndrs"), Yt = /* @__PURE__ */ c({
|
|
60
60
|
__name: "EffectComposerPmndrs",
|
|
61
61
|
props: {
|
|
62
62
|
enabled: { type: Boolean, default: !0 },
|
|
@@ -66,109 +66,106 @@ const $ = Symbol("effectComposerPmndrs"), Yt = /* @__PURE__ */ u({
|
|
|
66
66
|
resolutionScale: {},
|
|
67
67
|
autoClear: { type: Boolean, default: !0 },
|
|
68
68
|
multisampling: { default: 0 },
|
|
69
|
-
frameBufferType: { default:
|
|
69
|
+
frameBufferType: { default: E }
|
|
70
70
|
},
|
|
71
71
|
emits: ["render"],
|
|
72
|
-
setup(
|
|
73
|
-
const o =
|
|
74
|
-
let
|
|
75
|
-
He(
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
normalBuffer:
|
|
72
|
+
setup(i, { expose: t, emit: e }) {
|
|
73
|
+
const o = i, s = e, { scene: a, camera: r, renderer: n, sizes: u } = G(), l = U(null);
|
|
74
|
+
let d = null, x = null;
|
|
75
|
+
He(Z, l), t({ composer: l });
|
|
76
|
+
const b = () => {
|
|
77
|
+
l.value && (x = new Ze(a.value, r.activeCamera.value), x.enabled = !1, l.value.addPass(x), o.resolutionScale !== void 0 && Fe.isWebGL2Available() && (d = new _e({
|
|
78
|
+
normalBuffer: x.texture,
|
|
79
79
|
resolutionScale: o.resolutionScale
|
|
80
|
-
}),
|
|
81
|
-
},
|
|
82
|
-
const
|
|
83
|
-
depthBuffer: o.depthBuffer !== void 0 ? o.depthBuffer :
|
|
84
|
-
stencilBuffer: o.stencilBuffer !== void 0 ? o.stencilBuffer :
|
|
85
|
-
multisampling: Fe.isWebGL2Available() ? o.multisampling !== void 0 ? o.multisampling :
|
|
86
|
-
frameBufferType: o.frameBufferType !== void 0 ? o.frameBufferType :
|
|
80
|
+
}), d.enabled = !1, l.value.addPass(d)));
|
|
81
|
+
}, A = F(() => {
|
|
82
|
+
const p = new he(), w = {
|
|
83
|
+
depthBuffer: o.depthBuffer !== void 0 ? o.depthBuffer : p.inputBuffer.depthBuffer,
|
|
84
|
+
stencilBuffer: o.stencilBuffer !== void 0 ? o.stencilBuffer : p.inputBuffer.stencilBuffer,
|
|
85
|
+
multisampling: Fe.isWebGL2Available() ? o.multisampling !== void 0 ? o.multisampling : p.multisampling : 0,
|
|
86
|
+
frameBufferType: o.frameBufferType !== void 0 ? o.frameBufferType : E
|
|
87
87
|
};
|
|
88
|
-
return
|
|
89
|
-
}),
|
|
90
|
-
var
|
|
91
|
-
!
|
|
88
|
+
return p.dispose(), w;
|
|
89
|
+
}), m = () => {
|
|
90
|
+
var p;
|
|
91
|
+
!n.instance && !a.value && !r.activeCamera.value || ((p = l.value) == null || p.dispose(), l.value = new he(n.instance, A.value), l.value.addPass(new Je(a.value, r.activeCamera.value)), o.disableNormalPass || b());
|
|
92
92
|
};
|
|
93
|
-
g([
|
|
94
|
-
!
|
|
95
|
-
}), g(() => [
|
|
96
|
-
!
|
|
93
|
+
return g([a, r.activeCamera, () => o.disableNormalPass], () => {
|
|
94
|
+
!u.width.value || !u.height.value || m();
|
|
95
|
+
}), g(() => [u.width.value, u.height.value], ([p, w]) => {
|
|
96
|
+
!p && !w || (l.value ? l.value.setSize(p, w) : m());
|
|
97
97
|
}, {
|
|
98
98
|
immediate: !0
|
|
99
|
-
})
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
const x = i.value.autoClear;
|
|
104
|
-
i.value.autoClear = o.autoClear, o.stencilBuffer && !o.autoClear && i.value.clearStencil(), p.value.render(), s("render", p.value), i.value.autoClear = x;
|
|
99
|
+
}), n.replaceRenderFunction((p) => {
|
|
100
|
+
if (o.enabled && n.instance && l.value && u.width.value && u.height.value) {
|
|
101
|
+
const w = n.instance.autoClear;
|
|
102
|
+
n.instance.autoClear = o.autoClear, o.stencilBuffer && !o.autoClear && n.instance.clearStencil(), l.value.render(), s("render", l.value), n.instance.autoClear = w, p();
|
|
105
103
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
!i.value || !(o != null && o.value) || !r.value || (a.value = n(), s.value = new Xe(i.value, a.value), o.value.addPass(s.value, c));
|
|
104
|
+
}), z(() => {
|
|
105
|
+
var p;
|
|
106
|
+
(p = l.value) == null || p.dispose();
|
|
107
|
+
}), (p, w) => Ie(p.$slots, "default");
|
|
108
|
+
}
|
|
109
|
+
}), h = (i, t, e) => {
|
|
110
|
+
const o = Q(Z), s = U(null), a = U(null), { scene: r, camera: n, invalidate: u } = C();
|
|
111
|
+
g(t, () => u());
|
|
112
|
+
const l = () => {
|
|
113
|
+
var b, A, m;
|
|
114
|
+
s.value && ((b = o == null ? void 0 : o.value) == null || b.removePass(s.value)), (A = a.value) == null || A.dispose(), (m = s.value) == null || m.dispose();
|
|
115
|
+
}, d = (b) => {
|
|
116
|
+
!n.value || !(o != null && o.value) || !r.value || (a.value = i(), s.value = new Xe(n.value, a.value), o.value.addPass(s.value, b));
|
|
120
117
|
};
|
|
121
118
|
e && g(
|
|
122
|
-
() => e.map((
|
|
119
|
+
() => e.map((b) => t[b]),
|
|
123
120
|
() => {
|
|
124
|
-
var
|
|
121
|
+
var A;
|
|
125
122
|
if (!(o != null && o.value))
|
|
126
123
|
return;
|
|
127
|
-
const
|
|
128
|
-
~
|
|
124
|
+
const b = (A = o.value) == null ? void 0 : A.passes.findIndex((m) => m === s.value);
|
|
125
|
+
~b && (l(), d(b));
|
|
129
126
|
}
|
|
130
|
-
),
|
|
131
|
-
!
|
|
127
|
+
), S(() => {
|
|
128
|
+
!n.value || !(a != null && a.value) || (a.value.mainCamera = n.value);
|
|
132
129
|
});
|
|
133
|
-
const
|
|
134
|
-
!
|
|
130
|
+
const x = S(() => {
|
|
131
|
+
!n.value || !(o != null && o.value) || !r.value || (ue(() => x()), !a.value && d());
|
|
135
132
|
});
|
|
136
|
-
return
|
|
137
|
-
|
|
133
|
+
return z(() => {
|
|
134
|
+
l();
|
|
138
135
|
}), {
|
|
139
136
|
pass: s,
|
|
140
137
|
effect: a
|
|
141
138
|
};
|
|
142
|
-
}, ke = /([^[.\]])+/g, Tt = (
|
|
139
|
+
}, ke = /([^[.\]])+/g, Tt = (i, t) => {
|
|
143
140
|
if (!t)
|
|
144
141
|
return;
|
|
145
142
|
const e = Array.isArray(t) ? t : t.match(ke);
|
|
146
|
-
return e == null ? void 0 : e.reduce((o, s) => o && o[s],
|
|
147
|
-
}, Oe = (
|
|
143
|
+
return e == null ? void 0 : e.reduce((o, s) => o && o[s], i);
|
|
144
|
+
}, Oe = (i, t, e) => {
|
|
148
145
|
const o = Array.isArray(t) ? t : t.match(ke);
|
|
149
|
-
o && o.reduce((s, a, r) => (s[a] === void 0 && (s[a] = {}), r === o.length - 1 && (s[a] = e), s[a]),
|
|
150
|
-
}, Ct = (
|
|
151
|
-
const e = { ...
|
|
146
|
+
o && o.reduce((s, a, r) => (s[a] === void 0 && (s[a] = {}), r === o.length - 1 && (s[a] = e), s[a]), i);
|
|
147
|
+
}, Ct = (i, t) => {
|
|
148
|
+
const e = { ...i };
|
|
152
149
|
return t.forEach((o) => delete e[o]), e;
|
|
153
|
-
},
|
|
150
|
+
}, H = (i, t, e, o, s = {}) => g(i, (a) => {
|
|
154
151
|
var r;
|
|
155
152
|
if (t.value)
|
|
156
153
|
if (a === void 0) {
|
|
157
|
-
const
|
|
158
|
-
Oe(t.value, e, Tt(
|
|
154
|
+
const n = o();
|
|
155
|
+
Oe(t.value, e, Tt(n, e)), (r = n.dispose) == null || r.call(n);
|
|
159
156
|
} else
|
|
160
|
-
Oe(t.value, e,
|
|
161
|
-
}, s), v = (
|
|
157
|
+
Oe(t.value, e, i());
|
|
158
|
+
}, s), v = (i, t, e) => i.map(([o, s]) => H(
|
|
162
159
|
o,
|
|
163
160
|
t,
|
|
164
161
|
s,
|
|
165
162
|
e
|
|
166
|
-
)), de = (
|
|
167
|
-
() =>
|
|
163
|
+
)), de = (i, t, e) => Object.keys(i).map((o) => H(
|
|
164
|
+
() => i[o],
|
|
168
165
|
t,
|
|
169
166
|
o,
|
|
170
167
|
e
|
|
171
|
-
)), kt = /* @__PURE__ */
|
|
168
|
+
)), kt = /* @__PURE__ */ c({
|
|
172
169
|
__name: "BloomPmndrs",
|
|
173
170
|
props: {
|
|
174
171
|
blendFunction: {},
|
|
@@ -178,8 +175,8 @@ const $ = Symbol("effectComposerPmndrs"), Yt = /* @__PURE__ */ u({
|
|
|
178
175
|
luminanceSmoothing: {},
|
|
179
176
|
mipmapBlur: { type: Boolean, default: void 0 }
|
|
180
177
|
},
|
|
181
|
-
setup(
|
|
182
|
-
const e =
|
|
178
|
+
setup(i, { expose: t }) {
|
|
179
|
+
const e = i, { pass: o, effect: s } = h(() => new pe(e), e, ["mipmapBlur"]);
|
|
183
180
|
return t({ pass: o, effect: s }), v(
|
|
184
181
|
[
|
|
185
182
|
[() => e.blendFunction, "blendMode.blendFunction"],
|
|
@@ -193,7 +190,7 @@ const $ = Symbol("effectComposerPmndrs"), Yt = /* @__PURE__ */ u({
|
|
|
193
190
|
), () => {
|
|
194
191
|
};
|
|
195
192
|
}
|
|
196
|
-
}), qt = /* @__PURE__ */
|
|
193
|
+
}), qt = /* @__PURE__ */ c({
|
|
197
194
|
__name: "DepthOfFieldPmndrs",
|
|
198
195
|
props: {
|
|
199
196
|
blendFunction: {},
|
|
@@ -206,8 +203,8 @@ const $ = Symbol("effectComposerPmndrs"), Yt = /* @__PURE__ */ u({
|
|
|
206
203
|
resolutionX: {},
|
|
207
204
|
resolutionY: {}
|
|
208
205
|
},
|
|
209
|
-
setup(
|
|
210
|
-
const e =
|
|
206
|
+
setup(i, { expose: t }) {
|
|
207
|
+
const e = i, { camera: o } = C(), { pass: s, effect: a } = h(() => new me(o.value, e), e);
|
|
211
208
|
return t({ pass: s, effect: a }), v(
|
|
212
209
|
[
|
|
213
210
|
[() => e.blendFunction, "blendMode.blendFunction"],
|
|
@@ -225,7 +222,7 @@ const $ = Symbol("effectComposerPmndrs"), Yt = /* @__PURE__ */ u({
|
|
|
225
222
|
), () => {
|
|
226
223
|
};
|
|
227
224
|
}
|
|
228
|
-
}), Qt = /* @__PURE__ */
|
|
225
|
+
}), Qt = /* @__PURE__ */ c({
|
|
229
226
|
__name: "GlitchPmndrs",
|
|
230
227
|
props: {
|
|
231
228
|
blendFunction: {},
|
|
@@ -240,41 +237,41 @@ const $ = Symbol("effectComposerPmndrs"), Yt = /* @__PURE__ */ u({
|
|
|
240
237
|
perturbationMap: {},
|
|
241
238
|
dtSize: {}
|
|
242
239
|
},
|
|
243
|
-
setup(
|
|
244
|
-
const e =
|
|
240
|
+
setup(i, { expose: t }) {
|
|
241
|
+
const e = i, { pass: o, effect: s } = h(() => new I(e), e, ["dtSize"]);
|
|
245
242
|
t({ pass: o, effect: s });
|
|
246
|
-
const {
|
|
247
|
-
return
|
|
248
|
-
const
|
|
243
|
+
const { invalidate: a } = C(), { onBeforeRender: r } = ce();
|
|
244
|
+
return r(() => a()), S(() => {
|
|
245
|
+
const n = () => {
|
|
249
246
|
if (e.mode !== void 0)
|
|
250
247
|
return e.active === !1 ? $e.DISABLED : e.mode;
|
|
251
|
-
const
|
|
252
|
-
return
|
|
248
|
+
const u = new I(), l = u.mode;
|
|
249
|
+
return u.dispose(), l;
|
|
253
250
|
};
|
|
254
|
-
s.value && (s.value.mode =
|
|
255
|
-
}),
|
|
251
|
+
s.value && (s.value.mode = n());
|
|
252
|
+
}), H(
|
|
256
253
|
() => e.blendFunction,
|
|
257
254
|
s,
|
|
258
255
|
"blendMode.blendFunction",
|
|
259
|
-
() => new
|
|
256
|
+
() => new I()
|
|
260
257
|
), de(
|
|
261
258
|
Ct(e, ["active", "blendFunction"]),
|
|
262
259
|
s,
|
|
263
|
-
() => new
|
|
260
|
+
() => new I()
|
|
264
261
|
), () => {
|
|
265
262
|
};
|
|
266
263
|
}
|
|
267
|
-
}), Kt = /* @__PURE__ */
|
|
264
|
+
}), Kt = /* @__PURE__ */ c({
|
|
268
265
|
__name: "NoisePmndrs",
|
|
269
266
|
props: {
|
|
270
267
|
premultiply: { type: Boolean, default: void 0 },
|
|
271
268
|
blendFunction: {}
|
|
272
269
|
},
|
|
273
|
-
setup(
|
|
274
|
-
const e =
|
|
270
|
+
setup(i, { expose: t }) {
|
|
271
|
+
const e = i, { pass: o, effect: s } = h(() => new ve(e), e);
|
|
275
272
|
t({ pass: o, effect: s });
|
|
276
|
-
const {
|
|
277
|
-
return
|
|
273
|
+
const { invalidate: a } = C(), { onBeforeRender: r } = ce();
|
|
274
|
+
return r(() => a()), v(
|
|
278
275
|
[
|
|
279
276
|
[() => e.blendFunction, "blendMode.blendFunction"],
|
|
280
277
|
[() => e.premultiply, "premultiply"]
|
|
@@ -284,7 +281,7 @@ const $ = Symbol("effectComposerPmndrs"), Yt = /* @__PURE__ */ u({
|
|
|
284
281
|
), () => {
|
|
285
282
|
};
|
|
286
283
|
}
|
|
287
|
-
}), Jt = /* @__PURE__ */
|
|
284
|
+
}), Jt = /* @__PURE__ */ c({
|
|
288
285
|
__name: "OutlinePmndrs",
|
|
289
286
|
props: {
|
|
290
287
|
outlinedObjects: {},
|
|
@@ -303,8 +300,8 @@ const $ = Symbol("effectComposerPmndrs"), Yt = /* @__PURE__ */ u({
|
|
|
303
300
|
hiddenEdgeColor: {},
|
|
304
301
|
visibleEdgeColor: {}
|
|
305
302
|
},
|
|
306
|
-
setup(
|
|
307
|
-
const e =
|
|
303
|
+
setup(i, { expose: t }) {
|
|
304
|
+
const e = i, o = (l) => l !== void 0 ? ie(l).getHex() : void 0, { camera: s, scene: a } = C(), { pass: r, effect: n } = h(
|
|
308
305
|
() => new ge(
|
|
309
306
|
a.value,
|
|
310
307
|
s.value,
|
|
@@ -328,18 +325,18 @@ const $ = Symbol("effectComposerPmndrs"), Yt = /* @__PURE__ */ u({
|
|
|
328
325
|
),
|
|
329
326
|
e
|
|
330
327
|
);
|
|
331
|
-
t({ pass: r, effect:
|
|
332
|
-
[() => e.outlinedObjects,
|
|
328
|
+
t({ pass: r, effect: n }), g(
|
|
329
|
+
[() => e.outlinedObjects, n],
|
|
333
330
|
// watchEffect is intentionally not used here as it would result in an endless loop
|
|
334
331
|
() => {
|
|
335
|
-
var
|
|
336
|
-
(
|
|
332
|
+
var l;
|
|
333
|
+
(l = n.value) == null || l.selection.set(e.outlinedObjects || []);
|
|
337
334
|
},
|
|
338
335
|
{
|
|
339
336
|
immediate: !0
|
|
340
337
|
}
|
|
341
338
|
);
|
|
342
|
-
const
|
|
339
|
+
const u = F(() => ({
|
|
343
340
|
hiddenEdgeColor: e.hiddenEdgeColor ? ie(e.hiddenEdgeColor) : void 0,
|
|
344
341
|
visibleEdgeColor: e.visibleEdgeColor ? ie(e.visibleEdgeColor) : void 0
|
|
345
342
|
}));
|
|
@@ -357,21 +354,21 @@ const $ = Symbol("effectComposerPmndrs"), Yt = /* @__PURE__ */ u({
|
|
|
357
354
|
[() => e.resolutionY, "resolution.height"],
|
|
358
355
|
[() => e.patternTexture, "patternTexture"],
|
|
359
356
|
[() => e.resolutionScale, "resolution.scale"],
|
|
360
|
-
[() =>
|
|
361
|
-
[() =>
|
|
357
|
+
[() => u.value.hiddenEdgeColor, "hiddenEdgeColor"],
|
|
358
|
+
[() => u.value.visibleEdgeColor, "visibleEdgeColor"]
|
|
362
359
|
],
|
|
363
|
-
|
|
360
|
+
n,
|
|
364
361
|
() => new ge()
|
|
365
362
|
), () => {
|
|
366
363
|
};
|
|
367
364
|
}
|
|
368
|
-
}), Zt = /* @__PURE__ */
|
|
365
|
+
}), Zt = /* @__PURE__ */ c({
|
|
369
366
|
__name: "PixelationPmndrs",
|
|
370
367
|
props: {
|
|
371
368
|
granularity: {}
|
|
372
369
|
},
|
|
373
|
-
setup(
|
|
374
|
-
const e =
|
|
370
|
+
setup(i, { expose: t }) {
|
|
371
|
+
const e = i, { pass: o, effect: s } = h(() => new xe(e.granularity), e);
|
|
375
372
|
return t({ pass: o, effect: s }), de(
|
|
376
373
|
e,
|
|
377
374
|
s,
|
|
@@ -379,7 +376,7 @@ const $ = Symbol("effectComposerPmndrs"), Yt = /* @__PURE__ */ u({
|
|
|
379
376
|
), () => {
|
|
380
377
|
};
|
|
381
378
|
}
|
|
382
|
-
}), _t = /* @__PURE__ */
|
|
379
|
+
}), _t = /* @__PURE__ */ c({
|
|
383
380
|
__name: "VignettePmndrs",
|
|
384
381
|
props: {
|
|
385
382
|
technique: {},
|
|
@@ -387,8 +384,8 @@ const $ = Symbol("effectComposerPmndrs"), Yt = /* @__PURE__ */ u({
|
|
|
387
384
|
offset: {},
|
|
388
385
|
darkness: {}
|
|
389
386
|
},
|
|
390
|
-
setup(
|
|
391
|
-
const e =
|
|
387
|
+
setup(i, { expose: t }) {
|
|
388
|
+
const e = i, { pass: o, effect: s } = h(() => new be(e), e);
|
|
392
389
|
return t({ pass: o, effect: s }), v(
|
|
393
390
|
[
|
|
394
391
|
[() => e.blendFunction, "blendMode.blendFunction"],
|
|
@@ -402,7 +399,7 @@ const $ = Symbol("effectComposerPmndrs"), Yt = /* @__PURE__ */ u({
|
|
|
402
399
|
};
|
|
403
400
|
}
|
|
404
401
|
});
|
|
405
|
-
class
|
|
402
|
+
class Re extends K {
|
|
406
403
|
/**
|
|
407
404
|
* Creates a new BarrelBlurEffect instance.
|
|
408
405
|
*
|
|
@@ -412,7 +409,7 @@ class Be extends Z {
|
|
|
412
409
|
* @param {Vector2} [options.offset] - Offset of the barrel distortion center (0 to 1 for both x and y). This allows you to change the position of the distortion effect.
|
|
413
410
|
*
|
|
414
411
|
*/
|
|
415
|
-
constructor({ blendFunction: t =
|
|
412
|
+
constructor({ blendFunction: t = J.NORMAL, amount: e = 0.15, offset: o = new f(0.5, 0.5) } = {}) {
|
|
416
413
|
super("BarrelBlurEffect", `
|
|
417
414
|
uniform float amount;
|
|
418
415
|
uniform vec2 offset;
|
|
@@ -460,9 +457,9 @@ class Be extends Z {
|
|
|
460
457
|
`, {
|
|
461
458
|
blendFunction: t,
|
|
462
459
|
uniforms: /* @__PURE__ */ new Map([
|
|
463
|
-
["amount", new
|
|
460
|
+
["amount", new T(e)],
|
|
464
461
|
// Uniform controlling the intensity of distortion
|
|
465
|
-
["offset", new
|
|
462
|
+
["offset", new T(o)]
|
|
466
463
|
// Uniform controlling the offset of distortion
|
|
467
464
|
])
|
|
468
465
|
});
|
|
@@ -492,16 +489,16 @@ class Be extends Z {
|
|
|
492
489
|
this.uniforms.get("offset").value = t;
|
|
493
490
|
}
|
|
494
491
|
}
|
|
495
|
-
const $t = /* @__PURE__ */
|
|
492
|
+
const $t = /* @__PURE__ */ c({
|
|
496
493
|
__name: "BarrelBlurPmndrs",
|
|
497
494
|
props: {
|
|
498
495
|
blendFunction: {},
|
|
499
496
|
amount: {},
|
|
500
497
|
offset: {}
|
|
501
498
|
},
|
|
502
|
-
setup(
|
|
503
|
-
const e =
|
|
504
|
-
() => new
|
|
499
|
+
setup(i, { expose: t }) {
|
|
500
|
+
const e = i, { pass: o, effect: s } = h(
|
|
501
|
+
() => new Re({
|
|
505
502
|
...e,
|
|
506
503
|
offset: Array.isArray(e.offset) ? new f(...e.offset) : e.offset
|
|
507
504
|
}),
|
|
@@ -514,11 +511,11 @@ const $t = /* @__PURE__ */ u({
|
|
|
514
511
|
[() => e.offset, "offset"]
|
|
515
512
|
],
|
|
516
513
|
s,
|
|
517
|
-
() => new
|
|
514
|
+
() => new Re()
|
|
518
515
|
), () => {
|
|
519
516
|
};
|
|
520
517
|
}
|
|
521
|
-
}), eo = /* @__PURE__ */
|
|
518
|
+
}), eo = /* @__PURE__ */ c({
|
|
522
519
|
__name: "ToneMappingPmndrs",
|
|
523
520
|
props: {
|
|
524
521
|
mode: {},
|
|
@@ -529,8 +526,8 @@ const $t = /* @__PURE__ */ u({
|
|
|
529
526
|
minLuminance: {},
|
|
530
527
|
whitePoint: {}
|
|
531
528
|
},
|
|
532
|
-
setup(
|
|
533
|
-
const e =
|
|
529
|
+
setup(i, { expose: t }) {
|
|
530
|
+
const e = i, { pass: o, effect: s } = h(() => new we(e), e);
|
|
534
531
|
return t({ pass: o, effect: s }), v(
|
|
535
532
|
[
|
|
536
533
|
[() => e.mode, "mode"],
|
|
@@ -542,11 +539,11 @@ const $t = /* @__PURE__ */ u({
|
|
|
542
539
|
[() => e.whitePoint, "whitePoint"]
|
|
543
540
|
],
|
|
544
541
|
s,
|
|
545
|
-
() => new
|
|
542
|
+
() => new we()
|
|
546
543
|
), () => {
|
|
547
544
|
};
|
|
548
545
|
}
|
|
549
|
-
}), to = /* @__PURE__ */
|
|
546
|
+
}), to = /* @__PURE__ */ c({
|
|
550
547
|
__name: "ChromaticAberrationPmndrs",
|
|
551
548
|
props: {
|
|
552
549
|
blendFunction: {},
|
|
@@ -554,8 +551,8 @@ const $t = /* @__PURE__ */ u({
|
|
|
554
551
|
radialModulation: { type: Boolean, default: void 0 },
|
|
555
552
|
modulationOffset: {}
|
|
556
553
|
},
|
|
557
|
-
setup(
|
|
558
|
-
const e =
|
|
554
|
+
setup(i, { expose: t }) {
|
|
555
|
+
const e = i, o = new $(), { pass: s, effect: a } = h(() => new $({
|
|
559
556
|
...e,
|
|
560
557
|
// Unfortunately, these defaults must be set this way as the type in postprocessing is not correct.
|
|
561
558
|
// The arguments are optional in the actual constructor, but not in the type.
|
|
@@ -570,19 +567,19 @@ const $t = /* @__PURE__ */ u({
|
|
|
570
567
|
[() => e.modulationOffset, "modulationOffset"]
|
|
571
568
|
],
|
|
572
569
|
a,
|
|
573
|
-
() => new
|
|
570
|
+
() => new $()
|
|
574
571
|
), () => {
|
|
575
572
|
};
|
|
576
573
|
}
|
|
577
|
-
}), oo = /* @__PURE__ */
|
|
574
|
+
}), oo = /* @__PURE__ */ c({
|
|
578
575
|
__name: "HueSaturationPmndrs",
|
|
579
576
|
props: {
|
|
580
577
|
saturation: {},
|
|
581
578
|
hue: {},
|
|
582
579
|
blendFunction: {}
|
|
583
580
|
},
|
|
584
|
-
setup(
|
|
585
|
-
const e =
|
|
581
|
+
setup(i, { expose: t }) {
|
|
582
|
+
const e = i, { pass: o, effect: s } = h(() => new Se(e), e);
|
|
586
583
|
return t({ pass: o, effect: s }), v(
|
|
587
584
|
[
|
|
588
585
|
[() => e.blendFunction, "blendMode.blendFunction"],
|
|
@@ -590,11 +587,11 @@ const $t = /* @__PURE__ */ u({
|
|
|
590
587
|
[() => e.saturation, "saturation"]
|
|
591
588
|
],
|
|
592
589
|
s,
|
|
593
|
-
() => new
|
|
590
|
+
() => new Se()
|
|
594
591
|
), () => {
|
|
595
592
|
};
|
|
596
593
|
}
|
|
597
|
-
}), so = /* @__PURE__ */
|
|
594
|
+
}), so = /* @__PURE__ */ c({
|
|
598
595
|
__name: "ScanlinePmndrs",
|
|
599
596
|
props: {
|
|
600
597
|
blendFunction: {},
|
|
@@ -602,8 +599,8 @@ const $t = /* @__PURE__ */ u({
|
|
|
602
599
|
scrollSpeed: {},
|
|
603
600
|
opacity: {}
|
|
604
601
|
},
|
|
605
|
-
setup(
|
|
606
|
-
const e =
|
|
602
|
+
setup(i, { expose: t }) {
|
|
603
|
+
const e = i, { pass: o, effect: s } = h(() => new ee(e), e);
|
|
607
604
|
return t({ pass: o, effect: s }), v(
|
|
608
605
|
[
|
|
609
606
|
[() => e.blendFunction, "blendMode.blendFunction"],
|
|
@@ -611,7 +608,7 @@ const $t = /* @__PURE__ */ u({
|
|
|
611
608
|
[() => e.scrollSpeed, "scrollSpeed"]
|
|
612
609
|
],
|
|
613
610
|
s,
|
|
614
|
-
() => new
|
|
611
|
+
() => new ee()
|
|
615
612
|
), g(
|
|
616
613
|
[() => e.opacity],
|
|
617
614
|
() => {
|
|
@@ -619,8 +616,8 @@ const $t = /* @__PURE__ */ u({
|
|
|
619
616
|
if (e.opacity !== void 0)
|
|
620
617
|
(a = s.value) == null || a.blendMode.setOpacity(e.opacity);
|
|
621
618
|
else {
|
|
622
|
-
const
|
|
623
|
-
(r = s.value) == null || r.blendMode.setOpacity(
|
|
619
|
+
const n = new ee();
|
|
620
|
+
(r = s.value) == null || r.blendMode.setOpacity(n.blendMode.getOpacity()), n.dispose();
|
|
624
621
|
}
|
|
625
622
|
},
|
|
626
623
|
{
|
|
@@ -726,7 +723,7 @@ void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor)
|
|
|
726
723
|
outputColor = vec4(finalColor, inputColor.a);
|
|
727
724
|
}
|
|
728
725
|
`;
|
|
729
|
-
class
|
|
726
|
+
class Be extends K {
|
|
730
727
|
/**
|
|
731
728
|
* Creates a new KuwaharaEffect instance.
|
|
732
729
|
*
|
|
@@ -736,12 +733,12 @@ class Re extends Z {
|
|
|
736
733
|
* @param {number} [options.sectorCount] - Number of sectors.
|
|
737
734
|
*
|
|
738
735
|
*/
|
|
739
|
-
constructor({ blendFunction: t =
|
|
736
|
+
constructor({ blendFunction: t = J.NORMAL, radius: e = 1, sectorCount: o = 4 } = {}) {
|
|
740
737
|
super("KuwaharaEffect", Et, {
|
|
741
738
|
blendFunction: t,
|
|
742
739
|
uniforms: /* @__PURE__ */ new Map([
|
|
743
|
-
["radius", new
|
|
744
|
-
["sectorCount", new
|
|
740
|
+
["radius", new T(e)],
|
|
741
|
+
["sectorCount", new T(o)]
|
|
745
742
|
])
|
|
746
743
|
});
|
|
747
744
|
}
|
|
@@ -770,16 +767,16 @@ class Re extends Z {
|
|
|
770
767
|
this.uniforms.get("sectorCount").value = t;
|
|
771
768
|
}
|
|
772
769
|
}
|
|
773
|
-
const ao = /* @__PURE__ */
|
|
770
|
+
const ao = /* @__PURE__ */ c({
|
|
774
771
|
__name: "KuwaharaPmndrs",
|
|
775
772
|
props: {
|
|
776
773
|
blendFunction: {},
|
|
777
774
|
radius: {},
|
|
778
775
|
sectorCount: {}
|
|
779
776
|
},
|
|
780
|
-
setup(
|
|
781
|
-
const e =
|
|
782
|
-
() => new
|
|
777
|
+
setup(i, { expose: t }) {
|
|
778
|
+
const e = i, { pass: o, effect: s } = h(
|
|
779
|
+
() => new Be(e),
|
|
783
780
|
e
|
|
784
781
|
);
|
|
785
782
|
return t({ pass: o, effect: s }), v(
|
|
@@ -789,23 +786,23 @@ const ao = /* @__PURE__ */ u({
|
|
|
789
786
|
[() => e.sectorCount, "sectorCount"]
|
|
790
787
|
],
|
|
791
788
|
s,
|
|
792
|
-
() => new
|
|
789
|
+
() => new Be()
|
|
793
790
|
), () => {
|
|
794
791
|
};
|
|
795
792
|
}
|
|
796
|
-
}), ro = /* @__PURE__ */
|
|
793
|
+
}), ro = /* @__PURE__ */ c({
|
|
797
794
|
__name: "ColorAveragePmndrs",
|
|
798
795
|
props: {
|
|
799
796
|
blendFunction: {},
|
|
800
797
|
opacity: {}
|
|
801
798
|
},
|
|
802
|
-
setup(
|
|
803
|
-
const e =
|
|
804
|
-
return t({ pass: o, effect: s }),
|
|
799
|
+
setup(i, { expose: t }) {
|
|
800
|
+
const e = i, { pass: o, effect: s } = h(() => new te(e.blendFunction), e);
|
|
801
|
+
return t({ pass: o, effect: s }), H(
|
|
805
802
|
() => e.blendFunction,
|
|
806
803
|
s,
|
|
807
804
|
"blendMode.blendFunction",
|
|
808
|
-
() => new
|
|
805
|
+
() => new te()
|
|
809
806
|
), g(
|
|
810
807
|
[s, () => e.opacity],
|
|
811
808
|
() => {
|
|
@@ -814,14 +811,14 @@ const ao = /* @__PURE__ */ u({
|
|
|
814
811
|
if (e.opacity !== void 0)
|
|
815
812
|
(a = s.value) == null || a.blendMode.setOpacity(e.opacity);
|
|
816
813
|
else {
|
|
817
|
-
const
|
|
818
|
-
(r = s.value) == null || r.blendMode.setOpacity(
|
|
814
|
+
const n = new te();
|
|
815
|
+
(r = s.value) == null || r.blendMode.setOpacity(n.blendMode.getOpacity()), n.dispose();
|
|
819
816
|
}
|
|
820
817
|
}
|
|
821
818
|
), () => {
|
|
822
819
|
};
|
|
823
820
|
}
|
|
824
|
-
}),
|
|
821
|
+
}), io = /* @__PURE__ */ c({
|
|
825
822
|
__name: "LensDistortionPmndrs",
|
|
826
823
|
props: {
|
|
827
824
|
distortion: {},
|
|
@@ -829,8 +826,8 @@ const ao = /* @__PURE__ */ u({
|
|
|
829
826
|
focalLength: {},
|
|
830
827
|
skew: {}
|
|
831
828
|
},
|
|
832
|
-
setup(
|
|
833
|
-
const e =
|
|
829
|
+
setup(i, { expose: t }) {
|
|
830
|
+
const e = i, { pass: o, effect: s } = h(
|
|
834
831
|
() => new Ae({
|
|
835
832
|
...e,
|
|
836
833
|
distortion: e.distortion ? Array.isArray(e.distortion) ? new f(...e.distortion) : e.distortion : new f(),
|
|
@@ -846,7 +843,7 @@ const ao = /* @__PURE__ */ u({
|
|
|
846
843
|
), () => {
|
|
847
844
|
};
|
|
848
845
|
}
|
|
849
|
-
}),
|
|
846
|
+
}), no = /* @__PURE__ */ c({
|
|
850
847
|
__name: "ShockWavePmndrs",
|
|
851
848
|
props: {
|
|
852
849
|
position: {},
|
|
@@ -855,15 +852,15 @@ const ao = /* @__PURE__ */ u({
|
|
|
855
852
|
maxRadius: {},
|
|
856
853
|
waveSize: {}
|
|
857
854
|
},
|
|
858
|
-
setup(
|
|
859
|
-
const e =
|
|
860
|
-
() => new ye(o.value, Array.isArray(e.position) ? new
|
|
855
|
+
setup(i, { expose: t }) {
|
|
856
|
+
const e = i, { camera: o } = C(), { pass: s, effect: a } = h(
|
|
857
|
+
() => new ye(o.value, Array.isArray(e.position) ? new O(...e.position) : e.position, e),
|
|
861
858
|
e
|
|
862
859
|
);
|
|
863
860
|
return t({ pass: s, effect: a }), g(
|
|
864
861
|
() => e.position,
|
|
865
862
|
(r) => {
|
|
866
|
-
a.value && (Array.isArray(r) ? a.value.position.set(...r) : r instanceof
|
|
863
|
+
a.value && (Array.isArray(r) ? a.value.position.set(...r) : r instanceof O && a.value.position.copy(r));
|
|
867
864
|
},
|
|
868
865
|
{ immediate: !0 }
|
|
869
866
|
), v(
|
|
@@ -878,7 +875,7 @@ const ao = /* @__PURE__ */ u({
|
|
|
878
875
|
), () => {
|
|
879
876
|
};
|
|
880
877
|
}
|
|
881
|
-
}), lo = /* @__PURE__ */
|
|
878
|
+
}), lo = /* @__PURE__ */ c({
|
|
882
879
|
__name: "TiltShiftPmndrs",
|
|
883
880
|
props: {
|
|
884
881
|
blendFunction: {},
|
|
@@ -891,8 +888,8 @@ const ao = /* @__PURE__ */ u({
|
|
|
891
888
|
resolutionX: {},
|
|
892
889
|
resolutionY: {}
|
|
893
890
|
},
|
|
894
|
-
setup(
|
|
895
|
-
const e =
|
|
891
|
+
setup(i, { expose: t }) {
|
|
892
|
+
const e = i, { pass: o, effect: s } = h(() => new Me(e), e);
|
|
896
893
|
return t({ pass: o, effect: s }), v(
|
|
897
894
|
[
|
|
898
895
|
[() => e.blendFunction, "blendMode.blendFunction"],
|
|
@@ -910,15 +907,15 @@ const ao = /* @__PURE__ */ u({
|
|
|
910
907
|
), () => {
|
|
911
908
|
};
|
|
912
909
|
}
|
|
913
|
-
}), uo = /* @__PURE__ */
|
|
910
|
+
}), uo = /* @__PURE__ */ c({
|
|
914
911
|
__name: "DotScreenPmndrs",
|
|
915
912
|
props: {
|
|
916
913
|
angle: {},
|
|
917
914
|
scale: {},
|
|
918
915
|
blendFunction: {}
|
|
919
916
|
},
|
|
920
|
-
setup(
|
|
921
|
-
const e =
|
|
917
|
+
setup(i, { expose: t }) {
|
|
918
|
+
const e = i, { pass: o, effect: s } = h(() => new Te(e), e);
|
|
922
919
|
return t({ pass: o, effect: s }), v(
|
|
923
920
|
[
|
|
924
921
|
[() => e.blendFunction, "blendMode.blendFunction"],
|
|
@@ -930,14 +927,14 @@ const ao = /* @__PURE__ */ u({
|
|
|
930
927
|
), () => {
|
|
931
928
|
};
|
|
932
929
|
}
|
|
933
|
-
}), co = /* @__PURE__ */
|
|
930
|
+
}), co = /* @__PURE__ */ c({
|
|
934
931
|
__name: "SepiaPmndrs",
|
|
935
932
|
props: {
|
|
936
933
|
blendFunction: {},
|
|
937
934
|
intensity: {}
|
|
938
935
|
},
|
|
939
|
-
setup(
|
|
940
|
-
const e =
|
|
936
|
+
setup(i, { expose: t }) {
|
|
937
|
+
const e = i, { pass: o, effect: s } = h(() => new Ce(e), e);
|
|
941
938
|
return t({ pass: o, effect: s }), v(
|
|
942
939
|
[
|
|
943
940
|
[() => e.blendFunction, "blendMode.blendFunction"],
|
|
@@ -949,14 +946,14 @@ const ao = /* @__PURE__ */ u({
|
|
|
949
946
|
};
|
|
950
947
|
}
|
|
951
948
|
});
|
|
952
|
-
class Ne extends
|
|
949
|
+
class Ne extends K {
|
|
953
950
|
/**
|
|
954
951
|
* Creates a new LinocutEffect instance.
|
|
955
952
|
*
|
|
956
953
|
* @param {LinocutPmndrsProps} [options] - Configuration options for the effect.
|
|
957
954
|
*
|
|
958
955
|
*/
|
|
959
|
-
constructor({ blendFunction: t =
|
|
956
|
+
constructor({ blendFunction: t = J.NORMAL, scale: e = 0.85, noiseScale: o = 0, center: s = [0.5, 0.5], rotation: a = 0 } = {}) {
|
|
960
957
|
const r = Array.isArray(s) ? new f().fromArray(s) : s;
|
|
961
958
|
super("LinocutEffect", `
|
|
962
959
|
uniform float scale;
|
|
@@ -1021,10 +1018,10 @@ class Ne extends Z {
|
|
|
1021
1018
|
`, {
|
|
1022
1019
|
blendFunction: t,
|
|
1023
1020
|
uniforms: /* @__PURE__ */ new Map([
|
|
1024
|
-
["scale", new
|
|
1025
|
-
["noiseScale", new
|
|
1026
|
-
["center", new
|
|
1027
|
-
["rotation", new
|
|
1021
|
+
["scale", new T(e)],
|
|
1022
|
+
["noiseScale", new T(o)],
|
|
1023
|
+
["center", new T(r)],
|
|
1024
|
+
["rotation", new T(a)]
|
|
1028
1025
|
])
|
|
1029
1026
|
});
|
|
1030
1027
|
}
|
|
@@ -1057,7 +1054,7 @@ class Ne extends Z {
|
|
|
1057
1054
|
this.uniforms.get("rotation").value = t;
|
|
1058
1055
|
}
|
|
1059
1056
|
}
|
|
1060
|
-
const fo = /* @__PURE__ */
|
|
1057
|
+
const fo = /* @__PURE__ */ c({
|
|
1061
1058
|
__name: "LinocutPmndrs",
|
|
1062
1059
|
props: {
|
|
1063
1060
|
blendFunction: {},
|
|
@@ -1066,8 +1063,8 @@ const fo = /* @__PURE__ */ u({
|
|
|
1066
1063
|
center: {},
|
|
1067
1064
|
rotation: {}
|
|
1068
1065
|
},
|
|
1069
|
-
setup(
|
|
1070
|
-
const e =
|
|
1066
|
+
setup(i, { expose: t }) {
|
|
1067
|
+
const e = i, { pass: o, effect: s } = h(
|
|
1071
1068
|
() => new Ne({
|
|
1072
1069
|
...e,
|
|
1073
1070
|
center: e.center instanceof f ? [e.center.x, e.center.y] : e.center
|
|
@@ -1087,23 +1084,23 @@ const fo = /* @__PURE__ */ u({
|
|
|
1087
1084
|
), () => {
|
|
1088
1085
|
};
|
|
1089
1086
|
}
|
|
1090
|
-
}), ho = /* @__PURE__ */
|
|
1087
|
+
}), ho = /* @__PURE__ */ c({
|
|
1091
1088
|
__name: "DepthPickingPassPmndrs",
|
|
1092
1089
|
props: {
|
|
1093
1090
|
depthPacking: {},
|
|
1094
1091
|
mode: {}
|
|
1095
1092
|
},
|
|
1096
|
-
setup(
|
|
1097
|
-
const e =
|
|
1098
|
-
o != null && o.value && (
|
|
1093
|
+
setup(i, { expose: t }) {
|
|
1094
|
+
const e = i, o = Q(Z), s = new et(e), a = S(() => {
|
|
1095
|
+
o != null && o.value && (ue(() => a()), o.value.addPass(s));
|
|
1099
1096
|
});
|
|
1100
|
-
return
|
|
1097
|
+
return z(() => {
|
|
1101
1098
|
var r;
|
|
1102
1099
|
!(o != null && o.value) || !s || ((r = o == null ? void 0 : o.value) == null || r.removePass(s), s.dispose());
|
|
1103
1100
|
}), t({ pass: s }), () => {
|
|
1104
1101
|
};
|
|
1105
1102
|
}
|
|
1106
|
-
}), po = /* @__PURE__ */
|
|
1103
|
+
}), po = /* @__PURE__ */ c({
|
|
1107
1104
|
__name: "GodRaysPmndrs",
|
|
1108
1105
|
props: {
|
|
1109
1106
|
blendFunction: {},
|
|
@@ -1121,14 +1118,14 @@ const fo = /* @__PURE__ */ u({
|
|
|
1121
1118
|
samples: {},
|
|
1122
1119
|
clampMax: {}
|
|
1123
1120
|
},
|
|
1124
|
-
setup(
|
|
1125
|
-
const e =
|
|
1121
|
+
setup(i, { expose: t }) {
|
|
1122
|
+
const e = i, { camera: o } = C(), s = F(
|
|
1126
1123
|
() => e.lightSource ?? new je(
|
|
1127
1124
|
new ot(1e-5),
|
|
1128
1125
|
new Ve({ visible: !1 })
|
|
1129
1126
|
)
|
|
1130
1127
|
), { pass: a, effect: r } = h(
|
|
1131
|
-
() => new
|
|
1128
|
+
() => new oe(o.value, s.value, e),
|
|
1132
1129
|
e
|
|
1133
1130
|
);
|
|
1134
1131
|
return t({ pass: a, effect: r }), v(
|
|
@@ -1147,7 +1144,7 @@ const fo = /* @__PURE__ */ u({
|
|
|
1147
1144
|
[() => e.blur, "blurPass.enabled"]
|
|
1148
1145
|
],
|
|
1149
1146
|
r,
|
|
1150
|
-
() => new
|
|
1147
|
+
() => new oe()
|
|
1151
1148
|
), g(
|
|
1152
1149
|
[() => e.lightSource, r],
|
|
1153
1150
|
() => {
|
|
@@ -1157,15 +1154,15 @@ const fo = /* @__PURE__ */ u({
|
|
|
1157
1154
|
), g(
|
|
1158
1155
|
[() => e.opacity],
|
|
1159
1156
|
() => {
|
|
1160
|
-
var
|
|
1157
|
+
var n, u;
|
|
1161
1158
|
if (e.opacity !== void 0)
|
|
1162
|
-
(
|
|
1159
|
+
(n = r.value) == null || n.blendMode.setOpacity(e.opacity);
|
|
1163
1160
|
else {
|
|
1164
|
-
const
|
|
1161
|
+
const l = new oe(
|
|
1165
1162
|
o.value,
|
|
1166
1163
|
fe(s.value)
|
|
1167
1164
|
);
|
|
1168
|
-
(
|
|
1165
|
+
(u = r.value) == null || u.blendMode.setOpacity(l.blendMode.getOpacity()), l.dispose();
|
|
1169
1166
|
}
|
|
1170
1167
|
},
|
|
1171
1168
|
{
|
|
@@ -1174,20 +1171,20 @@ const fo = /* @__PURE__ */ u({
|
|
|
1174
1171
|
), () => {
|
|
1175
1172
|
};
|
|
1176
1173
|
}
|
|
1177
|
-
}), mo = /* @__PURE__ */
|
|
1174
|
+
}), mo = /* @__PURE__ */ c({
|
|
1178
1175
|
__name: "ColorDepthPmndrs",
|
|
1179
1176
|
props: {
|
|
1180
1177
|
blendFunction: {},
|
|
1181
1178
|
bits: {},
|
|
1182
1179
|
opacity: {}
|
|
1183
1180
|
},
|
|
1184
|
-
setup(
|
|
1185
|
-
const e =
|
|
1186
|
-
return t({ pass: o, effect: s }),
|
|
1181
|
+
setup(i, { expose: t }) {
|
|
1182
|
+
const e = i, { pass: o, effect: s } = h(() => new X(e), e);
|
|
1183
|
+
return t({ pass: o, effect: s }), H(
|
|
1187
1184
|
() => e.blendFunction,
|
|
1188
1185
|
s,
|
|
1189
1186
|
"blendMode.blendFunction",
|
|
1190
|
-
() => new
|
|
1187
|
+
() => new X()
|
|
1191
1188
|
), g(
|
|
1192
1189
|
[s, () => e.bits],
|
|
1193
1190
|
() => {
|
|
@@ -1196,8 +1193,8 @@ const fo = /* @__PURE__ */ u({
|
|
|
1196
1193
|
if (e.bits !== void 0)
|
|
1197
1194
|
(a = s.value) == null || a.setBitDepth(e.bits);
|
|
1198
1195
|
else {
|
|
1199
|
-
const
|
|
1200
|
-
(r = s.value) == null || r.setBitDepth(
|
|
1196
|
+
const n = new X();
|
|
1197
|
+
(r = s.value) == null || r.setBitDepth(n.getBitDepth()), n.dispose();
|
|
1201
1198
|
}
|
|
1202
1199
|
}
|
|
1203
1200
|
), g(
|
|
@@ -1208,22 +1205,22 @@ const fo = /* @__PURE__ */ u({
|
|
|
1208
1205
|
if (e.opacity !== void 0)
|
|
1209
1206
|
(a = s.value) == null || a.blendMode.setOpacity(e.opacity);
|
|
1210
1207
|
else {
|
|
1211
|
-
const
|
|
1212
|
-
(r = s.value) == null || r.blendMode.setOpacity(
|
|
1208
|
+
const n = new X();
|
|
1209
|
+
(r = s.value) == null || r.blendMode.setOpacity(n.blendMode.getOpacity()), n.dispose();
|
|
1213
1210
|
}
|
|
1214
1211
|
}
|
|
1215
1212
|
), () => {
|
|
1216
1213
|
};
|
|
1217
1214
|
}
|
|
1218
|
-
}), vo = /* @__PURE__ */
|
|
1215
|
+
}), vo = /* @__PURE__ */ c({
|
|
1219
1216
|
__name: "GridPmndrs",
|
|
1220
1217
|
props: {
|
|
1221
1218
|
blendFunction: {},
|
|
1222
1219
|
scale: {},
|
|
1223
1220
|
lineWidth: {}
|
|
1224
1221
|
},
|
|
1225
|
-
setup(
|
|
1226
|
-
const e =
|
|
1222
|
+
setup(i, { expose: t }) {
|
|
1223
|
+
const e = i, { pass: o, effect: s } = h(() => new Ee(e), e);
|
|
1227
1224
|
return t({ pass: o, effect: s }), v(
|
|
1228
1225
|
[
|
|
1229
1226
|
[() => e.blendFunction, "blendMode.blendFunction"],
|
|
@@ -1236,7 +1233,7 @@ const fo = /* @__PURE__ */ u({
|
|
|
1236
1233
|
};
|
|
1237
1234
|
}
|
|
1238
1235
|
});
|
|
1239
|
-
class ze extends
|
|
1236
|
+
class ze extends K {
|
|
1240
1237
|
/**
|
|
1241
1238
|
* Creates a new FishEyeEffect instance.
|
|
1242
1239
|
*
|
|
@@ -1247,7 +1244,7 @@ class ze extends Z {
|
|
|
1247
1244
|
* @param {number} [options.scale] - Scale.
|
|
1248
1245
|
*
|
|
1249
1246
|
*/
|
|
1250
|
-
constructor({ blendFunction: t =
|
|
1247
|
+
constructor({ blendFunction: t = J.NORMAL, lensS: e = new f(1, 1), lensF: o = new f(0, 1), scale: s = 1 } = {}) {
|
|
1251
1248
|
super("FishEyeEffect", `
|
|
1252
1249
|
uniform vec2 lensS;
|
|
1253
1250
|
uniform vec2 lensF;
|
|
@@ -1269,9 +1266,9 @@ class ze extends Z {
|
|
|
1269
1266
|
`, {
|
|
1270
1267
|
blendFunction: t,
|
|
1271
1268
|
uniforms: /* @__PURE__ */ new Map([
|
|
1272
|
-
["lensS", new
|
|
1273
|
-
["lensF", new
|
|
1274
|
-
["scale", new
|
|
1269
|
+
["lensS", new T(e)],
|
|
1270
|
+
["lensF", new T(o)],
|
|
1271
|
+
["scale", new T(s)]
|
|
1275
1272
|
])
|
|
1276
1273
|
});
|
|
1277
1274
|
}
|
|
@@ -1312,7 +1309,7 @@ class ze extends Z {
|
|
|
1312
1309
|
this.uniforms.get("scale").value = t;
|
|
1313
1310
|
}
|
|
1314
1311
|
}
|
|
1315
|
-
const go = /* @__PURE__ */
|
|
1312
|
+
const go = /* @__PURE__ */ c({
|
|
1316
1313
|
__name: "FishEyePmndrs",
|
|
1317
1314
|
props: {
|
|
1318
1315
|
blendFunction: {},
|
|
@@ -1320,10 +1317,10 @@ const go = /* @__PURE__ */ u({
|
|
|
1320
1317
|
lensF: {},
|
|
1321
1318
|
scale: {}
|
|
1322
1319
|
},
|
|
1323
|
-
setup(
|
|
1324
|
-
const e =
|
|
1320
|
+
setup(i, { expose: t }) {
|
|
1321
|
+
const e = i, o = F(
|
|
1325
1322
|
() => Array.isArray(e.lensS) ? new f(...e.lensS) : e.lensS
|
|
1326
|
-
), s =
|
|
1323
|
+
), s = F(
|
|
1327
1324
|
() => Array.isArray(e.lensF) ? new f(...e.lensF) : e.lensF
|
|
1328
1325
|
), { pass: a, effect: r } = h(
|
|
1329
1326
|
() => new ze({
|
|
@@ -1345,15 +1342,15 @@ const go = /* @__PURE__ */ u({
|
|
|
1345
1342
|
), () => {
|
|
1346
1343
|
};
|
|
1347
1344
|
}
|
|
1348
|
-
}), xo = /* @__PURE__ */
|
|
1345
|
+
}), xo = /* @__PURE__ */ c({
|
|
1349
1346
|
__name: "BrightnessContrastPmndrs",
|
|
1350
1347
|
props: {
|
|
1351
1348
|
blendFunction: {},
|
|
1352
1349
|
brightness: {},
|
|
1353
1350
|
contrast: {}
|
|
1354
1351
|
},
|
|
1355
|
-
setup(
|
|
1356
|
-
const e =
|
|
1352
|
+
setup(i, { expose: t }) {
|
|
1353
|
+
const e = i, { pass: o, effect: s } = h(() => new Pe(e), e);
|
|
1357
1354
|
return t({ pass: o, effect: s }), v(
|
|
1358
1355
|
[
|
|
1359
1356
|
[() => e.blendFunction, "blendMode.blendFunction"],
|
|
@@ -1365,11 +1362,11 @@ const go = /* @__PURE__ */ u({
|
|
|
1365
1362
|
), () => {
|
|
1366
1363
|
};
|
|
1367
1364
|
}
|
|
1368
|
-
}),
|
|
1365
|
+
}), ne = {
|
|
1369
1366
|
OFF: 0,
|
|
1370
1367
|
EDGES: 1,
|
|
1371
1368
|
WEIGHTS: 2
|
|
1372
|
-
}, bo = /* @__PURE__ */
|
|
1369
|
+
}, bo = /* @__PURE__ */ c({
|
|
1373
1370
|
__name: "SMAAPmndrs",
|
|
1374
1371
|
props: {
|
|
1375
1372
|
blendFunction: {},
|
|
@@ -1379,10 +1376,10 @@ const go = /* @__PURE__ */ u({
|
|
|
1379
1376
|
predicationMode: {},
|
|
1380
1377
|
debug: {}
|
|
1381
1378
|
},
|
|
1382
|
-
setup(
|
|
1383
|
-
const e =
|
|
1379
|
+
setup(i, { expose: t }) {
|
|
1380
|
+
const e = i, { pass: o, effect: s } = h(() => new se(e), e), { camera: a } = C(), r = Q(Z);
|
|
1384
1381
|
t({ pass: o, effect: s });
|
|
1385
|
-
const
|
|
1382
|
+
const n = new se();
|
|
1386
1383
|
v(
|
|
1387
1384
|
[
|
|
1388
1385
|
[() => Number(e.blendFunction), "blendMode.blendFunction"],
|
|
@@ -1390,11 +1387,11 @@ const go = /* @__PURE__ */ u({
|
|
|
1390
1387
|
[() => Number(e.edgeDetectionMode), "edgeDetectionMaterial.edgeDetectionMode"]
|
|
1391
1388
|
],
|
|
1392
1389
|
s,
|
|
1393
|
-
() => new
|
|
1390
|
+
() => new se()
|
|
1394
1391
|
), g(
|
|
1395
1392
|
[s, () => e.opacity],
|
|
1396
1393
|
() => {
|
|
1397
|
-
s.value && (e.opacity !== void 0 ? s.value.blendMode.setOpacity(e.opacity) : s.value.blendMode.setOpacity(
|
|
1394
|
+
s.value && (e.opacity !== void 0 ? s.value.blendMode.setOpacity(e.opacity) : s.value.blendMode.setOpacity(n.blendMode.getOpacity()));
|
|
1398
1395
|
},
|
|
1399
1396
|
{ immediate: !0 }
|
|
1400
1397
|
), g(
|
|
@@ -1403,32 +1400,32 @@ const go = /* @__PURE__ */ u({
|
|
|
1403
1400
|
s.value && s.value.applyPreset(Number(e.preset));
|
|
1404
1401
|
}
|
|
1405
1402
|
);
|
|
1406
|
-
let
|
|
1407
|
-
const
|
|
1403
|
+
let u = null, l = null;
|
|
1404
|
+
const d = (m) => {
|
|
1408
1405
|
if (!s.value)
|
|
1409
1406
|
return null;
|
|
1410
|
-
const
|
|
1411
|
-
return
|
|
1412
|
-
},
|
|
1413
|
-
m === "edges" && !
|
|
1414
|
-
},
|
|
1415
|
-
!m || !(r != null && r.value) || m.enabled !==
|
|
1416
|
-
},
|
|
1407
|
+
const p = m === "edges" ? s.value.edgesTexture : s.value.weightsTexture, w = new Xe(a.value, s.value, new Y({ texture: p }));
|
|
1408
|
+
return w.renderToScreen = !1, w.enabled = !1, w.fullscreenMaterial.encodeOutput = !1, w;
|
|
1409
|
+
}, x = (m) => {
|
|
1410
|
+
m === "edges" && !u ? u = d("edges") : m === "weights" && !l && (l = d("weights"));
|
|
1411
|
+
}, b = (m, p) => {
|
|
1412
|
+
!m || !(r != null && r.value) || m.enabled !== p && (m.enabled = p, m.renderToScreen = p, p && !(r != null && r.value.passes.includes(m)) ? r == null || r.value.addPass(m) : !p && (r != null && r.value.passes.includes(m)) && (r == null || r.value.removePass(m), m.dispose()));
|
|
1413
|
+
}, A = (m) => {
|
|
1417
1414
|
if (!o.value)
|
|
1418
1415
|
return;
|
|
1419
|
-
const
|
|
1420
|
-
o.value.enabled =
|
|
1416
|
+
const p = m === ne.OFF, w = m === ne.EDGES, _ = m === ne.WEIGHTS;
|
|
1417
|
+
o.value.enabled = p, o.value.renderToScreen = p, w && x("edges"), _ && x("weights"), b(u, w), b(l, _), w || (u = null), _ || (l = null);
|
|
1421
1418
|
};
|
|
1422
1419
|
return g(
|
|
1423
1420
|
() => e.debug,
|
|
1424
1421
|
() => {
|
|
1425
|
-
!o.value || e.debug === void 0 ||
|
|
1422
|
+
!o.value || e.debug === void 0 || A(e.debug);
|
|
1426
1423
|
},
|
|
1427
1424
|
{ immediate: !0 }
|
|
1428
1425
|
), () => {
|
|
1429
1426
|
};
|
|
1430
1427
|
}
|
|
1431
|
-
}),
|
|
1428
|
+
}), wo = /* @__PURE__ */ c({
|
|
1432
1429
|
__name: "FXAAPmndrs",
|
|
1433
1430
|
props: {
|
|
1434
1431
|
blendFunction: {},
|
|
@@ -1438,8 +1435,8 @@ const go = /* @__PURE__ */ u({
|
|
|
1438
1435
|
maxEdgeThreshold: {},
|
|
1439
1436
|
subpixelQuality: {}
|
|
1440
1437
|
},
|
|
1441
|
-
setup(
|
|
1442
|
-
const e =
|
|
1438
|
+
setup(i, { expose: t }) {
|
|
1439
|
+
const e = i, { pass: o, effect: s } = h(() => new ae(e), e);
|
|
1443
1440
|
return t({ pass: o, effect: s }), v(
|
|
1444
1441
|
[
|
|
1445
1442
|
[() => e.blendFunction, "blendMode.blendFunction"],
|
|
@@ -1449,7 +1446,7 @@ const go = /* @__PURE__ */ u({
|
|
|
1449
1446
|
[() => e.subpixelQuality, "subpixelQuality"]
|
|
1450
1447
|
],
|
|
1451
1448
|
s,
|
|
1452
|
-
() => new
|
|
1449
|
+
() => new ae()
|
|
1453
1450
|
), g(
|
|
1454
1451
|
[s, () => e.opacity],
|
|
1455
1452
|
() => {
|
|
@@ -1458,23 +1455,23 @@ const go = /* @__PURE__ */ u({
|
|
|
1458
1455
|
if (e.opacity !== void 0)
|
|
1459
1456
|
(a = s.value) == null || a.blendMode.setOpacity(e.opacity);
|
|
1460
1457
|
else {
|
|
1461
|
-
const
|
|
1462
|
-
(r = s.value) == null || r.blendMode.setOpacity(
|
|
1458
|
+
const n = new ae();
|
|
1459
|
+
(r = s.value) == null || r.blendMode.setOpacity(n.blendMode.getOpacity()), n.dispose();
|
|
1463
1460
|
}
|
|
1464
1461
|
},
|
|
1465
1462
|
{ immediate: !0 }
|
|
1466
1463
|
), () => {
|
|
1467
1464
|
};
|
|
1468
1465
|
}
|
|
1469
|
-
}),
|
|
1466
|
+
}), So = /* @__PURE__ */ c({
|
|
1470
1467
|
__name: "TexturePmndrs",
|
|
1471
1468
|
props: {
|
|
1472
1469
|
blendFunction: {},
|
|
1473
1470
|
texture: {},
|
|
1474
1471
|
opacity: {}
|
|
1475
1472
|
},
|
|
1476
|
-
setup(
|
|
1477
|
-
const e =
|
|
1473
|
+
setup(i, { expose: t }) {
|
|
1474
|
+
const e = i, { pass: o, effect: s } = h(() => new Y(e), e);
|
|
1478
1475
|
return t({
|
|
1479
1476
|
pass: o,
|
|
1480
1477
|
effect: s
|
|
@@ -1483,7 +1480,7 @@ const go = /* @__PURE__ */ u({
|
|
|
1483
1480
|
[() => e.blendFunction, "blendMode.blendFunction"]
|
|
1484
1481
|
],
|
|
1485
1482
|
s,
|
|
1486
|
-
() => new
|
|
1483
|
+
() => new Y()
|
|
1487
1484
|
), g(
|
|
1488
1485
|
[() => e.opacity],
|
|
1489
1486
|
() => {
|
|
@@ -1491,8 +1488,8 @@ const go = /* @__PURE__ */ u({
|
|
|
1491
1488
|
if (e.opacity !== void 0)
|
|
1492
1489
|
(a = s.value) == null || a.blendMode.setOpacity(e.opacity);
|
|
1493
1490
|
else {
|
|
1494
|
-
const
|
|
1495
|
-
(r = s.value) == null || r.blendMode.setOpacity(
|
|
1491
|
+
const n = new Y();
|
|
1492
|
+
(r = s.value) == null || r.blendMode.setOpacity(n.blendMode.getOpacity()), n.dispose();
|
|
1496
1493
|
}
|
|
1497
1494
|
},
|
|
1498
1495
|
{
|
|
@@ -1501,7 +1498,7 @@ const go = /* @__PURE__ */ u({
|
|
|
1501
1498
|
), () => {
|
|
1502
1499
|
};
|
|
1503
1500
|
}
|
|
1504
|
-
}), Ao = /* @__PURE__ */
|
|
1501
|
+
}), Ao = /* @__PURE__ */ c({
|
|
1505
1502
|
__name: "ASCIIPmndrs",
|
|
1506
1503
|
props: {
|
|
1507
1504
|
blendFunction: {},
|
|
@@ -1512,9 +1509,9 @@ const go = /* @__PURE__ */ u({
|
|
|
1512
1509
|
useSceneColor: { type: Boolean },
|
|
1513
1510
|
asciiTexture: {}
|
|
1514
1511
|
},
|
|
1515
|
-
setup(
|
|
1516
|
-
const e =
|
|
1517
|
-
return t({ pass: r, effect:
|
|
1512
|
+
setup(i, { expose: t }) {
|
|
1513
|
+
const e = i, o = new re(), { asciiTexture: s, ...a } = e, { pass: r, effect: n } = h(() => new re(a), e);
|
|
1514
|
+
return t({ pass: r, effect: n }), z(() => {
|
|
1518
1515
|
o.dispose();
|
|
1519
1516
|
}), v(
|
|
1520
1517
|
[
|
|
@@ -1522,39 +1519,39 @@ const go = /* @__PURE__ */ u({
|
|
|
1522
1519
|
[() => e.cellSize, "cellSize"],
|
|
1523
1520
|
[() => e.inverted, "inverted"]
|
|
1524
1521
|
],
|
|
1525
|
-
|
|
1526
|
-
() => new
|
|
1522
|
+
n,
|
|
1523
|
+
() => new re()
|
|
1527
1524
|
), g(
|
|
1528
|
-
[
|
|
1525
|
+
[n, () => e.useSceneColor],
|
|
1529
1526
|
() => {
|
|
1530
|
-
|
|
1527
|
+
n.value && (e.useSceneColor ? n.value.color = null : n.value.color = e.color ?? o.color);
|
|
1531
1528
|
},
|
|
1532
1529
|
{ immediate: !0 }
|
|
1533
1530
|
), g(
|
|
1534
|
-
[
|
|
1531
|
+
[n, () => e.opacity],
|
|
1535
1532
|
() => {
|
|
1536
|
-
|
|
1533
|
+
n.value && n.value.blendMode.setOpacity(e.opacity ?? o.blendMode.getOpacity());
|
|
1537
1534
|
},
|
|
1538
1535
|
{ immediate: !0 }
|
|
1539
1536
|
), g(
|
|
1540
|
-
[
|
|
1537
|
+
[n, () => e.color],
|
|
1541
1538
|
() => {
|
|
1542
|
-
|
|
1539
|
+
n.value && (e.useSceneColor || (n.value.color = e.color ?? null));
|
|
1543
1540
|
},
|
|
1544
1541
|
{ immediate: !0 }
|
|
1545
1542
|
), g(
|
|
1546
|
-
[
|
|
1543
|
+
[n, () => e.asciiTexture],
|
|
1547
1544
|
() => {
|
|
1548
|
-
if (!
|
|
1545
|
+
if (!n.value)
|
|
1549
1546
|
return;
|
|
1550
|
-
const
|
|
1551
|
-
|
|
1547
|
+
const u = e.asciiTexture ? new tt(e.asciiTexture) : o.asciiTexture;
|
|
1548
|
+
n.value.asciiTexture = u;
|
|
1552
1549
|
},
|
|
1553
1550
|
{ immediate: !0 }
|
|
1554
1551
|
), g(
|
|
1555
|
-
[
|
|
1552
|
+
[n, () => e.blendFunction],
|
|
1556
1553
|
() => {
|
|
1557
|
-
|
|
1554
|
+
n.value && (n.value.blendMode.blendFunction = e.blendFunction ? Number(e.blendFunction) : Number(o.blendMode.blendFunction));
|
|
1558
1555
|
},
|
|
1559
1556
|
{ immediate: !0 }
|
|
1560
1557
|
), () => {
|
|
@@ -1598,7 +1595,7 @@ const go = /* @__PURE__ */ u({
|
|
|
1598
1595
|
}`
|
|
1599
1596
|
)
|
|
1600
1597
|
};
|
|
1601
|
-
class
|
|
1598
|
+
class P {
|
|
1602
1599
|
constructor() {
|
|
1603
1600
|
this.isPass = !0, this.enabled = !0, this.needsSwap = !0, this.clear = !1, this.renderToScreen = !1;
|
|
1604
1601
|
}
|
|
@@ -1634,9 +1631,9 @@ class R {
|
|
|
1634
1631
|
this._mesh.material = t;
|
|
1635
1632
|
}
|
|
1636
1633
|
}
|
|
1637
|
-
class Ft extends
|
|
1634
|
+
class Ft extends P {
|
|
1638
1635
|
constructor(t, e) {
|
|
1639
|
-
super(), this.textureID = e !== void 0 ? e : "tDiffuse", t instanceof
|
|
1636
|
+
super(), this.textureID = e !== void 0 ? e : "tDiffuse", t instanceof M ? (this.uniforms = t.uniforms, this.material = t) : t && (this.uniforms = D.clone(t.uniforms), this.material = new M({
|
|
1640
1637
|
name: t.name !== void 0 ? t.name : "unspecified",
|
|
1641
1638
|
defines: Object.assign({}, t.defines),
|
|
1642
1639
|
uniforms: this.uniforms,
|
|
@@ -1651,18 +1648,18 @@ class Ft extends D {
|
|
|
1651
1648
|
this.material.dispose(), this.fsQuad.dispose();
|
|
1652
1649
|
}
|
|
1653
1650
|
}
|
|
1654
|
-
class We extends
|
|
1651
|
+
class We extends P {
|
|
1655
1652
|
constructor(t, e) {
|
|
1656
1653
|
super(), this.scene = t, this.camera = e, this.clear = !0, this.needsSwap = !1, this.inverse = !1;
|
|
1657
1654
|
}
|
|
1658
1655
|
render(t, e, o) {
|
|
1659
1656
|
const s = t.getContext(), a = t.state;
|
|
1660
1657
|
a.buffers.color.setMask(!1), a.buffers.depth.setMask(!1), a.buffers.color.setLocked(!0), a.buffers.depth.setLocked(!0);
|
|
1661
|
-
let r,
|
|
1662
|
-
this.inverse ? (r = 0,
|
|
1658
|
+
let r, n;
|
|
1659
|
+
this.inverse ? (r = 0, n = 1) : (r = 1, n = 0), a.buffers.stencil.setTest(!0), a.buffers.stencil.setOp(s.REPLACE, s.REPLACE, s.REPLACE), a.buffers.stencil.setFunc(s.ALWAYS, r, 4294967295), a.buffers.stencil.setClear(n), a.buffers.stencil.setLocked(!0), t.setRenderTarget(o), this.clear && t.clear(), t.render(this.scene, this.camera), t.setRenderTarget(e), this.clear && t.clear(), t.render(this.scene, this.camera), a.buffers.color.setLocked(!1), a.buffers.depth.setLocked(!1), a.buffers.color.setMask(!0), a.buffers.depth.setMask(!0), a.buffers.stencil.setLocked(!1), a.buffers.stencil.setFunc(s.EQUAL, 1, 4294967295), a.buffers.stencil.setOp(s.KEEP, s.KEEP, s.KEEP), a.buffers.stencil.setLocked(!0);
|
|
1663
1660
|
}
|
|
1664
1661
|
}
|
|
1665
|
-
class Ot extends
|
|
1662
|
+
class Ot extends P {
|
|
1666
1663
|
constructor() {
|
|
1667
1664
|
super(), this.needsSwap = !1;
|
|
1668
1665
|
}
|
|
@@ -1670,14 +1667,14 @@ class Ot extends D {
|
|
|
1670
1667
|
t.state.buffers.stencil.setLocked(!1), t.state.buffers.stencil.setTest(!1);
|
|
1671
1668
|
}
|
|
1672
1669
|
}
|
|
1673
|
-
class
|
|
1670
|
+
class Rt {
|
|
1674
1671
|
constructor(t, e) {
|
|
1675
1672
|
if (this.renderer = t, this._pixelRatio = t.getPixelRatio(), e === void 0) {
|
|
1676
1673
|
const o = t.getSize(new f());
|
|
1677
|
-
this._width = o.width, this._height = o.height, e = new
|
|
1674
|
+
this._width = o.width, this._height = o.height, e = new L(this._width * this._pixelRatio, this._height * this._pixelRatio, { type: E }), e.texture.name = "EffectComposer.rt1";
|
|
1678
1675
|
} else
|
|
1679
1676
|
this._width = e.width, this._height = e.height;
|
|
1680
|
-
this.renderTarget1 = e, this.renderTarget2 = e.clone(), this.renderTarget2.texture.name = "EffectComposer.rt2", this.writeBuffer = this.renderTarget1, this.readBuffer = this.renderTarget2, this.renderToScreen = !0, this.passes = [], this.copyPass = new Ft(qe), this.copyPass.material.blending = rt, this.clock = new
|
|
1677
|
+
this.renderTarget1 = e, this.renderTarget2 = e.clone(), this.renderTarget2.texture.name = "EffectComposer.rt2", this.writeBuffer = this.renderTarget1, this.readBuffer = this.renderTarget2, this.renderToScreen = !0, this.passes = [], this.copyPass = new Ft(qe), this.copyPass.material.blending = rt, this.clock = new it();
|
|
1681
1678
|
}
|
|
1682
1679
|
swapBuffers() {
|
|
1683
1680
|
const t = this.readBuffer;
|
|
@@ -1708,8 +1705,8 @@ class Bt {
|
|
|
1708
1705
|
if (r.enabled !== !1) {
|
|
1709
1706
|
if (r.renderToScreen = this.renderToScreen && this.isLastEnabledPass(s), r.render(this.renderer, this.writeBuffer, this.readBuffer, t, o), r.needsSwap) {
|
|
1710
1707
|
if (o) {
|
|
1711
|
-
const
|
|
1712
|
-
|
|
1708
|
+
const n = this.renderer.getContext(), u = this.renderer.state.buffers.stencil;
|
|
1709
|
+
u.setFunc(n.NOTEQUAL, 1, 4294967295), this.copyPass.render(this.renderer, this.writeBuffer, this.readBuffer, t), u.setFunc(n.EQUAL, 1, 4294967295);
|
|
1713
1710
|
}
|
|
1714
1711
|
this.swapBuffers();
|
|
1715
1712
|
}
|
|
@@ -1739,9 +1736,9 @@ class Bt {
|
|
|
1739
1736
|
this.renderTarget1.dispose(), this.renderTarget2.dispose(), this.copyPass.dispose();
|
|
1740
1737
|
}
|
|
1741
1738
|
}
|
|
1742
|
-
class
|
|
1739
|
+
class Bt extends P {
|
|
1743
1740
|
constructor(t, e, o = null, s = null, a = null) {
|
|
1744
|
-
super(), this.scene = t, this.camera = e, this.overrideMaterial = o, this.clearColor = s, this.clearAlpha = a, this.clear = !0, this.clearDepth = !1, this.needsSwap = !1, this._oldClearColor = new
|
|
1741
|
+
super(), this.scene = t, this.camera = e, this.overrideMaterial = o, this.clearColor = s, this.clearAlpha = a, this.clear = !0, this.clearDepth = !1, this.needsSwap = !1, this._oldClearColor = new q();
|
|
1745
1742
|
}
|
|
1746
1743
|
render(t, e, o) {
|
|
1747
1744
|
const s = t.autoClear;
|
|
@@ -1750,60 +1747,58 @@ class Rt extends D {
|
|
|
1750
1747
|
this.overrideMaterial !== null && (r = this.scene.overrideMaterial, this.scene.overrideMaterial = this.overrideMaterial), this.clearColor !== null && (t.getClearColor(this._oldClearColor), t.setClearColor(this.clearColor, t.getClearAlpha())), this.clearAlpha !== null && (a = t.getClearAlpha(), t.setClearAlpha(this.clearAlpha)), this.clearDepth == !0 && t.clearDepth(), t.setRenderTarget(this.renderToScreen ? null : o), this.clear === !0 && t.clear(t.autoClearColor, t.autoClearDepth, t.autoClearStencil), t.render(this.scene, this.camera), this.clearColor !== null && t.setClearColor(this._oldClearColor), this.clearAlpha !== null && t.setClearAlpha(a), this.overrideMaterial !== null && (this.scene.overrideMaterial = r), t.autoClear = s;
|
|
1751
1748
|
}
|
|
1752
1749
|
}
|
|
1753
|
-
const Qe = Symbol("effectComposerThree"), yo = /* @__PURE__ */
|
|
1750
|
+
const Qe = Symbol("effectComposerThree"), yo = /* @__PURE__ */ c({
|
|
1754
1751
|
__name: "EffectComposer",
|
|
1755
1752
|
props: {
|
|
1756
1753
|
enabled: { type: Boolean, default: !0 },
|
|
1757
1754
|
withoutRenderPass: { type: Boolean }
|
|
1758
1755
|
},
|
|
1759
|
-
setup(
|
|
1760
|
-
const e =
|
|
1756
|
+
setup(i, { expose: t }) {
|
|
1757
|
+
const e = i, o = U(null);
|
|
1761
1758
|
He(Qe, o), t({ composer: o });
|
|
1762
|
-
const { renderer: s, sizes: a, scene: r, camera:
|
|
1763
|
-
|
|
1764
|
-
var
|
|
1765
|
-
(
|
|
1766
|
-
}),
|
|
1767
|
-
var
|
|
1768
|
-
const { width:
|
|
1769
|
-
|
|
1770
|
-
});
|
|
1771
|
-
const { pixelRatio: p } = Ye();
|
|
1772
|
-
w(() => {
|
|
1773
|
-
var c;
|
|
1774
|
-
(c = o.value) == null || c.setPixelRatio(p.value);
|
|
1775
|
-
}), e.withoutRenderPass || w(() => {
|
|
1776
|
-
i.value && r.value && o.value && o.value.addPass(new Rt(r.value, i.value));
|
|
1759
|
+
const { renderer: s, sizes: a, scene: r, camera: n } = G();
|
|
1760
|
+
S(() => {
|
|
1761
|
+
var d;
|
|
1762
|
+
(d = o.value) == null || d.dispose(), o.value = new Rt(s.instance);
|
|
1763
|
+
}), S(() => {
|
|
1764
|
+
var b;
|
|
1765
|
+
const { width: d, height: x } = a;
|
|
1766
|
+
x.value && d.value && ((b = o.value) == null || b.setSize(d.value, x.value));
|
|
1777
1767
|
});
|
|
1778
|
-
const {
|
|
1779
|
-
return
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
}), (
|
|
1785
|
-
|
|
1786
|
-
}),
|
|
1768
|
+
const { pixelRatio: l } = Ye();
|
|
1769
|
+
return S(() => {
|
|
1770
|
+
var d;
|
|
1771
|
+
(d = o.value) == null || d.setPixelRatio(l.value);
|
|
1772
|
+
}), e.withoutRenderPass || S(() => {
|
|
1773
|
+
n.activeCamera.value && r.value && o.value && o.value.addPass(new Bt(r.value, n.activeCamera.value));
|
|
1774
|
+
}), s.replaceRenderFunction((d) => {
|
|
1775
|
+
o.value && e.enabled && (o.value.render(), d());
|
|
1776
|
+
}), z(() => {
|
|
1777
|
+
var d;
|
|
1778
|
+
(d = o.value) == null || d.dispose();
|
|
1779
|
+
}), (d, x) => Ie(d.$slots, "default");
|
|
1780
|
+
}
|
|
1781
|
+
}), W = (i, t, e) => {
|
|
1787
1782
|
if (!t && e)
|
|
1788
1783
|
throw new Error("passDependencies is required when dependencyFieldsTriggeringRecreation is provided");
|
|
1789
|
-
const o =
|
|
1784
|
+
const o = Q(Qe), s = U(i()), { sizes: a, invalidate: r } = C();
|
|
1790
1785
|
t && g(t, () => r());
|
|
1791
|
-
const
|
|
1792
|
-
var
|
|
1793
|
-
(
|
|
1794
|
-
},
|
|
1795
|
-
!(o != null && o.value) || !a.height.value || !a.width.value || (o.value.addPass(s.value),
|
|
1786
|
+
const n = () => {
|
|
1787
|
+
var l;
|
|
1788
|
+
(l = o == null ? void 0 : o.value) == null || l.removePass(s.value), s.value.dispose();
|
|
1789
|
+
}, u = S(() => {
|
|
1790
|
+
!(o != null && o.value) || !a.height.value || !a.width.value || (o.value.addPass(s.value), ue(() => u()));
|
|
1796
1791
|
});
|
|
1797
1792
|
return e && g(
|
|
1798
|
-
() => e.map((
|
|
1793
|
+
() => e.map((l) => t == null ? void 0 : t[l]),
|
|
1799
1794
|
() => {
|
|
1800
1795
|
if (!(o != null && o.value))
|
|
1801
1796
|
return;
|
|
1802
|
-
const
|
|
1803
|
-
~
|
|
1797
|
+
const l = o.value.passes.findIndex((d) => d === s.value);
|
|
1798
|
+
~l && (n(), s.value = i(), o.value.insertPass(s.value, l));
|
|
1804
1799
|
}
|
|
1805
|
-
),
|
|
1806
|
-
|
|
1800
|
+
), z(() => {
|
|
1801
|
+
n();
|
|
1807
1802
|
}), { pass: s };
|
|
1808
1803
|
}, Nt = {
|
|
1809
1804
|
uniforms: {
|
|
@@ -1900,54 +1895,53 @@ const Qe = Symbol("effectComposerThree"), yo = /* @__PURE__ */ u({
|
|
|
1900
1895
|
}`
|
|
1901
1896
|
)
|
|
1902
1897
|
};
|
|
1903
|
-
class Ue extends
|
|
1898
|
+
class Ue extends P {
|
|
1904
1899
|
constructor(t = 64) {
|
|
1905
1900
|
super();
|
|
1906
1901
|
const e = Nt;
|
|
1907
|
-
this.uniforms =
|
|
1902
|
+
this.uniforms = D.clone(e.uniforms), this.heightMap = this.generateHeightmap(t), this.uniforms.tDisp.value = this.heightMap, this.material = new M({
|
|
1908
1903
|
uniforms: this.uniforms,
|
|
1909
1904
|
vertexShader: e.vertexShader,
|
|
1910
1905
|
fragmentShader: e.fragmentShader
|
|
1911
1906
|
}), this.fsQuad = new R(this.material), this.goWild = !1, this.curF = 0, this.generateTrigger();
|
|
1912
1907
|
}
|
|
1913
1908
|
render(t, e, o) {
|
|
1914
|
-
this.uniforms.tDiffuse.value = o.texture, this.uniforms.seed.value = Math.random(), this.uniforms.byp.value = 0, this.curF % this.randX == 0 || this.goWild == !0 ? (this.uniforms.amount.value = Math.random() / 30, this.uniforms.angle.value =
|
|
1909
|
+
this.uniforms.tDiffuse.value = o.texture, this.uniforms.seed.value = Math.random(), this.uniforms.byp.value = 0, this.curF % this.randX == 0 || this.goWild == !0 ? (this.uniforms.amount.value = Math.random() / 30, this.uniforms.angle.value = y.randFloat(-Math.PI, Math.PI), this.uniforms.seed_x.value = y.randFloat(-1, 1), this.uniforms.seed_y.value = y.randFloat(-1, 1), this.uniforms.distortion_x.value = y.randFloat(0, 1), this.uniforms.distortion_y.value = y.randFloat(0, 1), this.curF = 0, this.generateTrigger()) : this.curF % this.randX < this.randX / 5 ? (this.uniforms.amount.value = Math.random() / 90, this.uniforms.angle.value = y.randFloat(-Math.PI, Math.PI), this.uniforms.distortion_x.value = y.randFloat(0, 1), this.uniforms.distortion_y.value = y.randFloat(0, 1), this.uniforms.seed_x.value = y.randFloat(-0.3, 0.3), this.uniforms.seed_y.value = y.randFloat(-0.3, 0.3)) : this.goWild == !1 && (this.uniforms.byp.value = 1), this.curF++, this.renderToScreen ? (t.setRenderTarget(null), this.fsQuad.render(t)) : (t.setRenderTarget(e), this.clear && t.clear(), this.fsQuad.render(t));
|
|
1915
1910
|
}
|
|
1916
1911
|
generateTrigger() {
|
|
1917
|
-
this.randX =
|
|
1912
|
+
this.randX = y.randInt(120, 240);
|
|
1918
1913
|
}
|
|
1919
1914
|
generateHeightmap(t) {
|
|
1920
1915
|
const e = new Float32Array(t * t), o = t * t;
|
|
1921
1916
|
for (let a = 0; a < o; a++) {
|
|
1922
|
-
const r =
|
|
1917
|
+
const r = y.randFloat(0, 1);
|
|
1923
1918
|
e[a] = r;
|
|
1924
1919
|
}
|
|
1925
|
-
const s = new
|
|
1920
|
+
const s = new nt(e, t, t, lt, ut);
|
|
1926
1921
|
return s.needsUpdate = !0, s;
|
|
1927
1922
|
}
|
|
1928
1923
|
dispose() {
|
|
1929
1924
|
this.material.dispose(), this.heightMap.dispose(), this.fsQuad.dispose();
|
|
1930
1925
|
}
|
|
1931
1926
|
}
|
|
1932
|
-
const Mo = /* @__PURE__ */
|
|
1927
|
+
const Mo = /* @__PURE__ */ c({
|
|
1933
1928
|
__name: "Glitch",
|
|
1934
1929
|
props: {
|
|
1935
1930
|
dtSize: {},
|
|
1936
1931
|
goWild: { type: Boolean }
|
|
1937
1932
|
},
|
|
1938
|
-
setup(
|
|
1939
|
-
const e =
|
|
1933
|
+
setup(i, { expose: t }) {
|
|
1934
|
+
const e = i, { pass: o } = W(() => new Ue(e.dtSize), e, ["dtSize"]), { invalidate: s } = C();
|
|
1940
1935
|
t({ pass: o });
|
|
1941
|
-
const { onBeforeRender:
|
|
1942
|
-
return
|
|
1936
|
+
const { onBeforeRender: a } = ce();
|
|
1937
|
+
return a(() => s()), v(
|
|
1943
1938
|
[[() => e.goWild, "goWild"]],
|
|
1944
1939
|
o,
|
|
1945
1940
|
() => new Ue()
|
|
1946
1941
|
), () => {
|
|
1947
1942
|
};
|
|
1948
1943
|
}
|
|
1949
|
-
}),
|
|
1950
|
-
name: "HalftoneShader",
|
|
1944
|
+
}), k = {
|
|
1951
1945
|
uniforms: {
|
|
1952
1946
|
tDiffuse: { value: null },
|
|
1953
1947
|
shape: { value: 1 },
|
|
@@ -2250,12 +2244,12 @@ const Mo = /* @__PURE__ */ u({
|
|
|
2250
2244
|
}`
|
|
2251
2245
|
)
|
|
2252
2246
|
};
|
|
2253
|
-
class zt extends
|
|
2247
|
+
class zt extends P {
|
|
2254
2248
|
constructor(t, e, o) {
|
|
2255
|
-
super(), this.uniforms =
|
|
2249
|
+
super(), this.uniforms = D.clone(k.uniforms), this.material = new M({
|
|
2256
2250
|
uniforms: this.uniforms,
|
|
2257
|
-
fragmentShader:
|
|
2258
|
-
vertexShader:
|
|
2251
|
+
fragmentShader: k.fragmentShader,
|
|
2252
|
+
vertexShader: k.vertexShader
|
|
2259
2253
|
}), this.uniforms.width.value = t, this.uniforms.height.value = e;
|
|
2260
2254
|
for (const s in o)
|
|
2261
2255
|
o.hasOwnProperty(s) && this.uniforms.hasOwnProperty(s) && (this.uniforms[s].value = o[s]);
|
|
@@ -2271,7 +2265,7 @@ class zt extends D {
|
|
|
2271
2265
|
this.material.dispose(), this.fsQuad.dispose();
|
|
2272
2266
|
}
|
|
2273
2267
|
}
|
|
2274
|
-
const To = /* @__PURE__ */
|
|
2268
|
+
const To = /* @__PURE__ */ c({
|
|
2275
2269
|
__name: "Halftone",
|
|
2276
2270
|
props: {
|
|
2277
2271
|
shape: {},
|
|
@@ -2284,29 +2278,29 @@ const To = /* @__PURE__ */ u({
|
|
|
2284
2278
|
greyscale: { type: Boolean },
|
|
2285
2279
|
blendingMode: {}
|
|
2286
2280
|
},
|
|
2287
|
-
setup(
|
|
2288
|
-
const e =
|
|
2281
|
+
setup(i, { expose: t }) {
|
|
2282
|
+
const e = i, { sizes: o } = G(), s = F(
|
|
2289
2283
|
() => Object.fromEntries(
|
|
2290
|
-
Object.entries(e).filter(([r,
|
|
2284
|
+
Object.entries(e).filter(([r, n]) => n !== void 0)
|
|
2291
2285
|
)
|
|
2292
|
-
), { pass: a } =
|
|
2286
|
+
), { pass: a } = W(() => new zt(
|
|
2293
2287
|
o.width.value,
|
|
2294
2288
|
o.height.value,
|
|
2295
2289
|
s.value
|
|
2296
2290
|
), e);
|
|
2297
|
-
return t({ pass: a }),
|
|
2291
|
+
return t({ pass: a }), S(() => {
|
|
2298
2292
|
a.value.setSize(o.width.value, o.height.value);
|
|
2299
|
-
}),
|
|
2300
|
-
Object.entries(e).forEach(([r,
|
|
2301
|
-
r in a.value.uniforms && (a.value.uniforms[r].value =
|
|
2293
|
+
}), S(() => {
|
|
2294
|
+
Object.entries(e).forEach(([r, n]) => {
|
|
2295
|
+
r in a.value.uniforms && (a.value.uniforms[r].value = n ?? k.uniforms[r].value);
|
|
2302
2296
|
});
|
|
2303
2297
|
}), () => {
|
|
2304
2298
|
};
|
|
2305
2299
|
}
|
|
2306
2300
|
});
|
|
2307
|
-
class Ge extends
|
|
2301
|
+
class Ge extends P {
|
|
2308
2302
|
constructor(t, e, o, s = {}) {
|
|
2309
|
-
super(), this.pixelSize = t, this.resolution = new f(), this.renderResolution = new f(), this.pixelatedMaterial = this.createPixelatedMaterial(), this.normalMaterial = new ct(), this.fsQuad = new R(this.pixelatedMaterial), this.scene = e, this.camera = o, this.normalEdgeStrength = s.normalEdgeStrength || 0.3, this.depthEdgeStrength = s.depthEdgeStrength || 0.4, this.beautyRenderTarget = new
|
|
2303
|
+
super(), this.pixelSize = t, this.resolution = new f(), this.renderResolution = new f(), this.pixelatedMaterial = this.createPixelatedMaterial(), this.normalMaterial = new ct(), this.fsQuad = new R(this.pixelatedMaterial), this.scene = e, this.camera = o, this.normalEdgeStrength = s.normalEdgeStrength || 0.3, this.depthEdgeStrength = s.depthEdgeStrength || 0.4, this.beautyRenderTarget = new L(), this.beautyRenderTarget.texture.minFilter = B, this.beautyRenderTarget.texture.magFilter = B, this.beautyRenderTarget.texture.type = E, this.beautyRenderTarget.depthTexture = new dt(), this.normalRenderTarget = new L(), this.normalRenderTarget.texture.minFilter = B, this.normalRenderTarget.texture.magFilter = B, this.normalRenderTarget.texture.type = E;
|
|
2310
2304
|
}
|
|
2311
2305
|
dispose() {
|
|
2312
2306
|
this.beautyRenderTarget.dispose(), this.normalRenderTarget.dispose(), this.pixelatedMaterial.dispose(), this.normalMaterial.dispose(), this.fsQuad.dispose();
|
|
@@ -2326,7 +2320,7 @@ class Ge extends D {
|
|
|
2326
2320
|
t.setRenderTarget(this.normalRenderTarget), this.scene.overrideMaterial = this.normalMaterial, t.render(this.scene, this.camera), this.scene.overrideMaterial = s, o.tDiffuse.value = this.beautyRenderTarget.texture, o.tDepth.value = this.beautyRenderTarget.depthTexture, o.tNormal.value = this.normalRenderTarget.texture, this.renderToScreen ? t.setRenderTarget(null) : (t.setRenderTarget(e), this.clear && t.clear()), this.fsQuad.render(t);
|
|
2327
2321
|
}
|
|
2328
2322
|
createPixelatedMaterial() {
|
|
2329
|
-
return new
|
|
2323
|
+
return new M({
|
|
2330
2324
|
uniforms: {
|
|
2331
2325
|
tDiffuse: { value: null },
|
|
2332
2326
|
tDepth: { value: null },
|
|
@@ -2451,16 +2445,16 @@ class Ge extends D {
|
|
|
2451
2445
|
});
|
|
2452
2446
|
}
|
|
2453
2447
|
}
|
|
2454
|
-
const Co = /* @__PURE__ */
|
|
2448
|
+
const Co = /* @__PURE__ */ c({
|
|
2455
2449
|
__name: "Pixelation",
|
|
2456
2450
|
props: {
|
|
2457
2451
|
pixelSize: {},
|
|
2458
2452
|
depthEdgeStrength: {},
|
|
2459
2453
|
normalEdgeStrength: {}
|
|
2460
2454
|
},
|
|
2461
|
-
setup(
|
|
2462
|
-
const e =
|
|
2463
|
-
return t({ pass: a }),
|
|
2455
|
+
setup(i, { expose: t }) {
|
|
2456
|
+
const e = i, { scene: o, camera: s } = C(), { pass: a } = W(() => new Ge(e.pixelSize, o.value, s.value), e);
|
|
2457
|
+
return t({ pass: a }), S(() => {
|
|
2464
2458
|
a.value.setPixelSize(e.pixelSize);
|
|
2465
2459
|
}), v(
|
|
2466
2460
|
[
|
|
@@ -2558,11 +2552,11 @@ const Co = /* @__PURE__ */ u({
|
|
|
2558
2552
|
}`
|
|
2559
2553
|
)
|
|
2560
2554
|
};
|
|
2561
|
-
class Ut extends
|
|
2555
|
+
class Ut extends P {
|
|
2562
2556
|
constructor() {
|
|
2563
2557
|
super();
|
|
2564
2558
|
const t = Wt;
|
|
2565
|
-
this.uniforms =
|
|
2559
|
+
this.uniforms = D.clone(t.uniforms), this.material = new ht({
|
|
2566
2560
|
name: t.name,
|
|
2567
2561
|
uniforms: this.uniforms,
|
|
2568
2562
|
vertexShader: t.vertexShader,
|
|
@@ -2570,21 +2564,20 @@ class Ut extends D {
|
|
|
2570
2564
|
}), this.fsQuad = new R(this.material), this._outputColorSpace = null, this._toneMapping = null;
|
|
2571
2565
|
}
|
|
2572
2566
|
render(t, e, o) {
|
|
2573
|
-
this.uniforms.tDiffuse.value = o.texture, this.uniforms.toneMappingExposure.value = t.toneMappingExposure, (this._outputColorSpace !== t.outputColorSpace || this._toneMapping !== t.toneMapping) && (this._outputColorSpace = t.outputColorSpace, this._toneMapping = t.toneMapping, this.material.defines = {}, pt.getTransfer(this._outputColorSpace) === mt && (this.material.defines.SRGB_TRANSFER = ""), this._toneMapping === vt ? this.material.defines.LINEAR_TONE_MAPPING = "" : this._toneMapping === gt ? this.material.defines.REINHARD_TONE_MAPPING = "" : this._toneMapping === xt ? this.material.defines.CINEON_TONE_MAPPING = "" : this._toneMapping === bt ? this.material.defines.ACES_FILMIC_TONE_MAPPING = "" : this._toneMapping ===
|
|
2567
|
+
this.uniforms.tDiffuse.value = o.texture, this.uniforms.toneMappingExposure.value = t.toneMappingExposure, (this._outputColorSpace !== t.outputColorSpace || this._toneMapping !== t.toneMapping) && (this._outputColorSpace = t.outputColorSpace, this._toneMapping = t.toneMapping, this.material.defines = {}, pt.getTransfer(this._outputColorSpace) === mt && (this.material.defines.SRGB_TRANSFER = ""), this._toneMapping === vt ? this.material.defines.LINEAR_TONE_MAPPING = "" : this._toneMapping === gt ? this.material.defines.REINHARD_TONE_MAPPING = "" : this._toneMapping === xt ? this.material.defines.CINEON_TONE_MAPPING = "" : this._toneMapping === bt ? this.material.defines.ACES_FILMIC_TONE_MAPPING = "" : this._toneMapping === wt ? this.material.defines.AGX_TONE_MAPPING = "" : this._toneMapping === St ? this.material.defines.NEUTRAL_TONE_MAPPING = "" : this._toneMapping === At && (this.material.defines.CUSTOM_TONE_MAPPING = ""), this.material.needsUpdate = !0), this.renderToScreen === !0 ? (t.setRenderTarget(null), this.fsQuad.render(t)) : (t.setRenderTarget(e), this.clear && t.clear(t.autoClearColor, t.autoClearDepth, t.autoClearStencil), this.fsQuad.render(t));
|
|
2574
2568
|
}
|
|
2575
2569
|
dispose() {
|
|
2576
2570
|
this.material.dispose(), this.fsQuad.dispose();
|
|
2577
2571
|
}
|
|
2578
2572
|
}
|
|
2579
|
-
const Eo = /* @__PURE__ */
|
|
2573
|
+
const Eo = /* @__PURE__ */ c({
|
|
2580
2574
|
__name: "Output",
|
|
2581
|
-
setup(
|
|
2582
|
-
const { pass: e } =
|
|
2575
|
+
setup(i, { expose: t }) {
|
|
2576
|
+
const { pass: e } = W(() => new Ut());
|
|
2583
2577
|
return t({ pass: e }), () => {
|
|
2584
2578
|
};
|
|
2585
2579
|
}
|
|
2586
|
-
}),
|
|
2587
|
-
name: "SMAAEdgesShader",
|
|
2580
|
+
}), j = {
|
|
2588
2581
|
defines: {
|
|
2589
2582
|
SMAA_THRESHOLD: "0.1"
|
|
2590
2583
|
},
|
|
@@ -2684,8 +2677,7 @@ const Eo = /* @__PURE__ */ u({
|
|
|
2684
2677
|
|
|
2685
2678
|
}`
|
|
2686
2679
|
)
|
|
2687
|
-
},
|
|
2688
|
-
name: "SMAAWeightsShader",
|
|
2680
|
+
}, V = {
|
|
2689
2681
|
defines: {
|
|
2690
2682
|
SMAA_MAX_SEARCH_STEPS: "8",
|
|
2691
2683
|
SMAA_AREATEX_MAX_DISTANCE: "16",
|
|
@@ -2934,8 +2926,7 @@ const Eo = /* @__PURE__ */ u({
|
|
|
2934
2926
|
|
|
2935
2927
|
}`
|
|
2936
2928
|
)
|
|
2937
|
-
},
|
|
2938
|
-
name: "SMAABlendShader",
|
|
2929
|
+
}, le = {
|
|
2939
2930
|
uniforms: {
|
|
2940
2931
|
tDiffuse: { value: null },
|
|
2941
2932
|
tColor: { value: null },
|
|
@@ -3024,14 +3015,14 @@ const Eo = /* @__PURE__ */ u({
|
|
|
3024
3015
|
}`
|
|
3025
3016
|
)
|
|
3026
3017
|
};
|
|
3027
|
-
class Gt extends
|
|
3018
|
+
class Gt extends P {
|
|
3028
3019
|
constructor(t, e) {
|
|
3029
|
-
super(), this.edgesRT = new
|
|
3020
|
+
super(), this.edgesRT = new L(t, e, {
|
|
3030
3021
|
depthBuffer: !1,
|
|
3031
|
-
type:
|
|
3032
|
-
}), this.edgesRT.texture.name = "SMAAPass.edges", this.weightsRT = new
|
|
3022
|
+
type: E
|
|
3023
|
+
}), this.edgesRT.texture.name = "SMAAPass.edges", this.weightsRT = new L(t, e, {
|
|
3033
3024
|
depthBuffer: !1,
|
|
3034
|
-
type:
|
|
3025
|
+
type: E
|
|
3035
3026
|
}), this.weightsRT.texture.name = "SMAAPass.weights";
|
|
3036
3027
|
const o = this, s = new Image();
|
|
3037
3028
|
s.src = this.getAreaTexture(), s.onload = function() {
|
|
@@ -3040,20 +3031,20 @@ class Gt extends D {
|
|
|
3040
3031
|
const a = new Image();
|
|
3041
3032
|
a.src = this.getSearchTexture(), a.onload = function() {
|
|
3042
3033
|
o.searchTexture.needsUpdate = !0;
|
|
3043
|
-
}, this.searchTexture = new Le(), this.searchTexture.name = "SMAAPass.search", this.searchTexture.image = a, this.searchTexture.magFilter =
|
|
3044
|
-
defines: Object.assign({},
|
|
3034
|
+
}, this.searchTexture = new Le(), this.searchTexture.name = "SMAAPass.search", this.searchTexture.image = a, this.searchTexture.magFilter = B, this.searchTexture.minFilter = B, this.searchTexture.generateMipmaps = !1, this.searchTexture.flipY = !1, this.uniformsEdges = D.clone(j.uniforms), this.uniformsEdges.resolution.value.set(1 / t, 1 / e), this.materialEdges = new M({
|
|
3035
|
+
defines: Object.assign({}, j.defines),
|
|
3045
3036
|
uniforms: this.uniformsEdges,
|
|
3046
|
-
vertexShader:
|
|
3047
|
-
fragmentShader:
|
|
3048
|
-
}), this.uniformsWeights =
|
|
3049
|
-
defines: Object.assign({},
|
|
3037
|
+
vertexShader: j.vertexShader,
|
|
3038
|
+
fragmentShader: j.fragmentShader
|
|
3039
|
+
}), this.uniformsWeights = D.clone(V.uniforms), this.uniformsWeights.resolution.value.set(1 / t, 1 / e), this.uniformsWeights.tDiffuse.value = this.edgesRT.texture, this.uniformsWeights.tArea.value = this.areaTexture, this.uniformsWeights.tSearch.value = this.searchTexture, this.materialWeights = new M({
|
|
3040
|
+
defines: Object.assign({}, V.defines),
|
|
3050
3041
|
uniforms: this.uniformsWeights,
|
|
3051
|
-
vertexShader:
|
|
3052
|
-
fragmentShader:
|
|
3053
|
-
}), this.uniformsBlend =
|
|
3042
|
+
vertexShader: V.vertexShader,
|
|
3043
|
+
fragmentShader: V.fragmentShader
|
|
3044
|
+
}), this.uniformsBlend = D.clone(le.uniforms), this.uniformsBlend.resolution.value.set(1 / t, 1 / e), this.uniformsBlend.tDiffuse.value = this.weightsRT.texture, this.materialBlend = new M({
|
|
3054
3045
|
uniforms: this.uniformsBlend,
|
|
3055
|
-
vertexShader:
|
|
3056
|
-
fragmentShader:
|
|
3046
|
+
vertexShader: le.vertexShader,
|
|
3047
|
+
fragmentShader: le.fragmentShader
|
|
3057
3048
|
}), this.fsQuad = new R(null);
|
|
3058
3049
|
}
|
|
3059
3050
|
render(t, e, o) {
|
|
@@ -3072,27 +3063,25 @@ class Gt extends D {
|
|
|
3072
3063
|
this.edgesRT.dispose(), this.weightsRT.dispose(), this.areaTexture.dispose(), this.searchTexture.dispose(), this.materialEdges.dispose(), this.materialWeights.dispose(), this.materialBlend.dispose(), this.fsQuad.dispose();
|
|
3073
3064
|
}
|
|
3074
3065
|
}
|
|
3075
|
-
const Po = /* @__PURE__ */
|
|
3066
|
+
const Po = /* @__PURE__ */ c({
|
|
3076
3067
|
__name: "SMAA",
|
|
3077
3068
|
props: {
|
|
3078
3069
|
width: {},
|
|
3079
3070
|
height: {}
|
|
3080
3071
|
},
|
|
3081
|
-
setup(
|
|
3082
|
-
const e =
|
|
3083
|
-
return t({ pass:
|
|
3084
|
-
|
|
3072
|
+
setup(i, { expose: t }) {
|
|
3073
|
+
const e = i, { sizes: o } = G(), { pixelRatio: s } = Ye(), a = F(() => e.width ?? o.width.value * s.value), r = F(() => e.height ?? o.height.value * s.value), { pass: n } = W(() => new Gt(a.value, r.value), e);
|
|
3074
|
+
return t({ pass: n }), S(() => {
|
|
3075
|
+
n.value.setSize(a.value, r.value);
|
|
3085
3076
|
}), () => {
|
|
3086
3077
|
};
|
|
3087
3078
|
}
|
|
3088
3079
|
}), Ke = {
|
|
3089
|
-
name: "LuminosityHighPassShader",
|
|
3090
|
-
shaderID: "luminosityHighPass",
|
|
3091
3080
|
uniforms: {
|
|
3092
3081
|
tDiffuse: { value: null },
|
|
3093
3082
|
luminosityThreshold: { value: 1 },
|
|
3094
3083
|
smoothWidth: { value: 1 },
|
|
3095
|
-
defaultColor: { value: new
|
|
3084
|
+
defaultColor: { value: new q(0) },
|
|
3096
3085
|
defaultOpacity: { value: 0 }
|
|
3097
3086
|
},
|
|
3098
3087
|
vertexShader: (
|
|
@@ -3136,40 +3125,40 @@ const Po = /* @__PURE__ */ u({
|
|
|
3136
3125
|
}`
|
|
3137
3126
|
)
|
|
3138
3127
|
};
|
|
3139
|
-
class
|
|
3128
|
+
class N extends P {
|
|
3140
3129
|
constructor(t, e, o, s) {
|
|
3141
|
-
super(), this.strength = e !== void 0 ? e : 1, this.radius = o, this.threshold = s, this.resolution = t !== void 0 ? new f(t.x, t.y) : new f(256, 256), this.clearColor = new
|
|
3130
|
+
super(), this.strength = e !== void 0 ? e : 1, this.radius = o, this.threshold = s, this.resolution = t !== void 0 ? new f(t.x, t.y) : new f(256, 256), this.clearColor = new q(0, 0, 0), this.renderTargetsHorizontal = [], this.renderTargetsVertical = [], this.nMips = 5;
|
|
3142
3131
|
let a = Math.round(this.resolution.x / 2), r = Math.round(this.resolution.y / 2);
|
|
3143
|
-
this.renderTargetBright = new
|
|
3144
|
-
for (let
|
|
3145
|
-
const
|
|
3146
|
-
|
|
3147
|
-
const
|
|
3148
|
-
|
|
3132
|
+
this.renderTargetBright = new L(a, r, { type: E }), this.renderTargetBright.texture.name = "UnrealBloomPass.bright", this.renderTargetBright.texture.generateMipmaps = !1;
|
|
3133
|
+
for (let x = 0; x < this.nMips; x++) {
|
|
3134
|
+
const b = new L(a, r, { type: E });
|
|
3135
|
+
b.texture.name = "UnrealBloomPass.h" + x, b.texture.generateMipmaps = !1, this.renderTargetsHorizontal.push(b);
|
|
3136
|
+
const A = new L(a, r, { type: E });
|
|
3137
|
+
A.texture.name = "UnrealBloomPass.v" + x, A.texture.generateMipmaps = !1, this.renderTargetsVertical.push(A), a = Math.round(a / 2), r = Math.round(r / 2);
|
|
3149
3138
|
}
|
|
3150
|
-
const
|
|
3151
|
-
this.highPassUniforms =
|
|
3139
|
+
const n = Ke;
|
|
3140
|
+
this.highPassUniforms = D.clone(n.uniforms), this.highPassUniforms.luminosityThreshold.value = s, this.highPassUniforms.smoothWidth.value = 0.01, this.materialHighPassFilter = new M({
|
|
3152
3141
|
uniforms: this.highPassUniforms,
|
|
3153
|
-
vertexShader:
|
|
3154
|
-
fragmentShader:
|
|
3142
|
+
vertexShader: n.vertexShader,
|
|
3143
|
+
fragmentShader: n.fragmentShader
|
|
3155
3144
|
}), this.separableBlurMaterials = [];
|
|
3156
|
-
const
|
|
3145
|
+
const u = [3, 5, 7, 9, 11];
|
|
3157
3146
|
a = Math.round(this.resolution.x / 2), r = Math.round(this.resolution.y / 2);
|
|
3158
|
-
for (let
|
|
3159
|
-
this.separableBlurMaterials.push(this.getSeparableBlurMaterial(
|
|
3147
|
+
for (let x = 0; x < this.nMips; x++)
|
|
3148
|
+
this.separableBlurMaterials.push(this.getSeparableBlurMaterial(u[x])), this.separableBlurMaterials[x].uniforms.invSize.value = new f(1 / a, 1 / r), a = Math.round(a / 2), r = Math.round(r / 2);
|
|
3160
3149
|
this.compositeMaterial = this.getCompositeMaterial(this.nMips), this.compositeMaterial.uniforms.blurTexture1.value = this.renderTargetsVertical[0].texture, this.compositeMaterial.uniforms.blurTexture2.value = this.renderTargetsVertical[1].texture, this.compositeMaterial.uniforms.blurTexture3.value = this.renderTargetsVertical[2].texture, this.compositeMaterial.uniforms.blurTexture4.value = this.renderTargetsVertical[3].texture, this.compositeMaterial.uniforms.blurTexture5.value = this.renderTargetsVertical[4].texture, this.compositeMaterial.uniforms.bloomStrength.value = e, this.compositeMaterial.uniforms.bloomRadius.value = 0.1;
|
|
3161
|
-
const
|
|
3162
|
-
this.compositeMaterial.uniforms.bloomFactors.value =
|
|
3163
|
-
const
|
|
3164
|
-
this.copyUniforms =
|
|
3150
|
+
const l = [1, 0.8, 0.6, 0.4, 0.2];
|
|
3151
|
+
this.compositeMaterial.uniforms.bloomFactors.value = l, this.bloomTintColors = [new O(1, 1, 1), new O(1, 1, 1), new O(1, 1, 1), new O(1, 1, 1), new O(1, 1, 1)], this.compositeMaterial.uniforms.bloomTintColors.value = this.bloomTintColors;
|
|
3152
|
+
const d = qe;
|
|
3153
|
+
this.copyUniforms = D.clone(d.uniforms), this.blendMaterial = new M({
|
|
3165
3154
|
uniforms: this.copyUniforms,
|
|
3166
|
-
vertexShader:
|
|
3167
|
-
fragmentShader:
|
|
3155
|
+
vertexShader: d.vertexShader,
|
|
3156
|
+
fragmentShader: d.fragmentShader,
|
|
3168
3157
|
blending: Mt,
|
|
3169
3158
|
depthTest: !1,
|
|
3170
3159
|
depthWrite: !1,
|
|
3171
3160
|
transparent: !0
|
|
3172
|
-
}), this.enabled = !0, this.needsSwap = !1, this._oldClearColor = new
|
|
3161
|
+
}), this.enabled = !0, this.needsSwap = !1, this._oldClearColor = new q(), this.oldClearAlpha = 1, this.basic = new Ve(), this.fsQuad = new R(null);
|
|
3173
3162
|
}
|
|
3174
3163
|
dispose() {
|
|
3175
3164
|
for (let t = 0; t < this.renderTargetsHorizontal.length; t++)
|
|
@@ -3191,16 +3180,16 @@ class z extends D {
|
|
|
3191
3180
|
t.getClearColor(this._oldClearColor), this.oldClearAlpha = t.getClearAlpha();
|
|
3192
3181
|
const r = t.autoClear;
|
|
3193
3182
|
t.autoClear = !1, t.setClearColor(this.clearColor, 0), a && t.state.buffers.stencil.setTest(!1), this.renderToScreen && (this.fsQuad.material = this.basic, this.basic.map = o.texture, t.setRenderTarget(null), t.clear(), this.fsQuad.render(t)), this.highPassUniforms.tDiffuse.value = o.texture, this.highPassUniforms.luminosityThreshold.value = this.threshold, this.fsQuad.material = this.materialHighPassFilter, t.setRenderTarget(this.renderTargetBright), t.clear(), this.fsQuad.render(t);
|
|
3194
|
-
let
|
|
3195
|
-
for (let
|
|
3196
|
-
this.fsQuad.material = this.separableBlurMaterials[
|
|
3183
|
+
let n = this.renderTargetBright;
|
|
3184
|
+
for (let u = 0; u < this.nMips; u++)
|
|
3185
|
+
this.fsQuad.material = this.separableBlurMaterials[u], this.separableBlurMaterials[u].uniforms.colorTexture.value = n.texture, this.separableBlurMaterials[u].uniforms.direction.value = N.BlurDirectionX, t.setRenderTarget(this.renderTargetsHorizontal[u]), t.clear(), this.fsQuad.render(t), this.separableBlurMaterials[u].uniforms.colorTexture.value = this.renderTargetsHorizontal[u].texture, this.separableBlurMaterials[u].uniforms.direction.value = N.BlurDirectionY, t.setRenderTarget(this.renderTargetsVertical[u]), t.clear(), this.fsQuad.render(t), n = this.renderTargetsVertical[u];
|
|
3197
3186
|
this.fsQuad.material = this.compositeMaterial, this.compositeMaterial.uniforms.bloomStrength.value = this.strength, this.compositeMaterial.uniforms.bloomRadius.value = this.radius, this.compositeMaterial.uniforms.bloomTintColors.value = this.bloomTintColors, t.setRenderTarget(this.renderTargetsHorizontal[0]), t.clear(), this.fsQuad.render(t), this.fsQuad.material = this.blendMaterial, this.copyUniforms.tDiffuse.value = this.renderTargetsHorizontal[0].texture, a && t.state.buffers.stencil.setTest(!0), this.renderToScreen ? (t.setRenderTarget(null), this.fsQuad.render(t)) : (t.setRenderTarget(o), this.fsQuad.render(t)), t.setClearColor(this._oldClearColor, this.oldClearAlpha), t.autoClear = r;
|
|
3198
3187
|
}
|
|
3199
3188
|
getSeparableBlurMaterial(t) {
|
|
3200
3189
|
const e = [];
|
|
3201
3190
|
for (let o = 0; o < t; o++)
|
|
3202
3191
|
e.push(0.39894 * Math.exp(-0.5 * o * o / (t * t)) / t);
|
|
3203
|
-
return new
|
|
3192
|
+
return new M({
|
|
3204
3193
|
defines: {
|
|
3205
3194
|
KERNEL_RADIUS: t
|
|
3206
3195
|
},
|
|
@@ -3241,7 +3230,7 @@ class z extends D {
|
|
|
3241
3230
|
});
|
|
3242
3231
|
}
|
|
3243
3232
|
getCompositeMaterial(t) {
|
|
3244
|
-
return new
|
|
3233
|
+
return new M({
|
|
3245
3234
|
defines: {
|
|
3246
3235
|
NUM_MIPS: t
|
|
3247
3236
|
},
|
|
@@ -3287,29 +3276,29 @@ class z extends D {
|
|
|
3287
3276
|
});
|
|
3288
3277
|
}
|
|
3289
3278
|
}
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
const Do = /* @__PURE__ */
|
|
3279
|
+
N.BlurDirectionX = new f(1, 0);
|
|
3280
|
+
N.BlurDirectionY = new f(0, 1);
|
|
3281
|
+
const Do = /* @__PURE__ */ c({
|
|
3293
3282
|
__name: "UnrealBloom",
|
|
3294
3283
|
props: {
|
|
3295
3284
|
radius: { default: 0 },
|
|
3296
3285
|
strength: { default: 1 },
|
|
3297
3286
|
threshold: { default: 0 }
|
|
3298
3287
|
},
|
|
3299
|
-
setup(
|
|
3300
|
-
const e =
|
|
3288
|
+
setup(i, { expose: t }) {
|
|
3289
|
+
const e = i, { sizes: o } = G(), { pass: s } = W(() => new N(
|
|
3301
3290
|
new f(o.width.value, o.height.value),
|
|
3302
3291
|
e.radius,
|
|
3303
3292
|
e.strength,
|
|
3304
3293
|
e.threshold
|
|
3305
3294
|
), e);
|
|
3306
|
-
return t({ pass: s }),
|
|
3295
|
+
return t({ pass: s }), S(() => {
|
|
3307
3296
|
var a;
|
|
3308
3297
|
s.value.radius = e.radius ?? ((a = s.value.getCompositeMaterial().uniforms.bloomRadius) == null ? void 0 : a.value) ?? 0.1;
|
|
3309
|
-
}),
|
|
3298
|
+
}), S(() => {
|
|
3310
3299
|
var a;
|
|
3311
3300
|
s.value.strength = e.strength ?? ((a = s.value.getCompositeMaterial().uniforms.bloomStrength) == null ? void 0 : a.value) ?? 1;
|
|
3312
|
-
}),
|
|
3301
|
+
}), S(() => {
|
|
3313
3302
|
var a;
|
|
3314
3303
|
s.value.threshold = e.threshold ?? ((a = Ke.uniforms.luminosityThreshold) == null ? void 0 : a.value) ?? 1;
|
|
3315
3304
|
}), () => {
|
|
@@ -3329,7 +3318,7 @@ export {
|
|
|
3329
3318
|
uo as DotScreenPmndrs,
|
|
3330
3319
|
yo as EffectComposer,
|
|
3331
3320
|
Yt as EffectComposerPmndrs,
|
|
3332
|
-
|
|
3321
|
+
wo as FXAAPmndrs,
|
|
3333
3322
|
go as FishEyePmndrs,
|
|
3334
3323
|
Mo as Glitch,
|
|
3335
3324
|
Qt as GlitchPmndrs,
|
|
@@ -3338,7 +3327,7 @@ export {
|
|
|
3338
3327
|
To as Halftone,
|
|
3339
3328
|
oo as HueSaturationPmndrs,
|
|
3340
3329
|
ao as KuwaharaPmndrs,
|
|
3341
|
-
|
|
3330
|
+
io as LensDistortionPmndrs,
|
|
3342
3331
|
fo as LinocutPmndrs,
|
|
3343
3332
|
Kt as NoisePmndrs,
|
|
3344
3333
|
Jt as OutlinePmndrs,
|
|
@@ -3349,12 +3338,12 @@ export {
|
|
|
3349
3338
|
bo as SMAAPmndrs,
|
|
3350
3339
|
so as ScanlinePmndrs,
|
|
3351
3340
|
co as SepiaPmndrs,
|
|
3352
|
-
|
|
3353
|
-
|
|
3341
|
+
no as ShockWavePmndrs,
|
|
3342
|
+
So as TexturePmndrs,
|
|
3354
3343
|
lo as TiltShiftPmndrs,
|
|
3355
3344
|
eo as ToneMappingPmndrs,
|
|
3356
3345
|
Do as UnrealBloom,
|
|
3357
3346
|
_t as VignettePmndrs,
|
|
3358
|
-
|
|
3347
|
+
W as useEffect,
|
|
3359
3348
|
h as useEffectPmndrs
|
|
3360
3349
|
};
|