@tresjs/cientos 5.0.0-next.6 → 5.0.0-next.7
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/core/loaders/useFBX/component.vue.d.ts +1 -7221
- package/dist/core/loaders/useFBX/index.d.ts +32 -0
- package/dist/core/loaders/useGLTF/component.vue.d.ts +1 -1
- package/dist/core/loaders/useGLTF/index.d.ts +43 -0
- package/dist/core/loaders/useSVG/component.vue.d.ts +1 -1
- package/dist/core/loaders/useSVG/index.d.ts +65 -0
- package/dist/trescientos.js +386 -377
- package/package.json +1 -1
package/dist/trescientos.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @tresjs/cientos
|
|
3
|
-
* version: v5.0.0-next.
|
|
3
|
+
* version: v5.0.0-next.7
|
|
4
4
|
* (c) 2025
|
|
5
5
|
* description: Collection of useful helpers and fully functional, ready-made abstractions for Tres
|
|
6
6
|
* author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)
|
|
7
7
|
*/
|
|
8
8
|
import * as Ei from "three";
|
|
9
9
|
import { TextureLoader as Jr, DoubleSide as ji, WebGLCubeRenderTarget as Py, HalfFloatType as ii, CubeCamera as Iy, Group as li, Quaternion as mt, Euler as Cs, AudioListener as Fy, Audio as T_, AudioLoader as By, MathUtils as gt, ShaderMaterial as Xs, UniformsUtils as qr, Vector2 as Pe, Color as Ie, Texture as Rn, FrontSide as ua, Mesh as Se, MeshBasicMaterial as Ri, Vector3 as O, FramebufferTexture as gm, RawShaderMaterial as Ku, AdditiveBlending as Vp, Box2 as Dy, Vector4 as ns, UnsignedByteType as qd, BufferGeometry as hs, InterleavedBuffer as Hp, InterleavedBufferAttribute as fn, REVISION as $p, BufferAttribute as Xt, TrianglesDrawMode as b_, TriangleFanDrawMode as Xd, TriangleStripDrawMode as Ly, CompressedTexture as Qu, RGBAFormat as Oy, PropertyBinding as Cn, InterpolateDiscrete as Uy, Matrix4 as Ze, Scene as hl, PlaneGeometry as ki, Uniform as Ve, PerspectiveCamera as ci, WebGLRenderer as dl, InterpolateLinear as Wp, NearestFilter as su, NearestMipmapNearestFilter as zy, NearestMipmapLinearFilter as ky, LinearFilter as Ws, LinearMipmapNearestFilter as Gy, LinearMipmapLinearFilter as jp, ClampToEdgeWrapping as Qo, RepeatWrapping as Xr, MirroredRepeatWrapping as Vy, Plane as Ml, WebGLRenderTarget as ni, NoToneMapping as S_, UniformsLib as iu, DynamicDrawUsage as Gl, Sphere as ha, BackSide as Eu, BoxGeometry as zi, Triangle as w_, Object3D as qs, Raycaster as qp, LineBasicMaterial as pl, CylinderGeometry as fi, Float32BufferAttribute as Es, Line as at, OctahedronGeometry as vr, SphereGeometry as M_, TorusGeometry as Vl, MOUSE as bi, TOUCH as Gi, Spherical as nu, OrthographicCamera as or, Ray as A_, Loader as Al, LoaderUtils as Go, FileLoader as Yr, MeshPhysicalMaterial as Zi, SpotLight as Hy, PointLight as Yd, DirectionalLight as Xp, InstancedMesh as $y, InstancedBufferAttribute as E_, ImageBitmapLoader as R_, PointsMaterial as Wy, Material as Ju, MeshStandardMaterial as El, SkinnedMesh as Yp, LineSegments as C_, LineLoop as N_, Points as jy, Skeleton as qy, AnimationClip as Xy, Bone as Zd, VectorKeyframeTrack as Kd, NumberKeyframeTrack as Qd, QuaternionKeyframeTrack as Jd, Interpolant as P_, Box3 as Rs, ExtrudeGeometry as I_, Curve as F_, MeshPhongMaterial as eh, MeshLambertMaterial as Yy, EquirectangularReflectionMapping as Hc, AmbientLight as B_, Uint16BufferAttribute as D_, Matrix3 as Ir, ShapePath as Zn, DataTextureLoader as L_, FloatType as $c, DataUtils as Hl, ShapeUtils as O_, Shape as U_, Path as th, InstancedBufferGeometry as z_, InstancedInterleavedBuffer as ep, WireframeGeometry as k_, Line3 as G_, AlwaysStencilFunc as V_, ReplaceStencilOp as sh, AnimationMixer as H_, KeepStencilOp as ih, NotEqualStencilFunc as ym, EqualStencilFunc as xm, DepthTexture as Zy, EdgesGeometry as $_, CubeTextureLoader as W_, CubeReflectionMapping as j_, ShapeGeometry as q_, DefaultLoadingManager as $l, VideoTexture as X_, Clock as Y_, NoBlending as Z_, Camera as K_, TangentSpaceNormalMap as Q_, LOD as J_, CatmullRomCurve3 as eT, QuadraticBezierCurve3 as Ky, CubicBezierCurve3 as tT, MeshDepthMaterial as vm, ShaderChunk as nh, DataTexture as Qy, UVMapping as sT, IcosahedronGeometry as iT } from "three";
|
|
10
|
-
import { defineComponent as me, watch as
|
|
10
|
+
import { defineComponent as me, watch as Z, ref as Fe, shallowRef as ne, withAsyncContext as Zp, onUnmounted as Bt, createElementBlock as pe, openBlock as ue, renderSlot as Xe, createElementVNode as we, unref as F, getCurrentScope as nT, onScopeDispose as rT, onMounted as Ki, nextTick as Kp, getCurrentInstance as Qp, isRef as ru, hasInjectionContext as Jy, inject as Jp, toValue as Be, computed as Re, reactive as Jo, watchEffect as Et, isReactive as fl, createVNode as mn, mergeProps as ht, provide as oT, toRefs as rt, shallowReactive as e1, onBeforeUnmount as Ru, useSlots as ef, createCommentVNode as ds, createBlock as gn, Fragment as t1, renderList as s1, useAttrs as aT, render as lT, triggerRef as cT, withCtx as Wl, Suspense as uT, normalizeProps as hT, toRaw as _m } from "vue";
|
|
11
11
|
import { logError as qi, useTres as Le, useLoop as ot, normalizeVectorFlexibleParam as Vo, useTresContext as Zs, extend as Rl, useLoader as da, normalizeColor as hn, logWarning as Lr, buildGraph as ou } from "@tresjs/core";
|
|
12
12
|
function dT(l) {
|
|
13
13
|
const e = pT(l), t = [];
|
|
@@ -270,39 +270,39 @@ const RT = ["scale", "position"], CT = ["map", "alphaTest"], NT = ["scale", "pos
|
|
|
270
270
|
async setup(l, { expose: e, emit: t }) {
|
|
271
271
|
let s, i;
|
|
272
272
|
const n = l, r = t, { invalidate: o } = Le();
|
|
273
|
-
|
|
273
|
+
Z(n, () => {
|
|
274
274
|
o();
|
|
275
275
|
});
|
|
276
276
|
const a = Fe(0), c = Fe(0), u = Fe(0), h = Fe(0), d = ne();
|
|
277
277
|
e({ instance: d });
|
|
278
|
-
const [p, f] = ([s, i] = Zp(() => _T(n.image, n.atlas)), s = await s, i(), s);
|
|
279
|
-
|
|
280
|
-
let
|
|
281
|
-
ot().onBeforeRender(({ delta:
|
|
282
|
-
for (!n.paused && !
|
|
283
|
-
|
|
284
|
-
|
|
278
|
+
const [p, f] = ([s, i] = Zp(() => _T(n.image, n.atlas)), s = await s, i(), s), m = Array.isArray(p) ? p[0] : p;
|
|
279
|
+
m.matrixAutoUpdate = !1;
|
|
280
|
+
let y = qa(f, n.animation, n.reversed), g = 0.5, v = 0.5, x = 1, _ = tf(), T = null, S = 0, b = !1, w = !0;
|
|
281
|
+
ot().onBeforeRender(({ delta: A }) => {
|
|
282
|
+
for (!n.paused && !b && (x -= A * n.fps); x <= 0; )
|
|
283
|
+
x++, S++, n.loop ? (S >= y.length && r("loop", y[y.length - 1].name), S %= y.length) : S >= y.length && (b = !0, S = n.resetOnEnd ? 0 : y.length - 1, r("end", y[y.length - 1].name));
|
|
284
|
+
y[S] !== _ && (_ = y[S], T = _.name, M()), w && (w = !1, m.offset.x = _.offsetX + (n.flipX ? _.repeatX : 0), m.offset.y = _.offsetY, m.repeat.x = _.repeatX * (n.flipX ? -1 : 1), m.repeat.y = _.repeatY, m.updateMatrix(), u.value = _.width * jl, h.value = _.height * jl, a.value = (0.5 - g) * _.width * jl, c.value = (0.5 - v) * _.height * jl), T && (r("frame", T), T = null);
|
|
285
285
|
});
|
|
286
|
-
function
|
|
287
|
-
|
|
288
|
-
}
|
|
289
|
-
return
|
|
290
|
-
JSON.stringify(
|
|
291
|
-
}, { immediate: !0 }),
|
|
292
|
-
|
|
293
|
-
}),
|
|
294
|
-
|
|
295
|
-
}),
|
|
296
|
-
|
|
297
|
-
}),
|
|
298
|
-
|
|
299
|
-
}),
|
|
300
|
-
[
|
|
301
|
-
}, { immediate: !0 }),
|
|
302
|
-
AT(f, n.definitions),
|
|
286
|
+
function M() {
|
|
287
|
+
w = !0;
|
|
288
|
+
}
|
|
289
|
+
return Z(() => n.animation, (A, E) => {
|
|
290
|
+
JSON.stringify(A) !== JSON.stringify(E) && (y = qa(f, n.animation, n.reversed), S = 0, x = 1, b = !1, M());
|
|
291
|
+
}, { immediate: !0 }), Z(() => n.reversed, () => {
|
|
292
|
+
S = (y.length - S - 1) % y.length, y = qa(f, n.animation, n.reversed), b && (S = n.resetOnEnd ? 0 : y.length - 1), M();
|
|
293
|
+
}), Z(() => n.paused, () => {
|
|
294
|
+
b = !1;
|
|
295
|
+
}), Z(() => n.loop, () => {
|
|
296
|
+
b && n.loop && (b = !1);
|
|
297
|
+
}), Z(() => n.resetOnEnd, () => {
|
|
298
|
+
b && (S = n.resetOnEnd ? 0 : y.length - 1, M());
|
|
299
|
+
}), Z(() => n.flipX, M), Z(() => [n.center], () => {
|
|
300
|
+
[g, v] = Vo(n.center), M();
|
|
301
|
+
}, { immediate: !0 }), Z(() => [n.definitions], () => {
|
|
302
|
+
AT(f, n.definitions), y = qa(f, n.animation, n.reversed), x = 1, S = 0, M();
|
|
303
303
|
}, { immediate: !0 }), Bt(() => {
|
|
304
|
-
|
|
305
|
-
}), (
|
|
304
|
+
m.dispose();
|
|
305
|
+
}), (A, E) => (ue(), pe("TresGroup", {
|
|
306
306
|
ref_key: "groupRef",
|
|
307
307
|
ref: d
|
|
308
308
|
}, [
|
|
@@ -313,7 +313,7 @@ const RT = ["scale", "position"], CT = ["map", "alphaTest"], NT = ["scale", "pos
|
|
|
313
313
|
}, [
|
|
314
314
|
we("TresSpriteMaterial", {
|
|
315
315
|
toneMapped: !1,
|
|
316
|
-
map: F(
|
|
316
|
+
map: F(m),
|
|
317
317
|
transparent: !0,
|
|
318
318
|
alphaTest: n.alphaTest
|
|
319
319
|
}, null, 8, CT)
|
|
@@ -322,18 +322,18 @@ const RT = ["scale", "position"], CT = ["map", "alphaTest"], NT = ["scale", "pos
|
|
|
322
322
|
scale: [u.value, h.value, 1],
|
|
323
323
|
position: [a.value, c.value, 0]
|
|
324
324
|
}, [
|
|
325
|
-
|
|
325
|
+
E[0] || (E[0] = we("TresPlaneGeometry", { args: [1, 1] }, null, -1)),
|
|
326
326
|
we("TresMeshBasicMaterial", {
|
|
327
327
|
toneMapped: !1,
|
|
328
328
|
side: F(ji),
|
|
329
|
-
map: F(
|
|
329
|
+
map: F(m),
|
|
330
330
|
transparent: !0,
|
|
331
331
|
alphaTest: n.alphaTest,
|
|
332
332
|
depthWrite: n.depthWrite,
|
|
333
333
|
depthTest: n.depthTest
|
|
334
334
|
}, null, 8, PT)
|
|
335
335
|
], 8, NT)),
|
|
336
|
-
Xe(
|
|
336
|
+
Xe(A.$slots, "default")
|
|
337
337
|
], 512));
|
|
338
338
|
}
|
|
339
339
|
});
|
|
@@ -417,7 +417,7 @@ function GT(l, e, t = {}) {
|
|
|
417
417
|
eventFilter: s = OT,
|
|
418
418
|
...i
|
|
419
419
|
} = t;
|
|
420
|
-
return
|
|
420
|
+
return Z(
|
|
421
421
|
l,
|
|
422
422
|
sf(
|
|
423
423
|
s,
|
|
@@ -430,7 +430,7 @@ function rf(l, e = !0, t) {
|
|
|
430
430
|
zT() ? Ki(l, t) : e ? l() : Kp(l);
|
|
431
431
|
}
|
|
432
432
|
function VT(l, e, t) {
|
|
433
|
-
return
|
|
433
|
+
return Z(
|
|
434
434
|
l,
|
|
435
435
|
e,
|
|
436
436
|
{
|
|
@@ -456,7 +456,7 @@ function HT(l, e, t = {}) {
|
|
|
456
456
|
);
|
|
457
457
|
}
|
|
458
458
|
function Sm(l, e, t) {
|
|
459
|
-
return
|
|
459
|
+
return Z(
|
|
460
460
|
l,
|
|
461
461
|
(i, n, r) => {
|
|
462
462
|
i && e(i, n, r);
|
|
@@ -526,7 +526,7 @@ function WT(l, e, t = {}) {
|
|
|
526
526
|
}, a = Re(() => {
|
|
527
527
|
const d = Be(l), p = Ja(d).map(yn).filter(BT);
|
|
528
528
|
return new Set(p);
|
|
529
|
-
}), c =
|
|
529
|
+
}), c = Z(
|
|
530
530
|
() => a.value,
|
|
531
531
|
(d) => {
|
|
532
532
|
o(), r.value && d.size && (n = new MutationObserver(e), d.forEach((p) => n.observe(p, i)));
|
|
@@ -550,7 +550,7 @@ function XT(l, e = {}) {
|
|
|
550
550
|
const { window: t = Qi, ssrWidth: s = qT() } = e, i = of(() => t && "matchMedia" in t && typeof t.matchMedia == "function"), n = ne(typeof s == "number"), r = ne(), o = ne(!1), a = (c) => {
|
|
551
551
|
o.value = c.matches;
|
|
552
552
|
};
|
|
553
|
-
return
|
|
553
|
+
return Et(() => {
|
|
554
554
|
if (n.value) {
|
|
555
555
|
n.value = !i.value;
|
|
556
556
|
const c = Be(l).split(",");
|
|
@@ -572,7 +572,7 @@ function YT(l, e, t = {}) {
|
|
|
572
572
|
}, a = Re(() => {
|
|
573
573
|
const h = Be(l);
|
|
574
574
|
return Array.isArray(h) ? h.map((d) => yn(d)) : [yn(h)];
|
|
575
|
-
}), c =
|
|
575
|
+
}), c = Z(
|
|
576
576
|
a,
|
|
577
577
|
(h) => {
|
|
578
578
|
if (o(), r.value && s) {
|
|
@@ -616,7 +616,7 @@ function ZT(l, e = { width: 0, height: 0 }, t = {}) {
|
|
|
616
616
|
const h = yn(l);
|
|
617
617
|
h && (r.value = "offsetWidth" in h ? h.offsetWidth : e.width, o.value = "offsetHeight" in h ? h.offsetHeight : e.height);
|
|
618
618
|
});
|
|
619
|
-
const c =
|
|
619
|
+
const c = Z(
|
|
620
620
|
() => yn(l),
|
|
621
621
|
(h) => {
|
|
622
622
|
r.value = h ? e.width : 0, o.value = h ? e.height : 0;
|
|
@@ -893,13 +893,13 @@ function o1(l = {}) {
|
|
|
893
893
|
const u = { passive: !0 };
|
|
894
894
|
if (bt("resize", c, u), e && r === "visual" && e.visualViewport && bt(e.visualViewport, "resize", c, u), i) {
|
|
895
895
|
const h = XT("(orientation: portrait)");
|
|
896
|
-
|
|
896
|
+
Z(h, () => c());
|
|
897
897
|
}
|
|
898
898
|
return { width: o, height: a };
|
|
899
899
|
}
|
|
900
900
|
function sb(l) {
|
|
901
901
|
let { resolution: e, renderer: t, scene: s, envMap: i, fog: n, near: r, far: o } = l;
|
|
902
|
-
t = t ?? Le().renderer, s = s ?? Le().scene,
|
|
902
|
+
t = t ?? Le().renderer, s = s ?? Le().scene, Et(() => {
|
|
903
903
|
e = Be(l.resolution) ?? 255, r = Be(l.near) ?? 0.1, o = Be(l.far) ?? 1e3, i = Be(l.envMap) ?? void 0, n = Be(l.fog) ?? void 0, t = Be(l.renderer) ?? t, s = Be(l.scene) ?? s;
|
|
904
904
|
});
|
|
905
905
|
const c = Re(() => new Py(Be(e)));
|
|
@@ -910,7 +910,7 @@ function sb(l) {
|
|
|
910
910
|
const d = Be(s), p = d.fog, f = d.background;
|
|
911
911
|
d.background = Be(i) || f, d.fog = Be(n) || p, u.value.update(Be(t), d), d.fog = p, d.background = f;
|
|
912
912
|
};
|
|
913
|
-
return
|
|
913
|
+
return Et(h), {
|
|
914
914
|
fbo: c,
|
|
915
915
|
camera: u,
|
|
916
916
|
update: h
|
|
@@ -993,7 +993,7 @@ const ib = ["object"], P3 = /* @__PURE__ */ me({
|
|
|
993
993
|
const r = new T_(n), o = new By();
|
|
994
994
|
e({ instance: r }), Bt(() => {
|
|
995
995
|
r && r.disconnect();
|
|
996
|
-
}),
|
|
996
|
+
}), Z(() => [l.playbackRate], () => r.setPlaybackRate(l.playbackRate ?? 1), { immediate: !0 }), Z(() => [l.volume], () => r.setVolume(l.volume ?? 0.5), { immediate: !0 }), Z(() => [l.loop], () => r.setLoop(l.loop ?? !1), { immediate: !0 }), Z(() => [l.src], async () => {
|
|
997
997
|
const h = await o.loadAsync(l.src);
|
|
998
998
|
r.setBuffer(h);
|
|
999
999
|
}, { immediate: !0 });
|
|
@@ -1044,9 +1044,9 @@ const ib = ["object"], P3 = /* @__PURE__ */ me({
|
|
|
1044
1044
|
a.save(), a.fillStyle = c, a.fillRect(0, 0, t.width, t.height), a.restore(), s.value && (s.value.needsUpdate = !0);
|
|
1045
1045
|
}
|
|
1046
1046
|
const r = Le().renderer;
|
|
1047
|
-
return
|
|
1047
|
+
return Z(() => [t.colors, t.stops, t.height, t.width, t.type, t.innerCircleRadius, t.outerCircleRadius], () => {
|
|
1048
1048
|
n(i);
|
|
1049
|
-
}, { immediate: !0 }), fl(t.colors) &&
|
|
1049
|
+
}, { immediate: !0 }), fl(t.colors) && Z(t.colors, () => n(i)), fl(t.stops) && Z(t.stops, () => n(i)), e({ instance: s }), (o, a) => (ue(), pe("TresCanvasTexture", {
|
|
1050
1050
|
ref_key: "textureRef",
|
|
1051
1051
|
ref: s,
|
|
1052
1052
|
"color-space": F(r).outputColorSpace,
|
|
@@ -1185,7 +1185,7 @@ const ab = ["scale"], lb = ["args"], D3 = /* @__PURE__ */ me({
|
|
|
1185
1185
|
},
|
|
1186
1186
|
setup(l, { expose: e }) {
|
|
1187
1187
|
const t = l, s = ne(), i = ne(t.texture ?? null), n = Le().sizes, r = Re(() => Array.isArray(t.scale) ? [t.scale[0], t.scale[1]] : [t.scale, t.scale]), o = Re(() => [i.value?.image?.width ?? 0, i.value?.image?.height ?? 0]), a = Re(() => Math.max(n.width.value, n.height.value));
|
|
1188
|
-
|
|
1188
|
+
Et(() => {
|
|
1189
1189
|
if (t.texture)
|
|
1190
1190
|
i.value = t.texture;
|
|
1191
1191
|
else {
|
|
@@ -1731,18 +1731,18 @@ const L3 = /* @__PURE__ */ me({
|
|
|
1731
1731
|
c();
|
|
1732
1732
|
}), Ki(() => {
|
|
1733
1733
|
s.value?.add(o), i.value = Cm(t.elements, n.value, t.seed, t.seedProps);
|
|
1734
|
-
}),
|
|
1734
|
+
}), Z(() => [t.color, t.distance, t.size, t.texture], () => {
|
|
1735
1735
|
n.value = {
|
|
1736
1736
|
color: t.color,
|
|
1737
1737
|
distance: t.distance,
|
|
1738
1738
|
size: t.size,
|
|
1739
1739
|
texture: t.texture
|
|
1740
1740
|
};
|
|
1741
|
-
}),
|
|
1741
|
+
}), Z(() => [n.value, t.elements, t.seed, t.seedProps], () => {
|
|
1742
1742
|
i.value = Cm(t.elements, n.value, t.seed, t.seedProps);
|
|
1743
|
-
}),
|
|
1743
|
+
}), Z(() => t.scale, () => {
|
|
1744
1744
|
h();
|
|
1745
|
-
}),
|
|
1745
|
+
}), Z(() => i.value, () => {
|
|
1746
1746
|
d();
|
|
1747
1747
|
}), (p, f) => (ue(), pe("TresGroup", {
|
|
1748
1748
|
ref_key: "lensflareRef",
|
|
@@ -3148,9 +3148,9 @@ var si = Uint8Array, nr = Uint16Array, sp = Uint32Array, f1 = new si([
|
|
|
3148
3148
|
}, y1 = g1(f1, 2), x1 = y1[0], Qb = y1[1];
|
|
3149
3149
|
x1[28] = 258, Qb[258] = 28;
|
|
3150
3150
|
var Jb = g1(m1, 0), eS = Jb[0], ip = new nr(32768);
|
|
3151
|
-
for (var
|
|
3152
|
-
var zn = (
|
|
3153
|
-
zn = (zn & 52428) >>> 2 | (zn & 13107) << 2, zn = (zn & 61680) >>> 4 | (zn & 3855) << 4, ip[
|
|
3151
|
+
for (var Nt = 0; Nt < 32768; ++Nt) {
|
|
3152
|
+
var zn = (Nt & 43690) >>> 1 | (Nt & 21845) << 1;
|
|
3153
|
+
zn = (zn & 52428) >>> 2 | (zn & 13107) << 2, zn = (zn & 61680) >>> 4 | (zn & 3855) << 4, ip[Nt] = ((zn & 65280) >>> 8 | (zn & 255) << 8) >>> 1;
|
|
3154
3154
|
}
|
|
3155
3155
|
var el = function(l, e, t) {
|
|
3156
3156
|
for (var s = l.length, i = 0, n = new nr(e); i < s; ++i)
|
|
@@ -3171,17 +3171,17 @@ var el = function(l, e, t) {
|
|
|
3171
3171
|
l[i] && (o[i] = ip[r[l[i] - 1]++] >>> 15 - l[i]);
|
|
3172
3172
|
return o;
|
|
3173
3173
|
}, Cl = new si(288);
|
|
3174
|
-
for (var
|
|
3175
|
-
Cl[
|
|
3176
|
-
for (var
|
|
3177
|
-
Cl[
|
|
3178
|
-
for (var
|
|
3179
|
-
Cl[
|
|
3180
|
-
for (var
|
|
3181
|
-
Cl[
|
|
3174
|
+
for (var Nt = 0; Nt < 144; ++Nt)
|
|
3175
|
+
Cl[Nt] = 8;
|
|
3176
|
+
for (var Nt = 144; Nt < 256; ++Nt)
|
|
3177
|
+
Cl[Nt] = 9;
|
|
3178
|
+
for (var Nt = 256; Nt < 280; ++Nt)
|
|
3179
|
+
Cl[Nt] = 7;
|
|
3180
|
+
for (var Nt = 280; Nt < 288; ++Nt)
|
|
3181
|
+
Cl[Nt] = 8;
|
|
3182
3182
|
var v1 = new si(32);
|
|
3183
|
-
for (var
|
|
3184
|
-
v1[
|
|
3183
|
+
for (var Nt = 0; Nt < 32; ++Nt)
|
|
3184
|
+
v1[Nt] = 5;
|
|
3185
3185
|
var tS = /* @__PURE__ */ el(Cl, 9, 1), sS = /* @__PURE__ */ el(v1, 5, 1), uh = function(l) {
|
|
3186
3186
|
for (var e = l[0], t = 1; t < l.length; ++t)
|
|
3187
3187
|
l[t] > e && (e = l[t]);
|
|
@@ -14921,7 +14921,7 @@ const sM = ["object"], Z3 = /* @__PURE__ */ me({
|
|
|
14921
14921
|
const n = Array.isArray(s.value?.material) ? s.value.material[0] : s.value?.material;
|
|
14922
14922
|
n && (n.colorWrite = t.colorWrite, n.depthWrite = t.depthWrite, n.stencilWrite = !0, n.stencilRef = t.id, n.stencilFunc = V_, n.stencilFail = sh, n.stencilZFail = sh, n.stencilZPass = sh);
|
|
14923
14923
|
}
|
|
14924
|
-
return
|
|
14924
|
+
return Et(i), e({ instance: s }), (n, r) => (ue(), pe("TresMesh", {
|
|
14925
14925
|
ref_key: "meshRef",
|
|
14926
14926
|
ref: s,
|
|
14927
14927
|
"render-order": -t.id
|
|
@@ -14941,7 +14941,7 @@ const sM = ["object"], Z3 = /* @__PURE__ */ me({
|
|
|
14941
14941
|
const e = l, { camera: t, renderer: s } = Le(), { disabled: i, factor: n, ease: r, local: o } = rt(e), a = {};
|
|
14942
14942
|
o.value && (a.target = s.domElement, a.type = "client");
|
|
14943
14943
|
const { x: c, y: u } = eb(a), { width: h, height: d } = o.value ? ZT(s.domElement) : o1(), p = ne(), f = Fe(), m = Fe();
|
|
14944
|
-
|
|
14944
|
+
Z(
|
|
14945
14945
|
[n, r],
|
|
14946
14946
|
() => {
|
|
14947
14947
|
f.value = Array.isArray(n.value) ? n.value : [n.value, n.value], m.value = Array.isArray(r.value) ? r.value : [r.value, r.value];
|
|
@@ -14954,7 +14954,7 @@ const sM = ["object"], Z3 = /* @__PURE__ */ me({
|
|
|
14954
14954
|
/* invalidate */
|
|
14955
14955
|
}) => {
|
|
14956
14956
|
i.value || !p.value || Number.isNaN(y.value) || Number.isNaN(g.value) || (p.value.position.x += (y.value - p.value.position.x) * m.value[0] * x, p.value.position.y += (g.value - p.value.position.y) * m.value[1] * x);
|
|
14957
|
-
}),
|
|
14957
|
+
}), Z(
|
|
14958
14958
|
() => p.value,
|
|
14959
14959
|
(x) => x?.add(t.value)
|
|
14960
14960
|
), (x, _) => (ue(), pe("TresGroup", {
|
|
@@ -15043,11 +15043,11 @@ const sM = ["object"], Z3 = /* @__PURE__ */ me({
|
|
|
15043
15043
|
i.side = Eu, i.transparent = t.transparent, i.thickness = t.thickness, i.color = hn(t.color), i.opacity = t.opacity, i.size = n, i.screenspace = t.screenspace, i.toneMapped = t.toneMapped, i.polygonOffset = t.polygonOffset, i.polygonOffsetFactor = t.polygonOffsetFactor;
|
|
15044
15044
|
}
|
|
15045
15045
|
const u = Le().sizes;
|
|
15046
|
-
return
|
|
15046
|
+
return Z(() => [u.width.value, u.height.value], ([h, d]) => {
|
|
15047
15047
|
n.set(h, d);
|
|
15048
|
-
}),
|
|
15048
|
+
}), Z(() => [t.angle], () => {
|
|
15049
15049
|
s.value && a(s.value);
|
|
15050
|
-
}),
|
|
15050
|
+
}), Z(
|
|
15051
15051
|
() => [t.transparent, t.thickness, t.color, t.opacity, n, t.screenspace, t.toneMapped, t.polygonOffset, t.polygonOffsetFactor],
|
|
15052
15052
|
() => c(),
|
|
15053
15053
|
{ immediate: !0 }
|
|
@@ -15089,9 +15089,12 @@ const sM = ["object"], Z3 = /* @__PURE__ */ me({
|
|
|
15089
15089
|
}, b = () => {
|
|
15090
15090
|
!y?.value || !g?.value || (g?.value?.dispose(), y?.value?.remove(g?.value));
|
|
15091
15091
|
}, w = () => {
|
|
15092
|
-
if (y.value
|
|
15093
|
-
|
|
15094
|
-
|
|
15092
|
+
if (!y.value || !f.value)
|
|
15093
|
+
return;
|
|
15094
|
+
const E = Array.isArray(f.value) ? f.value[0] : f.value;
|
|
15095
|
+
if (y.value.setBuffer(E), y.value.setRefDistance(o.value), y.value.setLoop(c.value), y.value.setDirectionalCone(h.value, d.value, p.value), g?.value?.update(), g?.value) {
|
|
15096
|
+
const P = g.value.material[0];
|
|
15097
|
+
!P.visible && d.value !== h.value && (P.visible = !0);
|
|
15095
15098
|
}
|
|
15096
15099
|
}, M = () => {
|
|
15097
15100
|
w();
|
|
@@ -15106,13 +15109,13 @@ const sM = ["object"], Z3 = /* @__PURE__ */ me({
|
|
|
15106
15109
|
stop: T,
|
|
15107
15110
|
pause: _,
|
|
15108
15111
|
dispose: A
|
|
15109
|
-
}),
|
|
15112
|
+
}), Z(y, () => {
|
|
15110
15113
|
y?.value && (a.value && M(), n.value && u && x());
|
|
15111
|
-
}),
|
|
15114
|
+
}), Z(a, () => {
|
|
15112
15115
|
a.value ? M() : b();
|
|
15113
|
-
}),
|
|
15116
|
+
}), Z(n, () => {
|
|
15114
15117
|
n.value && w(), u.value && n.value && x(), !u.value && n.value && T();
|
|
15115
|
-
}),
|
|
15118
|
+
}), Z([o, c, f, h, d, p, u], () => {
|
|
15116
15119
|
w();
|
|
15117
15120
|
}), Ki(() => {
|
|
15118
15121
|
m.activeCamera.value?.add(v);
|
|
@@ -15138,7 +15141,7 @@ const sM = ["object"], Z3 = /* @__PURE__ */ me({
|
|
|
15138
15141
|
const t = l, { extend: s, invalidate: i } = Le(), n = ne();
|
|
15139
15142
|
s({ Reflector: Um });
|
|
15140
15143
|
const { color: r, textureWidth: o, textureHeight: a, clipBias: c, multisample: u, shader: h } = rt(t);
|
|
15141
|
-
return
|
|
15144
|
+
return Z(t, () => {
|
|
15142
15145
|
i();
|
|
15143
15146
|
}), e({
|
|
15144
15147
|
instance: n
|
|
@@ -15205,7 +15208,7 @@ const sM = ["object"], Z3 = /* @__PURE__ */ me({
|
|
|
15205
15208
|
bevelOffset: m,
|
|
15206
15209
|
bevelSegments: y
|
|
15207
15210
|
} = rt(i), { extend: g, invalidate: v } = Le();
|
|
15208
|
-
|
|
15211
|
+
Z(i, () => {
|
|
15209
15212
|
v();
|
|
15210
15213
|
}), g({ TextGeometry: Zm });
|
|
15211
15214
|
const x = new Hw(), _ = ef(), T = Re(() => o?.value ? o.value : _.default ? _.default()[0].children?.trim() : a.value ? "" : "TresJS"), S = ne();
|
|
@@ -15231,7 +15234,7 @@ const sM = ["object"], Z3 = /* @__PURE__ */ me({
|
|
|
15231
15234
|
bevelOffset: Be(m),
|
|
15232
15235
|
bevelSegments: Be(y)
|
|
15233
15236
|
}));
|
|
15234
|
-
return
|
|
15237
|
+
return Et(() => {
|
|
15235
15238
|
S.value && a.value && (S.value.geometry.dispose(), S.value.geometry = new Zm(T.value, w.value), n.value && S.value.geometry.center());
|
|
15236
15239
|
}), (M, A) => F(r) ? (ue(), pe("TresMesh", {
|
|
15237
15240
|
key: 0,
|
|
@@ -15255,7 +15258,7 @@ function rU(l, e) {
|
|
|
15255
15258
|
i[a.name] = c;
|
|
15256
15259
|
}));
|
|
15257
15260
|
};
|
|
15258
|
-
|
|
15261
|
+
Z(l, n, { deep: !0, immediate: !0 }), Z(t, (o) => {
|
|
15259
15262
|
o && (s.uncacheRoot(t.value), t.value = o, n());
|
|
15260
15263
|
});
|
|
15261
15264
|
const { onBeforeRender: r } = ot();
|
|
@@ -15275,13 +15278,13 @@ function oU(l, e = !1) {
|
|
|
15275
15278
|
stencilZFail: ih,
|
|
15276
15279
|
stencilZPass: ih
|
|
15277
15280
|
});
|
|
15278
|
-
return
|
|
15281
|
+
return Et(() => {
|
|
15279
15282
|
t.stencilRef = Be(l), t.stencilFunc = Be(e) ? ym : xm;
|
|
15280
15283
|
}), t;
|
|
15281
15284
|
}
|
|
15282
15285
|
function cM(l) {
|
|
15283
15286
|
const e = Fe(null), { height: t, width: s, settings: i, depth: n, autoRender: r = Fe(!0) } = fl(l) ? rt(l) : rt(Jo(l)), { onBeforeRender: o } = ot(), { camera: a, renderer: c, scene: u, sizes: h, invalidate: d } = Le();
|
|
15284
|
-
return
|
|
15287
|
+
return Z(() => [s?.value, h.width.value, t?.value, h.height.value], () => {
|
|
15285
15288
|
e.value?.dispose(), e.value = new ni(s?.value || h.width.value, t?.value || h.height.value, {
|
|
15286
15289
|
minFilter: Ws,
|
|
15287
15290
|
magFilter: Ws,
|
|
@@ -15347,9 +15350,9 @@ const aU = /* @__PURE__ */ me({
|
|
|
15347
15350
|
},
|
|
15348
15351
|
setup(l, { expose: e }) {
|
|
15349
15352
|
const t = l, s = Fe(), i = Fe(), n = Fe(), { invalidate: r } = Le();
|
|
15350
|
-
return
|
|
15353
|
+
return Z(t, () => {
|
|
15351
15354
|
r();
|
|
15352
|
-
}),
|
|
15355
|
+
}), Et(() => {
|
|
15353
15356
|
i.value = t.instanceMesh ?? s.value?.children.find((o) => Object.prototype.hasOwnProperty.call(o, "instanceMatrix")), n.value = t.mesh ?? s.value?.children.find((o) => o.type === "Mesh"), uM(n.value, t.count, i.value, t.weight, t.transform);
|
|
15354
15357
|
}), e({
|
|
15355
15358
|
samplerRef: s
|
|
@@ -15408,7 +15411,7 @@ const aU = /* @__PURE__ */ me({
|
|
|
15408
15411
|
const t = l, { color: s, threshold: i } = rt(t), n = ne(), r = Fe(null), o = Fe(1);
|
|
15409
15412
|
return e({
|
|
15410
15413
|
instance: n
|
|
15411
|
-
}),
|
|
15414
|
+
}), Z(
|
|
15412
15415
|
() => [n.value, i.value],
|
|
15413
15416
|
() => {
|
|
15414
15417
|
if (n.value) {
|
|
@@ -15463,7 +15466,7 @@ async function vM(l, e) {
|
|
|
15463
15466
|
environmentRotation: d = Fe([0, 0, 0]),
|
|
15464
15467
|
syncMaterials: p = Fe(!1)
|
|
15465
15468
|
} = rt(l);
|
|
15466
|
-
|
|
15469
|
+
Z(l, () => {
|
|
15467
15470
|
s();
|
|
15468
15471
|
});
|
|
15469
15472
|
const f = Fe(null), m = Re(() => Array.isArray(r.value)), y = new W_(), g = new qw(), v = async (x, _) => new Promise((T, S) => {
|
|
@@ -15483,7 +15486,7 @@ async function vM(l, e) {
|
|
|
15483
15486
|
(b) => S(b)
|
|
15484
15487
|
));
|
|
15485
15488
|
});
|
|
15486
|
-
return
|
|
15489
|
+
return Z([r, o], async ([x, _]) => {
|
|
15487
15490
|
if (!(!x || x.length === 0 || i?.value))
|
|
15488
15491
|
try {
|
|
15489
15492
|
const T = await v(
|
|
@@ -15496,44 +15499,44 @@ async function vM(l, e) {
|
|
|
15496
15499
|
}
|
|
15497
15500
|
}, {
|
|
15498
15501
|
immediate: !0
|
|
15499
|
-
}),
|
|
15502
|
+
}), Z(f, (x) => {
|
|
15500
15503
|
t.value && x && (t.value.environment = x);
|
|
15501
15504
|
}, {
|
|
15502
15505
|
immediate: !0
|
|
15503
|
-
}),
|
|
15506
|
+
}), Z([a, f], ([x, _]) => {
|
|
15504
15507
|
if (t.value) {
|
|
15505
15508
|
const T = e?.value ? e.value.texture : _;
|
|
15506
15509
|
T && (t.value.background = x ? T : null);
|
|
15507
15510
|
}
|
|
15508
15511
|
}, {
|
|
15509
15512
|
immediate: !0
|
|
15510
|
-
}),
|
|
15513
|
+
}), Z(() => n?.value, (x) => {
|
|
15511
15514
|
t.value && x && (t.value.backgroundBlurriness = x);
|
|
15512
15515
|
}, {
|
|
15513
15516
|
immediate: !0
|
|
15514
|
-
}),
|
|
15517
|
+
}), Z(() => c?.value, (x) => {
|
|
15515
15518
|
t.value && (t.value.backgroundIntensity = x ?? 1);
|
|
15516
15519
|
}, {
|
|
15517
15520
|
immediate: !0
|
|
15518
|
-
}),
|
|
15521
|
+
}), Z(() => u?.value, (x) => {
|
|
15519
15522
|
t.value && (t.value.environmentIntensity = x ?? 1);
|
|
15520
15523
|
}, {
|
|
15521
15524
|
immediate: !0
|
|
15522
|
-
}),
|
|
15525
|
+
}), Z(() => h?.value, (x) => {
|
|
15523
15526
|
if (t.value) {
|
|
15524
15527
|
const _ = Sh(x);
|
|
15525
15528
|
_ && (t.value.backgroundRotation = _);
|
|
15526
15529
|
}
|
|
15527
15530
|
}, {
|
|
15528
15531
|
immediate: !0
|
|
15529
|
-
}),
|
|
15532
|
+
}), Z(() => d?.value, (x) => {
|
|
15530
15533
|
if (t.value && !p?.value) {
|
|
15531
15534
|
const _ = Sh(x);
|
|
15532
15535
|
_ && (t.value.environmentRotation = _, og(t.value));
|
|
15533
15536
|
}
|
|
15534
15537
|
}, {
|
|
15535
15538
|
immediate: !0
|
|
15536
|
-
}),
|
|
15539
|
+
}), Z(() => i?.value, async (x) => {
|
|
15537
15540
|
if (x && x in sc) {
|
|
15538
15541
|
const _ = xM, T = sc[x];
|
|
15539
15542
|
try {
|
|
@@ -15557,7 +15560,7 @@ async function vM(l, e) {
|
|
|
15557
15560
|
throw new Error(`Preset must be one of: ${Object.keys(sc).join(", ")}`);
|
|
15558
15561
|
}, {
|
|
15559
15562
|
immediate: !0
|
|
15560
|
-
}),
|
|
15563
|
+
}), Z([p, h], ([x, _]) => {
|
|
15561
15564
|
if (x && t.value) {
|
|
15562
15565
|
const T = Sh(_);
|
|
15563
15566
|
T && (t.value.environmentRotation = T, og(t.value));
|
|
@@ -17053,7 +17056,7 @@ const F1 = (l) => !!(l && l.isPerspectiveCamera), B1 = (l) => !!(l && l.isOrthog
|
|
|
17053
17056
|
};
|
|
17054
17057
|
cs.install({ THREE: L });
|
|
17055
17058
|
const { camera: j, renderer: H, extend: de, controls: se, invalidate: z } = Le();
|
|
17056
|
-
|
|
17059
|
+
Z(s, () => {
|
|
17057
17060
|
z();
|
|
17058
17061
|
});
|
|
17059
17062
|
const re = Re(() => mg(
|
|
@@ -17063,7 +17066,7 @@ const F1 = (l) => !!(l && l.isPerspectiveCamera), B1 = (l) => !!(l && l.isOrthog
|
|
|
17063
17066
|
s.camera || j.value,
|
|
17064
17067
|
s.touches
|
|
17065
17068
|
)), he = ne(null);
|
|
17066
|
-
de({ CameraControls: cs }),
|
|
17069
|
+
de({ CameraControls: cs }), Et(() => {
|
|
17067
17070
|
Te(), he.value && n.value ? se.value = he.value : se.value = null;
|
|
17068
17071
|
});
|
|
17069
17072
|
function Te() {
|
|
@@ -17118,7 +17121,7 @@ const F1 = (l) => !!(l && l.isPerspectiveCamera), B1 = (l) => !!(l && l.isOrthog
|
|
|
17118
17121
|
function wM(l, e, ...t) {
|
|
17119
17122
|
const s = ne(), { scene: i } = Le();
|
|
17120
17123
|
let n;
|
|
17121
|
-
return
|
|
17124
|
+
return Et(() => {
|
|
17122
17125
|
l && Be(l) && e && (s.value = n = new e(Be(l), ...t)), n && (n.traverse((r) => r.raycast = () => null), i.value.add(n));
|
|
17123
17126
|
}), Ru(() => {
|
|
17124
17127
|
s.value = void 0, i.value.remove(n), n.dispose?.();
|
|
@@ -17134,7 +17137,7 @@ const pU = /* @__PURE__ */ me({
|
|
|
17134
17137
|
},
|
|
17135
17138
|
setup(l) {
|
|
17136
17139
|
const e = l, t = ne(), s = ne();
|
|
17137
|
-
return
|
|
17140
|
+
return Et(() => {
|
|
17138
17141
|
t.value && t.value.parent && (s.value = t.value.parent);
|
|
17139
17142
|
}), wM(s, e.type, ...e.args ?? []), (i, n) => (ue(), pe("TresObject3D", {
|
|
17140
17143
|
ref_key: "objRef",
|
|
@@ -17153,11 +17156,11 @@ const pU = /* @__PURE__ */ me({
|
|
|
17153
17156
|
emits: ["isLock", "change"],
|
|
17154
17157
|
setup(l, { expose: e, emit: t }) {
|
|
17155
17158
|
const s = l, i = t, { moveSpeed: n } = rt(s), { camera: r, controls: o, renderer: a, invalidate: c } = Le();
|
|
17156
|
-
|
|
17159
|
+
Z(s, () => {
|
|
17157
17160
|
c();
|
|
17158
17161
|
});
|
|
17159
17162
|
const u = Fe(0), h = Fe(0), { KeyW: d, KeyA: p, KeyS: f, KeyD: m, Up: y, Down: g, Left: v, Right: x } = QT();
|
|
17160
|
-
|
|
17163
|
+
Et(() => {
|
|
17161
17164
|
p.value || v.value ? u.value = -n.value : m.value || x.value ? u.value = n.value : u.value = 0, d.value || y.value ? h.value = n.value : f.value || g.value ? h.value = -n.value : h.value = 0;
|
|
17162
17165
|
}), e({
|
|
17163
17166
|
instance: o
|
|
@@ -17233,11 +17236,11 @@ const pU = /* @__PURE__ */ me({
|
|
|
17233
17236
|
enableRotate: _,
|
|
17234
17237
|
rotateSpeed: T
|
|
17235
17238
|
} = rt(s), { camera: S, renderer: b, extend: w, controls: M, invalidate: A } = Le();
|
|
17236
|
-
|
|
17239
|
+
Z(s, () => {
|
|
17237
17240
|
A();
|
|
17238
17241
|
});
|
|
17239
17242
|
const E = ne(null);
|
|
17240
|
-
w({ MapControls: OS }),
|
|
17243
|
+
w({ MapControls: OS }), Z(M, (N) => {
|
|
17241
17244
|
N && s.makeDefault ? M.value = N : M.value = null;
|
|
17242
17245
|
});
|
|
17243
17246
|
const { onBeforeRender: P } = ot();
|
|
@@ -17328,7 +17331,7 @@ const pU = /* @__PURE__ */ me({
|
|
|
17328
17331
|
target: M,
|
|
17329
17332
|
mouseButtons: A
|
|
17330
17333
|
} = rt(s), { camera: E, renderer: P, extend: N, controls: L, invalidate: j } = Le(), H = ne(null);
|
|
17331
|
-
N({ OrbitControls: b1 }),
|
|
17334
|
+
N({ OrbitControls: b1 }), Z(H, (z) => {
|
|
17332
17335
|
de(), z && n.value ? L.value = z : L.value = null;
|
|
17333
17336
|
});
|
|
17334
17337
|
function de() {
|
|
@@ -17381,7 +17384,7 @@ const pU = /* @__PURE__ */ me({
|
|
|
17381
17384
|
emits: ["isLock", "change"],
|
|
17382
17385
|
setup(l, { expose: e, emit: t }) {
|
|
17383
17386
|
const s = l, i = t, { camera: n, renderer: r, extend: o, controls: a, invalidate: c } = Le();
|
|
17384
|
-
|
|
17387
|
+
Z(s, () => {
|
|
17385
17388
|
c();
|
|
17386
17389
|
});
|
|
17387
17390
|
const u = ne(null);
|
|
@@ -17390,7 +17393,7 @@ const pU = /* @__PURE__ */ me({
|
|
|
17390
17393
|
const d = (p) => {
|
|
17391
17394
|
i("isLock", p);
|
|
17392
17395
|
};
|
|
17393
|
-
return
|
|
17396
|
+
return Z(u, (p) => {
|
|
17394
17397
|
p && s.makeDefault ? a.value = p : a.value = null, h = document.getElementById(s.selector || "") || r.domElement, bt(h, "click", () => {
|
|
17395
17398
|
u.value && (u.value.lock(), u.value.addEventListener("lock", () => d(!0)), u.value.addEventListener("unlock", () => d(!1)), c());
|
|
17396
17399
|
});
|
|
@@ -17420,12 +17423,12 @@ const pU = /* @__PURE__ */ me({
|
|
|
17420
17423
|
const s = l, i = t;
|
|
17421
17424
|
s.smoothScroll < 0 && Lr("SmoothControl must be greater than zero"), s.pages < 0 && Lr("Pages must be greater than zero");
|
|
17422
17425
|
const { camera: n, controls: r, renderer: o } = Zs();
|
|
17423
|
-
|
|
17426
|
+
Z(s, () => {
|
|
17424
17427
|
o.invalidate();
|
|
17425
17428
|
});
|
|
17426
17429
|
const a = ne(), c = document.createElement("div"), { y: u } = tb(), { x: h, y: d, isScrolling: p } = r1(c), { height: f, width: m } = o1();
|
|
17427
17430
|
let y = 0;
|
|
17428
|
-
const g = Fe(!1), v = Fe(0), x = Fe(0), _ = Fe(0), T = s.horizontal ? "x" : "y", S =
|
|
17431
|
+
const g = Fe(!1), v = Fe(0), x = Fe(0), _ = Fe(0), T = s.horizontal ? "x" : "y", S = Z(
|
|
17429
17432
|
n.activeCamera,
|
|
17430
17433
|
(w) => {
|
|
17431
17434
|
if (g.value) {
|
|
@@ -17438,7 +17441,7 @@ const pU = /* @__PURE__ */ me({
|
|
|
17438
17441
|
immediate: !0
|
|
17439
17442
|
}
|
|
17440
17443
|
);
|
|
17441
|
-
|
|
17444
|
+
Z(
|
|
17442
17445
|
p,
|
|
17443
17446
|
(w) => {
|
|
17444
17447
|
r.value && (r.value.enabled = !w);
|
|
@@ -17446,13 +17449,13 @@ const pU = /* @__PURE__ */ me({
|
|
|
17446
17449
|
{
|
|
17447
17450
|
immediate: !0
|
|
17448
17451
|
}
|
|
17449
|
-
),
|
|
17452
|
+
), Z(u, (w) => {
|
|
17450
17453
|
!p.value && !s.htmlScroll || (x.value = w / f.value / (_.value / f.value - 1), v.value = -1 * x.value, i("update:modelValue", x.value));
|
|
17451
|
-
}),
|
|
17454
|
+
}), Z(d, (w) => {
|
|
17452
17455
|
x.value = w / f.value / (_.value / f.value), v.value = -1 * x.value, i("update:modelValue", x.value);
|
|
17453
|
-
}),
|
|
17456
|
+
}), Z(h, (w) => {
|
|
17454
17457
|
x.value = w / m.value / (_.value / m.value - 1), v.value = +x.value, i("update:modelValue", x.value);
|
|
17455
|
-
}),
|
|
17458
|
+
}), Z(
|
|
17456
17459
|
o.instance,
|
|
17457
17460
|
(w) => {
|
|
17458
17461
|
const M = w?.domElement;
|
|
@@ -17502,7 +17505,7 @@ const pU = /* @__PURE__ */ me({
|
|
|
17502
17505
|
emits: ["dragging", "change", "mouseDown", "mouseUp", "objectChange"],
|
|
17503
17506
|
setup(l, { expose: e, emit: t }) {
|
|
17504
17507
|
const s = l, i = t, { object: n, mode: r, enabled: o, axis: a, translationSnap: c, rotationSnap: u, scaleSnap: h, space: d, size: p, showX: f, showY: m, showZ: y } = rt(s), g = ne(null), { controls: v, camera: x, renderer: _, extend: T, invalidate: S } = Le();
|
|
17505
|
-
|
|
17508
|
+
Z([n, r, o, a, c, u, h, d, p, f, m, y], () => {
|
|
17506
17509
|
S();
|
|
17507
17510
|
}), T({ TransformControls: AS });
|
|
17508
17511
|
const b = () => {
|
|
@@ -17519,7 +17522,7 @@ const pU = /* @__PURE__ */ me({
|
|
|
17519
17522
|
function P() {
|
|
17520
17523
|
bt(g.value, "change", b), bt(g.value, "dragging-changed", w), bt(g.value, "mouseDown", M), bt(g.value, "mouseUp", A), bt(g.value, "objectChange", E);
|
|
17521
17524
|
}
|
|
17522
|
-
return
|
|
17525
|
+
return Z(g, (N) => {
|
|
17523
17526
|
N && P();
|
|
17524
17527
|
}), Bt(() => {
|
|
17525
17528
|
g.value && g.value.dispose();
|
|
@@ -17650,12 +17653,16 @@ const PM = { key: 0 }, IM = ["geometry", "render-order"], vU = /* @__PURE__ */ m
|
|
|
17650
17653
|
]));
|
|
17651
17654
|
}
|
|
17652
17655
|
});
|
|
17653
|
-
function FM(l) {
|
|
17654
|
-
const
|
|
17656
|
+
function FM(l, e) {
|
|
17657
|
+
const t = da(Cw, l);
|
|
17658
|
+
e?.traverse && Z(t.state, (n) => {
|
|
17659
|
+
n.traverse((r) => e.traverse?.(r));
|
|
17660
|
+
});
|
|
17661
|
+
const s = Re(() => t.state.value ? ou(t.state.value).nodes : {}), i = Re(() => t.state.value ? ou(t.state.value).materials : {});
|
|
17655
17662
|
return {
|
|
17656
|
-
...
|
|
17657
|
-
nodes:
|
|
17658
|
-
materials:
|
|
17663
|
+
...t,
|
|
17664
|
+
nodes: s,
|
|
17665
|
+
materials: i
|
|
17659
17666
|
};
|
|
17660
17667
|
}
|
|
17661
17668
|
const BM = ["object"], _U = /* @__PURE__ */ me({
|
|
@@ -17669,7 +17676,7 @@ const BM = ["object"], _U = /* @__PURE__ */ me({
|
|
|
17669
17676
|
const t = l, { state: s } = FM(t.path);
|
|
17670
17677
|
return e({
|
|
17671
17678
|
instance: s
|
|
17672
|
-
}),
|
|
17679
|
+
}), Et(() => {
|
|
17673
17680
|
s.value && (t.castShadow || t.receiveShadow) && s.value.traverse((i) => {
|
|
17674
17681
|
i instanceof Se && (i.castShadow = t.castShadow, i.receiveShadow = t.receiveShadow);
|
|
17675
17682
|
});
|
|
@@ -17684,7 +17691,11 @@ function DM(l, e) {
|
|
|
17684
17691
|
o instanceof Wm && o.setDRACOLoader(r);
|
|
17685
17692
|
};
|
|
17686
17693
|
}
|
|
17687
|
-
const s = da(Wm, l, t)
|
|
17694
|
+
const s = da(Wm, l, t);
|
|
17695
|
+
e?.traverse && Z(s.state, (r) => {
|
|
17696
|
+
r.scene.traverse((o) => e.traverse?.(o));
|
|
17697
|
+
});
|
|
17698
|
+
const i = Re(() => s.state.value?.scene ? ou(s.state.value?.scene).nodes : {}), n = Re(() => s.state.value?.scene ? ou(s.state.value?.scene).materials : {});
|
|
17688
17699
|
return {
|
|
17689
17700
|
...s,
|
|
17690
17701
|
nodes: i,
|
|
@@ -17705,18 +17716,16 @@ const LM = ["object"], TU = /* @__PURE__ */ me({
|
|
|
17705
17716
|
draco: t.draco,
|
|
17706
17717
|
decoderPath: t.decoderPath
|
|
17707
17718
|
});
|
|
17708
|
-
e({
|
|
17719
|
+
return e({
|
|
17709
17720
|
instance: s
|
|
17710
|
-
})
|
|
17711
|
-
|
|
17712
|
-
|
|
17713
|
-
|
|
17714
|
-
|
|
17715
|
-
}));
|
|
17716
|
-
}), (r, o) => !F(i) && F(n) ? (ue(), pe("primitive", ht({
|
|
17721
|
+
}), Et(() => {
|
|
17722
|
+
s.value?.scene && (t.castShadow || t.receiveShadow) && s.value.scene.traverse((n) => {
|
|
17723
|
+
n instanceof Se && (n.castShadow = t.castShadow, n.receiveShadow = t.receiveShadow);
|
|
17724
|
+
});
|
|
17725
|
+
}), (n, r) => !F(i) && F(s)?.scene ? (ue(), pe("primitive", ht({
|
|
17717
17726
|
key: 0,
|
|
17718
|
-
object: F(
|
|
17719
|
-
},
|
|
17727
|
+
object: F(s)?.scene
|
|
17728
|
+
}, n.$attrs), null, 16, LM)) : ds("", !0);
|
|
17720
17729
|
}
|
|
17721
17730
|
}), bU = /* @__PURE__ */ me({
|
|
17722
17731
|
__name: "component",
|
|
@@ -18427,7 +18436,7 @@ const YM = ["args"], EU = /* @__PURE__ */ me({
|
|
|
18427
18436
|
},
|
|
18428
18437
|
setup(l, { expose: e }) {
|
|
18429
18438
|
const t = l, s = ne(null), { extend: i, invalidate: n } = Le();
|
|
18430
|
-
return i({ CustomShaderMaterial: XM }),
|
|
18439
|
+
return i({ CustomShaderMaterial: XM }), Z(t, () => {
|
|
18431
18440
|
n();
|
|
18432
18441
|
}), e({ instance: s }), (r, o) => (ue(), pe("TresCustomShaderMaterial", {
|
|
18433
18442
|
ref_key: "customShaderMaterialClass",
|
|
@@ -31534,7 +31543,7 @@ class yR extends $e {
|
|
|
31534
31543
|
}
|
|
31535
31544
|
let ra = null;
|
|
31536
31545
|
const Lo = /* @__PURE__ */ new Map();
|
|
31537
|
-
function
|
|
31546
|
+
function K(l, e) {
|
|
31538
31547
|
if (Lo.has(l)) {
|
|
31539
31548
|
console.warn(`THREE.TSL: Redefinition of method chaining '${l}'.`);
|
|
31540
31549
|
return;
|
|
@@ -31740,32 +31749,32 @@ const ie = (l, e = null) => {
|
|
|
31740
31749
|
function Ax(l) {
|
|
31741
31750
|
return ra && ra.add(l), l;
|
|
31742
31751
|
}
|
|
31743
|
-
|
|
31752
|
+
K("toStack", Ax);
|
|
31744
31753
|
const NR = new Ht("color"), J = new Ht("float", zu.float), At = new Ht("int", zu.ints), PR = new Ht("uint", zu.uint), Uf = new Ht("bool", zu.bool), ge = new Ht("vec2"), un = new Ht("ivec2"), IR = new Ht("uvec2"), FR = new Ht("bvec2"), ee = new Ht("vec3"), BR = new Ht("ivec3"), DR = new Ht("uvec3"), LR = new Ht("bvec3"), He = new Ht("vec4"), OR = new Ht("ivec4"), UR = new Ht("uvec4"), zR = new Ht("bvec4"), zf = new Ht("mat2"), ws = new Ht("mat3"), Xo = new Ht("mat4");
|
|
31745
|
-
|
|
31746
|
-
|
|
31747
|
-
|
|
31748
|
-
|
|
31749
|
-
|
|
31750
|
-
|
|
31751
|
-
|
|
31752
|
-
|
|
31753
|
-
|
|
31754
|
-
|
|
31755
|
-
|
|
31756
|
-
|
|
31757
|
-
|
|
31758
|
-
|
|
31759
|
-
|
|
31760
|
-
|
|
31761
|
-
|
|
31762
|
-
|
|
31763
|
-
|
|
31764
|
-
|
|
31754
|
+
K("toColor", NR);
|
|
31755
|
+
K("toFloat", J);
|
|
31756
|
+
K("toInt", At);
|
|
31757
|
+
K("toUint", PR);
|
|
31758
|
+
K("toBool", Uf);
|
|
31759
|
+
K("toVec2", ge);
|
|
31760
|
+
K("toIVec2", un);
|
|
31761
|
+
K("toUVec2", IR);
|
|
31762
|
+
K("toBVec2", FR);
|
|
31763
|
+
K("toVec3", ee);
|
|
31764
|
+
K("toIVec3", BR);
|
|
31765
|
+
K("toUVec3", DR);
|
|
31766
|
+
K("toBVec3", LR);
|
|
31767
|
+
K("toVec4", He);
|
|
31768
|
+
K("toIVec4", OR);
|
|
31769
|
+
K("toUVec4", UR);
|
|
31770
|
+
K("toBVec4", zR);
|
|
31771
|
+
K("toMat2", zf);
|
|
31772
|
+
K("toMat3", ws);
|
|
31773
|
+
K("toMat4", Xo);
|
|
31765
31774
|
const kR = /* @__PURE__ */ le(Il).setParameterLength(2), GR = (l, e) => oe(new Tx(oe(l), e));
|
|
31766
|
-
|
|
31767
|
-
|
|
31768
|
-
|
|
31775
|
+
K("element", kR);
|
|
31776
|
+
K("convert", GR);
|
|
31777
|
+
K("append", (l) => (console.warn("THREE.TSL: .append() has been renamed to .toStack()."), Ax(l)));
|
|
31769
31778
|
class xt extends $e {
|
|
31770
31779
|
static get type() {
|
|
31771
31780
|
return "PropertyNode";
|
|
@@ -31933,7 +31942,7 @@ const $R = (...l) => {
|
|
|
31933
31942
|
}
|
|
31934
31943
|
return oe(e);
|
|
31935
31944
|
};
|
|
31936
|
-
|
|
31945
|
+
K("toArray", (l, e) => $R(Array(e).fill(l)));
|
|
31937
31946
|
class WR extends Qt {
|
|
31938
31947
|
static get type() {
|
|
31939
31948
|
return "AssignNode";
|
|
@@ -31998,7 +32007,7 @@ class WR extends Qt {
|
|
|
31998
32007
|
}
|
|
31999
32008
|
}
|
|
32000
32009
|
const jR = /* @__PURE__ */ le(WR).setParameterLength(2);
|
|
32001
|
-
|
|
32010
|
+
K("assign", jR);
|
|
32002
32011
|
class qR extends Qt {
|
|
32003
32012
|
static get type() {
|
|
32004
32013
|
return "FunctionCallNode";
|
|
@@ -32055,7 +32064,7 @@ class qR extends Qt {
|
|
|
32055
32064
|
}
|
|
32056
32065
|
}
|
|
32057
32066
|
const XR = (l, ...e) => (e = e.length > 1 || e[0] && e[0].isNode === !0 ? qo(e) : ku(e[0]), oe(new qR(oe(l), e)));
|
|
32058
|
-
|
|
32067
|
+
K("call", XR);
|
|
32059
32068
|
const YR = {
|
|
32060
32069
|
"==": "equal",
|
|
32061
32070
|
"!=": "notEqual",
|
|
@@ -32173,33 +32182,33 @@ const Bs = /* @__PURE__ */ le(Pt, "+").setParameterLength(2, 1 / 0).setName("add
|
|
|
32173
32182
|
const e = At(l).toConst();
|
|
32174
32183
|
return l.subAssign(1), e;
|
|
32175
32184
|
});
|
|
32176
|
-
|
|
32177
|
-
|
|
32178
|
-
|
|
32179
|
-
|
|
32180
|
-
|
|
32181
|
-
|
|
32182
|
-
|
|
32183
|
-
|
|
32184
|
-
|
|
32185
|
-
|
|
32186
|
-
|
|
32187
|
-
|
|
32188
|
-
|
|
32189
|
-
|
|
32190
|
-
|
|
32191
|
-
|
|
32192
|
-
|
|
32193
|
-
|
|
32194
|
-
|
|
32195
|
-
|
|
32196
|
-
|
|
32197
|
-
|
|
32198
|
-
|
|
32199
|
-
|
|
32200
|
-
|
|
32185
|
+
K("add", Bs);
|
|
32186
|
+
K("sub", xs);
|
|
32187
|
+
K("mul", Je);
|
|
32188
|
+
K("div", Xi);
|
|
32189
|
+
K("mod", Hf);
|
|
32190
|
+
K("equal", Dx);
|
|
32191
|
+
K("notEqual", ZR);
|
|
32192
|
+
K("lessThan", KR);
|
|
32193
|
+
K("greaterThan", QR);
|
|
32194
|
+
K("lessThanEqual", JR);
|
|
32195
|
+
K("greaterThanEqual", eC);
|
|
32196
|
+
K("and", tC);
|
|
32197
|
+
K("or", sC);
|
|
32198
|
+
K("not", iC);
|
|
32199
|
+
K("xor", nC);
|
|
32200
|
+
K("bitAnd", rC);
|
|
32201
|
+
K("bitNot", oC);
|
|
32202
|
+
K("bitOr", aC);
|
|
32203
|
+
K("bitXor", lC);
|
|
32204
|
+
K("shiftLeft", cC);
|
|
32205
|
+
K("shiftRight", uC);
|
|
32206
|
+
K("incrementBefore", hC);
|
|
32207
|
+
K("decrementBefore", dC);
|
|
32208
|
+
K("increment", pC);
|
|
32209
|
+
K("decrement", fC);
|
|
32201
32210
|
const mC = (l, e) => (console.warn('THREE.TSL: "modInt()" is deprecated. Use "mod( int( ... ) )" instead.'), Hf(At(l), At(e)));
|
|
32202
|
-
|
|
32211
|
+
K("modInt", mC);
|
|
32203
32212
|
class k extends Qt {
|
|
32204
32213
|
static get type() {
|
|
32205
32214
|
return "MathNode";
|
|
@@ -32343,66 +32352,66 @@ k.CLAMP = "clamp";
|
|
|
32343
32352
|
k.REFRACT = "refract";
|
|
32344
32353
|
k.SMOOTHSTEP = "smoothstep";
|
|
32345
32354
|
k.FACEFORWARD = "faceforward";
|
|
32346
|
-
const gC = /* @__PURE__ */ J(1e-6), yC = /* @__PURE__ */ J(Math.PI), xC = /* @__PURE__ */ le(k, k.ALL).setParameterLength(1), vC = /* @__PURE__ */ le(k, k.ANY).setParameterLength(1), _C = /* @__PURE__ */ le(k, k.RADIANS).setParameterLength(1), TC = /* @__PURE__ */ le(k, k.DEGREES).setParameterLength(1), Lx = /* @__PURE__ */ le(k, k.EXP).setParameterLength(1), vl = /* @__PURE__ */ le(k, k.EXP2).setParameterLength(1), Ox = /* @__PURE__ */ le(k, k.LOG).setParameterLength(1), An = /* @__PURE__ */ le(k, k.LOG2).setParameterLength(1), $f = /* @__PURE__ */ le(k, k.SQRT).setParameterLength(1), bC = /* @__PURE__ */ le(k, k.INVERSE_SQRT).setParameterLength(1), jr = /* @__PURE__ */ le(k, k.FLOOR).setParameterLength(1), Wf = /* @__PURE__ */ le(k, k.CEIL).setParameterLength(1), _l = /* @__PURE__ */ le(k, k.NORMALIZE).setParameterLength(1), pr = /* @__PURE__ */ le(k, k.FRACT).setParameterLength(1), Si = /* @__PURE__ */ le(k, k.SIN).setParameterLength(1), er = /* @__PURE__ */ le(k, k.COS).setParameterLength(1), SC = /* @__PURE__ */ le(k, k.TAN).setParameterLength(1), wC = /* @__PURE__ */ le(k, k.ASIN).setParameterLength(1), Ux = /* @__PURE__ */ le(k, k.ACOS).setParameterLength(1), zx = /* @__PURE__ */ le(k, k.ATAN).setParameterLength(1, 2), ti = /* @__PURE__ */ le(k, k.ABS).setParameterLength(1), Mu = /* @__PURE__ */ le(k, k.SIGN).setParameterLength(1), En = /* @__PURE__ */ le(k, k.LENGTH).setParameterLength(1), MC = /* @__PURE__ */ le(k, k.NEGATE).setParameterLength(1), AC = /* @__PURE__ */ le(k, k.ONE_MINUS).setParameterLength(1), kx = /* @__PURE__ */ le(k, k.DFDX).setParameterLength(1), Gx = /* @__PURE__ */ le(k, k.DFDY).setParameterLength(1), EC = /* @__PURE__ */ le(k, k.ROUND).setParameterLength(1), RC = /* @__PURE__ */ le(k, k.RECIPROCAL).setParameterLength(1), CC = /* @__PURE__ */ le(k, k.TRUNC).setParameterLength(1), NC = /* @__PURE__ */ le(k, k.FWIDTH).setParameterLength(1), PC = /* @__PURE__ */ le(k, k.TRANSPOSE).setParameterLength(1), IC = (l, e) => (console.warn('THREE.TSL: "equals" is deprecated. Use "equal" inside a vector instead, like: "bvec*( equal( ... ) )"'), Dx(l, e)), oa = /* @__PURE__ */ le(k, k.MIN).setParameterLength(2, 1 / 0), fs = /* @__PURE__ */ le(k, k.MAX).setParameterLength(2, 1 / 0), Vx = /* @__PURE__ */ le(k, k.STEP).setParameterLength(2), FC = /* @__PURE__ */ le(k, k.REFLECT).setParameterLength(2), BC = /* @__PURE__ */ le(k, k.DISTANCE).setParameterLength(2), DC = /* @__PURE__ */ le(k, k.DIFFERENCE).setParameterLength(2), jf = /* @__PURE__ */ le(k, k.DOT).setParameterLength(2), Hx = /* @__PURE__ */ le(k, k.CROSS).setParameterLength(2), Gu = /* @__PURE__ */ le(k, k.POW).setParameterLength(2), $x = /* @__PURE__ */ le(k, k.POW, 2).setParameterLength(1), LC = /* @__PURE__ */ le(k, k.POW, 3).setParameterLength(1), OC = /* @__PURE__ */ le(k, k.POW, 4).setParameterLength(1), UC = /* @__PURE__ */ le(k, k.TRANSFORM_DIRECTION).setParameterLength(2), zC = (l) => Je(Mu(l), Gu(ti(l), 1 / 3)), Wx = (l) => jf(l, l),
|
|
32355
|
+
const gC = /* @__PURE__ */ J(1e-6), yC = /* @__PURE__ */ J(Math.PI), xC = /* @__PURE__ */ le(k, k.ALL).setParameterLength(1), vC = /* @__PURE__ */ le(k, k.ANY).setParameterLength(1), _C = /* @__PURE__ */ le(k, k.RADIANS).setParameterLength(1), TC = /* @__PURE__ */ le(k, k.DEGREES).setParameterLength(1), Lx = /* @__PURE__ */ le(k, k.EXP).setParameterLength(1), vl = /* @__PURE__ */ le(k, k.EXP2).setParameterLength(1), Ox = /* @__PURE__ */ le(k, k.LOG).setParameterLength(1), An = /* @__PURE__ */ le(k, k.LOG2).setParameterLength(1), $f = /* @__PURE__ */ le(k, k.SQRT).setParameterLength(1), bC = /* @__PURE__ */ le(k, k.INVERSE_SQRT).setParameterLength(1), jr = /* @__PURE__ */ le(k, k.FLOOR).setParameterLength(1), Wf = /* @__PURE__ */ le(k, k.CEIL).setParameterLength(1), _l = /* @__PURE__ */ le(k, k.NORMALIZE).setParameterLength(1), pr = /* @__PURE__ */ le(k, k.FRACT).setParameterLength(1), Si = /* @__PURE__ */ le(k, k.SIN).setParameterLength(1), er = /* @__PURE__ */ le(k, k.COS).setParameterLength(1), SC = /* @__PURE__ */ le(k, k.TAN).setParameterLength(1), wC = /* @__PURE__ */ le(k, k.ASIN).setParameterLength(1), Ux = /* @__PURE__ */ le(k, k.ACOS).setParameterLength(1), zx = /* @__PURE__ */ le(k, k.ATAN).setParameterLength(1, 2), ti = /* @__PURE__ */ le(k, k.ABS).setParameterLength(1), Mu = /* @__PURE__ */ le(k, k.SIGN).setParameterLength(1), En = /* @__PURE__ */ le(k, k.LENGTH).setParameterLength(1), MC = /* @__PURE__ */ le(k, k.NEGATE).setParameterLength(1), AC = /* @__PURE__ */ le(k, k.ONE_MINUS).setParameterLength(1), kx = /* @__PURE__ */ le(k, k.DFDX).setParameterLength(1), Gx = /* @__PURE__ */ le(k, k.DFDY).setParameterLength(1), EC = /* @__PURE__ */ le(k, k.ROUND).setParameterLength(1), RC = /* @__PURE__ */ le(k, k.RECIPROCAL).setParameterLength(1), CC = /* @__PURE__ */ le(k, k.TRUNC).setParameterLength(1), NC = /* @__PURE__ */ le(k, k.FWIDTH).setParameterLength(1), PC = /* @__PURE__ */ le(k, k.TRANSPOSE).setParameterLength(1), IC = (l, e) => (console.warn('THREE.TSL: "equals" is deprecated. Use "equal" inside a vector instead, like: "bvec*( equal( ... ) )"'), Dx(l, e)), oa = /* @__PURE__ */ le(k, k.MIN).setParameterLength(2, 1 / 0), fs = /* @__PURE__ */ le(k, k.MAX).setParameterLength(2, 1 / 0), Vx = /* @__PURE__ */ le(k, k.STEP).setParameterLength(2), FC = /* @__PURE__ */ le(k, k.REFLECT).setParameterLength(2), BC = /* @__PURE__ */ le(k, k.DISTANCE).setParameterLength(2), DC = /* @__PURE__ */ le(k, k.DIFFERENCE).setParameterLength(2), jf = /* @__PURE__ */ le(k, k.DOT).setParameterLength(2), Hx = /* @__PURE__ */ le(k, k.CROSS).setParameterLength(2), Gu = /* @__PURE__ */ le(k, k.POW).setParameterLength(2), $x = /* @__PURE__ */ le(k, k.POW, 2).setParameterLength(1), LC = /* @__PURE__ */ le(k, k.POW, 3).setParameterLength(1), OC = /* @__PURE__ */ le(k, k.POW, 4).setParameterLength(1), UC = /* @__PURE__ */ le(k, k.TRANSFORM_DIRECTION).setParameterLength(2), zC = (l) => Je(Mu(l), Gu(ti(l), 1 / 3)), Wx = (l) => jf(l, l), Rt = /* @__PURE__ */ le(k, k.MIX).setParameterLength(3), Fn = (l, e = 0, t = 1) => oe(new k(k.CLAMP, oe(l), oe(e), oe(t))), jx = (l) => Fn(l), qx = /* @__PURE__ */ le(k, k.REFRACT).setParameterLength(3), hr = /* @__PURE__ */ le(k, k.SMOOTHSTEP).setParameterLength(3), kC = /* @__PURE__ */ le(k, k.FACEFORWARD).setParameterLength(3), GC = /* @__PURE__ */ ie(([l]) => {
|
|
32347
32356
|
const s = 43758.5453, i = jf(l.xy, ge(12.9898, 78.233)), n = Hf(i, yC);
|
|
32348
32357
|
return pr(Si(n).mul(s));
|
|
32349
|
-
}), VC = (l, e, t) =>
|
|
32350
|
-
|
|
32351
|
-
|
|
32352
|
-
|
|
32353
|
-
|
|
32354
|
-
|
|
32355
|
-
|
|
32356
|
-
|
|
32357
|
-
|
|
32358
|
-
|
|
32359
|
-
|
|
32360
|
-
|
|
32361
|
-
|
|
32362
|
-
|
|
32363
|
-
|
|
32364
|
-
|
|
32365
|
-
|
|
32366
|
-
|
|
32367
|
-
|
|
32368
|
-
|
|
32369
|
-
|
|
32370
|
-
|
|
32371
|
-
|
|
32372
|
-
|
|
32373
|
-
|
|
32374
|
-
|
|
32375
|
-
|
|
32376
|
-
|
|
32377
|
-
|
|
32378
|
-
|
|
32379
|
-
|
|
32380
|
-
|
|
32381
|
-
|
|
32382
|
-
|
|
32383
|
-
|
|
32384
|
-
|
|
32385
|
-
|
|
32386
|
-
|
|
32387
|
-
|
|
32388
|
-
|
|
32389
|
-
|
|
32390
|
-
|
|
32391
|
-
|
|
32392
|
-
|
|
32393
|
-
|
|
32394
|
-
|
|
32395
|
-
|
|
32396
|
-
|
|
32397
|
-
|
|
32398
|
-
|
|
32399
|
-
|
|
32400
|
-
|
|
32401
|
-
|
|
32402
|
-
|
|
32403
|
-
|
|
32404
|
-
|
|
32405
|
-
|
|
32358
|
+
}), VC = (l, e, t) => Rt(e, t, l), HC = (l, e, t) => hr(e, t, l), $C = (l, e) => Vx(e, l), WC = (l, e) => (console.warn('THREE.TSL: "atan2" is overloaded. Use "atan" instead.'), zx(l, e));
|
|
32359
|
+
K("all", xC);
|
|
32360
|
+
K("any", vC);
|
|
32361
|
+
K("equals", IC);
|
|
32362
|
+
K("radians", _C);
|
|
32363
|
+
K("degrees", TC);
|
|
32364
|
+
K("exp", Lx);
|
|
32365
|
+
K("exp2", vl);
|
|
32366
|
+
K("log", Ox);
|
|
32367
|
+
K("log2", An);
|
|
32368
|
+
K("sqrt", $f);
|
|
32369
|
+
K("inverseSqrt", bC);
|
|
32370
|
+
K("floor", jr);
|
|
32371
|
+
K("ceil", Wf);
|
|
32372
|
+
K("normalize", _l);
|
|
32373
|
+
K("fract", pr);
|
|
32374
|
+
K("sin", Si);
|
|
32375
|
+
K("cos", er);
|
|
32376
|
+
K("tan", SC);
|
|
32377
|
+
K("asin", wC);
|
|
32378
|
+
K("acos", Ux);
|
|
32379
|
+
K("atan", zx);
|
|
32380
|
+
K("abs", ti);
|
|
32381
|
+
K("sign", Mu);
|
|
32382
|
+
K("length", En);
|
|
32383
|
+
K("lengthSq", Wx);
|
|
32384
|
+
K("negate", MC);
|
|
32385
|
+
K("oneMinus", AC);
|
|
32386
|
+
K("dFdx", kx);
|
|
32387
|
+
K("dFdy", Gx);
|
|
32388
|
+
K("round", EC);
|
|
32389
|
+
K("reciprocal", RC);
|
|
32390
|
+
K("trunc", CC);
|
|
32391
|
+
K("fwidth", NC);
|
|
32392
|
+
K("atan2", WC);
|
|
32393
|
+
K("min", oa);
|
|
32394
|
+
K("max", fs);
|
|
32395
|
+
K("step", $C);
|
|
32396
|
+
K("reflect", FC);
|
|
32397
|
+
K("distance", BC);
|
|
32398
|
+
K("dot", jf);
|
|
32399
|
+
K("cross", Hx);
|
|
32400
|
+
K("pow", Gu);
|
|
32401
|
+
K("pow2", $x);
|
|
32402
|
+
K("pow3", LC);
|
|
32403
|
+
K("pow4", OC);
|
|
32404
|
+
K("transformDirection", UC);
|
|
32405
|
+
K("mix", VC);
|
|
32406
|
+
K("clamp", Fn);
|
|
32407
|
+
K("refract", qx);
|
|
32408
|
+
K("smoothstep", HC);
|
|
32409
|
+
K("faceForward", kC);
|
|
32410
|
+
K("difference", DC);
|
|
32411
|
+
K("saturate", jx);
|
|
32412
|
+
K("cbrt", zC);
|
|
32413
|
+
K("transpose", PC);
|
|
32414
|
+
K("rand", GC);
|
|
32406
32415
|
class jC extends $e {
|
|
32407
32416
|
static get type() {
|
|
32408
32417
|
return "ConditionalNode";
|
|
@@ -32474,7 +32483,7 @@ ${e.tab}if ( ${h} ) {
|
|
|
32474
32483
|
}
|
|
32475
32484
|
}
|
|
32476
32485
|
const Ts = /* @__PURE__ */ le(jC).setParameterLength(2, 3);
|
|
32477
|
-
|
|
32486
|
+
K("select", Ts);
|
|
32478
32487
|
class Xx extends $e {
|
|
32479
32488
|
static get type() {
|
|
32480
32489
|
return "ContextNode";
|
|
@@ -32521,8 +32530,8 @@ class Xx extends $e {
|
|
|
32521
32530
|
}
|
|
32522
32531
|
}
|
|
32523
32532
|
const qf = /* @__PURE__ */ le(Xx).setParameterLength(1, 2), qC = (l, e) => qf(l, { label: e });
|
|
32524
|
-
|
|
32525
|
-
|
|
32533
|
+
K("context", qf);
|
|
32534
|
+
K("label", qC);
|
|
32526
32535
|
class Kc extends $e {
|
|
32527
32536
|
static get type() {
|
|
32528
32537
|
return "VarNode";
|
|
@@ -32563,10 +32572,10 @@ class Kc extends $e {
|
|
|
32563
32572
|
}
|
|
32564
32573
|
}
|
|
32565
32574
|
const Xf = /* @__PURE__ */ le(Kc), XC = (l, e = null) => Xf(l, e).toStack(), YC = (l, e = null) => Xf(l, e, !0).toStack();
|
|
32566
|
-
|
|
32567
|
-
|
|
32575
|
+
K("toVar", XC);
|
|
32576
|
+
K("toConst", YC);
|
|
32568
32577
|
const ZC = (l) => (console.warn('TSL: "temp( node )" is deprecated. Use "Var( node )" or "node.toVar()" instead.'), Xf(l));
|
|
32569
|
-
|
|
32578
|
+
K("temp", ZC);
|
|
32570
32579
|
class KC extends $e {
|
|
32571
32580
|
static get type() {
|
|
32572
32581
|
return "SubBuild";
|
|
@@ -32647,13 +32656,13 @@ class QC extends $e {
|
|
|
32647
32656
|
}
|
|
32648
32657
|
}
|
|
32649
32658
|
const fr = /* @__PURE__ */ le(QC).setParameterLength(1, 2), JC = (l) => fr(l);
|
|
32650
|
-
|
|
32651
|
-
|
|
32652
|
-
|
|
32653
|
-
|
|
32659
|
+
K("toVarying", fr);
|
|
32660
|
+
K("toVertexStage", JC);
|
|
32661
|
+
K("varying", (...l) => (console.warn("THREE.TSL: .varying() has been renamed to .toVarying()."), fr(...l)));
|
|
32662
|
+
K("vertexStage", (...l) => (console.warn("THREE.TSL: .vertexStage() has been renamed to .toVertexStage()."), fr(...l)));
|
|
32654
32663
|
const eN = /* @__PURE__ */ ie(([l]) => {
|
|
32655
32664
|
const e = l.mul(0.9478672986).add(0.0521327014).pow(2.4), t = l.mul(0.0773993808), s = l.lessThanEqual(0.04045);
|
|
32656
|
-
return
|
|
32665
|
+
return Rt(e, t, s);
|
|
32657
32666
|
}).setLayout({
|
|
32658
32667
|
name: "sRGBTransferEOTF",
|
|
32659
32668
|
type: "vec3",
|
|
@@ -32662,7 +32671,7 @@ const eN = /* @__PURE__ */ ie(([l]) => {
|
|
|
32662
32671
|
]
|
|
32663
32672
|
}), tN = /* @__PURE__ */ ie(([l]) => {
|
|
32664
32673
|
const e = l.pow(0.41666).mul(1.055).sub(0.055), t = l.mul(12.92), s = l.lessThanEqual(31308e-7);
|
|
32665
|
-
return
|
|
32674
|
+
return Rt(e, t, s);
|
|
32666
32675
|
}).setLayout({
|
|
32667
32676
|
name: "sRGBTransferOETF",
|
|
32668
32677
|
type: "vec3",
|
|
@@ -32706,8 +32715,8 @@ class Yx extends Qt {
|
|
|
32706
32715
|
}
|
|
32707
32716
|
}
|
|
32708
32717
|
const iN = (l, e) => oe(new Yx(oe(l), Yf, e)), Zf = (l, e) => oe(new Yx(oe(l), e, Yf));
|
|
32709
|
-
|
|
32710
|
-
|
|
32718
|
+
K("workingToColorSpace", iN);
|
|
32719
|
+
K("colorSpaceToWorking", Zf);
|
|
32711
32720
|
let nN = class extends Il {
|
|
32712
32721
|
static get type() {
|
|
32713
32722
|
return "ReferenceElementNode";
|
|
@@ -32898,7 +32907,7 @@ class lN extends Qt {
|
|
|
32898
32907
|
}
|
|
32899
32908
|
}
|
|
32900
32909
|
const cN = (l, e, t) => oe(new lN(l, oe(e), oe(t))), uN = /* @__PURE__ */ aN("toneMappingExposure", "float");
|
|
32901
|
-
|
|
32910
|
+
K("toneMapping", (l, e, t) => cN(e, t, l));
|
|
32902
32911
|
class hN extends Bf {
|
|
32903
32912
|
static get type() {
|
|
32904
32913
|
return "BufferAttributeNode";
|
|
@@ -32992,7 +33001,7 @@ class hN extends Bf {
|
|
|
32992
33001
|
}
|
|
32993
33002
|
}
|
|
32994
33003
|
const Kf = (l, e = null, t = 0, s = 0) => oe(new hN(l, e, t, s)), dN = (l, e = null, t = 0, s = 0) => Kf(l, e, t, s).setUsage(Do), o0 = (l, e = null, t = 0, s = 0) => Kf(l, e, t, s).setInstanced(!0), a0 = (l, e = null, t = 0, s = 0) => dN(l, e, t, s).setInstanced(!0);
|
|
32995
|
-
|
|
33004
|
+
K("toAttribute", (l) => Kf(l.value));
|
|
32996
33005
|
class pN extends $e {
|
|
32997
33006
|
static get type() {
|
|
32998
33007
|
return "ComputeNode";
|
|
@@ -33070,7 +33079,7 @@ class pN extends $e {
|
|
|
33070
33079
|
}
|
|
33071
33080
|
}
|
|
33072
33081
|
const fN = (l, e, t) => oe(new pN(oe(l), e, t));
|
|
33073
|
-
|
|
33082
|
+
K("compute", fN);
|
|
33074
33083
|
class mN extends $e {
|
|
33075
33084
|
static get type() {
|
|
33076
33085
|
return "CacheNode";
|
|
@@ -33098,7 +33107,7 @@ class mN extends $e {
|
|
|
33098
33107
|
}
|
|
33099
33108
|
}
|
|
33100
33109
|
const Qc = (l, e) => oe(new mN(oe(l), e));
|
|
33101
|
-
|
|
33110
|
+
K("cache", Qc);
|
|
33102
33111
|
class gN extends $e {
|
|
33103
33112
|
static get type() {
|
|
33104
33113
|
return "BypassNode";
|
|
@@ -33121,7 +33130,7 @@ class gN extends $e {
|
|
|
33121
33130
|
}
|
|
33122
33131
|
}
|
|
33123
33132
|
const yN = /* @__PURE__ */ le(gN).setParameterLength(2);
|
|
33124
|
-
|
|
33133
|
+
K("bypass", yN);
|
|
33125
33134
|
class Kx extends $e {
|
|
33126
33135
|
static get type() {
|
|
33127
33136
|
return "RemapNode";
|
|
@@ -33145,8 +33154,8 @@ class Kx extends $e {
|
|
|
33145
33154
|
}
|
|
33146
33155
|
}
|
|
33147
33156
|
const xN = /* @__PURE__ */ le(Kx, null, null, { doClamp: !1 }).setParameterLength(3, 5), vN = /* @__PURE__ */ le(Kx).setParameterLength(3, 5);
|
|
33148
|
-
|
|
33149
|
-
|
|
33157
|
+
K("remap", xN);
|
|
33158
|
+
K("remapClamp", vN);
|
|
33150
33159
|
class Jc extends $e {
|
|
33151
33160
|
static get type() {
|
|
33152
33161
|
return "ExpressionNode";
|
|
@@ -33169,7 +33178,7 @@ class Jc extends $e {
|
|
|
33169
33178
|
}
|
|
33170
33179
|
}
|
|
33171
33180
|
const aa = /* @__PURE__ */ le(Jc).setParameterLength(1, 2), _N = (l) => (l ? Ts(l, aa("discard")) : aa("discard")).toStack();
|
|
33172
|
-
|
|
33181
|
+
K("discard", _N);
|
|
33173
33182
|
class TN extends Qt {
|
|
33174
33183
|
static get type() {
|
|
33175
33184
|
return "RenderOutputNode";
|
|
@@ -33191,7 +33200,7 @@ class TN extends Qt {
|
|
|
33191
33200
|
}
|
|
33192
33201
|
}
|
|
33193
33202
|
const bN = (l, e = null, t = null) => oe(new TN(oe(l), e, t));
|
|
33194
|
-
|
|
33203
|
+
K("renderOutput", bN);
|
|
33195
33204
|
class SN extends Qt {
|
|
33196
33205
|
static get type() {
|
|
33197
33206
|
return "DebugNode";
|
|
@@ -33219,7 +33228,7 @@ class SN extends Qt {
|
|
|
33219
33228
|
}
|
|
33220
33229
|
}
|
|
33221
33230
|
const wN = (l, e = null) => oe(new SN(oe(l), e));
|
|
33222
|
-
|
|
33231
|
+
K("debug", wN);
|
|
33223
33232
|
class Qx extends $e {
|
|
33224
33233
|
static get type() {
|
|
33225
33234
|
return "AttributeNode";
|
|
@@ -34257,7 +34266,7 @@ const sr = (l, e, t = null) => oe(new ZN(l, e, t)), lv = Bl(), KN = Ot.dFdx(), Q
|
|
|
34257
34266
|
return l === "VERTEX" || e.hasAttribute("tangent") ? s = t2(vt.cross(gv), "v_bitangentView").normalize() : s = e2, t.flatShading !== !0 && (s = Dl(s)), s;
|
|
34258
34267
|
}, "vec3").once(["NORMAL", "VERTEX"])().toVar("bitangentView"), Za = /* @__PURE__ */ ws(gv, s2, vt).toVar("TBNViewMatrix"), i2 = /* @__PURE__ */ ie(() => {
|
|
34259
34268
|
let l = Yo.cross(Ft);
|
|
34260
|
-
return l = l.cross(Yo).normalize(), l =
|
|
34269
|
+
return l = l.cross(Yo).normalize(), l = Rt(l, vt, Br.mul(pn.oneMinus()).oneMinus().pow2().pow2()).normalize(), l;
|
|
34261
34270
|
}).once()();
|
|
34262
34271
|
class n2 extends Qt {
|
|
34263
34272
|
static get type() {
|
|
@@ -34493,7 +34502,7 @@ const L2 = /* @__PURE__ */ ye(X, X.LINE_DASH_OFFSET), O2 = /* @__PURE__ */ ye(X,
|
|
|
34493
34502
|
}).onRenderUpdate(function({ material: l }) {
|
|
34494
34503
|
this.value.set(l.anisotropy * Math.cos(l.anisotropyRotation), l.anisotropy * Math.sin(l.anisotropyRotation));
|
|
34495
34504
|
}), vv = /* @__PURE__ */ ie((l) => l.context.setupModelViewProjection(), "vec4").once()().toVarying("v_modelViewProjection");
|
|
34496
|
-
class
|
|
34505
|
+
class Ct extends $e {
|
|
34497
34506
|
static get type() {
|
|
34498
34507
|
return "IndexNode";
|
|
34499
34508
|
}
|
|
@@ -34508,17 +34517,17 @@ class Rt extends $e {
|
|
|
34508
34517
|
generate(e) {
|
|
34509
34518
|
const t = this.getNodeType(e), s = this.scope;
|
|
34510
34519
|
let i;
|
|
34511
|
-
if (s ===
|
|
34520
|
+
if (s === Ct.VERTEX)
|
|
34512
34521
|
i = e.getVertexIndex();
|
|
34513
|
-
else if (s ===
|
|
34522
|
+
else if (s === Ct.INSTANCE)
|
|
34514
34523
|
i = e.getInstanceIndex();
|
|
34515
|
-
else if (s ===
|
|
34524
|
+
else if (s === Ct.DRAW)
|
|
34516
34525
|
i = e.getDrawIndex();
|
|
34517
|
-
else if (s ===
|
|
34526
|
+
else if (s === Ct.INVOCATION_LOCAL)
|
|
34518
34527
|
i = e.getInvocationLocalIndex();
|
|
34519
|
-
else if (s ===
|
|
34528
|
+
else if (s === Ct.INVOCATION_SUBGROUP)
|
|
34520
34529
|
i = e.getInvocationSubgroupIndex();
|
|
34521
|
-
else if (s ===
|
|
34530
|
+
else if (s === Ct.SUBGROUP)
|
|
34522
34531
|
i = e.getSubgroupIndex();
|
|
34523
34532
|
else
|
|
34524
34533
|
throw new Error("THREE.IndexNode: Unknown scope: " + s);
|
|
@@ -34526,17 +34535,17 @@ class Rt extends $e {
|
|
|
34526
34535
|
return e.shaderStage === "vertex" || e.shaderStage === "compute" ? n = i : n = fr(this).build(e, t), n;
|
|
34527
34536
|
}
|
|
34528
34537
|
}
|
|
34529
|
-
|
|
34530
|
-
|
|
34531
|
-
|
|
34532
|
-
|
|
34533
|
-
|
|
34534
|
-
|
|
34535
|
-
const k2 = /* @__PURE__ */ ye(
|
|
34536
|
-
|
|
34537
|
-
|
|
34538
|
-
|
|
34539
|
-
const G2 = /* @__PURE__ */ ye(
|
|
34538
|
+
Ct.VERTEX = "vertex";
|
|
34539
|
+
Ct.INSTANCE = "instance";
|
|
34540
|
+
Ct.SUBGROUP = "subgroup";
|
|
34541
|
+
Ct.INVOCATION_LOCAL = "invocationLocal";
|
|
34542
|
+
Ct.INVOCATION_SUBGROUP = "invocationSubgroup";
|
|
34543
|
+
Ct.DRAW = "draw";
|
|
34544
|
+
const k2 = /* @__PURE__ */ ye(Ct, Ct.VERTEX), tm = /* @__PURE__ */ ye(Ct, Ct.INSTANCE);
|
|
34545
|
+
Ct.SUBGROUP;
|
|
34546
|
+
Ct.INVOCATION_SUBGROUP;
|
|
34547
|
+
Ct.INVOCATION_LOCAL;
|
|
34548
|
+
const G2 = /* @__PURE__ */ ye(Ct, Ct.DRAW);
|
|
34540
34549
|
class V2 extends $e {
|
|
34541
34550
|
static get type() {
|
|
34542
34551
|
return "InstanceNode";
|
|
@@ -35632,7 +35641,7 @@ class Vt extends Fs {
|
|
|
35632
35641
|
if (o && o.getScope().hasLights) {
|
|
35633
35642
|
const c = this.setupLightingModel(e) || null;
|
|
35634
35643
|
a = sP(o, c, s, i);
|
|
35635
|
-
} else s !== null && (a = ee(i !== null ?
|
|
35644
|
+
} else s !== null && (a = ee(i !== null ? Rt(a, s, i) : s));
|
|
35636
35645
|
return (n && n.isNode === !0 || t.emissive && t.emissive.isColor === !0) && (i0.assign(ee(n || d2)), a = a.add(i0)), a;
|
|
35637
35646
|
}
|
|
35638
35647
|
/**
|
|
@@ -35990,10 +35999,10 @@ class Nv extends ju {
|
|
|
35990
35999
|
if (n)
|
|
35991
36000
|
switch (t.combine) {
|
|
35992
36001
|
case Bu:
|
|
35993
|
-
i.rgb.assign(
|
|
36002
|
+
i.rgb.assign(Rt(i.rgb, i.rgb.mul(n.rgb), eu.mul(ad)));
|
|
35994
36003
|
break;
|
|
35995
36004
|
case uA:
|
|
35996
|
-
i.rgb.assign(
|
|
36005
|
+
i.rgb.assign(Rt(i.rgb, n.rgb, eu.mul(ad)));
|
|
35997
36006
|
break;
|
|
35998
36007
|
case hA:
|
|
35999
36008
|
i.rgb.addAssign(n.rgb.mul(eu.mul(ad)));
|
|
@@ -36428,7 +36437,7 @@ const DP = /* @__PURE__ */ ie((l) => {
|
|
|
36428
36437
|
let o = s.mul(n.mul(2 * Math.PI).sqrt()).mul(i.mul(t).add(e).cos()).mul(t.pow2().negate().mul(n).exp());
|
|
36429
36438
|
return o = ee(o.x.add(r), o.y, o.z).div(10685e-11), QP.mul(o);
|
|
36430
36439
|
}, tI = /* @__PURE__ */ ie(({ outsideIOR: l, eta2: e, cosTheta1: t, thinFilmThickness: s, baseF0: i }) => {
|
|
36431
|
-
const n =
|
|
36440
|
+
const n = Rt(l, e, hr(0, 0.03, s)), o = l.div(n).pow2().mul(t.pow2().oneMinus()).oneMinus();
|
|
36432
36441
|
Ut(o.lessThan(0), () => ee(1));
|
|
36433
36442
|
const a = o.sqrt(), c = F0(n, l), u = wl({ f0: c, f90: 1, dotVH: t }), h = u.oneMinus(), d = n.lessThan(l).select(Math.PI, 0), p = J(Math.PI).sub(d), f = JP(i.clamp(0, 0.9999)), m = F0(f, n.toVec3()), y = wl({ f0: m, f90: 1, dotVH: a }), g = ee(
|
|
36434
36443
|
f.x.lessThan(n).select(Math.PI, 0),
|
|
@@ -36516,7 +36525,7 @@ class Ov extends ju {
|
|
|
36516
36525
|
Px,
|
|
36517
36526
|
Nx,
|
|
36518
36527
|
this.dispersion ? Ix : null
|
|
36519
|
-
), n.backdropAlpha = Np, ut.a.mulAssign(
|
|
36528
|
+
), n.backdropAlpha = Np, ut.a.mulAssign(Rt(1, n.backdrop.a, Np));
|
|
36520
36529
|
}
|
|
36521
36530
|
super.start(e);
|
|
36522
36531
|
}
|
|
@@ -36721,7 +36730,7 @@ const B0 = /* @__PURE__ */ J(1), Lp = /* @__PURE__ */ J(-2), Rc = /* @__PURE__ *
|
|
|
36721
36730
|
const r = J(t), o = ee(e), a = Fn(aI(r), Lp, n), c = pr(a), u = jr(a), h = ee(Op(l, o, u, s, i, n)).toVar();
|
|
36722
36731
|
return Ut(c.notEqual(0), () => {
|
|
36723
36732
|
const d = ee(Op(l, o, u.add(1), s, i, n)).toVar();
|
|
36724
|
-
h.assign(
|
|
36733
|
+
h.assign(Rt(h, d, c));
|
|
36725
36734
|
}), h;
|
|
36726
36735
|
}), Op = /* @__PURE__ */ ie(([l, e, t, s, i, n]) => {
|
|
36727
36736
|
const r = J(t).toVar(), o = ee(e), a = J(rI(o)).toVar(), c = J(fs(L0.sub(r), 0)).toVar();
|
|
@@ -37307,7 +37316,7 @@ class kv extends Vt {
|
|
|
37307
37316
|
* Setups the specular related node variables.
|
|
37308
37317
|
*/
|
|
37309
37318
|
setupSpecular() {
|
|
37310
|
-
const e =
|
|
37319
|
+
const e = Rt(ee(0.04), ut.rgb, bu);
|
|
37311
37320
|
Gs.assign(e), wu.assign(1);
|
|
37312
37321
|
}
|
|
37313
37322
|
/**
|
|
@@ -37397,7 +37406,7 @@ class EI extends kv {
|
|
|
37397
37406
|
*/
|
|
37398
37407
|
setupSpecular() {
|
|
37399
37408
|
const e = this.iorNode ? J(this.iorNode) : N2;
|
|
37400
|
-
Zc.assign(e), Gs.assign(
|
|
37409
|
+
Zc.assign(e), Gs.assign(Rt(oa($x(Zc.sub(1).div(Zc.add(1))).mul(f2), ee(1)).mul(y0), ut.rgb, bu)), wu.assign(Rt(y0, 1, bu));
|
|
37401
37410
|
}
|
|
37402
37411
|
/**
|
|
37403
37412
|
* Setups the lighting model.
|
|
@@ -37463,7 +37472,7 @@ const RI = /* @__PURE__ */ ie(({ normal: l, lightDirection: e, builder: t }) =>
|
|
|
37463
37472
|
return ee(n.r);
|
|
37464
37473
|
} else {
|
|
37465
37474
|
const n = i.fwidth().mul(0.5);
|
|
37466
|
-
return
|
|
37475
|
+
return Rt(ee(0.7), ee(1), hr(J(0.7).sub(n.x), J(0.7).add(n.x), i.x));
|
|
37467
37476
|
}
|
|
37468
37477
|
});
|
|
37469
37478
|
class CI extends ju {
|
|
@@ -37534,7 +37543,7 @@ class BI extends Vt {
|
|
|
37534
37543
|
setupVariants(e) {
|
|
37535
37544
|
const t = II;
|
|
37536
37545
|
let s;
|
|
37537
|
-
e.material.matcap ? s = sr("matcap", "texture").context({ getUV: () => t }) : s = ee(
|
|
37546
|
+
e.material.matcap ? s = sr("matcap", "texture").context({ getUV: () => t }) : s = ee(Rt(0.2, 0.8, t.y)), ut.rgb.mulAssign(s.rgb);
|
|
37538
37547
|
}
|
|
37539
37548
|
}
|
|
37540
37549
|
class DI extends Qt {
|
|
@@ -39858,7 +39867,7 @@ const wF = /* @__PURE__ */ ie(([l, e]) => l.mul(e).clamp()).setLayout({
|
|
|
39858
39867
|
const o = xs(1, t), a = xs(1, o.mul(o).div(r.add(o.sub(t))));
|
|
39859
39868
|
l.mulAssign(a.div(r));
|
|
39860
39869
|
const c = xs(1, Xi(1, s.mul(r.sub(a)).add(1)));
|
|
39861
|
-
return
|
|
39870
|
+
return Rt(l, ee(a), c);
|
|
39862
39871
|
}).setLayout({
|
|
39863
39872
|
name: "neutralToneMapping",
|
|
39864
39873
|
type: "vec3",
|
|
@@ -40320,33 +40329,33 @@ const Q0 = /* @__PURE__ */ new WeakMap(), KF = /* @__PURE__ */ ie(({ depthTextur
|
|
|
40320
40329
|
i(c.add(ge(o, 0)), e.z),
|
|
40321
40330
|
i(c.add(ge(0, a)), e.z),
|
|
40322
40331
|
i(c.add(r), e.z),
|
|
40323
|
-
|
|
40332
|
+
Rt(
|
|
40324
40333
|
i(c.add(ge(o.negate(), 0)), e.z),
|
|
40325
40334
|
i(c.add(ge(o.mul(2), 0)), e.z),
|
|
40326
40335
|
u.x
|
|
40327
40336
|
),
|
|
40328
|
-
|
|
40337
|
+
Rt(
|
|
40329
40338
|
i(c.add(ge(o.negate(), a)), e.z),
|
|
40330
40339
|
i(c.add(ge(o.mul(2), a)), e.z),
|
|
40331
40340
|
u.x
|
|
40332
40341
|
),
|
|
40333
|
-
|
|
40342
|
+
Rt(
|
|
40334
40343
|
i(c.add(ge(0, a.negate())), e.z),
|
|
40335
40344
|
i(c.add(ge(0, a.mul(2))), e.z),
|
|
40336
40345
|
u.y
|
|
40337
40346
|
),
|
|
40338
|
-
|
|
40347
|
+
Rt(
|
|
40339
40348
|
i(c.add(ge(o, a.negate())), e.z),
|
|
40340
40349
|
i(c.add(ge(o, a.mul(2))), e.z),
|
|
40341
40350
|
u.y
|
|
40342
40351
|
),
|
|
40343
|
-
|
|
40344
|
-
|
|
40352
|
+
Rt(
|
|
40353
|
+
Rt(
|
|
40345
40354
|
i(c.add(ge(o.negate(), a.negate())), e.z),
|
|
40346
40355
|
i(c.add(ge(o.mul(2), a.negate())), e.z),
|
|
40347
40356
|
u.x
|
|
40348
40357
|
),
|
|
40349
|
-
|
|
40358
|
+
Rt(
|
|
40350
40359
|
i(c.add(ge(o.negate(), a.mul(2))), e.z),
|
|
40351
40360
|
i(c.add(ge(o.mul(2), a.mul(2))), e.z),
|
|
40352
40361
|
u.x
|
|
@@ -40496,7 +40505,7 @@ class Jv extends VF {
|
|
|
40496
40505
|
const p = n === Wc && i.isPointLightShadow !== !0 ? this.vsmShadowMapHorizontal.texture : r, f = this.setupShadowFilter(e, { filterFn: d, shadowTexture: o.texture, depthTexture: p, shadowCoord: h, shadow: i, depthLayer: this.depthLayer });
|
|
40497
40506
|
let m = lt(o.texture, h);
|
|
40498
40507
|
r.isArrayTexture && (m = m.depth(this.depthLayer));
|
|
40499
|
-
const y =
|
|
40508
|
+
const y = Rt(1, f.rgb.mix(m, 1), a.mul(m.a)).toVar();
|
|
40500
40509
|
return this.shadowMap = o, this.shadow.map = o, y;
|
|
40501
40510
|
}
|
|
40502
40511
|
/**
|
|
@@ -43044,7 +43053,7 @@ class YB extends no {
|
|
|
43044
43053
|
super.update(e), this.lightPositionNode.object3d = t, this.groundColorNode.value.copy(t.groundColor).multiplyScalar(t.intensity);
|
|
43045
43054
|
}
|
|
43046
43055
|
setup(e) {
|
|
43047
|
-
const { colorNode: t, groundColorNode: s, lightDirectionNode: i } = this, r = ga.dot(i).mul(0.5).add(0.5), o =
|
|
43056
|
+
const { colorNode: t, groundColorNode: s, lightDirectionNode: i } = this, r = ga.dot(i).mul(0.5).add(0.5), o = Rt(s, t, r);
|
|
43048
43057
|
e.context.irradiance.addAssign(o);
|
|
43049
43058
|
}
|
|
43050
43059
|
}
|
|
@@ -54551,12 +54560,12 @@ const fL = ["texture-matrix", "t-sharp", "t-depth", "t-blur", "defines-USE_BLUR"
|
|
|
54551
54560
|
type: ii
|
|
54552
54561
|
}
|
|
54553
54562
|
);
|
|
54554
|
-
|
|
54563
|
+
Z(
|
|
54555
54564
|
() => [t.resolution],
|
|
54556
54565
|
() => {
|
|
54557
54566
|
f.setSize(t.resolution, t.resolution), m.setSize(t.resolution, t.resolution);
|
|
54558
54567
|
}
|
|
54559
|
-
),
|
|
54568
|
+
), Z(() => [
|
|
54560
54569
|
t.resolution,
|
|
54561
54570
|
n.value,
|
|
54562
54571
|
r.value,
|
|
@@ -54574,23 +54583,23 @@ const fL = ["texture-matrix", "t-sharp", "t-depth", "t-blur", "defines-USE_BLUR"
|
|
|
54574
54583
|
depthScale: t.blurDepthScale,
|
|
54575
54584
|
depthBias: t.blurDepthBias
|
|
54576
54585
|
});
|
|
54577
|
-
}, { immediate: !0 }),
|
|
54586
|
+
}, { immediate: !0 }), Z(() => [o.value], () => {
|
|
54578
54587
|
Lr(
|
|
54579
54588
|
"MeshReflectionMaterial: Setting blurMixRough or blurMixSmooth to 0, then non-zero triggers a recompile.The TresJS core cannot currently handle recompiled materials."
|
|
54580
54589
|
);
|
|
54581
|
-
}),
|
|
54590
|
+
}), Z(a, () => {
|
|
54582
54591
|
Lr(
|
|
54583
54592
|
"MeshReflectionMaterial: Setting depthScale to 0, then non-zero triggers a recompile.The TresJS core cannot currently handle recompiled materials."
|
|
54584
54593
|
);
|
|
54585
|
-
}),
|
|
54594
|
+
}), Z(c, () => {
|
|
54586
54595
|
Lr(
|
|
54587
54596
|
"MeshReflectionMaterial: Toggling distortionMap triggers a recompile.The TresJS core cannot currently handle recompiled materials."
|
|
54588
54597
|
);
|
|
54589
|
-
}),
|
|
54598
|
+
}), Z(u, () => {
|
|
54590
54599
|
Lr(
|
|
54591
54600
|
"MeshReflectionMaterial: Toggling roughnessMap triggers a recompile.The TresJS core cannot currently handle recompiled materials."
|
|
54592
54601
|
);
|
|
54593
|
-
}),
|
|
54602
|
+
}), Z(() => [t.normalMap], () => {
|
|
54594
54603
|
Lr(
|
|
54595
54604
|
"MeshReflectionMaterial: Toggling normalMap triggers a recompile.The TresJS core cannot currently handle recompiled materials."
|
|
54596
54605
|
);
|
|
@@ -54677,7 +54686,7 @@ const gL = ["factor"], FU = /* @__PURE__ */ me({
|
|
|
54677
54686
|
},
|
|
54678
54687
|
setup(l, { expose: e }) {
|
|
54679
54688
|
const t = l, s = ne(), { extend: i, invalidate: n } = Le();
|
|
54680
|
-
i({ MeshWobbleMaterial: mL }),
|
|
54689
|
+
i({ MeshWobbleMaterial: mL }), Z(t, () => {
|
|
54681
54690
|
n();
|
|
54682
54691
|
});
|
|
54683
54692
|
const { onBeforeRender: r } = ot();
|
|
@@ -54720,7 +54729,7 @@ const yL = ["object"], BU = /* @__PURE__ */ me({
|
|
|
54720
54729
|
const t = l;
|
|
54721
54730
|
Rl({ PointMaterial: Vd });
|
|
54722
54731
|
const s = ne(new Vd({ sizeAttenuation: t.sizeAttenuation }));
|
|
54723
|
-
return
|
|
54732
|
+
return Z(() => t.sizeAttenuation, () => {
|
|
54724
54733
|
s.value && s.value.dispose(), s.value = new Vd({ sizeAttenuation: t.sizeAttenuation });
|
|
54725
54734
|
}), Bt(() => {
|
|
54726
54735
|
s.value && s.value.dispose && s.value.dispose();
|
|
@@ -54730,7 +54739,7 @@ const yL = ["object"], BU = /* @__PURE__ */ me({
|
|
|
54730
54739
|
name: "BakeShadows",
|
|
54731
54740
|
setup() {
|
|
54732
54741
|
const { renderer: l } = Le();
|
|
54733
|
-
|
|
54742
|
+
Et(() => {
|
|
54734
54743
|
l instanceof dl && (l.shadowMap.autoUpdate = !1, l.shadowMap.needsUpdate = !0);
|
|
54735
54744
|
});
|
|
54736
54745
|
}
|
|
@@ -54753,7 +54762,7 @@ const yL = ["object"], BU = /* @__PURE__ */ me({
|
|
|
54753
54762
|
}
|
|
54754
54763
|
r.sort((o, a) => o.distance - a.distance), s.value.levels.length = 0, r.forEach((o) => s.value.levels.push(o));
|
|
54755
54764
|
}
|
|
54756
|
-
return fl(t.levels) &&
|
|
54765
|
+
return fl(t.levels) && Z(() => t.levels, i), fl(t.hysteresis) && Z(() => t.hysteresis, i), Ki(i), e({
|
|
54757
54766
|
instance: s
|
|
54758
54767
|
}), (n, r) => (ue(), pe("TresLOD", {
|
|
54759
54768
|
ref_key: "lodRef",
|
|
@@ -54899,12 +54908,12 @@ const ML = /* @__PURE__ */ ((l) => (e) => m_(e, l))([1, -1, 1, 1, 1, -1, 1, 1, 1
|
|
|
54899
54908
|
})), se = Fe(null), z = Fe(!1), re = Re(
|
|
54900
54909
|
() => T?.value && T?.value !== "blending" || Array.isArray(T?.value) && T?.value.length && ru(T.value[0])
|
|
54901
54910
|
);
|
|
54902
|
-
|
|
54911
|
+
Z(
|
|
54903
54912
|
() => T,
|
|
54904
54913
|
({ value: U }) => {
|
|
54905
54914
|
U === "blending" ? (E.value.style.zIndex = `${Math.floor(S.value[0] / 2)}`, E.value.style.position = "absolute", E.value.style.pointerEvents = "none") : (E.value.style.zIndex = null, E.value.style.position = null, E.value.style.pointerEvents = null);
|
|
54906
54915
|
}
|
|
54907
|
-
),
|
|
54916
|
+
), Z(
|
|
54908
54917
|
() => [o.value, b.instance, A.width.value, A.height.value, n.default?.()],
|
|
54909
54918
|
([U, D]) => {
|
|
54910
54919
|
if (U && D) {
|
|
@@ -54934,7 +54943,7 @@ const ML = /* @__PURE__ */ ((l) => (e) => m_(e, l))([1, -1, 1, 1, 1, -1, 1, 1, 1
|
|
|
54934
54943
|
}, n.default?.()), lT(L.value, E.value);
|
|
54935
54944
|
}
|
|
54936
54945
|
}
|
|
54937
|
-
),
|
|
54946
|
+
), Et(() => {
|
|
54938
54947
|
f?.value && (E.value.className = f.value);
|
|
54939
54948
|
});
|
|
54940
54949
|
const ce = Fe(!0), { onBeforeRender: he } = ot();
|
|
@@ -55528,7 +55537,7 @@ function GU(l = () => {
|
|
|
55528
55537
|
}
|
|
55529
55538
|
let o = () => {
|
|
55530
55539
|
};
|
|
55531
|
-
return
|
|
55540
|
+
return Z(e, () => {
|
|
55532
55541
|
o(), e.value && (o = r(e.value));
|
|
55533
55542
|
}), { ref: e, intersect: t, off: () => o() };
|
|
55534
55543
|
}
|
|
@@ -55540,7 +55549,7 @@ const UL = ["args"], zL = ["color"], VU = /* @__PURE__ */ me({
|
|
|
55540
55549
|
},
|
|
55541
55550
|
setup(l, { expose: e }) {
|
|
55542
55551
|
const t = l, { invalidate: s } = Le(), { args: i, color: n } = rt(t);
|
|
55543
|
-
|
|
55552
|
+
Z(i, () => {
|
|
55544
55553
|
s();
|
|
55545
55554
|
});
|
|
55546
55555
|
const r = ne();
|
|
@@ -55599,7 +55608,7 @@ const UL = ["args"], zL = ["color"], VU = /* @__PURE__ */ me({
|
|
|
55599
55608
|
const g = s(m, f.length).map((v) => v.toArray()).flat();
|
|
55600
55609
|
p.setColors(g), r.computeLineDistances();
|
|
55601
55610
|
}
|
|
55602
|
-
u(i, t), h(n, t.points, t.vertexColors), r.computeLineDistances(),
|
|
55611
|
+
u(i, t), h(n, t.points, t.vertexColors), r.computeLineDistances(), Z(() => [
|
|
55603
55612
|
t.color,
|
|
55604
55613
|
t.lineWidth,
|
|
55605
55614
|
t.alphaToCoverage,
|
|
@@ -55611,9 +55620,9 @@ const UL = ["args"], zL = ["color"], VU = /* @__PURE__ */ me({
|
|
|
55611
55620
|
t.dashOffset
|
|
55612
55621
|
], () => {
|
|
55613
55622
|
u(i, t), a();
|
|
55614
|
-
}),
|
|
55623
|
+
}), Z(() => [t.points, t.vertexColors], () => {
|
|
55615
55624
|
h(n, t.points, t.vertexColors), a();
|
|
55616
|
-
}),
|
|
55625
|
+
}), Z(() => [o.height, o.width], () => {
|
|
55617
55626
|
i.resolution = new Pe(o.width.value, o.height.value), a();
|
|
55618
55627
|
}), Bt(() => {
|
|
55619
55628
|
n.dispose(), i.dispose();
|
|
@@ -55678,7 +55687,7 @@ const UL = ["args"], zL = ["color"], VU = /* @__PURE__ */ me({
|
|
|
55678
55687
|
},
|
|
55679
55688
|
setup(l, { expose: e }) {
|
|
55680
55689
|
const t = l, { invalidate: s } = Le(), { args: i, color: n } = rt(t);
|
|
55681
|
-
|
|
55690
|
+
Z(i, () => {
|
|
55682
55691
|
s();
|
|
55683
55692
|
});
|
|
55684
55693
|
const r = ne();
|
|
@@ -55702,7 +55711,7 @@ const UL = ["args"], zL = ["color"], VU = /* @__PURE__ */ me({
|
|
|
55702
55711
|
},
|
|
55703
55712
|
setup(l, { expose: e }) {
|
|
55704
55713
|
const t = l, { invalidate: s } = Le(), { args: i, color: n } = rt(t);
|
|
55705
|
-
|
|
55714
|
+
Z(i, () => {
|
|
55706
55715
|
s();
|
|
55707
55716
|
});
|
|
55708
55717
|
const r = ne();
|
|
@@ -55765,7 +55774,7 @@ const UL = ["args"], zL = ["color"], VU = /* @__PURE__ */ me({
|
|
|
55765
55774
|
},
|
|
55766
55775
|
setup(l, { expose: e }) {
|
|
55767
55776
|
const t = l, { invalidate: s } = Le(), { args: i, color: n } = rt(t);
|
|
55768
|
-
|
|
55777
|
+
Z(i, () => {
|
|
55769
55778
|
s();
|
|
55770
55779
|
});
|
|
55771
55780
|
const r = ne();
|
|
@@ -55789,7 +55798,7 @@ const UL = ["args"], zL = ["color"], VU = /* @__PURE__ */ me({
|
|
|
55789
55798
|
},
|
|
55790
55799
|
setup(l, { expose: e }) {
|
|
55791
55800
|
const t = l, { invalidate: s } = Le(), { args: i, color: n } = rt(t);
|
|
55792
|
-
|
|
55801
|
+
Z(i, () => {
|
|
55793
55802
|
s();
|
|
55794
55803
|
});
|
|
55795
55804
|
const r = ne();
|
|
@@ -55813,7 +55822,7 @@ const UL = ["args"], zL = ["color"], VU = /* @__PURE__ */ me({
|
|
|
55813
55822
|
},
|
|
55814
55823
|
setup(l, { expose: e }) {
|
|
55815
55824
|
const t = l, { invalidate: s } = Le(), { args: i, color: n } = rt(t);
|
|
55816
|
-
|
|
55825
|
+
Z(i, () => {
|
|
55817
55826
|
s();
|
|
55818
55827
|
});
|
|
55819
55828
|
const r = ne();
|
|
@@ -55837,7 +55846,7 @@ const UL = ["args"], zL = ["color"], VU = /* @__PURE__ */ me({
|
|
|
55837
55846
|
},
|
|
55838
55847
|
setup(l, { expose: e }) {
|
|
55839
55848
|
const t = l, { invalidate: s } = Le(), { args: i, color: n } = rt(t);
|
|
55840
|
-
|
|
55849
|
+
Z(i, () => {
|
|
55841
55850
|
s();
|
|
55842
55851
|
});
|
|
55843
55852
|
const r = ne();
|
|
@@ -55861,7 +55870,7 @@ const UL = ["args"], zL = ["color"], VU = /* @__PURE__ */ me({
|
|
|
55861
55870
|
},
|
|
55862
55871
|
setup(l, { expose: e }) {
|
|
55863
55872
|
const t = l, { invalidate: s } = Le(), { args: i, color: n } = rt(t);
|
|
55864
|
-
|
|
55873
|
+
Z(i, () => {
|
|
55865
55874
|
s();
|
|
55866
55875
|
});
|
|
55867
55876
|
const r = ne();
|
|
@@ -55886,7 +55895,7 @@ const UL = ["args"], zL = ["color"], VU = /* @__PURE__ */ me({
|
|
|
55886
55895
|
},
|
|
55887
55896
|
setup(l, { expose: e }) {
|
|
55888
55897
|
const t = l, { args: s, color: i } = rt(t), { invalidate: n } = Le();
|
|
55889
|
-
|
|
55898
|
+
Z(s, () => {
|
|
55890
55899
|
n();
|
|
55891
55900
|
});
|
|
55892
55901
|
const r = ne();
|
|
@@ -55910,7 +55919,7 @@ const UL = ["args"], zL = ["color"], VU = /* @__PURE__ */ me({
|
|
|
55910
55919
|
},
|
|
55911
55920
|
setup(l, { expose: e }) {
|
|
55912
55921
|
const t = l, { args: s, color: i } = rt(t), { invalidate: n, extend: r } = Le();
|
|
55913
|
-
r({ RoundedBoxGeometry: vw }),
|
|
55922
|
+
r({ RoundedBoxGeometry: vw }), Z(s, () => {
|
|
55914
55923
|
n();
|
|
55915
55924
|
});
|
|
55916
55925
|
const o = ne();
|
|
@@ -55947,7 +55956,7 @@ const UL = ["args"], zL = ["color"], VU = /* @__PURE__ */ me({
|
|
|
55947
55956
|
},
|
|
55948
55957
|
setup(l, { expose: e }) {
|
|
55949
55958
|
const t = l, { invalidate: s } = Le(), { args: i, color: n } = rt(t);
|
|
55950
|
-
|
|
55959
|
+
Z(i, () => {
|
|
55951
55960
|
s();
|
|
55952
55961
|
});
|
|
55953
55962
|
const r = ne();
|
|
@@ -56009,9 +56018,9 @@ const UL = ["args"], zL = ["color"], VU = /* @__PURE__ */ me({
|
|
|
56009
56018
|
}
|
|
56010
56019
|
P.needsUpdate = !0, p.computeVertexNormals();
|
|
56011
56020
|
}
|
|
56012
|
-
|
|
56021
|
+
Z(() => t.color, () => a.value = t.color), Z(() => [t.widthSegments, t.heightSegments], () => {
|
|
56013
56022
|
o.value && o.value.dispose(), o.value = c(t.widthSegments, t.heightSegments), s();
|
|
56014
|
-
}, { immediate: !0 }),
|
|
56023
|
+
}, { immediate: !0 }), Z(() => [
|
|
56015
56024
|
t.numArmsA,
|
|
56016
56025
|
t.expA[0],
|
|
56017
56026
|
t.expA[1],
|
|
@@ -56045,7 +56054,7 @@ const UL = ["args"], zL = ["color"], VU = /* @__PURE__ */ me({
|
|
|
56045
56054
|
},
|
|
56046
56055
|
setup(l, { expose: e }) {
|
|
56047
56056
|
const t = l, { invalidate: s } = Le(), { args: i, color: n } = rt(t);
|
|
56048
|
-
|
|
56057
|
+
Z(i, () => {
|
|
56049
56058
|
s();
|
|
56050
56059
|
});
|
|
56051
56060
|
const r = ne();
|
|
@@ -56070,7 +56079,7 @@ const UL = ["args"], zL = ["color"], VU = /* @__PURE__ */ me({
|
|
|
56070
56079
|
},
|
|
56071
56080
|
setup(l, { expose: e }) {
|
|
56072
56081
|
const t = l, { args: s, color: i } = rt(t), { invalidate: n } = Le();
|
|
56073
|
-
|
|
56082
|
+
Z(s, () => {
|
|
56074
56083
|
n();
|
|
56075
56084
|
});
|
|
56076
56085
|
const r = ne();
|
|
@@ -56094,7 +56103,7 @@ const UL = ["args"], zL = ["color"], VU = /* @__PURE__ */ me({
|
|
|
56094
56103
|
},
|
|
56095
56104
|
setup(l, { expose: e }) {
|
|
56096
56105
|
const t = l, { args: s, color: i } = rt(t), { invalidate: n } = Le();
|
|
56097
|
-
|
|
56106
|
+
Z(s, () => {
|
|
56098
56107
|
n();
|
|
56099
56108
|
});
|
|
56100
56109
|
const r = ne();
|
|
@@ -56124,7 +56133,7 @@ const UL = ["args"], zL = ["color"], VU = /* @__PURE__ */ me({
|
|
|
56124
56133
|
},
|
|
56125
56134
|
setup(l, { expose: e }) {
|
|
56126
56135
|
const t = l, { invalidate: s } = Le(), { args: i, color: n } = rt(t);
|
|
56127
|
-
|
|
56136
|
+
Z(i, () => {
|
|
56128
56137
|
s();
|
|
56129
56138
|
});
|
|
56130
56139
|
const r = ne();
|
|
@@ -56393,11 +56402,11 @@ const MO = /* @__PURE__ */ Nu(
|
|
|
56393
56402
|
}
|
|
56394
56403
|
c.value.visible = !1, u.value.finish(), h.value = u.value.progressiveLightMap2.texture;
|
|
56395
56404
|
}
|
|
56396
|
-
return
|
|
56405
|
+
return Et(() => {
|
|
56397
56406
|
a.value && u.value.configure(a.value, c.value);
|
|
56398
|
-
}),
|
|
56407
|
+
}), Z(() => [t.frames, t.once, t.accumulate, t.scale, t.limit], f), Et(f), ot().onBeforeRender(() => {
|
|
56399
56408
|
t.once || (d = 0), p--, !(p < 0) && (t.accumulate && t.once ? (d < t.frames || d < t.blend) && (r(), m(), d++) : (r(), d < t.frames && (m(t.frames - d), d = t.frames)));
|
|
56400
|
-
}),
|
|
56409
|
+
}), Et(() => c.value.traverse = () => null), e({ instance: o, update: () => {
|
|
56401
56410
|
f(), m();
|
|
56402
56411
|
} }), (y, g) => (ue(), pe("TresGroup", {
|
|
56403
56412
|
ref_key: "gOuter",
|
|
@@ -56486,7 +56495,7 @@ const MO = /* @__PURE__ */ Nu(
|
|
|
56486
56495
|
}
|
|
56487
56496
|
let p = null, f = null;
|
|
56488
56497
|
const m = ot();
|
|
56489
|
-
return
|
|
56498
|
+
return Et(() => {
|
|
56490
56499
|
p?.(), p = null;
|
|
56491
56500
|
const y = Be(s.cacheKey);
|
|
56492
56501
|
y === f && f !== null && f !== void 0 || (f = y, s.cacheKey === null || s.cacheKey === void 0 ? p = m.onBeforeRender(() => {
|
|
@@ -56518,7 +56527,7 @@ const MO = /* @__PURE__ */ Nu(
|
|
|
56518
56527
|
},
|
|
56519
56528
|
setup(l, { expose: e }) {
|
|
56520
56529
|
const t = l, s = (c) => c === 0 ? 0 : 2 ** (10 * c - 10), { floor: i, segments: n, receiveShadow: r } = rt(t), o = Fe(null);
|
|
56521
|
-
|
|
56530
|
+
Z(
|
|
56522
56531
|
[n, i, o],
|
|
56523
56532
|
([c, u, h]) => {
|
|
56524
56533
|
if (!h || c === null)
|
|
@@ -56713,17 +56722,17 @@ const LO = ["object", "duration", "offset"], OO = /* @__PURE__ */ me({
|
|
|
56713
56722
|
};
|
|
56714
56723
|
ot().onBeforeRender(({ delta: f }) => {
|
|
56715
56724
|
u.animate(f) && a();
|
|
56716
|
-
}),
|
|
56725
|
+
}), Et(() => {
|
|
56717
56726
|
r.value && (u.controls = r.value);
|
|
56718
56727
|
});
|
|
56719
56728
|
const d = Re(() => n.value?.uuid);
|
|
56720
|
-
|
|
56729
|
+
Z(d, () => {
|
|
56721
56730
|
n.value && (u.camera = n.value);
|
|
56722
56731
|
}, { immediate: !0, deep: !1 });
|
|
56723
56732
|
const p = nf(h, 250, { maxWait: 2e3 });
|
|
56724
|
-
return
|
|
56733
|
+
return Z(() => [o.width.value, o.height.value], () => {
|
|
56725
56734
|
s.useResize && p();
|
|
56726
|
-
}),
|
|
56735
|
+
}), Z(() => [s.easing], () => {
|
|
56727
56736
|
u.easing = s.easing ?? c;
|
|
56728
56737
|
}, { immediate: !0 }), Ki(() => {
|
|
56729
56738
|
s.useMounted && p();
|
|
@@ -56827,13 +56836,13 @@ const LO = ["object", "duration", "offset"], OO = /* @__PURE__ */ me({
|
|
|
56827
56836
|
}) => {
|
|
56828
56837
|
h < t.frames && (h++, i(t, Be(f), p, u));
|
|
56829
56838
|
}
|
|
56830
|
-
),
|
|
56839
|
+
), Z(() => [t.opacity, t.depthWrite, t.blur, t.smooth], () => {
|
|
56831
56840
|
u.plane.material.opacity = t.opacity ?? 1, u.plane.material.depthWrite = t.depthWrite ?? !1, d();
|
|
56832
|
-
}, { immediate: !0 }),
|
|
56841
|
+
}, { immediate: !0 }), Z(() => [t.color, t.tint], () => {
|
|
56833
56842
|
a(t, u), d();
|
|
56834
|
-
}, { immediate: !0 }),
|
|
56843
|
+
}, { immediate: !0 }), Z(() => [t.resolution], () => {
|
|
56835
56844
|
o(t.resolution, u), d();
|
|
56836
|
-
}),
|
|
56845
|
+
}), Z(() => [t.width, t.height, t.scale, t.far], () => {
|
|
56837
56846
|
r(t, u), d();
|
|
56838
56847
|
}, { immediate: !0 }), Bt(() => {
|
|
56839
56848
|
for (const p of Object.values(u))
|
|
@@ -56875,7 +56884,7 @@ const LO = ["object", "duration", "offset"], OO = /* @__PURE__ */ me({
|
|
|
56875
56884
|
use: { position: !0 }
|
|
56876
56885
|
};
|
|
56877
56886
|
}
|
|
56878
|
-
|
|
56887
|
+
Z(() => [t.into, t.precise], () => r(t.into, t.precise)), Ki(() => {
|
|
56879
56888
|
r(t.into, t.precise), Kp().then(() => {
|
|
56880
56889
|
r(t.into, t.precise);
|
|
56881
56890
|
});
|
|
@@ -57143,11 +57152,11 @@ const LO = ["object", "duration", "offset"], OO = /* @__PURE__ */ me({
|
|
|
57143
57152
|
for (let M = 0; M < p.value * 2; M += 2)
|
|
57144
57153
|
v[M] = (Math.random() - 0.5) / 5 * f.value * m.value, v[M + 1] = Math.random() / 5 * f.value;
|
|
57145
57154
|
};
|
|
57146
|
-
_(), x(),
|
|
57155
|
+
_(), x(), Et(() => {
|
|
57147
57156
|
_(), x();
|
|
57148
57157
|
});
|
|
57149
57158
|
const T = ne(null), S = ne(null);
|
|
57150
|
-
|
|
57159
|
+
Et(async () => {
|
|
57151
57160
|
if (typeof r.value == "string") {
|
|
57152
57161
|
const { state: M } = Kr(r.value);
|
|
57153
57162
|
T.value = M.value;
|
|
@@ -57218,7 +57227,7 @@ const LO = ["object", "duration", "offset"], OO = /* @__PURE__ */ me({
|
|
|
57218
57227
|
);
|
|
57219
57228
|
a.addColorStop(t.offset, new Ie(t.color).getStyle()), a.addColorStop(1, "rgba(0,0,0,0)"), i.clearRect(0, 0, Vc, Vc), i.fillStyle = a, i.fillRect(0, 0, s.width, s.height), n.needsUpdate = !0;
|
|
57220
57229
|
}
|
|
57221
|
-
|
|
57230
|
+
Et(r);
|
|
57222
57231
|
const o = ne();
|
|
57223
57232
|
return e({ instance: o }), Bt(() => n.dispose()), (a, c) => (ue(), pe("TresMesh", {
|
|
57224
57233
|
ref_key: "shadowRef",
|
|
@@ -57249,7 +57258,7 @@ const LO = ["object", "duration", "offset"], OO = /* @__PURE__ */ me({
|
|
|
57249
57258
|
},
|
|
57250
57259
|
setup(l, { expose: e }) {
|
|
57251
57260
|
const t = l, { invalidate: s } = Le();
|
|
57252
|
-
|
|
57261
|
+
Z(t, () => {
|
|
57253
57262
|
s();
|
|
57254
57263
|
});
|
|
57255
57264
|
const i = new vS(), n = Re(
|
|
@@ -57460,7 +57469,7 @@ float PCSS (sampler2D shadowMap, vec4 coords) {
|
|
|
57460
57469
|
}
|
|
57461
57470
|
return Bt(() => {
|
|
57462
57471
|
r.value && (nh.shadowmap_pars_fragment = s, a(i, n.value, r.value));
|
|
57463
|
-
}),
|
|
57472
|
+
}), Z(e, () => {
|
|
57464
57473
|
r.value && (o(i, e), a(i, n.value, r.value));
|
|
57465
57474
|
}, { immediate: !0 }), (c, u) => (ue(), pe("TresGroup"));
|
|
57466
57475
|
}
|
|
@@ -57561,7 +57570,7 @@ class r3 {
|
|
|
57561
57570
|
use() {
|
|
57562
57571
|
const e = this.build(), t = ne(e);
|
|
57563
57572
|
for (const s of this.entries)
|
|
57564
|
-
s.ref &&
|
|
57573
|
+
s.ref && Z(s.ref, () => {
|
|
57565
57574
|
s.data = s.ref?.value, cT(this.dirty);
|
|
57566
57575
|
});
|
|
57567
57576
|
return HT(
|
|
@@ -57865,18 +57874,18 @@ const p3 = ["object"], yz = /* @__PURE__ */ me({
|
|
|
57865
57874
|
[h.uMixNoise, i.mixNoise],
|
|
57866
57875
|
[h.uInfoTexture, r]
|
|
57867
57876
|
].forEach(
|
|
57868
|
-
([v, x]) =>
|
|
57877
|
+
([v, x]) => Z(
|
|
57869
57878
|
x,
|
|
57870
57879
|
() => {
|
|
57871
57880
|
v.value = x.value;
|
|
57872
57881
|
},
|
|
57873
57882
|
d
|
|
57874
57883
|
)
|
|
57875
|
-
),
|
|
57884
|
+
), Z([i.noiseScale, i.lifetimeSec], () => {
|
|
57876
57885
|
h.uNoiseScale.value = i.noiseScale.value * i.lifetimeSec.value;
|
|
57877
|
-
}, d),
|
|
57886
|
+
}, d), Z([i.lifetimeSec, i.cooldownSec], () => {
|
|
57878
57887
|
h.uCooldownRatio.value = i.cooldownSec.value / i.lifetimeSec.value;
|
|
57879
|
-
}, d),
|
|
57888
|
+
}, d), Z(i.map, () => {
|
|
57880
57889
|
if (typeof i.map.value == "string") {
|
|
57881
57890
|
const { state: v } = Kr(i.map.value);
|
|
57882
57891
|
c.uniforms.uMap.value = v;
|
|
@@ -57936,9 +57945,9 @@ const p3 = ["object"], yz = /* @__PURE__ */ me({
|
|
|
57936
57945
|
}, i = Fe(2), n = Fe(0), r = ne(), o = ne(), a = ne(), c = ne(), u = nf(() => {
|
|
57937
57946
|
o.value?.instance && o.value.instance.lookAt(o.value.instance);
|
|
57938
57947
|
}, 500, { maxWait: 2e3 });
|
|
57939
|
-
|
|
57948
|
+
Z(() => [t.adjustCamera, i.value], () => {
|
|
57940
57949
|
a.value?.update(), t.adjustCamera !== !1 && o.value && (o.value.instance.offset = typeof t.adjustCamera == "boolean" ? 0.3 : t.adjustCamera, u());
|
|
57941
|
-
}),
|
|
57950
|
+
}), Z(() => [t.shadows], () => {
|
|
57942
57951
|
c.value?.update();
|
|
57943
57952
|
});
|
|
57944
57953
|
const h = Re(() => {
|
|
@@ -58046,7 +58055,7 @@ const p3 = ["object"], yz = /* @__PURE__ */ me({
|
|
|
58046
58055
|
},
|
|
58047
58056
|
setup(l, { expose: e }) {
|
|
58048
58057
|
const t = l, s = Fe(), i = Fe(), { radius: n, depth: r, count: o, size: a, sizeAttenuation: c, transparent: u, alphaMap: h, alphaTest: d } = rt(t), { invalidate: p } = Le();
|
|
58049
|
-
|
|
58058
|
+
Z(t, () => {
|
|
58050
58059
|
p();
|
|
58051
58060
|
});
|
|
58052
58061
|
const f = () => {
|
|
@@ -58059,7 +58068,7 @@ const p3 = ["object"], yz = /* @__PURE__ */ me({
|
|
|
58059
58068
|
y -= g.value * Math.random(), v.push(..._(y));
|
|
58060
58069
|
s.value = new Float32Array(v), i.value = new Float32Array(x);
|
|
58061
58070
|
};
|
|
58062
|
-
|
|
58071
|
+
Et(() => {
|
|
58063
58072
|
f();
|
|
58064
58073
|
});
|
|
58065
58074
|
const m = ne();
|
|
@@ -58136,7 +58145,7 @@ const T3 = /* @__PURE__ */ me({
|
|
|
58136
58145
|
const v = _m(d.value).virtualScene;
|
|
58137
58146
|
h.update(o.instance, v), o.instance.autoClear = g, m++;
|
|
58138
58147
|
}
|
|
58139
|
-
}, -1),
|
|
58148
|
+
}, -1), Z([p, d], ([g, v]) => {
|
|
58140
58149
|
if (g && v?.virtualScene) {
|
|
58141
58150
|
const x = _m(v).virtualScene;
|
|
58142
58151
|
let _ = x.children.find(
|
|
@@ -58151,9 +58160,9 @@ const T3 = /* @__PURE__ */ me({
|
|
|
58151
58160
|
const y = (g) => {
|
|
58152
58161
|
g && c?.length ? (a.value.environment = g.texture, i.background && (a.value.background = g.texture)) : p.value && (a.value.environment = p.value, i.background && (a.value.background = p.value));
|
|
58153
58162
|
};
|
|
58154
|
-
return
|
|
58163
|
+
return Z(p, () => {
|
|
58155
58164
|
u.value && y(u.value);
|
|
58156
|
-
}, { immediate: !0, deep: !0 }),
|
|
58165
|
+
}, { immediate: !0, deep: !0 }), Z(() => ef().default, (g) => {
|
|
58157
58166
|
if (g && (c = g(), Array.isArray(c) && c.length > 0)) {
|
|
58158
58167
|
r({ EnvironmentScene: Ny }), u.value = new Py(i.resolution), u.value.texture.type = ii, h = new Iy(i.near, i.far, u.value), y(u.value);
|
|
58159
58168
|
return;
|
|
@@ -58187,7 +58196,7 @@ const T3 = /* @__PURE__ */ me({
|
|
|
58187
58196
|
},
|
|
58188
58197
|
setup(l, { expose: e }) {
|
|
58189
58198
|
const t = l, s = Fe(), i = Fe();
|
|
58190
|
-
return
|
|
58199
|
+
return Et(() => {
|
|
58191
58200
|
s.value && (s.value.color.copy(new Ie(t.color)), s.value.color.multiplyScalar(t.intensity), s.value.needsUpdate = !0);
|
|
58192
58201
|
}), e({ mesh: i }), (n, r) => (ue(), pe("TresMesh", {
|
|
58193
58202
|
ref_key: "mesh",
|