@tomorrowevening/hermes 0.1.7 → 0.1.9
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/hermes.cjs.js +1 -1
- package/dist/hermes.es.js +457 -455
- package/package.json +1 -1
- package/types/utils/post.d.ts +1 -1
package/dist/hermes.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { types as le, getProject as lx } from "@theatre/core";
|
|
2
|
-
import { Texture as Ph, OrthographicCamera as Fh, Scene as Pm, MeshBasicMaterial as Tn, BufferGeometry as Sn, Float32BufferAttribute as yn, Mesh as Y, LinearSRGBColorSpace as Fa, ObjectLoader as cx, AnimationMixer as hx, AnimationClip as ux, WebGLRenderTarget as Fm, RGBAFormat as dx, EventDispatcher as Dm, RepeatWrapping as Ud, Color as wn, ColorManagement as ir, FrontSide as px, BackSide as Om, DoubleSide as xu, ZeroFactor as
|
|
2
|
+
import { Texture as Ph, OrthographicCamera as Fh, Scene as Pm, MeshBasicMaterial as Tn, BufferGeometry as Sn, Float32BufferAttribute as yn, Mesh as Y, LinearSRGBColorSpace as Fa, ObjectLoader as cx, AnimationMixer as hx, AnimationClip as ux, WebGLRenderTarget as Fm, RGBAFormat as dx, EventDispatcher as Dm, RepeatWrapping as Ud, Color as wn, ColorManagement as ir, FrontSide as px, BackSide as Om, DoubleSide as xu, ZeroFactor as Bm, OneFactor as Im, SrcColorFactor as Lm, OneMinusSrcColorFactor as Um, SrcAlphaFactor as km, OneMinusSrcAlphaFactor as zm, DstAlphaFactor as Gm, OneMinusDstAlphaFactor as Vm, DstColorFactor as Hm, OneMinusDstColorFactor as $m, SrcAlphaSaturateFactor as fx, ConstantColorFactor as Wm, OneMinusConstantColorFactor as jm, ConstantAlphaFactor as qm, OneMinusConstantAlphaFactor as Ym, AddEquation as mx, SubtractEquation as gx, ReverseSubtractEquation as yx, MinEquation as xx, MaxEquation as _x, NoBlending as bx, NormalBlending as Tx, AdditiveBlending as Sx, SubtractiveBlending as vx, MultiplyBlending as wx, CustomBlending as Ex, Line as Us, LineBasicMaterial as _u, Controls as Xm, Vector3 as Z, MOUSE as ur, TOUCH as nr, Quaternion as es, Spherical as Dh, Vector2 as xt, Ray as Cx, Plane as Mx, MathUtils as Ax, ShaderMaterial as Zm, GLSL3 as Rx, PlaneGeometry as Km, Raycaster as Da, Object3D as Tr, CylinderGeometry as zt, BoxGeometry as St, OctahedronGeometry as Ja, TorusGeometry as Ur, SphereGeometry as Qm, Euler as Jm, Matrix4 as Nl, CatmullRomCurve3 as kd, Group as Nx, AxesHelper as Px, MeshDepthMaterial as Fx, MeshNormalMaterial as Dx, Sphere as Ox, Box3 as Bx, Vector4 as Ix, WebGLRenderer as pa, PerspectiveCamera as zd, CameraHelper as Lx, SkinnedMesh as Ux, SpotLightHelper as kx, PointLightHelper as zx, HemisphereLightHelper as Gx, DirectionalLightHelper as Vx, Clock as Hx, SkeletonHelper as $x, SRGBColorSpace as Gd, NoToneMapping as Vd, NoColorSpace as Wx, LinearToneMapping as jx, ReinhardToneMapping as qx, CineonToneMapping as Yx, ACESFilmicToneMapping as Xx, AgXToneMapping as Zx, NeutralToneMapping as Kx, CustomToneMapping as Qx } from "three";
|
|
3
3
|
import eg, { useState as Ne, useRef as Ve, useEffect as Pr, useMemo as va, Component as Ha, createRef as Ri, forwardRef as Jx } from "react";
|
|
4
4
|
const al = () => {
|
|
5
5
|
}, cP = () => {
|
|
@@ -169,7 +169,7 @@ const a_ = ({ mobileTiers: a = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
|
|
|
169
169
|
let X, [we, , , , ue] = $ > 1 ? W.map((be) => [be, n_(q, be[2])]).sort(([, be], [, lt]) => be - lt)[0][0] : W[0], ye = Number.MAX_VALUE;
|
|
170
170
|
const { devicePixelRatio: se } = window, Ee = c.width * se * c.height * se;
|
|
171
171
|
for (const be of ue) {
|
|
172
|
-
const [lt, Ut] = be,
|
|
172
|
+
const [lt, Ut] = be, Ir = lt * Ut, Rn = Math.abs(Ee - Ir);
|
|
173
173
|
Rn < ye && (ye = Rn, X = be);
|
|
174
174
|
}
|
|
175
175
|
if (!X) return;
|
|
@@ -614,13 +614,13 @@ const Yd = (a) => {
|
|
|
614
614
|
a.dispose !== void 0 && a.dispose();
|
|
615
615
|
}
|
|
616
616
|
};
|
|
617
|
-
let
|
|
617
|
+
let Bh = 0;
|
|
618
618
|
const Xd = () => {
|
|
619
|
-
|
|
620
|
-
},
|
|
619
|
+
Bh = 0;
|
|
620
|
+
}, Ih = (a) => {
|
|
621
621
|
if (!a) return;
|
|
622
622
|
let e = a.name.replaceAll(" ", "").replaceAll("/", ".");
|
|
623
|
-
if (e.length === 0 && (e = `obj_${
|
|
623
|
+
if (e.length === 0 && (e = `obj_${Bh}`, Bh++), a.parent !== null && a.parent.uuid.length > 0 && (e = `${a.parent.uuid}.${e}`), a.uuid = e, a.isMesh !== void 0) {
|
|
624
624
|
const t = a;
|
|
625
625
|
if (Array.isArray(t.material))
|
|
626
626
|
t.material.forEach((s, i) => {
|
|
@@ -631,7 +631,7 @@ const Xd = () => {
|
|
|
631
631
|
s.uuid = `${e}.material`;
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
|
-
a.children.forEach((t) =>
|
|
634
|
+
a.children.forEach((t) => Ih(t));
|
|
635
635
|
};
|
|
636
636
|
class xn {
|
|
637
637
|
static renderer;
|
|
@@ -700,25 +700,26 @@ function _P(a) {
|
|
|
700
700
|
});
|
|
701
701
|
}
|
|
702
702
|
let Lh = [];
|
|
703
|
-
function y_(a, e) {
|
|
703
|
+
function y_(a, e, t = !0) {
|
|
704
704
|
xn.renderer = e.renderer;
|
|
705
|
-
const
|
|
706
|
-
|
|
705
|
+
const s = [];
|
|
706
|
+
s.push({
|
|
707
707
|
type: "boolean",
|
|
708
708
|
prop: "Enabled",
|
|
709
709
|
value: a.enabled
|
|
710
710
|
});
|
|
711
|
-
let
|
|
712
|
-
console.log("Default Handle Pass:",
|
|
711
|
+
let i = (r, o) => {
|
|
712
|
+
console.log("Default Handle Pass:", r, o);
|
|
713
713
|
};
|
|
714
714
|
if (a.name === "EffectPass")
|
|
715
|
-
a.effects.forEach((
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
715
|
+
a.effects.forEach((r) => {
|
|
716
|
+
r.uniforms.size > 0 && r.uniforms.forEach((o, l) => {
|
|
717
|
+
if (l === "map") return;
|
|
718
|
+
const c = `${r.name.replace("Effect", "")} ${l}`;
|
|
719
|
+
if (o.value === null && t)
|
|
720
|
+
s.push({
|
|
721
|
+
prop: l,
|
|
722
|
+
title: c,
|
|
722
723
|
type: "image",
|
|
723
724
|
value: {
|
|
724
725
|
offset: [0, 0],
|
|
@@ -726,51 +727,52 @@ function y_(a, e) {
|
|
|
726
727
|
src: ""
|
|
727
728
|
}
|
|
728
729
|
});
|
|
729
|
-
else if (
|
|
730
|
-
const
|
|
731
|
-
|
|
732
|
-
prop:
|
|
733
|
-
title:
|
|
730
|
+
else if (o.value.isTexture && t) {
|
|
731
|
+
const h = o.value, u = xn.renderToBlob(h);
|
|
732
|
+
s.push({
|
|
733
|
+
prop: l,
|
|
734
|
+
title: c,
|
|
734
735
|
type: "image",
|
|
735
736
|
value: {
|
|
736
|
-
offset: [
|
|
737
|
-
repeat: [
|
|
738
|
-
src:
|
|
737
|
+
offset: [h.offset.x, h.offset.y],
|
|
738
|
+
repeat: [h.repeat.x, h.repeat.y],
|
|
739
|
+
src: u
|
|
739
740
|
}
|
|
740
741
|
});
|
|
741
|
-
} else typeof
|
|
742
|
-
prop:
|
|
743
|
-
title:
|
|
742
|
+
} else typeof o.value == "number" ? s.push({
|
|
743
|
+
prop: l,
|
|
744
|
+
title: c,
|
|
744
745
|
type: "number",
|
|
745
|
-
value:
|
|
746
|
+
value: o.value,
|
|
746
747
|
step: 0.01
|
|
747
|
-
}) : typeof
|
|
748
|
-
prop:
|
|
749
|
-
title:
|
|
748
|
+
}) : typeof o.value == "string" ? s.push({
|
|
749
|
+
prop: l,
|
|
750
|
+
title: c,
|
|
750
751
|
type: "string",
|
|
751
|
-
value:
|
|
752
|
-
}) : typeof
|
|
753
|
-
prop:
|
|
754
|
-
title:
|
|
752
|
+
value: o.value
|
|
753
|
+
}) : typeof o.value == "boolean" && s.push({
|
|
754
|
+
prop: l,
|
|
755
|
+
title: c,
|
|
755
756
|
type: "boolean",
|
|
756
|
-
value:
|
|
757
|
+
value: o.value
|
|
757
758
|
});
|
|
758
759
|
});
|
|
759
|
-
}),
|
|
760
|
-
a.effects.forEach((
|
|
761
|
-
|
|
762
|
-
|
|
760
|
+
}), i = (r, o) => {
|
|
761
|
+
a.effects.forEach((l) => {
|
|
762
|
+
l.uniforms.size > 0 && l.uniforms.forEach((c, h) => {
|
|
763
|
+
h === r && (c.value = o);
|
|
763
764
|
});
|
|
764
765
|
});
|
|
765
766
|
};
|
|
766
767
|
else if (a.name === "ShaderPass") {
|
|
767
|
-
const
|
|
768
|
-
for (const
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
768
|
+
const r = a.fullscreenMaterial;
|
|
769
|
+
for (const o in r.uniforms) {
|
|
770
|
+
if (o === "inputBuffer" || o === "map") continue;
|
|
771
|
+
const l = r.uniforms[o], c = `${r.name.replace("Material", "")} ${o}`;
|
|
772
|
+
if (l.value === null && t)
|
|
773
|
+
s.push({
|
|
774
|
+
title: c,
|
|
775
|
+
prop: o,
|
|
774
776
|
type: "image",
|
|
775
777
|
value: {
|
|
776
778
|
offset: [0, 0],
|
|
@@ -778,50 +780,50 @@ function y_(a, e) {
|
|
|
778
780
|
src: ""
|
|
779
781
|
}
|
|
780
782
|
});
|
|
781
|
-
else if (
|
|
782
|
-
const
|
|
783
|
-
|
|
784
|
-
title:
|
|
785
|
-
prop:
|
|
783
|
+
else if (l.value.isTexture && t) {
|
|
784
|
+
const h = l.value, u = xn.renderToBlob(h);
|
|
785
|
+
s.push({
|
|
786
|
+
title: c,
|
|
787
|
+
prop: o,
|
|
786
788
|
type: "image",
|
|
787
789
|
value: {
|
|
788
|
-
offset: [
|
|
789
|
-
repeat: [
|
|
790
|
-
src:
|
|
790
|
+
offset: [h.offset.x, h.offset.y],
|
|
791
|
+
repeat: [h.repeat.x, h.repeat.y],
|
|
792
|
+
src: u
|
|
791
793
|
}
|
|
792
794
|
});
|
|
793
|
-
} else typeof
|
|
794
|
-
title:
|
|
795
|
-
prop:
|
|
795
|
+
} else typeof l.value == "number" ? s.push({
|
|
796
|
+
title: c,
|
|
797
|
+
prop: o,
|
|
796
798
|
type: "number",
|
|
797
|
-
value:
|
|
799
|
+
value: l.value,
|
|
798
800
|
step: 0.01
|
|
799
|
-
}) : typeof
|
|
800
|
-
title:
|
|
801
|
-
prop:
|
|
801
|
+
}) : typeof l.value == "string" ? s.push({
|
|
802
|
+
title: c,
|
|
803
|
+
prop: o,
|
|
802
804
|
type: "string",
|
|
803
|
-
value:
|
|
804
|
-
}) : typeof
|
|
805
|
-
title:
|
|
806
|
-
prop:
|
|
805
|
+
value: l.value
|
|
806
|
+
}) : typeof l.value == "boolean" && s.push({
|
|
807
|
+
title: c,
|
|
808
|
+
prop: o,
|
|
807
809
|
type: "boolean",
|
|
808
|
-
value:
|
|
810
|
+
value: l.value
|
|
809
811
|
});
|
|
810
812
|
}
|
|
811
|
-
|
|
812
|
-
const
|
|
813
|
-
|
|
813
|
+
i = (o, l) => {
|
|
814
|
+
const c = r.uniforms[o];
|
|
815
|
+
c.value = l;
|
|
814
816
|
};
|
|
815
817
|
} else
|
|
816
818
|
return;
|
|
817
|
-
const
|
|
819
|
+
const n = `${a.name}: ${a.scene.name}`;
|
|
818
820
|
e.addGroup({
|
|
819
|
-
title:
|
|
820
|
-
items:
|
|
821
|
-
onUpdate: (
|
|
822
|
-
|
|
821
|
+
title: n,
|
|
822
|
+
items: s,
|
|
823
|
+
onUpdate: (r, o) => {
|
|
824
|
+
r === "Enabled" ? a.enabled = o : i(r, o);
|
|
823
825
|
}
|
|
824
|
-
}), Lh.push(
|
|
826
|
+
}), Lh.push(n);
|
|
825
827
|
}
|
|
826
828
|
function bP(a, e) {
|
|
827
829
|
a.passes.forEach((t) => {
|
|
@@ -1901,7 +1903,7 @@ class RP extends ig {
|
|
|
1901
1903
|
// Scenes
|
|
1902
1904
|
addScene(e) {
|
|
1903
1905
|
if (e === void 0 || (this.scenes.set(e.name, e), !this.debug)) return;
|
|
1904
|
-
Xd(),
|
|
1906
|
+
Xd(), Ih(e);
|
|
1905
1907
|
const t = sr(e);
|
|
1906
1908
|
this.send({
|
|
1907
1909
|
event: "addScene",
|
|
@@ -1941,7 +1943,7 @@ class RP extends ig {
|
|
|
1941
1943
|
}
|
|
1942
1944
|
setScene(e) {
|
|
1943
1945
|
if (e === void 0 || (this.scene = e, !this.debug)) return;
|
|
1944
|
-
this.renderer !== void 0 && (xn.renderer = this.renderer), Xd(),
|
|
1946
|
+
this.renderer !== void 0 && (xn.renderer = this.renderer), Xd(), Ih(e);
|
|
1945
1947
|
const t = sr(e);
|
|
1946
1948
|
this.send({
|
|
1947
1949
|
event: "setScene",
|
|
@@ -2094,7 +2096,7 @@ var zr = {};
|
|
|
2094
2096
|
* LICENSE file in the root directory of this source tree.
|
|
2095
2097
|
*/
|
|
2096
2098
|
var Kd;
|
|
2097
|
-
function
|
|
2099
|
+
function B_() {
|
|
2098
2100
|
return Kd || (Kd = 1, process.env.NODE_ENV !== "production" && function() {
|
|
2099
2101
|
var a = eg, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), n = Symbol.for("react.profiler"), r = Symbol.for("react.provider"), o = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), u = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), f = Symbol.iterator, m = "@@iterator";
|
|
2100
2102
|
function y(S) {
|
|
@@ -2247,7 +2249,7 @@ function I_() {
|
|
|
2247
2249
|
X < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
2248
2250
|
}
|
|
2249
2251
|
}
|
|
2250
|
-
var
|
|
2252
|
+
var Ir = g.ReactCurrentDispatcher, Rn;
|
|
2251
2253
|
function Xa(S, z, j) {
|
|
2252
2254
|
{
|
|
2253
2255
|
if (Rn === void 0)
|
|
@@ -2279,7 +2281,7 @@ function I_() {
|
|
|
2279
2281
|
var Me = Error.prepareStackTrace;
|
|
2280
2282
|
Error.prepareStackTrace = void 0;
|
|
2281
2283
|
var Oe;
|
|
2282
|
-
Oe =
|
|
2284
|
+
Oe = Ir.current, Ir.current = null, lt();
|
|
2283
2285
|
try {
|
|
2284
2286
|
if (z) {
|
|
2285
2287
|
var xe = function() {
|
|
@@ -2332,7 +2334,7 @@ function I_() {
|
|
|
2332
2334
|
}
|
|
2333
2335
|
}
|
|
2334
2336
|
} finally {
|
|
2335
|
-
Ql = !1,
|
|
2337
|
+
Ql = !1, Ir.current = Oe, Ut(), Error.prepareStackTrace = Me;
|
|
2336
2338
|
}
|
|
2337
2339
|
var Pn = S ? S.displayName || S.name : "", ji = Pn ? Xa(Pn) : "";
|
|
2338
2340
|
return typeof S == "function" && Za.set(S, ji), ji;
|
|
@@ -2572,7 +2574,7 @@ Check the top-level render call using <` + j + ">.");
|
|
|
2572
2574
|
S && S._owner && S._owner !== ec.current && (ee = " It was passed a child from " + $(S._owner.type) + "."), Nn(S), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', j, ee), Nn(null);
|
|
2573
2575
|
}
|
|
2574
2576
|
}
|
|
2575
|
-
function
|
|
2577
|
+
function Bd(S, z) {
|
|
2576
2578
|
{
|
|
2577
2579
|
if (typeof S != "object")
|
|
2578
2580
|
return;
|
|
@@ -2628,7 +2630,7 @@ Check the top-level render call using <` + j + ">.");
|
|
|
2628
2630
|
S.ref !== null && (Nn(S), x("Invalid attribute `ref` supplied to `React.Fragment`."), Nn(null));
|
|
2629
2631
|
}
|
|
2630
2632
|
}
|
|
2631
|
-
var
|
|
2633
|
+
var Id = {};
|
|
2632
2634
|
function Ld(S, z, j, ee, Me, Oe) {
|
|
2633
2635
|
{
|
|
2634
2636
|
var xe = k(S);
|
|
@@ -2649,25 +2651,25 @@ Check the top-level render call using <` + j + ">.");
|
|
|
2649
2651
|
if (ee)
|
|
2650
2652
|
if (Jl(rs)) {
|
|
2651
2653
|
for (var Pn = 0; Pn < rs.length; Pn++)
|
|
2652
|
-
|
|
2654
|
+
Bd(rs[Pn], S);
|
|
2653
2655
|
Object.freeze && Object.freeze(rs);
|
|
2654
2656
|
} else
|
|
2655
2657
|
x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
2656
2658
|
else
|
|
2657
|
-
|
|
2659
|
+
Bd(rs, S);
|
|
2658
2660
|
}
|
|
2659
2661
|
if (Lr.call(z, "key")) {
|
|
2660
2662
|
var ji = $(S), kt = Object.keys(z).filter(function(ox) {
|
|
2661
2663
|
return ox !== "key";
|
|
2662
2664
|
}), ic = kt.length > 0 ? "{key: someKey, " + kt.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
2663
|
-
if (!
|
|
2665
|
+
if (!Id[ji + ic]) {
|
|
2664
2666
|
var ax = kt.length > 0 ? "{" + kt.join(": ..., ") + ": ...}" : "{}";
|
|
2665
2667
|
x(`A props object containing a "key" prop is being spread into JSX:
|
|
2666
2668
|
let props = %s;
|
|
2667
2669
|
<%s {...props} />
|
|
2668
2670
|
React keys must be passed directly to JSX without using spread:
|
|
2669
2671
|
let props = %s;
|
|
2670
|
-
<%s key={someKey} {...props} />`, ic, ji, ax, ji),
|
|
2672
|
+
<%s key={someKey} {...props} />`, ic, ji, ax, ji), Id[ji + ic] = !0;
|
|
2671
2673
|
}
|
|
2672
2674
|
}
|
|
2673
2675
|
return S === s ? tx(Je) : ex(Je), Je;
|
|
@@ -2684,10 +2686,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2684
2686
|
}()), zr;
|
|
2685
2687
|
}
|
|
2686
2688
|
var Qd;
|
|
2687
|
-
function
|
|
2688
|
-
return Qd || (Qd = 1, process.env.NODE_ENV === "production" ? to.exports = O_() : to.exports =
|
|
2689
|
+
function I_() {
|
|
2690
|
+
return Qd || (Qd = 1, process.env.NODE_ENV === "production" ? to.exports = O_() : to.exports = B_()), to.exports;
|
|
2689
2691
|
}
|
|
2690
|
-
var C =
|
|
2692
|
+
var C = I_();
|
|
2691
2693
|
function rg(a) {
|
|
2692
2694
|
return a.title.search("<") > -1 ? /* @__PURE__ */ C.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: a.title } }) : /* @__PURE__ */ C.jsx("button", { children: a.title });
|
|
2693
2695
|
}
|
|
@@ -4012,11 +4014,11 @@ const lb = [
|
|
|
4012
4014
|
], ub = [
|
|
4013
4015
|
{
|
|
4014
4016
|
title: "Zero",
|
|
4015
|
-
value:
|
|
4017
|
+
value: Bm
|
|
4016
4018
|
},
|
|
4017
4019
|
{
|
|
4018
4020
|
title: "One",
|
|
4019
|
-
value:
|
|
4021
|
+
value: Im
|
|
4020
4022
|
},
|
|
4021
4023
|
{
|
|
4022
4024
|
title: "Src Color",
|
|
@@ -4073,11 +4075,11 @@ const lb = [
|
|
|
4073
4075
|
], db = [
|
|
4074
4076
|
{
|
|
4075
4077
|
title: "Zero",
|
|
4076
|
-
value:
|
|
4078
|
+
value: Bm
|
|
4077
4079
|
},
|
|
4078
4080
|
{
|
|
4079
4081
|
title: "One",
|
|
4080
|
-
value:
|
|
4082
|
+
value: Im
|
|
4081
4083
|
},
|
|
4082
4084
|
{
|
|
4083
4085
|
title: "Src Color",
|
|
@@ -5121,7 +5123,7 @@ class Rs {
|
|
|
5121
5123
|
return t.delete(e[e.length - 1]);
|
|
5122
5124
|
}
|
|
5123
5125
|
}
|
|
5124
|
-
const cg = "177", wb = 0, Eb = 1, Cb = 2, Mb = 0, Ab = 1, Xo = 3, ni = 0, jt = 1, dr = 2, vr = 0, ri = 1, hl = 2, ul = 3, dl = 4, Ea = 5, Cs = 100, hg = 101, ug = 102, Rb = 103, Nb = 104, Ni = 200, dg = 201, pg = 202, fg = 203, pl = 204, fl = 205, mg = 206, gg = 207, yg = 208, xg = 209, _g = 210, bg = 0, Tg = 1, Sg = 2, ml = 3, vg = 4, wg = 5, Eg = 6, Cg = 7, Fl = 0, Pb = 1, Fb = 2, pr = 0, Db = 1, Ob = 2,
|
|
5126
|
+
const cg = "177", wb = 0, Eb = 1, Cb = 2, Mb = 0, Ab = 1, Xo = 3, ni = 0, jt = 1, dr = 2, vr = 0, ri = 1, hl = 2, ul = 3, dl = 4, Ea = 5, Cs = 100, hg = 101, ug = 102, Rb = 103, Nb = 104, Ni = 200, dg = 201, pg = 202, fg = 203, pl = 204, fl = 205, mg = 206, gg = 207, yg = 208, xg = 209, _g = 210, bg = 0, Tg = 1, Sg = 2, ml = 3, vg = 4, wg = 5, Eg = 6, Cg = 7, Fl = 0, Pb = 1, Fb = 2, pr = 0, Db = 1, Ob = 2, Bb = 3, Ib = 4, Lb = 6, Ub = 7, Su = 300, Ba = 301, gl = 302, vu = 303, wu = 304, kh = 306, wr = 1e3, Ii = 1001, Er = 1002, dt = 1003, Mg = 1004, Ia = 1005, ns = 1006, zh = 1007, ai = 1008, Ot = 1009, Ca = 1010, Ma = 1011, rr = 1012, Pt = 1013, Ke = 1014, is = 1015, hs = 1016, kb = 1017, zb = 1018, Ui = 1020, Ag = 35902, Gb = 1021, Eu = 1022, us = 1023, Vs = 1026, oi = 1027, Cu = 1028, Mu = 1029, gn = 1030, Au = 1031, Vb = 1032, Ru = 1033, lc = 33776, Zo = 33777, Ko = 33778, Qo = 33779, rp = 35840, ap = 35841, op = 35842, lp = 35843, cp = 36196, Gh = 37492, Vh = 37496, Hh = 37808, $h = 37809, Wh = 37810, jh = 37811, qh = 37812, Yh = 37813, Xh = 37814, Zh = 37815, Kh = 37816, Qh = 37817, Jh = 37818, eu = 37819, tu = 37820, su = 37821, cc = 36492, Hb = 36283, hp = 36284, up = 36285, dp = 36286, ki = 0, $b = 1, di = "", ts = "srgb", fr = "srgb-linear", yl = "linear", te = "srgb", Wb = 0, ln = 7680, jb = 7681, qb = 7682, Yb = 7683, Xb = 34055, Zb = 34056, Kb = 5386, Qb = 512, Jb = 513, eT = 514, tT = 515, sT = 516, iT = 517, nT = 518, iu = 519, Rg = 512, Nu = 513, Ng = 514, Pg = 515, Fg = 516, Dg = 517, Og = 518, Bg = 519, xl = 35044, ar = 35048, Ht = 2e3, zi = 2001;
|
|
5125
5127
|
class Yt {
|
|
5126
5128
|
/**
|
|
5127
5129
|
* Constructs a new 3x3 matrix. The arguments are supposed to be
|
|
@@ -5493,7 +5495,7 @@ class Yt {
|
|
|
5493
5495
|
}
|
|
5494
5496
|
}
|
|
5495
5497
|
const hc = /* @__PURE__ */ new Yt();
|
|
5496
|
-
function
|
|
5498
|
+
function Ig(a) {
|
|
5497
5499
|
for (let e = a.length - 1; e >= 0; --e)
|
|
5498
5500
|
if (a[e] >= 65535) return !0;
|
|
5499
5501
|
return !1;
|
|
@@ -7712,7 +7714,7 @@ class Le {
|
|
|
7712
7714
|
* @return {Matrix4} A reference to this matrix.
|
|
7713
7715
|
*/
|
|
7714
7716
|
extractRotation(e) {
|
|
7715
|
-
const t = this.elements, s = e.elements, i = 1 /
|
|
7717
|
+
const t = this.elements, s = e.elements, i = 1 / Bn.setFromMatrixColumn(e, 0).length(), n = 1 / Bn.setFromMatrixColumn(e, 1).length(), r = 1 / Bn.setFromMatrixColumn(e, 2).length();
|
|
7716
7718
|
return t[0] = s[0] * i, t[1] = s[1] * i, t[2] = s[2] * i, t[3] = 0, t[4] = s[4] * n, t[5] = s[5] * n, t[6] = s[6] * n, t[7] = 0, t[8] = s[8] * r, t[9] = s[9] * r, t[10] = s[10] * r, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this;
|
|
7717
7719
|
}
|
|
7718
7720
|
/**
|
|
@@ -8126,8 +8128,8 @@ class Le {
|
|
|
8126
8128
|
*/
|
|
8127
8129
|
decompose(e, t, s) {
|
|
8128
8130
|
const i = this.elements;
|
|
8129
|
-
let n =
|
|
8130
|
-
const r =
|
|
8131
|
+
let n = Bn.set(i[0], i[1], i[2]).length();
|
|
8132
|
+
const r = Bn.set(i[4], i[5], i[6]).length(), o = Bn.set(i[8], i[9], i[10]).length();
|
|
8131
8133
|
this.determinant() < 0 && (n = -n), e.x = i[12], e.y = i[13], e.z = i[14], xs.copy(this);
|
|
8132
8134
|
const c = 1 / n, h = 1 / r, u = 1 / o;
|
|
8133
8135
|
return xs.elements[0] *= c, xs.elements[1] *= c, xs.elements[2] *= c, xs.elements[4] *= h, xs.elements[5] *= h, xs.elements[6] *= h, xs.elements[8] *= u, xs.elements[9] *= u, xs.elements[10] *= u, t.setFromRotationMatrix(xs), s.x = n, s.y = r, s.z = o, this;
|
|
@@ -8217,7 +8219,7 @@ class Le {
|
|
|
8217
8219
|
return e[t] = s[0], e[t + 1] = s[1], e[t + 2] = s[2], e[t + 3] = s[3], e[t + 4] = s[4], e[t + 5] = s[5], e[t + 6] = s[6], e[t + 7] = s[7], e[t + 8] = s[8], e[t + 9] = s[9], e[t + 10] = s[10], e[t + 11] = s[11], e[t + 12] = s[12], e[t + 13] = s[13], e[t + 14] = s[14], e[t + 15] = s[15], e;
|
|
8218
8220
|
}
|
|
8219
8221
|
}
|
|
8220
|
-
const
|
|
8222
|
+
const Bn = /* @__PURE__ */ new R(), xs = /* @__PURE__ */ new Le(), oT = /* @__PURE__ */ new R(0, 0, 0), lT = /* @__PURE__ */ new R(1, 1, 1), bi = /* @__PURE__ */ new R(), io = /* @__PURE__ */ new R(), Xt = /* @__PURE__ */ new R();
|
|
8221
8223
|
class ce {
|
|
8222
8224
|
/**
|
|
8223
8225
|
* Constructs a new 2D vector.
|
|
@@ -10263,7 +10265,7 @@ class Hg extends ps {
|
|
|
10263
10265
|
return e *= this.itemSize, this.normalized && (t = ae(t, this.array), s = ae(s, this.array), i = ae(i, this.array), n = ae(n, this.array)), this.array[e + 0] = Zt(t), this.array[e + 1] = Zt(s), this.array[e + 2] = Zt(i), this.array[e + 3] = Zt(n), this;
|
|
10264
10266
|
}
|
|
10265
10267
|
}
|
|
10266
|
-
class
|
|
10268
|
+
class Bt extends ps {
|
|
10267
10269
|
/**
|
|
10268
10270
|
* Constructs a new buffer attribute.
|
|
10269
10271
|
*
|
|
@@ -10293,7 +10295,7 @@ function xp(a) {
|
|
|
10293
10295
|
e.push(l, c, c, h, h, l);
|
|
10294
10296
|
}
|
|
10295
10297
|
}
|
|
10296
|
-
const i = new (
|
|
10298
|
+
const i = new (Ig(e) ? Vg : Gg)(e, 1);
|
|
10297
10299
|
return i.version = $g(a), i;
|
|
10298
10300
|
}
|
|
10299
10301
|
class vT extends Hi {
|
|
@@ -11221,7 +11223,7 @@ class gs {
|
|
|
11221
11223
|
}
|
|
11222
11224
|
}
|
|
11223
11225
|
gs.DEFAULT_ORDER = "XYZ";
|
|
11224
|
-
class
|
|
11226
|
+
class BT {
|
|
11225
11227
|
/**
|
|
11226
11228
|
* Constructs a new layers instance, with membership
|
|
11227
11229
|
* initially set to layer `0`.
|
|
@@ -11293,14 +11295,14 @@ class IT {
|
|
|
11293
11295
|
return (this.mask & (1 << e | 0)) !== 0;
|
|
11294
11296
|
}
|
|
11295
11297
|
}
|
|
11296
|
-
let
|
|
11297
|
-
const vp = /* @__PURE__ */ new R(),
|
|
11298
|
+
let IT = 0;
|
|
11299
|
+
const vp = /* @__PURE__ */ new R(), In = /* @__PURE__ */ new Fr(), Ys = /* @__PURE__ */ new Le(), ao = /* @__PURE__ */ new R(), Hr = /* @__PURE__ */ new R(), LT = /* @__PURE__ */ new R(), UT = /* @__PURE__ */ new Fr(), wp = /* @__PURE__ */ new R(1, 0, 0), Ep = /* @__PURE__ */ new R(0, 1, 0), Cp = /* @__PURE__ */ new R(0, 0, 1), Mp = { type: "added" }, kT = { type: "removed" }, Ln = { type: "childadded", child: null }, fc = { type: "childremoved", child: null };
|
|
11298
11300
|
class pt extends En {
|
|
11299
11301
|
/**
|
|
11300
11302
|
* Constructs a new 3D object.
|
|
11301
11303
|
*/
|
|
11302
11304
|
constructor() {
|
|
11303
|
-
super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value:
|
|
11305
|
+
super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: IT++ }), this.uuid = ii(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = pt.DEFAULT_UP.clone();
|
|
11304
11306
|
const e = new R(), t = new gs(), s = new Fr(), i = new R(1, 1, 1);
|
|
11305
11307
|
function n() {
|
|
11306
11308
|
s.setFromEuler(t, !1);
|
|
@@ -11374,7 +11376,7 @@ class pt extends En {
|
|
|
11374
11376
|
normalMatrix: {
|
|
11375
11377
|
value: new Yt()
|
|
11376
11378
|
}
|
|
11377
|
-
}), this.matrix = new Le(), this.matrixWorld = new Le(), this.matrixAutoUpdate = pt.DEFAULT_MATRIX_AUTO_UPDATE, this.matrixWorldAutoUpdate = pt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE, this.matrixWorldNeedsUpdate = !1, this.layers = new
|
|
11379
|
+
}), this.matrix = new Le(), this.matrixWorld = new Le(), this.matrixAutoUpdate = pt.DEFAULT_MATRIX_AUTO_UPDATE, this.matrixWorldAutoUpdate = pt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE, this.matrixWorldNeedsUpdate = !1, this.layers = new BT(), this.visible = !0, this.castShadow = !1, this.receiveShadow = !1, this.frustumCulled = !0, this.renderOrder = 0, this.animations = [], this.customDepthMaterial = void 0, this.customDistanceMaterial = void 0, this.userData = {};
|
|
11378
11380
|
}
|
|
11379
11381
|
/**
|
|
11380
11382
|
* A callback that is executed immediately before a 3D object is rendered to a shadow map.
|
|
@@ -11486,7 +11488,7 @@ class pt extends En {
|
|
|
11486
11488
|
* @return {Object3D} A reference to this instance.
|
|
11487
11489
|
*/
|
|
11488
11490
|
rotateOnAxis(e, t) {
|
|
11489
|
-
return
|
|
11491
|
+
return In.setFromAxisAngle(e, t), this.quaternion.multiply(In), this;
|
|
11490
11492
|
}
|
|
11491
11493
|
/**
|
|
11492
11494
|
* Rotates the 3D object along an axis in world space.
|
|
@@ -11496,7 +11498,7 @@ class pt extends En {
|
|
|
11496
11498
|
* @return {Object3D} A reference to this instance.
|
|
11497
11499
|
*/
|
|
11498
11500
|
rotateOnWorldAxis(e, t) {
|
|
11499
|
-
return
|
|
11501
|
+
return In.setFromAxisAngle(e, t), this.quaternion.premultiply(In), this;
|
|
11500
11502
|
}
|
|
11501
11503
|
/**
|
|
11502
11504
|
* Rotates the 3D object around its X axis in local space.
|
|
@@ -11592,7 +11594,7 @@ class pt extends En {
|
|
|
11592
11594
|
lookAt(e, t, s) {
|
|
11593
11595
|
e.isVector3 ? ao.copy(e) : ao.set(e, t, s);
|
|
11594
11596
|
const i = this.parent;
|
|
11595
|
-
this.updateWorldMatrix(!0, !1), Hr.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? Ys.lookAt(Hr, ao, this.up) : Ys.lookAt(ao, Hr, this.up), this.quaternion.setFromRotationMatrix(Ys), i && (Ys.extractRotation(i.matrixWorld),
|
|
11597
|
+
this.updateWorldMatrix(!0, !1), Hr.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? Ys.lookAt(Hr, ao, this.up) : Ys.lookAt(ao, Hr, this.up), this.quaternion.setFromRotationMatrix(Ys), i && (Ys.extractRotation(i.matrixWorld), In.setFromRotationMatrix(Ys), this.quaternion.premultiply(In.invert()));
|
|
11596
11598
|
}
|
|
11597
11599
|
/**
|
|
11598
11600
|
* Adds the given 3D object as a child to this 3D object. An arbitrary number of
|
|
@@ -12184,7 +12186,7 @@ class Ct extends En {
|
|
|
12184
12186
|
* @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
|
|
12185
12187
|
* @param {string} [colorSpace=NoColorSpace] - The color space.
|
|
12186
12188
|
*/
|
|
12187
|
-
constructor(e = Ct.DEFAULT_IMAGE, t = Ct.DEFAULT_MAPPING, s =
|
|
12189
|
+
constructor(e = Ct.DEFAULT_IMAGE, t = Ct.DEFAULT_MAPPING, s = Ii, i = Ii, n = ns, r = ai, o = us, l = Ot, c = Ct.DEFAULT_ANISOTROPY, h = di) {
|
|
12188
12190
|
super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: WT++ }), this.uuid = ii(), this.name = "", this.source = new Ou(e), this.mipmaps = [], this.mapping = t, this.channel = 0, this.wrapS = s, this.wrapT = i, this.magFilter = n, this.minFilter = r, this.anisotropy = c, this.format = o, this.internalFormat = null, this.type = l, this.offset = new ce(0, 0), this.repeat = new ce(1, 1), this.center = new ce(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new Yt(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = h, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(e && e.depth && e.depth > 1), this.pmremVersion = 0;
|
|
12189
12191
|
}
|
|
12190
12192
|
/**
|
|
@@ -12337,7 +12339,7 @@ class Ct extends En {
|
|
|
12337
12339
|
case wr:
|
|
12338
12340
|
e.x = e.x - Math.floor(e.x);
|
|
12339
12341
|
break;
|
|
12340
|
-
case
|
|
12342
|
+
case Ii:
|
|
12341
12343
|
e.x = e.x < 0 ? 0 : 1;
|
|
12342
12344
|
break;
|
|
12343
12345
|
case Er:
|
|
@@ -12349,7 +12351,7 @@ class Ct extends En {
|
|
|
12349
12351
|
case wr:
|
|
12350
12352
|
e.y = e.y - Math.floor(e.y);
|
|
12351
12353
|
break;
|
|
12352
|
-
case
|
|
12354
|
+
case Ii:
|
|
12353
12355
|
e.y = e.y < 0 ? 0 : 1;
|
|
12354
12356
|
break;
|
|
12355
12357
|
case Er:
|
|
@@ -12552,7 +12554,7 @@ class qT extends Hi {
|
|
|
12552
12554
|
this.has(e) === !0 && (this.backend.destroySampler(e), this.backend.destroyTexture(e), this.delete(e), this.info.memory.textures--);
|
|
12553
12555
|
}
|
|
12554
12556
|
}
|
|
12555
|
-
class
|
|
12557
|
+
class Bu extends ve {
|
|
12556
12558
|
/**
|
|
12557
12559
|
* Constructs a new four-component color.
|
|
12558
12560
|
* You can also pass a single THREE.Color, hex or
|
|
@@ -13344,7 +13346,7 @@ class eS extends rt {
|
|
|
13344
13346
|
return `${e.getType(i)}( ${c.join(", ")} )`;
|
|
13345
13347
|
}
|
|
13346
13348
|
}
|
|
13347
|
-
class
|
|
13349
|
+
class Iu extends re {
|
|
13348
13350
|
static get type() {
|
|
13349
13351
|
return "InputNode";
|
|
13350
13352
|
}
|
|
@@ -13395,7 +13397,7 @@ class Bu extends re {
|
|
|
13395
13397
|
}
|
|
13396
13398
|
}
|
|
13397
13399
|
const Pp = /float|u?int/;
|
|
13398
|
-
class gi extends
|
|
13400
|
+
class gi extends Iu {
|
|
13399
13401
|
static get type() {
|
|
13400
13402
|
return "ConstNode";
|
|
13401
13403
|
}
|
|
@@ -13455,7 +13457,7 @@ function D(a, e) {
|
|
|
13455
13457
|
const Yg = (a) => a.replace(/r|s/g, "x").replace(/g|t/g, "y").replace(/b|p/g, "z").replace(/a|q/g, "w"), Fp = (a) => Yg(a).split("").sort().join(""), Xg = {
|
|
13456
13458
|
setup(a, e) {
|
|
13457
13459
|
const t = e.shift();
|
|
13458
|
-
return a(
|
|
13460
|
+
return a(Il(t), ...e);
|
|
13459
13461
|
},
|
|
13460
13462
|
get(a, e, t) {
|
|
13461
13463
|
if (typeof e == "string" && a[e] === void 0) {
|
|
@@ -13500,7 +13502,7 @@ const Yg = (a) => a.replace(/r|s/g, "x").replace(/g|t/g, "y").replace(/b|p/g, "z
|
|
|
13500
13502
|
if (e === null && (t === "float" || t === "boolean") || t && t !== "shader" && t !== "string")
|
|
13501
13503
|
return U(ru(a, e));
|
|
13502
13504
|
if (t === "shader")
|
|
13503
|
-
return
|
|
13505
|
+
return I(a);
|
|
13504
13506
|
}
|
|
13505
13507
|
return a;
|
|
13506
13508
|
}, iS = function(a, e = null) {
|
|
@@ -13574,7 +13576,7 @@ class lS extends re {
|
|
|
13574
13576
|
return this.layout = e, this;
|
|
13575
13577
|
}
|
|
13576
13578
|
call(e = null) {
|
|
13577
|
-
return
|
|
13579
|
+
return Il(e), U(new oS(this, e));
|
|
13578
13580
|
}
|
|
13579
13581
|
setup() {
|
|
13580
13582
|
return this.call();
|
|
@@ -13589,7 +13591,7 @@ for (const a of uS) ku.set(a, new gi(a, "int"));
|
|
|
13589
13591
|
const Ol = new Map([...ku].map((a) => new gi(a.value)));
|
|
13590
13592
|
for (const a of Zg) Ol.set(a, new gi(a));
|
|
13591
13593
|
for (const a of Zg) Ol.set(-a, new gi(-a));
|
|
13592
|
-
const
|
|
13594
|
+
const Bl = { bool: Lu, uint: Uu, ints: ku, float: Ol }, Op = new Map([...Lu, ...Ol]), ru = (a, e) => Op.has(a) ? Op.get(a) : a.isNode === !0 ? a : new gi(a, e), dS = (a) => {
|
|
13593
13595
|
try {
|
|
13594
13596
|
return a.getNodeType();
|
|
13595
13597
|
} catch {
|
|
@@ -13606,21 +13608,21 @@ const Il = { bool: Lu, uint: Uu, ints: ku, float: Ol }, Op = new Map([...Lu, ...
|
|
|
13606
13608
|
const s = t.map((i) => ru(i));
|
|
13607
13609
|
return U(new KT(s, a));
|
|
13608
13610
|
};
|
|
13609
|
-
},
|
|
13611
|
+
}, Bp = (a) => typeof a == "object" && a !== null ? a.value : a, pS = (a) => a != null ? a.nodeType || a.convertTo || (typeof a == "string" ? a : null) : null;
|
|
13610
13612
|
function ga(a, e) {
|
|
13611
13613
|
return new Proxy(new lS(a, e), Xg);
|
|
13612
13614
|
}
|
|
13613
13615
|
const U = (a, e = null) => (
|
|
13614
13616
|
/* new */
|
|
13615
13617
|
sS(a, e)
|
|
13616
|
-
),
|
|
13618
|
+
), Il = (a, e = null) => new iS(a, e), gr = (a, e = null) => new nS(a, e), L = (...a) => new rS(...a), G = (...a) => new aS(...a);
|
|
13617
13619
|
let fS = 0;
|
|
13618
|
-
const
|
|
13620
|
+
const I = (a, e = null) => {
|
|
13619
13621
|
let t = null;
|
|
13620
13622
|
e !== null && (typeof e == "object" ? t = e.return : (typeof e == "string" ? t = e : console.error("THREE.TSL: Invalid layout type."), e = null));
|
|
13621
13623
|
const s = new ga(a, t), i = (...n) => {
|
|
13622
13624
|
let r;
|
|
13623
|
-
|
|
13625
|
+
Il(n), n[0] && (n[0].isNode || Object.getPrototypeOf(n[0]) !== Object.prototype) ? r = [...n] : r = n[0];
|
|
13624
13626
|
const l = s.call(r);
|
|
13625
13627
|
return t === "void" && l.toStack(), l;
|
|
13626
13628
|
};
|
|
@@ -13648,7 +13650,7 @@ function Qg(a) {
|
|
|
13648
13650
|
return Cr && Cr.add(a), a;
|
|
13649
13651
|
}
|
|
13650
13652
|
D("toStack", Qg);
|
|
13651
|
-
const mS = new at("color"), O = new at("float",
|
|
13653
|
+
const mS = new at("color"), O = new at("float", Bl.float), ze = new at("int", Bl.ints), gS = new at("uint", Bl.uint), zu = new at("bool", Bl.bool), V = new at("vec2"), Js = new at("ivec2"), yS = new at("uvec2"), xS = new at("bvec2"), B = new at("vec3"), _S = new at("ivec3"), bS = new at("uvec3"), TS = new at("bvec3"), ne = new at("vec4"), SS = new at("ivec4"), vS = new at("uvec4"), wS = new at("bvec4"), Gu = new at("mat2"), It = new at("mat3"), yr = new at("mat4");
|
|
13652
13654
|
D("toColor", mS);
|
|
13653
13655
|
D("toFloat", O);
|
|
13654
13656
|
D("toInt", ze);
|
|
@@ -13658,7 +13660,7 @@ D("toVec2", V);
|
|
|
13658
13660
|
D("toIVec2", Js);
|
|
13659
13661
|
D("toUVec2", yS);
|
|
13660
13662
|
D("toBVec2", xS);
|
|
13661
|
-
D("toVec3",
|
|
13663
|
+
D("toVec3", B);
|
|
13662
13664
|
D("toIVec3", _S);
|
|
13663
13665
|
D("toUVec3", bS);
|
|
13664
13666
|
D("toBVec3", TS);
|
|
@@ -13667,7 +13669,7 @@ D("toIVec4", SS);
|
|
|
13667
13669
|
D("toUVec4", vS);
|
|
13668
13670
|
D("toBVec4", wS);
|
|
13669
13671
|
D("toMat2", Gu);
|
|
13670
|
-
D("toMat3",
|
|
13672
|
+
D("toMat3", It);
|
|
13671
13673
|
D("toMat4", yr);
|
|
13672
13674
|
const ES = /* @__PURE__ */ L($a).setParameterLength(2), CS = (a, e) => U(new qg(U(a), e));
|
|
13673
13675
|
D("element", ES);
|
|
@@ -13738,7 +13740,7 @@ class MS extends rt {
|
|
|
13738
13740
|
}
|
|
13739
13741
|
const AS = /* @__PURE__ */ L(MS).setParameterLength(2);
|
|
13740
13742
|
D("assign", AS);
|
|
13741
|
-
class
|
|
13743
|
+
class Ip extends rt {
|
|
13742
13744
|
static get type() {
|
|
13743
13745
|
return "ArrayNode";
|
|
13744
13746
|
}
|
|
@@ -13785,10 +13787,10 @@ const RS = (...a) => {
|
|
|
13785
13787
|
let e;
|
|
13786
13788
|
if (a.length === 1) {
|
|
13787
13789
|
const t = a[0];
|
|
13788
|
-
e = new
|
|
13790
|
+
e = new Ip(null, t.length, t);
|
|
13789
13791
|
} else {
|
|
13790
13792
|
const t = a[0], s = a[1];
|
|
13791
|
-
e = new
|
|
13793
|
+
e = new Ip(t, s);
|
|
13792
13794
|
}
|
|
13793
13795
|
return U(e);
|
|
13794
13796
|
};
|
|
@@ -13815,7 +13817,7 @@ class Jg extends re {
|
|
|
13815
13817
|
}
|
|
13816
13818
|
}
|
|
13817
13819
|
const NS = (a) => new Jg(a), Vu = (a, e = 0) => new Jg(a, !0, e), PS = /* @__PURE__ */ Vu("frame"), K = /* @__PURE__ */ Vu("render"), ey = /* @__PURE__ */ NS("object");
|
|
13818
|
-
class Wa extends
|
|
13820
|
+
class Wa extends Iu {
|
|
13819
13821
|
static get type() {
|
|
13820
13822
|
return "UniformNode";
|
|
13821
13823
|
}
|
|
@@ -13961,7 +13963,7 @@ class FS extends rt {
|
|
|
13961
13963
|
return `${s.build(e, "property")}( ${t.join(", ")} )`;
|
|
13962
13964
|
}
|
|
13963
13965
|
}
|
|
13964
|
-
const DS = (a, ...e) => (e = e.length > 1 || e[0] && e[0].isNode === !0 ? gr(e) :
|
|
13966
|
+
const DS = (a, ...e) => (e = e.length > 1 || e[0] && e[0].isNode === !0 ? gr(e) : Il(e[0]), U(new FS(U(a), e)));
|
|
13965
13967
|
D("call", DS);
|
|
13966
13968
|
const OS = {
|
|
13967
13969
|
"==": "equal",
|
|
@@ -14073,10 +14075,10 @@ class je extends rt {
|
|
|
14073
14075
|
super.deserialize(e), this.op = e.op;
|
|
14074
14076
|
}
|
|
14075
14077
|
}
|
|
14076
|
-
const Lt = /* @__PURE__ */ L(je, "+").setParameterLength(2, 1 / 0).setName("add"), Ft = /* @__PURE__ */ L(je, "-").setParameterLength(2, 1 / 0).setName("sub"), fe = /* @__PURE__ */ L(je, "*").setParameterLength(2, 1 / 0).setName("mul"), $s = /* @__PURE__ */ L(je, "/").setParameterLength(2, 1 / 0).setName("div"), Ll = /* @__PURE__ */ L(je, "%").setParameterLength(2).setName("mod"), ly = /* @__PURE__ */ L(je, "==").setParameterLength(2).setName("equal"),
|
|
14078
|
+
const Lt = /* @__PURE__ */ L(je, "+").setParameterLength(2, 1 / 0).setName("add"), Ft = /* @__PURE__ */ L(je, "-").setParameterLength(2, 1 / 0).setName("sub"), fe = /* @__PURE__ */ L(je, "*").setParameterLength(2, 1 / 0).setName("mul"), $s = /* @__PURE__ */ L(je, "/").setParameterLength(2, 1 / 0).setName("div"), Ll = /* @__PURE__ */ L(je, "%").setParameterLength(2).setName("mod"), ly = /* @__PURE__ */ L(je, "==").setParameterLength(2).setName("equal"), BS = /* @__PURE__ */ L(je, "!=").setParameterLength(2).setName("notEqual"), IS = /* @__PURE__ */ L(je, "<").setParameterLength(2).setName("lessThan"), LS = /* @__PURE__ */ L(je, ">").setParameterLength(2).setName("greaterThan"), US = /* @__PURE__ */ L(je, "<=").setParameterLength(2).setName("lessThanEqual"), kS = /* @__PURE__ */ L(je, ">=").setParameterLength(2).setName("greaterThanEqual"), zS = /* @__PURE__ */ L(je, "&&").setParameterLength(2, 1 / 0).setName("and"), GS = /* @__PURE__ */ L(je, "||").setParameterLength(2, 1 / 0).setName("or"), VS = /* @__PURE__ */ L(je, "!").setParameterLength(1).setName("not"), HS = /* @__PURE__ */ L(je, "^^").setParameterLength(2).setName("xor"), $S = /* @__PURE__ */ L(je, "&").setParameterLength(2).setName("bitAnd"), WS = /* @__PURE__ */ L(je, "~").setParameterLength(2).setName("bitNot"), jS = /* @__PURE__ */ L(je, "|").setParameterLength(2).setName("bitOr"), qS = /* @__PURE__ */ L(je, "^").setParameterLength(2).setName("bitXor"), YS = /* @__PURE__ */ L(je, "<<").setParameterLength(2).setName("shiftLeft"), XS = /* @__PURE__ */ L(je, ">>").setParameterLength(2).setName("shiftRight"), ZS = I(([a]) => (a.addAssign(1), a)), KS = I(([a]) => (a.subAssign(1), a)), QS = /* @__PURE__ */ I(([a]) => {
|
|
14077
14079
|
const e = ze(a).toConst();
|
|
14078
14080
|
return a.addAssign(1), e;
|
|
14079
|
-
}), JS = /* @__PURE__ */
|
|
14081
|
+
}), JS = /* @__PURE__ */ I(([a]) => {
|
|
14080
14082
|
const e = ze(a).toConst();
|
|
14081
14083
|
return a.subAssign(1), e;
|
|
14082
14084
|
});
|
|
@@ -14086,8 +14088,8 @@ D("mul", fe);
|
|
|
14086
14088
|
D("div", $s);
|
|
14087
14089
|
D("mod", Ll);
|
|
14088
14090
|
D("equal", ly);
|
|
14089
|
-
D("notEqual",
|
|
14090
|
-
D("lessThan",
|
|
14091
|
+
D("notEqual", BS);
|
|
14092
|
+
D("lessThan", IS);
|
|
14091
14093
|
D("greaterThan", LS);
|
|
14092
14094
|
D("lessThanEqual", US);
|
|
14093
14095
|
D("greaterThanEqual", kS);
|
|
@@ -14160,7 +14162,7 @@ class M extends rt {
|
|
|
14160
14162
|
n = cs(Ft(t, s));
|
|
14161
14163
|
else if (i === M.TRANSFORM_DIRECTION) {
|
|
14162
14164
|
let r = t, o = s;
|
|
14163
|
-
e.isMatrix(r.getNodeType(e)) ? o = ne(
|
|
14165
|
+
e.isMatrix(r.getNodeType(e)) ? o = ne(B(o), 0) : r = ne(B(r), 0);
|
|
14164
14166
|
const l = fe(r, o).xyz;
|
|
14165
14167
|
n = ka(l);
|
|
14166
14168
|
}
|
|
@@ -14251,7 +14253,7 @@ M.CLAMP = "clamp";
|
|
|
14251
14253
|
M.REFRACT = "refract";
|
|
14252
14254
|
M.SMOOTHSTEP = "smoothstep";
|
|
14253
14255
|
M.FACEFORWARD = "faceforward";
|
|
14254
|
-
const sv = /* @__PURE__ */ O(1e-6), iv = /* @__PURE__ */ O(Math.PI), nv = /* @__PURE__ */ L(M, M.ALL).setParameterLength(1), rv = /* @__PURE__ */ L(M, M.ANY).setParameterLength(1), av = /* @__PURE__ */ L(M, M.RADIANS).setParameterLength(1), ov = /* @__PURE__ */ L(M, M.DEGREES).setParameterLength(1), cy = /* @__PURE__ */ L(M, M.EXP).setParameterLength(1), Ua = /* @__PURE__ */ L(M, M.EXP2).setParameterLength(1), hy = /* @__PURE__ */ L(M, M.LOG).setParameterLength(1), ci = /* @__PURE__ */ L(M, M.LOG2).setParameterLength(1), Wu = /* @__PURE__ */ L(M, M.SQRT).setParameterLength(1), lv = /* @__PURE__ */ L(M, M.INVERSE_SQRT).setParameterLength(1), bn = /* @__PURE__ */ L(M, M.FLOOR).setParameterLength(1), ju = /* @__PURE__ */ L(M, M.CEIL).setParameterLength(1), ka = /* @__PURE__ */ L(M, M.NORMALIZE).setParameterLength(1), $i = /* @__PURE__ */ L(M, M.FRACT).setParameterLength(1), Es = /* @__PURE__ */ L(M, M.SIN).setParameterLength(1), Pi = /* @__PURE__ */ L(M, M.COS).setParameterLength(1), cv = /* @__PURE__ */ L(M, M.TAN).setParameterLength(1), hv = /* @__PURE__ */ L(M, M.ASIN).setParameterLength(1), uy = /* @__PURE__ */ L(M, M.ACOS).setParameterLength(1), dy = /* @__PURE__ */ L(M, M.ATAN).setParameterLength(1, 2), cs = /* @__PURE__ */ L(M, M.ABS).setParameterLength(1), Ml = /* @__PURE__ */ L(M, M.SIGN).setParameterLength(1), hi = /* @__PURE__ */ L(M, M.LENGTH).setParameterLength(1), uv = /* @__PURE__ */ L(M, M.NEGATE).setParameterLength(1), dv = /* @__PURE__ */ L(M, M.ONE_MINUS).setParameterLength(1), py = /* @__PURE__ */ L(M, M.DFDX).setParameterLength(1), fy = /* @__PURE__ */ L(M, M.DFDY).setParameterLength(1), pv = /* @__PURE__ */ L(M, M.ROUND).setParameterLength(1), fv = /* @__PURE__ */ L(M, M.RECIPROCAL).setParameterLength(1), mv = /* @__PURE__ */ L(M, M.TRUNC).setParameterLength(1), gv = /* @__PURE__ */ L(M, M.FWIDTH).setParameterLength(1), yv = /* @__PURE__ */ L(M, M.TRANSPOSE).setParameterLength(1), xv = (a, e) => (console.warn('THREE.TSL: "equals" is deprecated. Use "equal" inside a vector instead, like: "bvec*( equal( ... ) )"'), ly(a, e)), Mr = /* @__PURE__ */ L(M, M.MIN).setParameterLength(2, 1 / 0), Mt = /* @__PURE__ */ L(M, M.MAX).setParameterLength(2, 1 / 0), my = /* @__PURE__ */ L(M, M.STEP).setParameterLength(2), _v = /* @__PURE__ */ L(M, M.REFLECT).setParameterLength(2), bv = /* @__PURE__ */ L(M, M.DISTANCE).setParameterLength(2), Tv = /* @__PURE__ */ L(M, M.DIFFERENCE).setParameterLength(2), qu = /* @__PURE__ */ L(M, M.DOT).setParameterLength(2), gy = /* @__PURE__ */ L(M, M.CROSS).setParameterLength(2), Ul = /* @__PURE__ */ L(M, M.POW).setParameterLength(2), yy = /* @__PURE__ */ L(M, M.POW, 2).setParameterLength(1), Sv = /* @__PURE__ */ L(M, M.POW, 3).setParameterLength(1), vv = /* @__PURE__ */ L(M, M.POW, 4).setParameterLength(1), wv = /* @__PURE__ */ L(M, M.TRANSFORM_DIRECTION).setParameterLength(2), Ev = (a) => fe(Ml(a), Ul(cs(a), 1 / 3)), xy = (a) => qu(a, a), He = /* @__PURE__ */ L(M, M.MIX).setParameterLength(3), fi = (a, e = 0, t = 1) => U(new M(M.CLAMP, U(a), U(e), U(t))), _y = (a) => fi(a), by = /* @__PURE__ */ L(M, M.REFRACT).setParameterLength(3), Gi = /* @__PURE__ */ L(M, M.SMOOTHSTEP).setParameterLength(3), Cv = /* @__PURE__ */ L(M, M.FACEFORWARD).setParameterLength(3), Mv = /* @__PURE__ */
|
|
14256
|
+
const sv = /* @__PURE__ */ O(1e-6), iv = /* @__PURE__ */ O(Math.PI), nv = /* @__PURE__ */ L(M, M.ALL).setParameterLength(1), rv = /* @__PURE__ */ L(M, M.ANY).setParameterLength(1), av = /* @__PURE__ */ L(M, M.RADIANS).setParameterLength(1), ov = /* @__PURE__ */ L(M, M.DEGREES).setParameterLength(1), cy = /* @__PURE__ */ L(M, M.EXP).setParameterLength(1), Ua = /* @__PURE__ */ L(M, M.EXP2).setParameterLength(1), hy = /* @__PURE__ */ L(M, M.LOG).setParameterLength(1), ci = /* @__PURE__ */ L(M, M.LOG2).setParameterLength(1), Wu = /* @__PURE__ */ L(M, M.SQRT).setParameterLength(1), lv = /* @__PURE__ */ L(M, M.INVERSE_SQRT).setParameterLength(1), bn = /* @__PURE__ */ L(M, M.FLOOR).setParameterLength(1), ju = /* @__PURE__ */ L(M, M.CEIL).setParameterLength(1), ka = /* @__PURE__ */ L(M, M.NORMALIZE).setParameterLength(1), $i = /* @__PURE__ */ L(M, M.FRACT).setParameterLength(1), Es = /* @__PURE__ */ L(M, M.SIN).setParameterLength(1), Pi = /* @__PURE__ */ L(M, M.COS).setParameterLength(1), cv = /* @__PURE__ */ L(M, M.TAN).setParameterLength(1), hv = /* @__PURE__ */ L(M, M.ASIN).setParameterLength(1), uy = /* @__PURE__ */ L(M, M.ACOS).setParameterLength(1), dy = /* @__PURE__ */ L(M, M.ATAN).setParameterLength(1, 2), cs = /* @__PURE__ */ L(M, M.ABS).setParameterLength(1), Ml = /* @__PURE__ */ L(M, M.SIGN).setParameterLength(1), hi = /* @__PURE__ */ L(M, M.LENGTH).setParameterLength(1), uv = /* @__PURE__ */ L(M, M.NEGATE).setParameterLength(1), dv = /* @__PURE__ */ L(M, M.ONE_MINUS).setParameterLength(1), py = /* @__PURE__ */ L(M, M.DFDX).setParameterLength(1), fy = /* @__PURE__ */ L(M, M.DFDY).setParameterLength(1), pv = /* @__PURE__ */ L(M, M.ROUND).setParameterLength(1), fv = /* @__PURE__ */ L(M, M.RECIPROCAL).setParameterLength(1), mv = /* @__PURE__ */ L(M, M.TRUNC).setParameterLength(1), gv = /* @__PURE__ */ L(M, M.FWIDTH).setParameterLength(1), yv = /* @__PURE__ */ L(M, M.TRANSPOSE).setParameterLength(1), xv = (a, e) => (console.warn('THREE.TSL: "equals" is deprecated. Use "equal" inside a vector instead, like: "bvec*( equal( ... ) )"'), ly(a, e)), Mr = /* @__PURE__ */ L(M, M.MIN).setParameterLength(2, 1 / 0), Mt = /* @__PURE__ */ L(M, M.MAX).setParameterLength(2, 1 / 0), my = /* @__PURE__ */ L(M, M.STEP).setParameterLength(2), _v = /* @__PURE__ */ L(M, M.REFLECT).setParameterLength(2), bv = /* @__PURE__ */ L(M, M.DISTANCE).setParameterLength(2), Tv = /* @__PURE__ */ L(M, M.DIFFERENCE).setParameterLength(2), qu = /* @__PURE__ */ L(M, M.DOT).setParameterLength(2), gy = /* @__PURE__ */ L(M, M.CROSS).setParameterLength(2), Ul = /* @__PURE__ */ L(M, M.POW).setParameterLength(2), yy = /* @__PURE__ */ L(M, M.POW, 2).setParameterLength(1), Sv = /* @__PURE__ */ L(M, M.POW, 3).setParameterLength(1), vv = /* @__PURE__ */ L(M, M.POW, 4).setParameterLength(1), wv = /* @__PURE__ */ L(M, M.TRANSFORM_DIRECTION).setParameterLength(2), Ev = (a) => fe(Ml(a), Ul(cs(a), 1 / 3)), xy = (a) => qu(a, a), He = /* @__PURE__ */ L(M, M.MIX).setParameterLength(3), fi = (a, e = 0, t = 1) => U(new M(M.CLAMP, U(a), U(e), U(t))), _y = (a) => fi(a), by = /* @__PURE__ */ L(M, M.REFRACT).setParameterLength(3), Gi = /* @__PURE__ */ L(M, M.SMOOTHSTEP).setParameterLength(3), Cv = /* @__PURE__ */ L(M, M.FACEFORWARD).setParameterLength(3), Mv = /* @__PURE__ */ I(([a]) => {
|
|
14255
14257
|
const s = 43758.5453, i = qu(a.xy, V(12.9898, 78.233)), n = Ll(i, iv);
|
|
14256
14258
|
return $i(Es(n).mul(s));
|
|
14257
14259
|
}), Av = (a, e, t) => He(e, t, a), Rv = (a, e, t) => Gi(e, t, a), Nv = (a, e) => (console.warn('THREE.TSL: "atan2" is overloaded. Use "atan" instead.'), dy(a, e));
|
|
@@ -14472,11 +14474,11 @@ class tl extends re {
|
|
|
14472
14474
|
return e.addLineFlowCode(`${p} = ${h}`, this), d;
|
|
14473
14475
|
}
|
|
14474
14476
|
}
|
|
14475
|
-
const Xu = /* @__PURE__ */ L(tl), Ov = (a, e = null) => Xu(a, e).toStack(),
|
|
14477
|
+
const Xu = /* @__PURE__ */ L(tl), Ov = (a, e = null) => Xu(a, e).toStack(), Bv = (a, e = null) => Xu(a, e, !0).toStack();
|
|
14476
14478
|
D("toVar", Ov);
|
|
14477
|
-
D("toConst",
|
|
14478
|
-
const
|
|
14479
|
-
D("temp",
|
|
14479
|
+
D("toConst", Bv);
|
|
14480
|
+
const Iv = (a) => (console.warn('TSL: "temp( node )" is deprecated. Use "Var( node )" or "node.toVar()" instead.'), Xu(a));
|
|
14481
|
+
D("temp", Iv);
|
|
14480
14482
|
class Lv extends re {
|
|
14481
14483
|
static get type() {
|
|
14482
14484
|
return "VaryingNode";
|
|
@@ -14541,7 +14543,7 @@ D("toVarying", Ns);
|
|
|
14541
14543
|
D("toVertexStage", Uv);
|
|
14542
14544
|
D("varying", (...a) => (console.warn("THREE.TSL: .varying() has been renamed to .toVarying()."), Ns(...a)));
|
|
14543
14545
|
D("vertexStage", (...a) => (console.warn("THREE.TSL: .vertexStage() has been renamed to .toVertexStage()."), Ns(...a)));
|
|
14544
|
-
const kv = /* @__PURE__ */
|
|
14546
|
+
const kv = /* @__PURE__ */ I(([a]) => {
|
|
14545
14547
|
const e = a.mul(0.9478672986).add(0.0521327014).pow(2.4), t = a.mul(0.0773993808), s = a.lessThanEqual(0.04045);
|
|
14546
14548
|
return He(e, t, s);
|
|
14547
14549
|
}).setLayout({
|
|
@@ -14550,7 +14552,7 @@ const kv = /* @__PURE__ */ B(([a]) => {
|
|
|
14550
14552
|
inputs: [
|
|
14551
14553
|
{ name: "color", type: "vec3" }
|
|
14552
14554
|
]
|
|
14553
|
-
}), zv = /* @__PURE__ */
|
|
14555
|
+
}), zv = /* @__PURE__ */ I(([a]) => {
|
|
14554
14556
|
const e = a.pow(0.41666).mul(1.055).sub(0.055), t = a.mul(12.92), s = a.lessThanEqual(31308e-7);
|
|
14555
14557
|
return He(e, t, s);
|
|
14556
14558
|
}).setLayout({
|
|
@@ -14590,7 +14592,7 @@ class Sy extends rt {
|
|
|
14590
14592
|
const { colorNode: t } = this, s = this.resolveColorSpace(e, this.source), i = this.resolveColorSpace(e, this.target);
|
|
14591
14593
|
let n = t;
|
|
14592
14594
|
return ke.enabled === !1 || s === i || !s || !i || (ke.getTransfer(s) === te && (n = ne(kv(n.rgb), n.a)), ke.getPrimaries(s) !== ke.getPrimaries(i) && (n = ne(
|
|
14593
|
-
|
|
14595
|
+
It(ke._getMatrix(new Yt(), s, i)).mul(n.rgb),
|
|
14594
14596
|
n.a
|
|
14595
14597
|
)), ke.getTransfer(i) === te && (n = ne(zv(n.rgb), n.a))), n;
|
|
14596
14598
|
}
|
|
@@ -15181,7 +15183,7 @@ class wy {
|
|
|
15181
15183
|
};
|
|
15182
15184
|
}
|
|
15183
15185
|
}
|
|
15184
|
-
class Zv extends
|
|
15186
|
+
class Zv extends Iu {
|
|
15185
15187
|
static get type() {
|
|
15186
15188
|
return "BufferAttributeNode";
|
|
15187
15189
|
}
|
|
@@ -15808,7 +15810,7 @@ class mw extends re {
|
|
|
15808
15810
|
const i = e.addStack();
|
|
15809
15811
|
t.returnsNode = this.params[this.params.length - 1](s, e), t.stackNode = i;
|
|
15810
15812
|
const n = this.params[0];
|
|
15811
|
-
return n.isNode !== !0 && typeof n.update == "function" && (t.updateNode =
|
|
15813
|
+
return n.isNode !== !0 && typeof n.update == "function" && (t.updateNode = I(this.params[0].update)(s)), e.removeStack(), t;
|
|
15812
15814
|
}
|
|
15813
15815
|
/**
|
|
15814
15816
|
* This method is overwritten since the node type is inferred based on the loop configuration.
|
|
@@ -16763,7 +16765,7 @@ class Tw extends re {
|
|
|
16763
16765
|
return this.name;
|
|
16764
16766
|
}
|
|
16765
16767
|
}
|
|
16766
|
-
const zl = L(Tw).setParameterLength(1), Ry = /* @__PURE__ */ Q(0, "uint").label("u_cameraIndex").setGroup(Vu("cameraIndex")).toVarying("v_cameraIndex"), dn = /* @__PURE__ */ Q("float").label("cameraNear").setGroup(K).onRenderUpdate(({ camera: a }) => a.near), pn = /* @__PURE__ */ Q("float").label("cameraFar").setGroup(K).onRenderUpdate(({ camera: a }) => a.far), td = /* @__PURE__ */
|
|
16768
|
+
const zl = L(Tw).setParameterLength(1), Ry = /* @__PURE__ */ Q(0, "uint").label("u_cameraIndex").setGroup(Vu("cameraIndex")).toVarying("v_cameraIndex"), dn = /* @__PURE__ */ Q("float").label("cameraNear").setGroup(K).onRenderUpdate(({ camera: a }) => a.near), pn = /* @__PURE__ */ Q("float").label("cameraFar").setGroup(K).onRenderUpdate(({ camera: a }) => a.far), td = /* @__PURE__ */ I(({ camera: a }) => {
|
|
16767
16769
|
let e;
|
|
16768
16770
|
if (a.isArrayCamera && a.cameras.length > 0) {
|
|
16769
16771
|
const t = [];
|
|
@@ -16773,7 +16775,7 @@ const zl = L(Tw).setParameterLength(1), Ry = /* @__PURE__ */ Q(0, "uint").label(
|
|
|
16773
16775
|
} else
|
|
16774
16776
|
e = Q("mat4").label("cameraProjectionMatrix").setGroup(K).onRenderUpdate(({ camera: t }) => t.projectionMatrix);
|
|
16775
16777
|
return e;
|
|
16776
|
-
}).once()(), yi = /* @__PURE__ */
|
|
16778
|
+
}).once()(), yi = /* @__PURE__ */ I(({ camera: a }) => {
|
|
16777
16779
|
let e;
|
|
16778
16780
|
if (a.isArrayCamera && a.cameras.length > 0) {
|
|
16779
16781
|
const t = [];
|
|
@@ -16812,10 +16814,10 @@ ys.POSITION;
|
|
|
16812
16814
|
ys.SCALE;
|
|
16813
16815
|
ys.VIEW_POSITION;
|
|
16814
16816
|
ys.RADIUS;
|
|
16815
|
-
const vw = /* @__PURE__ */ Q(new Yt()).onObjectUpdate(({ object: a }, e) => e.value.getNormalMatrix(a.matrixWorld)), Gl = /* @__PURE__ */
|
|
16817
|
+
const vw = /* @__PURE__ */ Q(new Yt()).onObjectUpdate(({ object: a }, e) => e.value.getNormalMatrix(a.matrixWorld)), Gl = /* @__PURE__ */ I((a) => a.renderer.overrideNodes.modelViewMatrix || ww).once()().toVar("modelViewMatrix"), ww = /* @__PURE__ */ yi.mul(vn), Vp = /* @__PURE__ */ I((a) => (a.context.isHighPrecisionModelViewMatrix = !0, Q("mat4").onObjectUpdate(({ object: e, camera: t }) => e.modelViewMatrix.multiplyMatrices(t.matrixWorldInverse, e.matrixWorld)))).once()().toVar("highpModelViewMatrix"), Hp = /* @__PURE__ */ I((a) => {
|
|
16816
16818
|
const e = a.context.isHighPrecisionModelViewMatrix;
|
|
16817
16819
|
return Q("mat3").onObjectUpdate(({ object: t, camera: s }) => (e !== !0 && t.modelViewMatrix.multiplyMatrices(s.matrixWorldInverse, t.matrixWorld), t.normalMatrix.getNormalMatrix(t.modelViewMatrix)));
|
|
16818
|
-
}).once()().toVar("highpModelNormalViewMatrix"), Vl = /* @__PURE__ */ Vi("position", "vec3"), wt = /* @__PURE__ */ Vl.toVarying("positionLocal"), $p = /* @__PURE__ */ Vl.toVarying("positionPrevious"), za = /* @__PURE__ */
|
|
16820
|
+
}).once()().toVar("highpModelNormalViewMatrix"), Vl = /* @__PURE__ */ Vi("position", "vec3"), wt = /* @__PURE__ */ Vl.toVarying("positionLocal"), $p = /* @__PURE__ */ Vl.toVarying("positionPrevious"), za = /* @__PURE__ */ I((a) => vn.mul(wt).xyz.toVarying(a.getNamespace("v_positionWorld")), "vec3").once("POSITION")(), Ny = /* @__PURE__ */ I((a) => wt.transformDirection(vn).toVarying(a.getNamespace("v_positionWorldDirection")).normalize().toVar("positionWorldDirection"), "vec3").once("POSITION")(), it = /* @__PURE__ */ I((a) => a.context.setupPositionView().toVarying(a.getNamespace("v_positionView")), "vec3").once("POSITION")(), Ye = /* @__PURE__ */ it.negate().toVarying("v_positionViewDirection").normalize().toVar("positionViewDirection");
|
|
16819
16821
|
class Ew extends rt {
|
|
16820
16822
|
static get type() {
|
|
16821
16823
|
return "EquirectUVNode";
|
|
@@ -16849,22 +16851,22 @@ class Cw extends re {
|
|
|
16849
16851
|
return t.coordinateSystem === Ht && s.side === jt ? "false" : e.getFrontFacing();
|
|
16850
16852
|
}
|
|
16851
16853
|
}
|
|
16852
|
-
const Mw = /* @__PURE__ */ G(Cw), Hl = /* @__PURE__ */ O(Mw).mul(2).sub(1), Fy = /* @__PURE__ */ Vi("normal", "vec3"), Ws = /* @__PURE__ */
|
|
16854
|
+
const Mw = /* @__PURE__ */ G(Cw), Hl = /* @__PURE__ */ O(Mw).mul(2).sub(1), Fy = /* @__PURE__ */ Vi("normal", "vec3"), Ws = /* @__PURE__ */ I((a) => a.geometry.hasAttribute("normal") === !1 ? (console.warn('THREE.TSL: Vertex attribute "normal" not found on geometry.'), B(0, 1, 0)) : Fy, "vec3").once()().toVar("normalLocal"), Aw = /* @__PURE__ */ it.dFdx().cross(it.dFdy()).normalize().toVar("normalFlat"), js = /* @__PURE__ */ I((a) => {
|
|
16853
16855
|
let e;
|
|
16854
16856
|
return a.material.flatShading === !0 ? e = Aw : e = Ns(Dy(Ws), "v_normalView").normalize(), e;
|
|
16855
|
-
}, "vec3").once()().toVar("normalView"), sd = /* @__PURE__ */
|
|
16857
|
+
}, "vec3").once()().toVar("normalView"), sd = /* @__PURE__ */ I((a) => {
|
|
16856
16858
|
let e = js.transformDirection(yi);
|
|
16857
16859
|
return a.material.flatShading !== !0 && (e = Ns(e, "v_normalWorld")), e;
|
|
16858
|
-
}, "vec3").once()().normalize().toVar("normalWorld"), st = /* @__PURE__ */
|
|
16860
|
+
}, "vec3").once()().normalize().toVar("normalWorld"), st = /* @__PURE__ */ I((a) => {
|
|
16859
16861
|
let e = a.context.setupNormal().context({ getUV: null });
|
|
16860
16862
|
return a.material.flatShading !== !0 && (e = e.mul(Hl)), e;
|
|
16861
|
-
}, "vec3").once()().toVar("transformedNormalView"), id = /* @__PURE__ */ st.transformDirection(yi).toVar("transformedNormalWorld"), ya = /* @__PURE__ */
|
|
16863
|
+
}, "vec3").once()().toVar("transformedNormalView"), id = /* @__PURE__ */ st.transformDirection(yi).toVar("transformedNormalWorld"), ya = /* @__PURE__ */ I((a) => {
|
|
16862
16864
|
let e = a.context.setupClearcoatNormal().context({ getUV: null });
|
|
16863
16865
|
return a.material.flatShading !== !0 && (e = e.mul(Hl)), e;
|
|
16864
|
-
}, "vec3").once()().toVar("transformedClearcoatNormalView"), Rw = /* @__PURE__ */
|
|
16865
|
-
const t =
|
|
16866
|
+
}, "vec3").once()().toVar("transformedClearcoatNormalView"), Rw = /* @__PURE__ */ I(([a, e = vn]) => {
|
|
16867
|
+
const t = It(e), s = a.div(B(t[0].dot(t[0]), t[1].dot(t[1]), t[2].dot(t[2])));
|
|
16866
16868
|
return t.mul(s).xyz;
|
|
16867
|
-
}), Dy = /* @__PURE__ */
|
|
16869
|
+
}), Dy = /* @__PURE__ */ I(([a], e) => {
|
|
16868
16870
|
const t = e.renderer.overrideNodes.modelNormalViewMatrix;
|
|
16869
16871
|
if (t !== null)
|
|
16870
16872
|
return t.transformDirection(a);
|
|
@@ -16882,7 +16884,7 @@ class Nw extends rt {
|
|
|
16882
16884
|
super("vec2");
|
|
16883
16885
|
}
|
|
16884
16886
|
setup() {
|
|
16885
|
-
const e =
|
|
16887
|
+
const e = B(Ye.z, 0, Ye.x.negate()).normalize(), t = Ye.cross(e);
|
|
16886
16888
|
return V(e.dot(st), t.dot(st)).mul(0.495).add(0.5);
|
|
16887
16889
|
}
|
|
16888
16890
|
}
|
|
@@ -16926,7 +16928,7 @@ class Fw extends Wa {
|
|
|
16926
16928
|
}
|
|
16927
16929
|
}
|
|
16928
16930
|
const Dw = /* @__PURE__ */ L(Fw).setParameterLength(1), Ow = (a) => U(a).mul(0.5).add(0.5);
|
|
16929
|
-
class
|
|
16931
|
+
class Bw extends rt {
|
|
16930
16932
|
static get type() {
|
|
16931
16933
|
return "RotateNode";
|
|
16932
16934
|
}
|
|
@@ -16965,7 +16967,7 @@ class Iw extends rt {
|
|
|
16965
16967
|
}
|
|
16966
16968
|
}
|
|
16967
16969
|
}
|
|
16968
|
-
const Oy = /* @__PURE__ */ L(
|
|
16970
|
+
const Oy = /* @__PURE__ */ L(Bw).setParameterLength(2);
|
|
16969
16971
|
let qr, Yr;
|
|
16970
16972
|
class tt extends re {
|
|
16971
16973
|
static get type() {
|
|
@@ -17031,7 +17033,7 @@ const _r = /* @__PURE__ */ G(tt, tt.UV), hu = /* @__PURE__ */ G(tt, tt.SIZE), $l
|
|
|
17031
17033
|
Ra.zw;
|
|
17032
17034
|
Ra.xy;
|
|
17033
17035
|
const qa = (a = 0) => Vi("uv" + (a > 0 ? a : ""), "vec2");
|
|
17034
|
-
class
|
|
17036
|
+
class Iw extends re {
|
|
17035
17037
|
static get type() {
|
|
17036
17038
|
return "TextureSizeNode";
|
|
17037
17039
|
}
|
|
@@ -17049,7 +17051,7 @@ class Bw extends re {
|
|
|
17049
17051
|
return e.format(`${e.getMethod("textureDimensions")}( ${s}, ${i} )`, this.getNodeType(e), t);
|
|
17050
17052
|
}
|
|
17051
17053
|
}
|
|
17052
|
-
const br = /* @__PURE__ */ L(
|
|
17054
|
+
const br = /* @__PURE__ */ L(Iw).setParameterLength(1, 2), By = /* @__PURE__ */ new Ct();
|
|
17053
17055
|
class Or extends Wa {
|
|
17054
17056
|
static get type() {
|
|
17055
17057
|
return "TextureNode";
|
|
@@ -17062,7 +17064,7 @@ class Or extends Wa {
|
|
|
17062
17064
|
* @param {?Node<int>} [levelNode=null] - The level node.
|
|
17063
17065
|
* @param {?Node<float>} [biasNode=null] - The bias node.
|
|
17064
17066
|
*/
|
|
17065
|
-
constructor(e =
|
|
17067
|
+
constructor(e = By, t = null, s = null, i = null) {
|
|
17066
17068
|
super(e), this.isTextureNode = !0, this.uvNode = t, this.levelNode = s, this.biasNode = i, this.compareNode = null, this.depthNode = null, this.gradNode = null, this.sampler = !0, this.updateMatrix = !1, this.updateType = he.NONE, this.referenceNode = null, this._value = e, this._matrixUniform = null, this.setUpdateMatrix(t === null);
|
|
17067
17069
|
}
|
|
17068
17070
|
set value(e) {
|
|
@@ -17127,7 +17129,7 @@ class Or extends Wa {
|
|
|
17127
17129
|
* @return {Node} The transformed uv node.
|
|
17128
17130
|
*/
|
|
17129
17131
|
getTransformedUV(e) {
|
|
17130
|
-
return this._matrixUniform === null && (this._matrixUniform = Q(this.value.matrix)), this._matrixUniform.mul(
|
|
17132
|
+
return this._matrixUniform === null && (this._matrixUniform = Q(this.value.matrix)), this._matrixUniform.mul(B(e, 1)).xy;
|
|
17131
17133
|
}
|
|
17132
17134
|
/**
|
|
17133
17135
|
* Defines whether the uv transformation matrix should automatically be updated or not.
|
|
@@ -17355,7 +17357,7 @@ class Or extends Wa {
|
|
|
17355
17357
|
return e.sampler = this.sampler, e.depthNode = this.depthNode, e.compareNode = this.compareNode, e.gradNode = this.gradNode, e;
|
|
17356
17358
|
}
|
|
17357
17359
|
}
|
|
17358
|
-
const Lw = /* @__PURE__ */ L(Or).setParameterLength(1, 4).setName("texture"), _e = (a =
|
|
17360
|
+
const Lw = /* @__PURE__ */ L(Or).setParameterLength(1, 4).setName("texture"), _e = (a = By, e = null, t = null, s = null) => {
|
|
17359
17361
|
let i;
|
|
17360
17362
|
return a && a.isTextureNode === !0 ? (i = U(a.clone()), i.referenceNode = a.getSelf(), e !== null && (i.uvNode = U(e)), t !== null && (i.levelNode = U(t)), s !== null && (i.biasNode = U(s))) : i = Lw(a, e, t, s), i;
|
|
17361
17363
|
}, vs = (...a) => _e(...a).setSampler(!1);
|
|
@@ -17371,7 +17373,7 @@ class Uw extends Ct {
|
|
|
17371
17373
|
}
|
|
17372
17374
|
}
|
|
17373
17375
|
const Xr = /* @__PURE__ */ new ce();
|
|
17374
|
-
class
|
|
17376
|
+
class Iy extends Or {
|
|
17375
17377
|
static get type() {
|
|
17376
17378
|
return "ViewportTextureNode";
|
|
17377
17379
|
}
|
|
@@ -17398,9 +17400,9 @@ class By extends Or {
|
|
|
17398
17400
|
return e.generateMipmaps = this.generateMipmaps, e;
|
|
17399
17401
|
}
|
|
17400
17402
|
}
|
|
17401
|
-
const Ly = /* @__PURE__ */ L(
|
|
17403
|
+
const Ly = /* @__PURE__ */ L(Iy, null, null, { generateMipmaps: !0 }).setParameterLength(0, 3);
|
|
17402
17404
|
let Sc = null;
|
|
17403
|
-
class kw extends
|
|
17405
|
+
class kw extends Iy {
|
|
17404
17406
|
static get type() {
|
|
17405
17407
|
return "ViewportDepthTextureNode";
|
|
17406
17408
|
}
|
|
@@ -18017,7 +18019,7 @@ class Wl extends Ct {
|
|
|
18017
18019
|
* @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
|
|
18018
18020
|
* @param {string} [colorSpace=NoColorSpace] - The color space value.
|
|
18019
18021
|
*/
|
|
18020
|
-
constructor(e = [], t =
|
|
18022
|
+
constructor(e = [], t = Ba, s, i, n, r, o, l, c, h) {
|
|
18021
18023
|
super(e, t, s, i, n, r, o, l, c, h), this.isCubeTexture = !0, this.flipY = !1;
|
|
18022
18024
|
}
|
|
18023
18025
|
/**
|
|
@@ -18064,7 +18066,7 @@ class Jw extends Or {
|
|
|
18064
18066
|
*/
|
|
18065
18067
|
getDefaultUV() {
|
|
18066
18068
|
const e = this.value;
|
|
18067
|
-
return e.mapping ===
|
|
18069
|
+
return e.mapping === Ba ? Zw : e.mapping === gl ? Kw : (console.error('THREE.CubeTextureNode: Mapping "%s" not supported.', e.mapping), B(0, 0, 0));
|
|
18068
18070
|
}
|
|
18069
18071
|
/**
|
|
18070
18072
|
* Overwritten with an empty implementation since the `updateMatrix` flag is ignored
|
|
@@ -18085,7 +18087,7 @@ class Jw extends Or {
|
|
|
18085
18087
|
*/
|
|
18086
18088
|
setupUV(e, t) {
|
|
18087
18089
|
const s = this.value;
|
|
18088
|
-
return (e.renderer.coordinateSystem === zi || !s.isRenderTargetTexture) && (t =
|
|
18090
|
+
return (e.renderer.coordinateSystem === zi || !s.isRenderTargetTexture) && (t = B(t.x.negate(), t.yz)), Vy.mul(t);
|
|
18089
18091
|
}
|
|
18090
18092
|
/**
|
|
18091
18093
|
* Generates the uv code snippet.
|
|
@@ -18242,7 +18244,7 @@ class nd extends re {
|
|
|
18242
18244
|
Array.isArray(e) ? this.node.array = e : this.node.value = e;
|
|
18243
18245
|
}
|
|
18244
18246
|
}
|
|
18245
|
-
const
|
|
18247
|
+
const Ie = (a, e, t) => U(new nd(a, e, t)), jp = (a, e, t, s) => U(new nd(a, e, s, t));
|
|
18246
18248
|
class sE extends nd {
|
|
18247
18249
|
static get type() {
|
|
18248
18250
|
return "MaterialReferenceNode";
|
|
@@ -18269,13 +18271,13 @@ class sE extends nd {
|
|
|
18269
18271
|
return this.reference = this.material !== null ? this.material : e.material, this.reference;
|
|
18270
18272
|
}
|
|
18271
18273
|
}
|
|
18272
|
-
const Oi = (a, e, t = null) => U(new sE(a, e, t)), Hy = /* @__PURE__ */
|
|
18274
|
+
const Oi = (a, e, t = null) => U(new sE(a, e, t)), Hy = /* @__PURE__ */ I((a) => (a.geometry.hasAttribute("tangent") === !1 && a.geometry.computeTangents(), Vi("tangent", "vec4")))(), rd = /* @__PURE__ */ Hy.xyz.toVar("tangentLocal"), $y = /* @__PURE__ */ Gl.mul(ne(rd, 0)).xyz.toVarying("v_tangentView").normalize().toVar("tangentView"), iE = /* @__PURE__ */ I(([a, e], t) => {
|
|
18273
18275
|
let s = a.mul(Hy.w).xyz;
|
|
18274
18276
|
return t.material.flatShading !== !0 && (s = Ns(s, e)), s;
|
|
18275
|
-
}).once(), nE = iE(js.cross($y), "v_bitangentView").normalize().toVar("bitangentView"), xa = /* @__PURE__ */
|
|
18277
|
+
}).once(), nE = iE(js.cross($y), "v_bitangentView").normalize().toVar("bitangentView"), xa = /* @__PURE__ */ It($y, nE, js), rE = /* @__PURE__ */ (() => {
|
|
18276
18278
|
let a = xr.cross(Ye);
|
|
18277
18279
|
return a = a.cross(xr).normalize(), a = He(a, st, cn.mul(ti.oneMinus()).oneMinus().pow2().pow2()).normalize(), a;
|
|
18278
|
-
})(), aE = /* @__PURE__ */
|
|
18280
|
+
})(), aE = /* @__PURE__ */ I((a) => {
|
|
18279
18281
|
const { eye_pos: e, surf_norm: t, mapN: s, uv: i } = a, n = e.dFdx(), r = e.dFdy(), o = i.dFdx(), l = i.dFdy(), c = t, h = r.cross(c), u = c.cross(n), d = h.mul(o.x).add(u.mul(l.x)), p = h.mul(o.y).add(u.mul(l.y)), f = d.dot(d).max(p.dot(p)), m = Hl.mul(f.inverseSqrt());
|
|
18280
18282
|
return Lt(d.mul(s.x, m), p.mul(s.y, m), c.mul(s.z)).normalize();
|
|
18281
18283
|
});
|
|
@@ -18295,7 +18297,7 @@ class oE extends rt {
|
|
|
18295
18297
|
setup(e) {
|
|
18296
18298
|
const { normalMapType: t, scaleNode: s } = this;
|
|
18297
18299
|
let i = this.node.mul(2).sub(1);
|
|
18298
|
-
s !== null && (i =
|
|
18300
|
+
s !== null && (i = B(i.xy.mul(s), i.z));
|
|
18299
18301
|
let n = null;
|
|
18300
18302
|
return t === $b ? n = Dy(i) : t === ki && (e.hasGeometryAttribute("tangent") === !0 ? n = xa.mul(i).normalize() : n = aE({
|
|
18301
18303
|
eye_pos: it,
|
|
@@ -18305,13 +18307,13 @@ class oE extends rt {
|
|
|
18305
18307
|
})), n;
|
|
18306
18308
|
}
|
|
18307
18309
|
}
|
|
18308
|
-
const qp = /* @__PURE__ */ L(oE).setParameterLength(1, 2), lE =
|
|
18310
|
+
const qp = /* @__PURE__ */ L(oE).setParameterLength(1, 2), lE = I(({ textureNode: a, bumpScale: e }) => {
|
|
18309
18311
|
const t = (i) => a.cache().context({ getUV: (n) => i(n.uvNode || qa()), forceUVContext: !0 }), s = O(t((i) => i));
|
|
18310
18312
|
return V(
|
|
18311
18313
|
O(t((i) => i.add(i.dFdx()))).sub(s),
|
|
18312
18314
|
O(t((i) => i.add(i.dFdy()))).sub(s)
|
|
18313
18315
|
).mul(e);
|
|
18314
|
-
}), cE =
|
|
18316
|
+
}), cE = I((a) => {
|
|
18315
18317
|
const { surf_pos: e, surf_norm: t, dHdxy: s } = a, i = e.dFdx().normalize(), n = e.dFdy().normalize(), r = t, o = n.cross(r), l = r.cross(i), c = i.dot(o).mul(Hl), h = c.sign().mul(s.x.mul(o).add(s.y.mul(l)));
|
|
18316
18318
|
return c.abs().mul(t).sub(h).normalize();
|
|
18317
18319
|
});
|
|
@@ -18399,7 +18401,7 @@ class F extends re {
|
|
|
18399
18401
|
const t = e.context.material, s = this.scope;
|
|
18400
18402
|
let i = null;
|
|
18401
18403
|
if (s === F.COLOR) {
|
|
18402
|
-
const n = t.color !== void 0 ? this.getColor(s) :
|
|
18404
|
+
const n = t.color !== void 0 ? this.getColor(s) : B();
|
|
18403
18405
|
t.map && t.map.isTexture === !0 ? i = n.mul(this.getTexture("map")) : i = n;
|
|
18404
18406
|
} else if (s === F.OPACITY) {
|
|
18405
18407
|
const n = this.getFloat(s);
|
|
@@ -18444,9 +18446,9 @@ class F extends re {
|
|
|
18444
18446
|
} else
|
|
18445
18447
|
i = Zr;
|
|
18446
18448
|
else if (s === F.IRIDESCENCE_THICKNESS) {
|
|
18447
|
-
const n =
|
|
18449
|
+
const n = Ie("1", "float", t.iridescenceThicknessRange);
|
|
18448
18450
|
if (t.iridescenceThicknessMap) {
|
|
18449
|
-
const r =
|
|
18451
|
+
const r = Ie("0", "float", t.iridescenceThicknessRange);
|
|
18450
18452
|
i = n.sub(r).mul(this.getTexture(s).g).add(r);
|
|
18451
18453
|
} else
|
|
18452
18454
|
i = n;
|
|
@@ -18508,13 +18510,13 @@ F.POINT_SIZE = "size";
|
|
|
18508
18510
|
F.DISPERSION = "dispersion";
|
|
18509
18511
|
F.LIGHT_MAP = "light";
|
|
18510
18512
|
F.AO = "ao";
|
|
18511
|
-
const dE = /* @__PURE__ */ G(F, F.ALPHA_TEST), pE = /* @__PURE__ */ G(F, F.COLOR), fE = /* @__PURE__ */ G(F, F.SHININESS), mE = /* @__PURE__ */ G(F, F.EMISSIVE), Wy = /* @__PURE__ */ G(F, F.OPACITY), gE = /* @__PURE__ */ G(F, F.SPECULAR), Xp = /* @__PURE__ */ G(F, F.SPECULAR_INTENSITY), yE = /* @__PURE__ */ G(F, F.SPECULAR_COLOR), nl = /* @__PURE__ */ G(F, F.SPECULAR_STRENGTH), Cc = /* @__PURE__ */ G(F, F.REFLECTIVITY), xE = /* @__PURE__ */ G(F, F.ROUGHNESS), _E = /* @__PURE__ */ G(F, F.METALNESS), bE = /* @__PURE__ */ G(F, F.NORMAL), TE = /* @__PURE__ */ G(F, F.CLEARCOAT), SE = /* @__PURE__ */ G(F, F.CLEARCOAT_ROUGHNESS), vE = /* @__PURE__ */ G(F, F.CLEARCOAT_NORMAL), wE = /* @__PURE__ */ G(F, F.ROTATION), EE = /* @__PURE__ */ G(F, F.SHEEN), CE = /* @__PURE__ */ G(F, F.SHEEN_ROUGHNESS), ME = /* @__PURE__ */ G(F, F.ANISOTROPY), AE = /* @__PURE__ */ G(F, F.IRIDESCENCE), RE = /* @__PURE__ */ G(F, F.IRIDESCENCE_IOR), NE = /* @__PURE__ */ G(F, F.IRIDESCENCE_THICKNESS), PE = /* @__PURE__ */ G(F, F.TRANSMISSION), FE = /* @__PURE__ */ G(F, F.THICKNESS), DE = /* @__PURE__ */ G(F, F.IOR), OE = /* @__PURE__ */ G(F, F.ATTENUATION_DISTANCE),
|
|
18513
|
+
const dE = /* @__PURE__ */ G(F, F.ALPHA_TEST), pE = /* @__PURE__ */ G(F, F.COLOR), fE = /* @__PURE__ */ G(F, F.SHININESS), mE = /* @__PURE__ */ G(F, F.EMISSIVE), Wy = /* @__PURE__ */ G(F, F.OPACITY), gE = /* @__PURE__ */ G(F, F.SPECULAR), Xp = /* @__PURE__ */ G(F, F.SPECULAR_INTENSITY), yE = /* @__PURE__ */ G(F, F.SPECULAR_COLOR), nl = /* @__PURE__ */ G(F, F.SPECULAR_STRENGTH), Cc = /* @__PURE__ */ G(F, F.REFLECTIVITY), xE = /* @__PURE__ */ G(F, F.ROUGHNESS), _E = /* @__PURE__ */ G(F, F.METALNESS), bE = /* @__PURE__ */ G(F, F.NORMAL), TE = /* @__PURE__ */ G(F, F.CLEARCOAT), SE = /* @__PURE__ */ G(F, F.CLEARCOAT_ROUGHNESS), vE = /* @__PURE__ */ G(F, F.CLEARCOAT_NORMAL), wE = /* @__PURE__ */ G(F, F.ROTATION), EE = /* @__PURE__ */ G(F, F.SHEEN), CE = /* @__PURE__ */ G(F, F.SHEEN_ROUGHNESS), ME = /* @__PURE__ */ G(F, F.ANISOTROPY), AE = /* @__PURE__ */ G(F, F.IRIDESCENCE), RE = /* @__PURE__ */ G(F, F.IRIDESCENCE_IOR), NE = /* @__PURE__ */ G(F, F.IRIDESCENCE_THICKNESS), PE = /* @__PURE__ */ G(F, F.TRANSMISSION), FE = /* @__PURE__ */ G(F, F.THICKNESS), DE = /* @__PURE__ */ G(F, F.IOR), OE = /* @__PURE__ */ G(F, F.ATTENUATION_DISTANCE), BE = /* @__PURE__ */ G(F, F.ATTENUATION_COLOR), IE = /* @__PURE__ */ G(F, F.LINE_SCALE), LE = /* @__PURE__ */ G(F, F.LINE_DASH_SIZE), UE = /* @__PURE__ */ G(F, F.LINE_GAP_SIZE);
|
|
18512
18514
|
F.LINE_WIDTH;
|
|
18513
18515
|
const kE = /* @__PURE__ */ G(F, F.LINE_DASH_OFFSET), zE = /* @__PURE__ */ G(F, F.POINT_SIZE), GE = /* @__PURE__ */ G(F, F.DISPERSION), jy = /* @__PURE__ */ G(F, F.LIGHT_MAP), VE = /* @__PURE__ */ G(F, F.AO), Zr = /* @__PURE__ */ Q(new ce()).onReference(function(a) {
|
|
18514
18516
|
return a.material;
|
|
18515
18517
|
}).onRenderUpdate(function({ material: a }) {
|
|
18516
18518
|
this.value.set(a.anisotropy * Math.cos(a.anisotropyRotation), a.anisotropy * Math.sin(a.anisotropyRotation));
|
|
18517
|
-
}), qy = /* @__PURE__ */
|
|
18519
|
+
}), qy = /* @__PURE__ */ I((a) => a.context.setupModelViewProjection(), "vec4").once()().toVarying("v_modelViewProjection");
|
|
18518
18520
|
class HE extends wy {
|
|
18519
18521
|
/**
|
|
18520
18522
|
* Constructs a new instanced interleaved buffer.
|
|
@@ -18601,7 +18603,7 @@ class WE extends re {
|
|
|
18601
18603
|
}
|
|
18602
18604
|
if (i && r === null) {
|
|
18603
18605
|
const l = new $E(i.array, 3), c = i.usage === ar ? zp : kp;
|
|
18604
|
-
this.bufferColor = l, r =
|
|
18606
|
+
this.bufferColor = l, r = B(c(l, "vec3", 3, 0)), this.instanceColorNode = r;
|
|
18605
18607
|
}
|
|
18606
18608
|
const o = n.mul(wt).xyz;
|
|
18607
18609
|
if (wt.assign(o), e.hasGeometryAttribute("normal")) {
|
|
@@ -18655,7 +18657,7 @@ class YE extends re {
|
|
|
18655
18657
|
*/
|
|
18656
18658
|
setup(e) {
|
|
18657
18659
|
this.batchingIdNode === null && (e.getDrawIndex() === null ? this.batchingIdNode = ed : this.batchingIdNode = dw);
|
|
18658
|
-
const s =
|
|
18660
|
+
const s = I(([f]) => {
|
|
18659
18661
|
const m = ze(br(vs(this.batchMesh._indirectTexture), 0).x), y = ze(f).mod(m), g = ze(f).div(m);
|
|
18660
18662
|
return vs(this.batchMesh._indirectTexture, Js(y, g)).x;
|
|
18661
18663
|
}).setLayout({
|
|
@@ -18671,7 +18673,7 @@ class YE extends re {
|
|
|
18671
18673
|
vs(i, Js(o.add(3), l))
|
|
18672
18674
|
), h = this.batchMesh._colorsTexture;
|
|
18673
18675
|
if (h !== null) {
|
|
18674
|
-
const m =
|
|
18676
|
+
const m = I(([y]) => {
|
|
18675
18677
|
const g = ze(br(vs(h), 0).x), x = y, _ = x.mod(g), b = x.div(g);
|
|
18676
18678
|
return vs(h, Js(_, b)).rgb;
|
|
18677
18679
|
}).setLayout({
|
|
@@ -18683,9 +18685,9 @@ class YE extends re {
|
|
|
18683
18685
|
})(s);
|
|
18684
18686
|
vl("vec3", "vBatchColor").assign(m);
|
|
18685
18687
|
}
|
|
18686
|
-
const u =
|
|
18688
|
+
const u = It(c);
|
|
18687
18689
|
wt.assign(c.mul(wt));
|
|
18688
|
-
const d = Ws.div(
|
|
18690
|
+
const d = Ws.div(B(u[0].dot(u[0]), u[1].dot(u[1]), u[2].dot(u[2]))), p = u.mul(d).xyz;
|
|
18689
18691
|
Ws.assign(p), e.hasGeometryAttribute("tangent") && rd.mulAssign(u);
|
|
18690
18692
|
}
|
|
18691
18693
|
}
|
|
@@ -18700,7 +18702,7 @@ class ZE extends re {
|
|
|
18700
18702
|
* @param {SkinnedMesh} skinnedMesh - The skinned mesh.
|
|
18701
18703
|
*/
|
|
18702
18704
|
constructor(e) {
|
|
18703
|
-
super("void"), this.skinnedMesh = e, this.updateType = he.OBJECT, this.skinIndexNode = Vi("skinIndex", "uvec4"), this.skinWeightNode = Vi("skinWeight", "vec4"), this.bindMatrixNode =
|
|
18705
|
+
super("void"), this.skinnedMesh = e, this.updateType = he.OBJECT, this.skinIndexNode = Vi("skinIndex", "uvec4"), this.skinWeightNode = Vi("skinWeight", "vec4"), this.bindMatrixNode = Ie("bindMatrix", "mat4"), this.bindMatrixInverseNode = Ie("bindMatrixInverse", "mat4"), this.boneMatricesNode = jp("skeleton.boneMatrices", "mat4", e.skeleton.bones.length), this.positionNode = wt, this.toPositionNode = wt, this.previousBoneMatricesNode = null;
|
|
18704
18706
|
}
|
|
18705
18707
|
/**
|
|
18706
18708
|
* Transforms the given vertex position via skinning.
|
|
@@ -18803,7 +18805,7 @@ class QE extends Ct {
|
|
|
18803
18805
|
* @param {number} [depth=1] - The depth of the texture.
|
|
18804
18806
|
*/
|
|
18805
18807
|
constructor(e = null, t = 1, s = 1, i = 1) {
|
|
18806
|
-
super(null), this.isDataArrayTexture = !0, this.image = { data: e, width: t, height: s, depth: i }, this.magFilter = dt, this.minFilter = dt, this.wrapR =
|
|
18808
|
+
super(null), this.isDataArrayTexture = !0, this.image = { data: e, width: t, height: s, depth: i }, this.magFilter = dt, this.minFilter = dt, this.wrapR = Ii, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1, this.layerUpdates = /* @__PURE__ */ new Set();
|
|
18807
18809
|
}
|
|
18808
18810
|
/**
|
|
18809
18811
|
* Describes that a specific layer of the texture needs to be updated.
|
|
@@ -18824,7 +18826,7 @@ class QE extends Ct {
|
|
|
18824
18826
|
this.layerUpdates.clear();
|
|
18825
18827
|
}
|
|
18826
18828
|
}
|
|
18827
|
-
const Mc = /* @__PURE__ */ new WeakMap(), Kt = /* @__PURE__ */ new ge(), Kp = /* @__PURE__ */
|
|
18829
|
+
const Mc = /* @__PURE__ */ new WeakMap(), Kt = /* @__PURE__ */ new ge(), Kp = /* @__PURE__ */ I(({ bufferMap: a, influence: e, stride: t, width: s, depth: i, offset: n }) => {
|
|
18828
18830
|
const r = ze(uw).mul(t).add(n), o = r.div(s), l = r.sub(o.mul(s));
|
|
18829
18831
|
return vs(a, Js(l, o)).depth(i).xyz.mul(e);
|
|
18830
18832
|
});
|
|
@@ -18884,7 +18886,7 @@ class eC extends re {
|
|
|
18884
18886
|
const h = ze(c.width);
|
|
18885
18887
|
Ms(r, ({ i: u }) => {
|
|
18886
18888
|
const d = O(0).toVar();
|
|
18887
|
-
this.mesh.count > 1 && this.mesh.morphTexture !== null && this.mesh.morphTexture !== void 0 ? d.assign(vs(this.mesh.morphTexture, Js(ze(u).add(1), ze(ed))).r) : d.assign(
|
|
18889
|
+
this.mesh.count > 1 && this.mesh.morphTexture !== null && this.mesh.morphTexture !== void 0 ? d.assign(vs(this.mesh.morphTexture, Js(ze(u).add(1), ze(ed))).r) : d.assign(Ie("morphTargetInfluences", "float").element(u).toVar()), Qe(d.notEqual(0), () => {
|
|
18888
18890
|
s === !0 && wt.addAssign(Kp({
|
|
18889
18891
|
bufferMap: o,
|
|
18890
18892
|
influence: d,
|
|
@@ -18914,7 +18916,7 @@ class eC extends re {
|
|
|
18914
18916
|
}
|
|
18915
18917
|
}
|
|
18916
18918
|
const tC = /* @__PURE__ */ L(eC).setParameterLength(1);
|
|
18917
|
-
class
|
|
18919
|
+
class Br extends re {
|
|
18918
18920
|
static get type() {
|
|
18919
18921
|
return "LightingNode";
|
|
18920
18922
|
}
|
|
@@ -18925,7 +18927,7 @@ class Ir extends re {
|
|
|
18925
18927
|
super("vec3"), this.isLightingNode = !0;
|
|
18926
18928
|
}
|
|
18927
18929
|
}
|
|
18928
|
-
class sC extends
|
|
18930
|
+
class sC extends Br {
|
|
18929
18931
|
static get type() {
|
|
18930
18932
|
return "AONode";
|
|
18931
18933
|
}
|
|
@@ -18970,16 +18972,16 @@ class iC extends Ty {
|
|
|
18970
18972
|
* }} The lighting context object.
|
|
18971
18973
|
*/
|
|
18972
18974
|
getContext() {
|
|
18973
|
-
const { backdropNode: e, backdropAlphaNode: t } = this, s =
|
|
18975
|
+
const { backdropNode: e, backdropAlphaNode: t } = this, s = B().toVar("directDiffuse"), i = B().toVar("directSpecular"), n = B().toVar("indirectDiffuse"), r = B().toVar("indirectSpecular"), o = {
|
|
18974
18976
|
directDiffuse: s,
|
|
18975
18977
|
directSpecular: i,
|
|
18976
18978
|
indirectDiffuse: n,
|
|
18977
18979
|
indirectSpecular: r
|
|
18978
18980
|
};
|
|
18979
18981
|
return {
|
|
18980
|
-
radiance:
|
|
18981
|
-
irradiance:
|
|
18982
|
-
iblIrradiance:
|
|
18982
|
+
radiance: B().toVar("radiance"),
|
|
18983
|
+
irradiance: B().toVar("irradiance"),
|
|
18984
|
+
iblIrradiance: B().toVar("iblIrradiance"),
|
|
18983
18985
|
ambientOcclusion: O(1).toVar("ambientOcclusion"),
|
|
18984
18986
|
reflectedLight: o,
|
|
18985
18987
|
backdrop: e,
|
|
@@ -18991,7 +18993,7 @@ class iC extends Ty {
|
|
|
18991
18993
|
}
|
|
18992
18994
|
}
|
|
18993
18995
|
const nC = /* @__PURE__ */ L(iC);
|
|
18994
|
-
class rC extends
|
|
18996
|
+
class rC extends Br {
|
|
18995
18997
|
static get type() {
|
|
18996
18998
|
return "IrradianceNode";
|
|
18997
18999
|
}
|
|
@@ -19039,7 +19041,7 @@ class fs extends re {
|
|
|
19039
19041
|
* @return {Node} The result node.
|
|
19040
19042
|
*/
|
|
19041
19043
|
setupAlphaToCoverage(e, t) {
|
|
19042
|
-
return
|
|
19044
|
+
return I(() => {
|
|
19043
19045
|
const s = O().toVar("distanceToPlane"), i = O().toVar("distanceToGradient"), n = O(1).toVar("clipOpacity"), r = t.length;
|
|
19044
19046
|
if (this.hardwareClipping === !1 && r > 0) {
|
|
19045
19047
|
const l = Gs(t);
|
|
@@ -19067,7 +19069,7 @@ class fs extends re {
|
|
|
19067
19069
|
* @return {Node} The result node.
|
|
19068
19070
|
*/
|
|
19069
19071
|
setupDefault(e, t) {
|
|
19070
|
-
return
|
|
19072
|
+
return I(() => {
|
|
19071
19073
|
const s = t.length;
|
|
19072
19074
|
if (this.hardwareClipping === !1 && s > 0) {
|
|
19073
19075
|
const n = Gs(t);
|
|
@@ -19095,7 +19097,7 @@ class fs extends re {
|
|
|
19095
19097
|
*/
|
|
19096
19098
|
setupHardwareClipping(e, t) {
|
|
19097
19099
|
const s = e.length;
|
|
19098
|
-
return t.enableHardwareClipping(s),
|
|
19100
|
+
return t.enableHardwareClipping(s), I(() => {
|
|
19099
19101
|
const i = Gs(e), n = zl(t.getClipDistance());
|
|
19100
19102
|
Ms(s, ({ i: r }) => {
|
|
19101
19103
|
const o = i.element(r), l = it.dot(o.xyz).sub(o.w).negate();
|
|
@@ -19333,7 +19335,7 @@ class hC {
|
|
|
19333
19335
|
return i || n ? !1 : this.equals(e) !== !0;
|
|
19334
19336
|
}
|
|
19335
19337
|
}
|
|
19336
|
-
const uC = 0.05, Qp = /* @__PURE__ */
|
|
19338
|
+
const uC = 0.05, Qp = /* @__PURE__ */ I(([a]) => $i(fe(1e4, Es(fe(17, a.x).add(fe(0.1, a.y)))).mul(Lt(0.1, cs(Es(fe(13, a.y).add(a.x))))))), Jp = /* @__PURE__ */ I(([a]) => Qp(V(Qp(a.xy), a.z))), dC = /* @__PURE__ */ I(([a]) => {
|
|
19337
19339
|
const e = Mt(
|
|
19338
19340
|
hi(py(a.xyz)),
|
|
19339
19341
|
hi(fy(a.xyz))
|
|
@@ -19343,7 +19345,7 @@ const uC = 0.05, Qp = /* @__PURE__ */ B(([a]) => $i(fe(1e4, Es(fe(17, a.x).add(f
|
|
|
19343
19345
|
), i = V(
|
|
19344
19346
|
Jp(bn(s.x.mul(a.xyz))),
|
|
19345
19347
|
Jp(bn(s.y.mul(a.xyz)))
|
|
19346
|
-
), n = $i(ci(t)), r = Lt(fe(n.oneMinus(), i.x), fe(n, i.y)), o = Mr(n, n.oneMinus()), l =
|
|
19348
|
+
), n = $i(ci(t)), r = Lt(fe(n.oneMinus(), i.x), fe(n, i.y)), o = Mr(n, n.oneMinus()), l = B(
|
|
19347
19349
|
r.mul(r).div(fe(2, o).mul(Ft(1, o))),
|
|
19348
19350
|
r.sub(fe(0.5, o)).div(Ft(1, o)),
|
|
19349
19351
|
Ft(1, Ft(1, r).mul(Ft(1, r)).div(fe(2, o).mul(Ft(1, o))))
|
|
@@ -19585,7 +19587,7 @@ class nt extends qt {
|
|
|
19585
19587
|
* @return {Node<vec3>} The outgoing light node.
|
|
19586
19588
|
*/
|
|
19587
19589
|
setupOutgoingLight() {
|
|
19588
|
-
return this.lights === !0 ?
|
|
19590
|
+
return this.lights === !0 ? B(0) : Se.rgb;
|
|
19589
19591
|
}
|
|
19590
19592
|
/**
|
|
19591
19593
|
* Setups the normal node from the material.
|
|
@@ -19593,7 +19595,7 @@ class nt extends qt {
|
|
|
19593
19595
|
* @return {Node<vec3>} The normal node.
|
|
19594
19596
|
*/
|
|
19595
19597
|
setupNormal() {
|
|
19596
|
-
return this.normalNode ?
|
|
19598
|
+
return this.normalNode ? B(this.normalNode) : bE;
|
|
19597
19599
|
}
|
|
19598
19600
|
/**
|
|
19599
19601
|
* Setups the environment node from the material.
|
|
@@ -19654,8 +19656,8 @@ class nt extends qt {
|
|
|
19654
19656
|
if (o && o.getScope().hasLights) {
|
|
19655
19657
|
const c = this.setupLightingModel(e) || null;
|
|
19656
19658
|
l = nC(o, c, s, i);
|
|
19657
|
-
} else s !== null && (l =
|
|
19658
|
-
return (n && n.isNode === !0 || t.emissive && t.emissive.isColor === !0) && (Lp.assign(
|
|
19659
|
+
} else s !== null && (l = B(i !== null ? He(l, s, i) : s));
|
|
19660
|
+
return (n && n.isNode === !0 || t.emissive && t.emissive.isColor === !0) && (Lp.assign(B(n || mE)), l = l.add(Lp)), l;
|
|
19659
19661
|
}
|
|
19660
19662
|
/**
|
|
19661
19663
|
* Setup the fog.
|
|
@@ -19759,7 +19761,7 @@ class xi extends En {
|
|
|
19759
19761
|
* @return {BufferGeometry} A reference to this instance.
|
|
19760
19762
|
*/
|
|
19761
19763
|
setIndex(e) {
|
|
19762
|
-
return Array.isArray(e) ? this.index = new (
|
|
19764
|
+
return Array.isArray(e) ? this.index = new (Ig(e) ? Vg : Gg)(e, 1) : this.index = e, this;
|
|
19763
19765
|
}
|
|
19764
19766
|
/**
|
|
19765
19767
|
* Sets the given indirect attribute to this geometry.
|
|
@@ -19970,7 +19972,7 @@ class xi extends En {
|
|
|
19970
19972
|
const r = e[i];
|
|
19971
19973
|
s.push(r.x, r.y, r.z || 0);
|
|
19972
19974
|
}
|
|
19973
|
-
this.setAttribute("position", new
|
|
19975
|
+
this.setAttribute("position", new Bt(s, 3));
|
|
19974
19976
|
} else {
|
|
19975
19977
|
const s = Math.min(e.length, t.count);
|
|
19976
19978
|
for (let i = 0; i < s; i++) {
|
|
@@ -20524,7 +20526,7 @@ class gC {
|
|
|
20524
20526
|
return new this.constructor().copy(this);
|
|
20525
20527
|
}
|
|
20526
20528
|
}
|
|
20527
|
-
const bs = /* @__PURE__ */ new R(), Ks = /* @__PURE__ */ new R(), Fc = /* @__PURE__ */ new R(), Qs = /* @__PURE__ */ new R(), Hn = /* @__PURE__ */ new R(), $n = /* @__PURE__ */ new R(), ef = /* @__PURE__ */ new R(), Dc = /* @__PURE__ */ new R(), Oc = /* @__PURE__ */ new R(),
|
|
20529
|
+
const bs = /* @__PURE__ */ new R(), Ks = /* @__PURE__ */ new R(), Fc = /* @__PURE__ */ new R(), Qs = /* @__PURE__ */ new R(), Hn = /* @__PURE__ */ new R(), $n = /* @__PURE__ */ new R(), ef = /* @__PURE__ */ new R(), Dc = /* @__PURE__ */ new R(), Oc = /* @__PURE__ */ new R(), Bc = /* @__PURE__ */ new R(), Ic = /* @__PURE__ */ new ge(), Lc = /* @__PURE__ */ new ge(), Uc = /* @__PURE__ */ new ge();
|
|
20528
20530
|
class As {
|
|
20529
20531
|
/**
|
|
20530
20532
|
* Constructs a new triangle.
|
|
@@ -20612,7 +20614,7 @@ class As {
|
|
|
20612
20614
|
* @return {Vector3} The interpolated attribute value.
|
|
20613
20615
|
*/
|
|
20614
20616
|
static getInterpolatedAttribute(e, t, s, i, n, r) {
|
|
20615
|
-
return
|
|
20617
|
+
return Ic.setScalar(0), Lc.setScalar(0), Uc.setScalar(0), Ic.fromBufferAttribute(e, t), Lc.fromBufferAttribute(e, s), Uc.fromBufferAttribute(e, i), r.setScalar(0), r.addScaledVector(Ic, n.x), r.addScaledVector(Lc, n.y), r.addScaledVector(Uc, n.z), r;
|
|
20616
20618
|
}
|
|
20617
20619
|
/**
|
|
20618
20620
|
* Returns `true` if the triangle is oriented towards the given direction.
|
|
@@ -20788,8 +20790,8 @@ class As {
|
|
|
20788
20790
|
const d = l * u - h * c;
|
|
20789
20791
|
if (d <= 0 && l >= 0 && h <= 0)
|
|
20790
20792
|
return r = l / (l - h), t.copy(s).addScaledVector(Hn, r);
|
|
20791
|
-
|
|
20792
|
-
const p = Hn.dot(
|
|
20793
|
+
Bc.subVectors(e, n);
|
|
20794
|
+
const p = Hn.dot(Bc), f = $n.dot(Bc);
|
|
20793
20795
|
if (f >= 0 && p <= f)
|
|
20794
20796
|
return t.copy(n);
|
|
20795
20797
|
const m = p * c - l * f;
|
|
@@ -20811,7 +20813,7 @@ class As {
|
|
|
20811
20813
|
return e.a.equals(this.a) && e.b.equals(this.b) && e.c.equals(this.c);
|
|
20812
20814
|
}
|
|
20813
20815
|
}
|
|
20814
|
-
class
|
|
20816
|
+
class Bi extends qt {
|
|
20815
20817
|
/**
|
|
20816
20818
|
* Constructs a new mesh basic material.
|
|
20817
20819
|
*
|
|
@@ -20836,7 +20838,7 @@ class mi extends pt {
|
|
|
20836
20838
|
* @param {BufferGeometry} [geometry] - The mesh geometry.
|
|
20837
20839
|
* @param {Material|Array<Material>} [material] - The mesh material.
|
|
20838
20840
|
*/
|
|
20839
|
-
constructor(e = new xi(), t = new
|
|
20841
|
+
constructor(e = new xi(), t = new Bi()) {
|
|
20840
20842
|
super(), this.isMesh = !0, this.type = "Mesh", this.geometry = e, this.material = t, this.morphTargetDictionary = void 0, this.morphTargetInfluences = void 0, this.count = 1, this.updateMorphTargets();
|
|
20841
20843
|
}
|
|
20842
20844
|
copy(e, t) {
|
|
@@ -21030,7 +21032,7 @@ class xC extends xi {
|
|
|
21030
21032
|
constructor(e = !1) {
|
|
21031
21033
|
super();
|
|
21032
21034
|
const t = e === !1 ? [0, -1, 0, 1, 2, 1] : [0, 2, 0, 0, 2, 0];
|
|
21033
|
-
this.setAttribute("position", new
|
|
21035
|
+
this.setAttribute("position", new Bt([-1, 3, 0, -1, -1, 0, 3, -1, 0], 3)), this.setAttribute("uv", new Bt(t, 2));
|
|
21034
21036
|
}
|
|
21035
21037
|
}
|
|
21036
21038
|
const _C = /* @__PURE__ */ new xC();
|
|
@@ -21065,7 +21067,7 @@ class od extends mi {
|
|
|
21065
21067
|
const jl = 1 / 6, Yy = (a) => fe(jl, fe(a, fe(a, a.negate().add(3)).sub(3)).add(1)), uu = (a) => fe(jl, fe(a, fe(a, fe(3, a).sub(6))).add(4)), Xy = (a) => fe(jl, fe(a, fe(a, fe(-3, a).add(3)).add(3)).add(1)), du = (a) => fe(jl, Ul(a, 3)), rf = (a) => Yy(a).add(uu(a)), af = (a) => Xy(a).add(du(a)), of = (a) => Lt(-1, uu(a).div(Yy(a).add(uu(a)))), lf = (a) => Lt(1, du(a).div(Xy(a).add(du(a)))), cf = (a, e, t) => {
|
|
21066
21068
|
const s = a.uvNode, i = fe(s, e.zw).add(0.5), n = bn(i), r = $i(i), o = rf(r.x), l = af(r.x), c = of(r.x), h = lf(r.x), u = of(r.y), d = lf(r.y), p = V(n.x.add(c), n.y.add(u)).sub(0.5).mul(e.xy), f = V(n.x.add(h), n.y.add(u)).sub(0.5).mul(e.xy), m = V(n.x.add(c), n.y.add(d)).sub(0.5).mul(e.xy), y = V(n.x.add(h), n.y.add(d)).sub(0.5).mul(e.xy), g = rf(r.y).mul(Lt(o.mul(a.sample(p).level(t)), l.mul(a.sample(f).level(t)))), x = af(r.y).mul(Lt(o.mul(a.sample(m).level(t)), l.mul(a.sample(y).level(t))));
|
|
21067
21069
|
return g.add(x);
|
|
21068
|
-
}, bC = /* @__PURE__ */
|
|
21070
|
+
}, bC = /* @__PURE__ */ I(([a, e = O(3)]) => {
|
|
21069
21071
|
const t = V(a.size(ze(e))), s = V(a.size(ze(e.add(1)))), i = $s(1, t), n = $s(1, s), r = cf(a, ne(i, t), bn(e)), o = cf(a, ne(n, s), ju(e));
|
|
21070
21072
|
return $i(e).mix(r, o);
|
|
21071
21073
|
}), Qr = /* @__PURE__ */ new gs(), Gc = /* @__PURE__ */ new Le();
|
|
@@ -21092,7 +21094,7 @@ class Wt extends re {
|
|
|
21092
21094
|
setup(e) {
|
|
21093
21095
|
const t = this.scope, s = this.scene !== null ? this.scene : e.scene;
|
|
21094
21096
|
let i;
|
|
21095
|
-
return t === Wt.BACKGROUND_BLURRINESS ? i =
|
|
21097
|
+
return t === Wt.BACKGROUND_BLURRINESS ? i = Ie("backgroundBlurriness", "float", s) : t === Wt.BACKGROUND_INTENSITY ? i = Ie("backgroundIntensity", "float", s) : t === Wt.BACKGROUND_ROTATION ? i = Q("mat4").label("backgroundRotation").setGroup(K).onRenderUpdate(() => {
|
|
21096
21098
|
const n = s.background;
|
|
21097
21099
|
return n !== null && n.isTexture && n.mapping !== Su ? (Qr.copy(s.backgroundRotation), Qr.x *= -1, Qr.y *= -1, Qr.z *= -1, Gc.makeRotationFromEuler(Qr)) : Gc.identity(), Gc;
|
|
21098
21100
|
}) : console.error("THREE.SceneNode: Unknown scope:", t), i;
|
|
@@ -21101,23 +21103,23 @@ class Wt extends re {
|
|
|
21101
21103
|
Wt.BACKGROUND_BLURRINESS = "backgroundBlurriness";
|
|
21102
21104
|
Wt.BACKGROUND_INTENSITY = "backgroundIntensity";
|
|
21103
21105
|
Wt.BACKGROUND_ROTATION = "backgroundRotation";
|
|
21104
|
-
const TC = /* @__PURE__ */ G(Wt, Wt.BACKGROUND_BLURRINESS), hf = /* @__PURE__ */ G(Wt, Wt.BACKGROUND_INTENSITY), SC = /* @__PURE__ */ G(Wt, Wt.BACKGROUND_ROTATION), vC =
|
|
21105
|
-
const s =
|
|
21106
|
+
const TC = /* @__PURE__ */ G(Wt, Wt.BACKGROUND_BLURRINESS), hf = /* @__PURE__ */ G(Wt, Wt.BACKGROUND_INTENSITY), SC = /* @__PURE__ */ G(Wt, Wt.BACKGROUND_ROTATION), vC = I(({ texture: a, uv: e }) => {
|
|
21107
|
+
const s = B().toVar();
|
|
21106
21108
|
return Qe(e.x.lessThan(1e-4), () => {
|
|
21107
|
-
s.assign(
|
|
21109
|
+
s.assign(B(1, 0, 0));
|
|
21108
21110
|
}).ElseIf(e.y.lessThan(1e-4), () => {
|
|
21109
|
-
s.assign(
|
|
21111
|
+
s.assign(B(0, 1, 0));
|
|
21110
21112
|
}).ElseIf(e.z.lessThan(1e-4), () => {
|
|
21111
|
-
s.assign(
|
|
21113
|
+
s.assign(B(0, 0, 1));
|
|
21112
21114
|
}).ElseIf(e.x.greaterThan(1 - 1e-4), () => {
|
|
21113
|
-
s.assign(
|
|
21115
|
+
s.assign(B(-1, 0, 0));
|
|
21114
21116
|
}).ElseIf(e.y.greaterThan(1 - 1e-4), () => {
|
|
21115
|
-
s.assign(
|
|
21117
|
+
s.assign(B(0, -1, 0));
|
|
21116
21118
|
}).ElseIf(e.z.greaterThan(1 - 1e-4), () => {
|
|
21117
|
-
s.assign(
|
|
21119
|
+
s.assign(B(0, 0, -1));
|
|
21118
21120
|
}).Else(() => {
|
|
21119
|
-
const n = a.sample(e.add(
|
|
21120
|
-
s.assign(
|
|
21121
|
+
const n = a.sample(e.add(B(-0.01, 0, 0))).r.sub(a.sample(e.add(B(0.01, 0, 0))).r), r = a.sample(e.add(B(0, -0.01, 0))).r.sub(a.sample(e.add(B(0, 0.01, 0))).r), o = a.sample(e.add(B(0, 0, -0.01))).r.sub(a.sample(e.add(B(0, 0, 0.01))).r);
|
|
21122
|
+
s.assign(B(n, r, o));
|
|
21121
21123
|
}), s.normalize();
|
|
21122
21124
|
});
|
|
21123
21125
|
class wC extends Or {
|
|
@@ -21150,7 +21152,7 @@ class wC extends Or {
|
|
|
21150
21152
|
* @return {Node<vec3>} The default uv node.
|
|
21151
21153
|
*/
|
|
21152
21154
|
getDefaultUV() {
|
|
21153
|
-
return
|
|
21155
|
+
return B(0.5, 0.5, 0.5);
|
|
21154
21156
|
}
|
|
21155
21157
|
/**
|
|
21156
21158
|
* Overwritten with an empty implementation since the `updateMatrix` flag is ignored
|
|
@@ -21426,21 +21428,21 @@ class ql extends rt {
|
|
|
21426
21428
|
}
|
|
21427
21429
|
ql.COLOR = "color";
|
|
21428
21430
|
ql.DEPTH = "depth";
|
|
21429
|
-
const MC = /* @__PURE__ */
|
|
21431
|
+
const MC = /* @__PURE__ */ I(([a, e]) => a.mul(e).clamp()).setLayout({
|
|
21430
21432
|
name: "linearToneMapping",
|
|
21431
21433
|
type: "vec3",
|
|
21432
21434
|
inputs: [
|
|
21433
21435
|
{ name: "color", type: "vec3" },
|
|
21434
21436
|
{ name: "exposure", type: "float" }
|
|
21435
21437
|
]
|
|
21436
|
-
}), AC = /* @__PURE__ */
|
|
21438
|
+
}), AC = /* @__PURE__ */ I(([a, e]) => (a = a.mul(e), a.div(a.add(1)).clamp())).setLayout({
|
|
21437
21439
|
name: "reinhardToneMapping",
|
|
21438
21440
|
type: "vec3",
|
|
21439
21441
|
inputs: [
|
|
21440
21442
|
{ name: "color", type: "vec3" },
|
|
21441
21443
|
{ name: "exposure", type: "float" }
|
|
21442
21444
|
]
|
|
21443
|
-
}), RC = /* @__PURE__ */
|
|
21445
|
+
}), RC = /* @__PURE__ */ I(([a, e]) => {
|
|
21444
21446
|
a = a.mul(e), a = a.sub(4e-3).max(0);
|
|
21445
21447
|
const t = a.mul(a.mul(6.2).add(0.5)), s = a.mul(a.mul(6.2).add(1.7)).add(0.06);
|
|
21446
21448
|
return t.div(s).pow(2.2);
|
|
@@ -21451,11 +21453,11 @@ const MC = /* @__PURE__ */ B(([a, e]) => a.mul(e).clamp()).setLayout({
|
|
|
21451
21453
|
{ name: "color", type: "vec3" },
|
|
21452
21454
|
{ name: "exposure", type: "float" }
|
|
21453
21455
|
]
|
|
21454
|
-
}), NC = /* @__PURE__ */
|
|
21456
|
+
}), NC = /* @__PURE__ */ I(([a]) => {
|
|
21455
21457
|
const e = a.mul(a.add(0.0245786)).sub(90537e-9), t = a.mul(a.add(0.432951).mul(0.983729)).add(0.238081);
|
|
21456
21458
|
return e.div(t);
|
|
21457
|
-
}), PC = /* @__PURE__ */
|
|
21458
|
-
const t =
|
|
21459
|
+
}), PC = /* @__PURE__ */ I(([a, e]) => {
|
|
21460
|
+
const t = It(
|
|
21459
21461
|
0.59719,
|
|
21460
21462
|
0.35458,
|
|
21461
21463
|
0.04823,
|
|
@@ -21465,7 +21467,7 @@ const MC = /* @__PURE__ */ B(([a, e]) => a.mul(e).clamp()).setLayout({
|
|
|
21465
21467
|
0.0284,
|
|
21466
21468
|
0.13383,
|
|
21467
21469
|
0.83777
|
|
21468
|
-
), s =
|
|
21470
|
+
), s = It(
|
|
21469
21471
|
1.60475,
|
|
21470
21472
|
-0.53108,
|
|
21471
21473
|
-0.07367,
|
|
@@ -21484,12 +21486,12 @@ const MC = /* @__PURE__ */ B(([a, e]) => a.mul(e).clamp()).setLayout({
|
|
|
21484
21486
|
{ name: "color", type: "vec3" },
|
|
21485
21487
|
{ name: "exposure", type: "float" }
|
|
21486
21488
|
]
|
|
21487
|
-
}), FC = /* @__PURE__ */
|
|
21488
|
-
const e =
|
|
21489
|
+
}), FC = /* @__PURE__ */ It(B(1.6605, -0.1246, -0.0182), B(-0.5876, 1.1329, -0.1006), B(-0.0728, -83e-4, 1.1187)), DC = /* @__PURE__ */ It(B(0.6274, 0.0691, 0.0164), B(0.3293, 0.9195, 0.088), B(0.0433, 0.0113, 0.8956)), OC = /* @__PURE__ */ I(([a]) => {
|
|
21490
|
+
const e = B(a).toVar(), t = B(e.mul(e)).toVar(), s = B(t.mul(t)).toVar();
|
|
21489
21491
|
return O(15.5).mul(s.mul(t)).sub(fe(40.14, s.mul(e))).add(fe(31.96, s).sub(fe(6.868, t.mul(e))).add(fe(0.4298, t).add(fe(0.1191, e).sub(232e-5))));
|
|
21490
|
-
}),
|
|
21491
|
-
const t =
|
|
21492
|
-
return t.mulAssign(e), t.assign(DC.mul(t)), t.assign(s.mul(t)), t.assign(Mt(t, 1e-10)), t.assign(ci(t)), t.assign(t.sub(n).div(r.sub(n))), t.assign(fi(t, 0, 1)), t.assign(OC(t)), t.assign(i.mul(t)), t.assign(Ul(Mt(
|
|
21492
|
+
}), BC = /* @__PURE__ */ I(([a, e]) => {
|
|
21493
|
+
const t = B(a).toVar(), s = It(B(0.856627153315983, 0.137318972929847, 0.11189821299995), B(0.0951212405381588, 0.761241990602591, 0.0767994186031903), B(0.0482516061458583, 0.101439036467562, 0.811302368396859)), i = It(B(1.1271005818144368, -0.1413297634984383, -0.14132976349843826), B(-0.11060664309660323, 1.157823702216272, -0.11060664309660294), B(-0.016493938717834573, -0.016493938717834257, 1.2519364065950405)), n = O(-12.47393), r = O(4.026069);
|
|
21494
|
+
return t.mulAssign(e), t.assign(DC.mul(t)), t.assign(s.mul(t)), t.assign(Mt(t, 1e-10)), t.assign(ci(t)), t.assign(t.sub(n).div(r.sub(n))), t.assign(fi(t, 0, 1)), t.assign(OC(t)), t.assign(i.mul(t)), t.assign(Ul(Mt(B(0), t), B(2.2))), t.assign(FC.mul(t)), t.assign(fi(t, 0, 1)), t;
|
|
21493
21495
|
}).setLayout({
|
|
21494
21496
|
name: "agxToneMapping",
|
|
21495
21497
|
type: "vec3",
|
|
@@ -21497,7 +21499,7 @@ const MC = /* @__PURE__ */ B(([a, e]) => a.mul(e).clamp()).setLayout({
|
|
|
21497
21499
|
{ name: "color", type: "vec3" },
|
|
21498
21500
|
{ name: "exposure", type: "float" }
|
|
21499
21501
|
]
|
|
21500
|
-
}),
|
|
21502
|
+
}), IC = /* @__PURE__ */ I(([a, e]) => {
|
|
21501
21503
|
const t = O(0.76), s = O(0.15);
|
|
21502
21504
|
a = a.mul(e);
|
|
21503
21505
|
const i = Mr(a.r, Mr(a.g, a.b)), n = Et(i.lessThan(0.08), i.sub(fe(6.25, i.mul(i))), 0.04);
|
|
@@ -21507,7 +21509,7 @@ const MC = /* @__PURE__ */ B(([a, e]) => a.mul(e).clamp()).setLayout({
|
|
|
21507
21509
|
const o = Ft(1, t), l = Ft(1, o.mul(o).div(r.add(o.sub(t))));
|
|
21508
21510
|
a.mulAssign(l.div(r));
|
|
21509
21511
|
const c = Ft(1, $s(1, s.mul(r.sub(l)).add(1)));
|
|
21510
|
-
return He(a,
|
|
21512
|
+
return He(a, B(l), c);
|
|
21511
21513
|
}).setLayout({
|
|
21512
21514
|
name: "neutralToneMapping",
|
|
21513
21515
|
type: "vec3",
|
|
@@ -21613,13 +21615,13 @@ function Zy(a) {
|
|
|
21613
21615
|
const t = a.context.getViewZ;
|
|
21614
21616
|
return t !== void 0 && (e = t(this)), (e || it.z).negate();
|
|
21615
21617
|
}
|
|
21616
|
-
const UC =
|
|
21618
|
+
const UC = I(([a, e], t) => {
|
|
21617
21619
|
const s = Zy(t);
|
|
21618
21620
|
return Gi(a, e, s);
|
|
21619
|
-
}), kC =
|
|
21621
|
+
}), kC = I(([a], e) => {
|
|
21620
21622
|
const t = Zy(e);
|
|
21621
21623
|
return a.mul(a, t, t).negate().exp().oneMinus();
|
|
21622
|
-
}), df =
|
|
21624
|
+
}), df = I(([a, e]) => ne(e.toFloat().mix(Aa.rgb, a.toVec3()), Aa.a));
|
|
21623
21625
|
class zC extends re {
|
|
21624
21626
|
/**
|
|
21625
21627
|
* Constructs a new barrier node.
|
|
@@ -21731,7 +21733,7 @@ class t0 extends re {
|
|
|
21731
21733
|
* Constructs a new lights node.
|
|
21732
21734
|
*/
|
|
21733
21735
|
constructor() {
|
|
21734
|
-
super("vec3"), this.totalDiffuseNode =
|
|
21736
|
+
super("vec3"), this.totalDiffuseNode = B().toVar(), this.totalSpecularNode = B().toVar(), this.outgoingLightNode = B().toVar(), this._lights = [], this._lightNodes = null, this._lightNodesHash = null, this.global = !0;
|
|
21735
21737
|
}
|
|
21736
21738
|
/**
|
|
21737
21739
|
* Overwrites the default {@link Node#customCacheKey} implementation by including
|
|
@@ -21855,7 +21857,7 @@ class t0 extends re {
|
|
|
21855
21857
|
r.nodes = c.nodes, n.start(e);
|
|
21856
21858
|
const { backdrop: h, backdropAlpha: u } = i, { directDiffuse: d, directSpecular: p, indirectDiffuse: f, indirectSpecular: m } = i.reflectedLight;
|
|
21857
21859
|
let y = d.add(f);
|
|
21858
|
-
h !== null && (u !== null ? y =
|
|
21860
|
+
h !== null && (u !== null ? y = B(u.mix(y, h)) : y = B(h), i.material.transparent = !0), o.assign(y), l.assign(p.add(m)), s.assign(o.add(l)), n.finish(e), s = s.bypass(e.removeStack());
|
|
21859
21861
|
} else
|
|
21860
21862
|
r.nodes = [];
|
|
21861
21863
|
return e.lightsNode = t, s;
|
|
@@ -21932,14 +21934,14 @@ function QC(a, e, t) {
|
|
|
21932
21934
|
function JC(a, e, t) {
|
|
21933
21935
|
YC(a, t), KC(e, t);
|
|
21934
21936
|
}
|
|
21935
|
-
const pf = /* @__PURE__ */ new WeakMap(), eM = /* @__PURE__ */
|
|
21937
|
+
const pf = /* @__PURE__ */ new WeakMap(), eM = /* @__PURE__ */ I(({ depthTexture: a, shadowCoord: e, depthLayer: t }) => {
|
|
21936
21938
|
let s = _e(a, e.xy).label("t_basic");
|
|
21937
21939
|
return a.isArrayTexture && (s = s.depth(t)), s.compare(e.z);
|
|
21938
|
-
}), tM = /* @__PURE__ */
|
|
21940
|
+
}), tM = /* @__PURE__ */ I(({ depthTexture: a, shadowCoord: e, shadow: t, depthLayer: s }) => {
|
|
21939
21941
|
const i = (y, g) => {
|
|
21940
21942
|
let x = _e(a, y);
|
|
21941
21943
|
return a.isArrayTexture && (x = x.depth(s)), x.compare(g);
|
|
21942
|
-
}, n =
|
|
21944
|
+
}, n = Ie("mapSize", "vec2", t).setGroup(K), r = Ie("radius", "float", t).setGroup(K), o = V(1).div(n), l = o.x.negate().mul(r), c = o.y.negate().mul(r), h = o.x.mul(r), u = o.y.mul(r), d = l.div(2), p = c.div(2), f = h.div(2), m = u.div(2);
|
|
21943
21945
|
return Lt(
|
|
21944
21946
|
i(e.xy.add(V(l, c)), e.z),
|
|
21945
21947
|
i(e.xy.add(V(0, c)), e.z),
|
|
@@ -21959,11 +21961,11 @@ const pf = /* @__PURE__ */ new WeakMap(), eM = /* @__PURE__ */ B(({ depthTexture
|
|
|
21959
21961
|
i(e.xy.add(V(0, u)), e.z),
|
|
21960
21962
|
i(e.xy.add(V(h, u)), e.z)
|
|
21961
21963
|
).mul(1 / 17);
|
|
21962
|
-
}), sM = /* @__PURE__ */
|
|
21964
|
+
}), sM = /* @__PURE__ */ I(({ depthTexture: a, shadowCoord: e, shadow: t, depthLayer: s }) => {
|
|
21963
21965
|
const i = (u, d) => {
|
|
21964
21966
|
let p = _e(a, u);
|
|
21965
21967
|
return a.isArrayTexture && (p = p.depth(s)), p.compare(d);
|
|
21966
|
-
}, n =
|
|
21968
|
+
}, n = Ie("mapSize", "vec2", t).setGroup(K), r = V(1).div(n), o = r.x, l = r.y, c = e.xy, h = $i(c.mul(n).add(0.5));
|
|
21967
21969
|
return c.subAssign(h.mul(r)), Lt(
|
|
21968
21970
|
i(c, e.z),
|
|
21969
21971
|
i(c.add(V(o, 0)), e.z),
|
|
@@ -22003,7 +22005,7 @@ const pf = /* @__PURE__ */ new WeakMap(), eM = /* @__PURE__ */ B(({ depthTexture
|
|
|
22003
22005
|
h.y
|
|
22004
22006
|
)
|
|
22005
22007
|
).mul(1 / 9);
|
|
22006
|
-
}), iM = /* @__PURE__ */
|
|
22008
|
+
}), iM = /* @__PURE__ */ I(({ depthTexture: a, shadowCoord: e, depthLayer: t }) => {
|
|
22007
22009
|
const s = O(1).toVar();
|
|
22008
22010
|
let i = _e(a).sample(e.xy);
|
|
22009
22011
|
a.isArrayTexture && (i = i.depth(t)), i = i.rg;
|
|
@@ -22013,11 +22015,11 @@ const pf = /* @__PURE__ */ new WeakMap(), eM = /* @__PURE__ */ B(({ depthTexture
|
|
|
22013
22015
|
let l = o.div(o.add(r.mul(r)));
|
|
22014
22016
|
l = fi(Ft(l, 0.3).div(0.95 - 0.3)), s.assign(fi(Mt(n, l)));
|
|
22015
22017
|
}), s;
|
|
22016
|
-
}), nM = /* @__PURE__ */
|
|
22018
|
+
}), nM = /* @__PURE__ */ I(([a, e, t]) => {
|
|
22017
22019
|
let s = za.sub(a).length();
|
|
22018
22020
|
return s = s.sub(e).div(t.sub(e)), s = s.saturate(), s;
|
|
22019
22021
|
}), rM = (a) => {
|
|
22020
|
-
const e = a.shadow.camera, t =
|
|
22022
|
+
const e = a.shadow.camera, t = Ie("near", "float", e).setGroup(K), s = Ie("far", "float", e).setGroup(K), i = xw(a);
|
|
22021
22023
|
return nM(i, t, s);
|
|
22022
22024
|
}, aM = (a) => {
|
|
22023
22025
|
let e = pf.get(a);
|
|
@@ -22032,7 +22034,7 @@ const pf = /* @__PURE__ */ new WeakMap(), eM = /* @__PURE__ */ B(({ depthTexture
|
|
|
22032
22034
|
return (i === void 0 || i.shadowType !== t || i.useVelocity !== s) && (i = (n, r, o, l, c, h, ...u) => {
|
|
22033
22035
|
(n.castShadow === !0 || n.receiveShadow && t === Xo) && (s && (zg(n).useVelocity = !0), n.onBeforeShadow(a, n, o, e.camera, l, r.overrideMaterial, h), a.renderObject(n, r, o, l, c, h, ...u), n.onAfterShadow(a, n, o, e.camera, l, r.overrideMaterial, h));
|
|
22034
22036
|
}, i.shadowType = t, i.useVelocity = s, ff.set(Wn, i)), Wn[0] = null, Wn[1] = null, i;
|
|
22035
|
-
}, lM = /* @__PURE__ */
|
|
22037
|
+
}, lM = /* @__PURE__ */ I(({ samples: a, radius: e, size: t, shadowPass: s, depthLayer: i }) => {
|
|
22036
22038
|
const n = O(0).toVar("meanVertical"), r = O(0).toVar("squareMeanVertical"), o = a.lessThanEqual(O(1)).select(O(0), O(2).div(a.sub(1))), l = a.lessThanEqual(O(1)).select(O(0), O(-1));
|
|
22037
22039
|
Ms({ start: ze(0), end: ze(a), type: "int", condition: "<" }, ({ i: h }) => {
|
|
22038
22040
|
const u = l.add(O(h).mul(o));
|
|
@@ -22041,7 +22043,7 @@ const pf = /* @__PURE__ */ new WeakMap(), eM = /* @__PURE__ */ B(({ depthTexture
|
|
|
22041
22043
|
}), n.divAssign(a), r.divAssign(a);
|
|
22042
22044
|
const c = Wu(r.sub(n.mul(n)));
|
|
22043
22045
|
return V(n, c);
|
|
22044
|
-
}), cM = /* @__PURE__ */
|
|
22046
|
+
}), cM = /* @__PURE__ */ I(({ samples: a, radius: e, size: t, shadowPass: s, depthLayer: i }) => {
|
|
22045
22047
|
const n = O(0).toVar("meanHorizontal"), r = O(0).toVar("squareMeanHorizontal"), o = a.lessThanEqual(O(1)).select(O(0), O(2).div(a.sub(1))), l = a.lessThanEqual(O(1)).select(O(0), O(-1));
|
|
22046
22048
|
Ms({ start: ze(0), end: ze(a), type: "int", condition: "<" }, ({ i: h }) => {
|
|
22047
22049
|
const u = l.add(O(h).mul(o));
|
|
@@ -22089,17 +22091,17 @@ class i0 extends WC {
|
|
|
22089
22091
|
* @return {Node<vec3>} The shadow coordinates.
|
|
22090
22092
|
*/
|
|
22091
22093
|
setupShadowCoord(e, t) {
|
|
22092
|
-
const { shadow: s } = this, { renderer: i } = e, n =
|
|
22094
|
+
const { shadow: s } = this, { renderer: i } = e, n = Ie("bias", "float", s).setGroup(K);
|
|
22093
22095
|
let r = t, o;
|
|
22094
22096
|
if (s.camera.isOrthographicCamera || i.logarithmicDepthBuffer !== !0)
|
|
22095
22097
|
r = r.xyz.div(r.w), o = r.z, i.coordinateSystem === zi && (o = o.mul(2).sub(1));
|
|
22096
22098
|
else {
|
|
22097
22099
|
const l = r.w;
|
|
22098
22100
|
r = r.xy.div(l);
|
|
22099
|
-
const c =
|
|
22101
|
+
const c = Ie("near", "float", s.camera).setGroup(K), h = Ie("far", "float", s.camera).setGroup(K);
|
|
22100
22102
|
o = ky(l.negate(), c, h);
|
|
22101
22103
|
}
|
|
22102
|
-
return r =
|
|
22104
|
+
return r = B(
|
|
22103
22105
|
r.x,
|
|
22104
22106
|
r.y.oneMinus(),
|
|
22105
22107
|
// follow webgpu standards
|
|
@@ -22135,11 +22137,11 @@ class i0 extends WC {
|
|
|
22135
22137
|
r.isArrayTexture && (g = g.depth(this.depthLayer));
|
|
22136
22138
|
let x = _e(this.vsmShadowMapVertical.texture);
|
|
22137
22139
|
r.isArrayTexture && (x = x.depth(this.depthLayer));
|
|
22138
|
-
const _ =
|
|
22140
|
+
const _ = Ie("blurSamples", "float", i).setGroup(K), b = Ie("radius", "float", i).setGroup(K), T = Ie("mapSize", "vec2", i).setGroup(K);
|
|
22139
22141
|
let E = this.vsmMaterialVertical || (this.vsmMaterialVertical = new nt());
|
|
22140
22142
|
E.fragmentNode = lM({ samples: _, radius: b, size: T, shadowPass: g, depthLayer: this.depthLayer }).context(e.getSharedContext()), E.name = "VSMVertical", E = this.vsmMaterialHorizontal || (this.vsmMaterialHorizontal = new nt()), E.fragmentNode = cM({ samples: _, radius: b, size: T, shadowPass: x, depthLayer: this.depthLayer }).context(e.getSharedContext()), E.name = "VSMHorizontal";
|
|
22141
22143
|
}
|
|
22142
|
-
const l =
|
|
22144
|
+
const l = Ie("intensity", "float", i).setGroup(K), c = Ie("normalBias", "float", i).setGroup(K), h = Ky(s).mul(s0.add(id.mul(c))), u = this.setupShadowCoord(e, h), d = i.filterNode || this.getShadowFilterFn(t.shadowMap.type) || null;
|
|
22143
22145
|
if (d === null)
|
|
22144
22146
|
throw new Error("THREE.WebGPURenderer: Shadow map type not supported yet.");
|
|
22145
22147
|
const p = n === Xo && i.isPointLightShadow !== !0 ? this.vsmShadowMapHorizontal.texture : r, f = this.setupShadowFilter(e, { filterFn: d, shadowTexture: o.texture, depthTexture: p, shadowCoord: u, shadow: i, depthLayer: this.depthLayer });
|
|
@@ -22157,7 +22159,7 @@ class i0 extends WC {
|
|
|
22157
22159
|
*/
|
|
22158
22160
|
setup(e) {
|
|
22159
22161
|
if (e.renderer.shadowMap.enabled !== !1)
|
|
22160
|
-
return
|
|
22162
|
+
return I(() => {
|
|
22161
22163
|
let t = this._node;
|
|
22162
22164
|
return this.setupShadowPosition(e), t === null && (this._node = t = this.setupShadow(e)), e.material.shadowNode && console.warn('THREE.NodeMaterial: ".shadowNode" is deprecated. Use ".castShadowNode" instead.'), e.material.receivedShadowNode && (t = e.material.receivedShadowNode(t)), t;
|
|
22163
22165
|
})();
|
|
@@ -22213,7 +22215,7 @@ class i0 extends WC {
|
|
|
22213
22215
|
s && (this._cameraFrameId[e.camera] === e.frameId && (s = !1), this._cameraFrameId[e.camera] = e.frameId), s && (this.updateShadow(e), this.shadowMap.depthTexture.version === this._depthVersionCached && (t.needsUpdate = !1));
|
|
22214
22216
|
}
|
|
22215
22217
|
}
|
|
22216
|
-
const uM = (a, e) => U(new i0(a, e)), dM = /* @__PURE__ */ new ve(), Ls = /* @__PURE__ */
|
|
22218
|
+
const uM = (a, e) => U(new i0(a, e)), dM = /* @__PURE__ */ new ve(), Ls = /* @__PURE__ */ I(([a, e]) => {
|
|
22217
22219
|
const t = a.toVar(), s = cs(t), i = $s(1, Mt(s.x, Mt(s.y, s.z)));
|
|
22218
22220
|
s.mulAssign(i), t.mulAssign(i.mul(e.mul(2).oneMinus()));
|
|
22219
22221
|
const n = V(t.xy).toVar(), o = e.mul(1.5).oneMinus();
|
|
@@ -22235,11 +22237,11 @@ const uM = (a, e) => U(new i0(a, e)), dM = /* @__PURE__ */ new ve(), Ls = /* @__
|
|
|
22235
22237
|
{ name: "pos", type: "vec3" },
|
|
22236
22238
|
{ name: "texelSizeY", type: "float" }
|
|
22237
22239
|
]
|
|
22238
|
-
}), pM = /* @__PURE__ */
|
|
22239
|
-
const n =
|
|
22240
|
+
}), pM = /* @__PURE__ */ I(({ depthTexture: a, bd3D: e, dp: t, texelSize: s }) => _e(a, Ls(e, s.y)).compare(t)), fM = /* @__PURE__ */ I(({ depthTexture: a, bd3D: e, dp: t, texelSize: s, shadow: i }) => {
|
|
22241
|
+
const n = Ie("radius", "float", i).setGroup(K), r = V(-1, 1).mul(n).mul(s.y);
|
|
22240
22242
|
return _e(a, Ls(e.add(r.xyy), s.y)).compare(t).add(_e(a, Ls(e.add(r.yyy), s.y)).compare(t)).add(_e(a, Ls(e.add(r.xyx), s.y)).compare(t)).add(_e(a, Ls(e.add(r.yyx), s.y)).compare(t)).add(_e(a, Ls(e, s.y)).compare(t)).add(_e(a, Ls(e.add(r.xxy), s.y)).compare(t)).add(_e(a, Ls(e.add(r.yxy), s.y)).compare(t)).add(_e(a, Ls(e.add(r.xxx), s.y)).compare(t)).add(_e(a, Ls(e.add(r.yxx), s.y)).compare(t)).mul(1 / 9);
|
|
22241
|
-
}), mM = /* @__PURE__ */
|
|
22242
|
-
const i = t.xyz.toVar(), n = i.length(), r = Q("float").setGroup(K).onRenderUpdate(() => s.camera.near), o = Q("float").setGroup(K).onRenderUpdate(() => s.camera.far), l =
|
|
22243
|
+
}), mM = /* @__PURE__ */ I(({ filterFn: a, depthTexture: e, shadowCoord: t, shadow: s }) => {
|
|
22244
|
+
const i = t.xyz.toVar(), n = i.length(), r = Q("float").setGroup(K).onRenderUpdate(() => s.camera.near), o = Q("float").setGroup(K).onRenderUpdate(() => s.camera.far), l = Ie("bias", "float", s).setGroup(K), c = Q(s.mapSize).setGroup(K), h = O(1).toVar();
|
|
22243
22245
|
return Qe(n.sub(o).lessThanEqual(0).and(n.sub(r).greaterThanEqual(0)), () => {
|
|
22244
22246
|
const u = n.sub(r).div(o.sub(r)).toVar();
|
|
22245
22247
|
u.addAssign(l);
|
|
@@ -22321,7 +22323,7 @@ class gM extends i0 {
|
|
|
22321
22323
|
}
|
|
22322
22324
|
}
|
|
22323
22325
|
const yM = (a, e) => U(new gM(a, e));
|
|
22324
|
-
class Mn extends
|
|
22326
|
+
class Mn extends Br {
|
|
22325
22327
|
static get type() {
|
|
22326
22328
|
return "AnalyticLightNode";
|
|
22327
22329
|
}
|
|
@@ -22415,7 +22417,7 @@ class Mn extends Ir {
|
|
|
22415
22417
|
this.color.copy(e.color).multiplyScalar(e.intensity);
|
|
22416
22418
|
}
|
|
22417
22419
|
}
|
|
22418
|
-
const n0 = /* @__PURE__ */
|
|
22420
|
+
const n0 = /* @__PURE__ */ I(({ lightDistance: a, cutoffDistance: e, decayExponent: t }) => {
|
|
22419
22421
|
const s = a.pow(t).max(0.01).reciprocal();
|
|
22420
22422
|
return e.greaterThan(0).select(
|
|
22421
22423
|
s.mul(a.div(e).pow4().oneMinus().clamp().pow2()),
|
|
@@ -22467,8 +22469,8 @@ class _M extends Mn {
|
|
|
22467
22469
|
});
|
|
22468
22470
|
}
|
|
22469
22471
|
}
|
|
22470
|
-
const gf = /* @__PURE__ */ O(1), pu = /* @__PURE__ */ O(-2), wo = /* @__PURE__ */ O(0.8), $c = /* @__PURE__ */ O(-1), Eo = /* @__PURE__ */ O(0.4), Wc = /* @__PURE__ */ O(2), Co = /* @__PURE__ */ O(0.305), jc = /* @__PURE__ */ O(3), yf = /* @__PURE__ */ O(0.21), bM = /* @__PURE__ */ O(4), xf = /* @__PURE__ */ O(4), TM = /* @__PURE__ */ O(16), SM = /* @__PURE__ */
|
|
22471
|
-
const e =
|
|
22472
|
+
const gf = /* @__PURE__ */ O(1), pu = /* @__PURE__ */ O(-2), wo = /* @__PURE__ */ O(0.8), $c = /* @__PURE__ */ O(-1), Eo = /* @__PURE__ */ O(0.4), Wc = /* @__PURE__ */ O(2), Co = /* @__PURE__ */ O(0.305), jc = /* @__PURE__ */ O(3), yf = /* @__PURE__ */ O(0.21), bM = /* @__PURE__ */ O(4), xf = /* @__PURE__ */ O(4), TM = /* @__PURE__ */ O(16), SM = /* @__PURE__ */ I(([a]) => {
|
|
22473
|
+
const e = B(cs(a)).toVar(), t = O(-1).toVar();
|
|
22472
22474
|
return Qe(e.x.greaterThan(e.z), () => {
|
|
22473
22475
|
Qe(e.x.greaterThan(e.y), () => {
|
|
22474
22476
|
t.assign(Et(a.x.greaterThan(0), 0, 3));
|
|
@@ -22488,7 +22490,7 @@ const gf = /* @__PURE__ */ O(1), pu = /* @__PURE__ */ O(-2), wo = /* @__PURE__ *
|
|
|
22488
22490
|
inputs: [
|
|
22489
22491
|
{ name: "direction", type: "vec3" }
|
|
22490
22492
|
]
|
|
22491
|
-
}), vM = /* @__PURE__ */
|
|
22493
|
+
}), vM = /* @__PURE__ */ I(([a, e]) => {
|
|
22492
22494
|
const t = V().toVar();
|
|
22493
22495
|
return Qe(e.equal(0), () => {
|
|
22494
22496
|
t.assign(V(a.z, a.y).div(cs(a.x)));
|
|
@@ -22510,7 +22512,7 @@ const gf = /* @__PURE__ */ O(1), pu = /* @__PURE__ */ O(-2), wo = /* @__PURE__ *
|
|
|
22510
22512
|
{ name: "direction", type: "vec3" },
|
|
22511
22513
|
{ name: "face", type: "float" }
|
|
22512
22514
|
]
|
|
22513
|
-
}), wM = /* @__PURE__ */
|
|
22515
|
+
}), wM = /* @__PURE__ */ I(([a]) => {
|
|
22514
22516
|
const e = O(0).toVar();
|
|
22515
22517
|
return Qe(a.greaterThanEqual(wo), () => {
|
|
22516
22518
|
e.assign(gf.sub(a).mul($c.sub(pu)).div(gf.sub(wo)).add(pu));
|
|
@@ -22529,10 +22531,10 @@ const gf = /* @__PURE__ */ O(1), pu = /* @__PURE__ */ O(-2), wo = /* @__PURE__ *
|
|
|
22529
22531
|
inputs: [
|
|
22530
22532
|
{ name: "roughness", type: "float" }
|
|
22531
22533
|
]
|
|
22532
|
-
}), EM = /* @__PURE__ */
|
|
22534
|
+
}), EM = /* @__PURE__ */ I(([a, e]) => {
|
|
22533
22535
|
const t = a.toVar();
|
|
22534
22536
|
t.assign(fe(2, t).sub(1));
|
|
22535
|
-
const s =
|
|
22537
|
+
const s = B(t, 1).toVar();
|
|
22536
22538
|
return Qe(e.equal(0), () => {
|
|
22537
22539
|
s.assign(s.zyx);
|
|
22538
22540
|
}).ElseIf(e.equal(1), () => {
|
|
@@ -22553,28 +22555,28 @@ const gf = /* @__PURE__ */ O(1), pu = /* @__PURE__ */ O(-2), wo = /* @__PURE__ *
|
|
|
22553
22555
|
{ name: "uv", type: "vec2" },
|
|
22554
22556
|
{ name: "face", type: "float" }
|
|
22555
22557
|
]
|
|
22556
|
-
}), CM = /* @__PURE__ */
|
|
22557
|
-
const r = O(t), o =
|
|
22558
|
+
}), CM = /* @__PURE__ */ I(([a, e, t, s, i, n]) => {
|
|
22559
|
+
const r = O(t), o = B(e), l = fi(wM(r), pu, n), c = $i(l), h = bn(l), u = B(fu(a, o, h, s, i, n)).toVar();
|
|
22558
22560
|
return Qe(c.notEqual(0), () => {
|
|
22559
|
-
const d =
|
|
22561
|
+
const d = B(fu(a, o, h.add(1), s, i, n)).toVar();
|
|
22560
22562
|
u.assign(He(u, d, c));
|
|
22561
22563
|
}), u;
|
|
22562
|
-
}), fu = /* @__PURE__ */
|
|
22563
|
-
const r = O(t).toVar(), o =
|
|
22564
|
+
}), fu = /* @__PURE__ */ I(([a, e, t, s, i, n]) => {
|
|
22565
|
+
const r = O(t).toVar(), o = B(e), l = O(SM(o)).toVar(), c = O(Mt(xf.sub(r), 0)).toVar();
|
|
22564
22566
|
r.assign(Mt(r, xf));
|
|
22565
22567
|
const h = O(Ua(r)).toVar(), u = V(vM(o, l).mul(h.sub(2)).add(1)).toVar();
|
|
22566
22568
|
return Qe(l.greaterThan(2), () => {
|
|
22567
22569
|
u.y.addAssign(h), l.subAssign(3);
|
|
22568
22570
|
}), u.x.addAssign(l.mul(h)), u.x.addAssign(c.mul(fe(3, TM))), u.y.addAssign(fe(4, Ua(n).sub(h))), u.x.mulAssign(s), u.y.mulAssign(i), a.sample(u).grad(V(), V());
|
|
22569
|
-
}), qc = /* @__PURE__ */
|
|
22571
|
+
}), qc = /* @__PURE__ */ I(({ envMap: a, mipInt: e, outputDirection: t, theta: s, axis: i, CUBEUV_TEXEL_WIDTH: n, CUBEUV_TEXEL_HEIGHT: r, CUBEUV_MAX_MIP: o }) => {
|
|
22570
22572
|
const l = Pi(s), c = t.mul(l).add(i.cross(t).mul(Es(s))).add(i.mul(i.dot(t).mul(l.oneMinus())));
|
|
22571
22573
|
return fu(a, c, e, n, r, o);
|
|
22572
|
-
}), MM = /* @__PURE__ */
|
|
22573
|
-
const d =
|
|
22574
|
-
Qe(d.equal(
|
|
22575
|
-
d.assign(
|
|
22574
|
+
}), MM = /* @__PURE__ */ I(({ n: a, latitudinal: e, poleAxis: t, outputDirection: s, weights: i, samples: n, dTheta: r, mipInt: o, envMap: l, CUBEUV_TEXEL_WIDTH: c, CUBEUV_TEXEL_HEIGHT: h, CUBEUV_MAX_MIP: u }) => {
|
|
22575
|
+
const d = B(Et(e, t, gy(t, s))).toVar();
|
|
22576
|
+
Qe(d.equal(B(0)), () => {
|
|
22577
|
+
d.assign(B(s.z, 0, s.x.negate()));
|
|
22576
22578
|
}), d.assign(ka(d));
|
|
22577
|
-
const p =
|
|
22579
|
+
const p = B().toVar();
|
|
22578
22580
|
return p.addAssign(i.element(0).mul(qc({ theta: 0, axis: d, outputDirection: s, mipInt: o, envMap: l, CUBEUV_TEXEL_WIDTH: c, CUBEUV_TEXEL_HEIGHT: h, CUBEUV_MAX_MIP: u }))), Ms({ start: ze(1), end: a }, ({ i: f }) => {
|
|
22579
22581
|
Qe(f.greaterThanEqual(n), () => {
|
|
22580
22582
|
gw();
|
|
@@ -22773,7 +22775,7 @@ class Ya extends xi {
|
|
|
22773
22775
|
i = Math.floor(i), n = Math.floor(n), r = Math.floor(r);
|
|
22774
22776
|
const l = [], c = [], h = [], u = [];
|
|
22775
22777
|
let d = 0, p = 0;
|
|
22776
|
-
f("z", "y", "x", -1, -1, s, t, e, r, n, 0), f("z", "y", "x", 1, -1, s, t, -e, r, n, 1), f("x", "z", "y", 1, 1, e, s, t, i, r, 2), f("x", "z", "y", 1, -1, e, s, -t, i, r, 3), f("x", "y", "z", 1, -1, e, t, s, i, n, 4), f("x", "y", "z", -1, -1, e, t, -s, i, n, 5), this.setIndex(l), this.setAttribute("position", new
|
|
22778
|
+
f("z", "y", "x", -1, -1, s, t, e, r, n, 0), f("z", "y", "x", 1, -1, s, t, -e, r, n, 1), f("x", "z", "y", 1, 1, e, s, t, i, r, 2), f("x", "z", "y", 1, -1, e, s, -t, i, r, 3), f("x", "y", "z", 1, -1, e, t, s, i, n, 4), f("x", "y", "z", -1, -1, e, t, -s, i, n, 5), this.setIndex(l), this.setAttribute("position", new Bt(c, 3)), this.setAttribute("normal", new Bt(h, 3)), this.setAttribute("uv", new Bt(u, 2));
|
|
22777
22779
|
function f(m, y, g, x, _, b, T, E, v, A, N) {
|
|
22778
22780
|
const k = b / v, H = T / A, W = b / 2, $ = T / 2, q = E / 2, X = v + 1, we = A + 1;
|
|
22779
22781
|
let ue = 0, ye = 0;
|
|
@@ -22827,7 +22829,7 @@ const hn = (1 + Math.sqrt(5)) / 2, qn = 1 / hn, vf = [
|
|
|
22827
22829
|
0,
|
|
22828
22830
|
4,
|
|
22829
22831
|
2
|
|
22830
|
-
], Qc = /* @__PURE__ */ EM(qa(), Vi("faceIndex")).normalize(), ld = /* @__PURE__ */
|
|
22832
|
+
], Qc = /* @__PURE__ */ EM(qa(), Vi("faceIndex")).normalize(), ld = /* @__PURE__ */ B(Qc.x, Qc.y, Qc.z);
|
|
22831
22833
|
class PM {
|
|
22832
22834
|
/**
|
|
22833
22835
|
* Constructs a new PMREM generator.
|
|
@@ -22983,7 +22985,7 @@ class PM {
|
|
|
22983
22985
|
}
|
|
22984
22986
|
// private interface
|
|
22985
22987
|
_setSizeFromTexture(e) {
|
|
22986
|
-
e.mapping ===
|
|
22988
|
+
e.mapping === Ba || e.mapping === gl ? this._setSize(e.image.length === 0 ? 16 : e.image[0].width || e.image[0].image.width) : this._setSize(e.image.width / 4);
|
|
22987
22989
|
}
|
|
22988
22990
|
_setSize(e) {
|
|
22989
22991
|
this._lodMax = Math.floor(Math.log2(e)), this._cubeSize = Math.pow(2, this._lodMax);
|
|
@@ -23023,7 +23025,7 @@ class PM {
|
|
|
23023
23025
|
c.getClearColor(Sf), c.autoClear = !1;
|
|
23024
23026
|
let u = this._backgroundBox;
|
|
23025
23027
|
if (u === null) {
|
|
23026
|
-
const f = new
|
|
23028
|
+
const f = new Bi({
|
|
23027
23029
|
name: "PMREM.Background",
|
|
23028
23030
|
side: jt,
|
|
23029
23031
|
depthWrite: !1,
|
|
@@ -23043,7 +23045,7 @@ class PM {
|
|
|
23043
23045
|
c.autoClear = h, e.background = p;
|
|
23044
23046
|
}
|
|
23045
23047
|
_textureToCubeUV(e, t) {
|
|
23046
|
-
const s = this._renderer, i = e.mapping ===
|
|
23048
|
+
const s = this._renderer, i = e.mapping === Ba || e.mapping === gl;
|
|
23047
23049
|
i ? this._cubemapMaterial === null && (this._cubemapMaterial = Ef(e)) : this._equirectMaterial === null && (this._equirectMaterial = Cf(e));
|
|
23048
23050
|
const n = i ? this._cubemapMaterial : this._equirectMaterial;
|
|
23049
23051
|
n.fragmentNode.value = e;
|
|
@@ -23207,8 +23209,8 @@ function OM(a) {
|
|
|
23207
23209
|
const e = Math.log2(a) - 2, t = 1 / a;
|
|
23208
23210
|
return { texelWidth: 1 / (3 * Math.max(Math.pow(2, e), 7 * 16)), texelHeight: t, maxMip: e };
|
|
23209
23211
|
}
|
|
23210
|
-
function
|
|
23211
|
-
const s =
|
|
23212
|
+
function BM(a, e, t) {
|
|
23213
|
+
const s = IM(e);
|
|
23212
23214
|
let i = s.get(a);
|
|
23213
23215
|
if ((i !== void 0 ? i.pmremVersion : -1) !== a.pmremVersion) {
|
|
23214
23216
|
const r = a.image;
|
|
@@ -23225,7 +23227,7 @@ function IM(a, e, t) {
|
|
|
23225
23227
|
}
|
|
23226
23228
|
return i.texture;
|
|
23227
23229
|
}
|
|
23228
|
-
function
|
|
23230
|
+
function IM(a) {
|
|
23229
23231
|
let e = Mf.get(a);
|
|
23230
23232
|
return e === void 0 && (e = /* @__PURE__ */ new WeakMap(), Mf.set(a, e)), e;
|
|
23231
23233
|
}
|
|
@@ -23268,12 +23270,12 @@ class LM extends rt {
|
|
|
23268
23270
|
updateBefore(e) {
|
|
23269
23271
|
let t = this._pmrem;
|
|
23270
23272
|
const s = t ? t.pmremVersion : -1, i = this._value;
|
|
23271
|
-
s !== i.pmremVersion && (i.isPMREMTexture === !0 ? t = i : t =
|
|
23273
|
+
s !== i.pmremVersion && (i.isPMREMTexture === !0 ? t = i : t = BM(i, e.renderer, this._generator), t !== null && (this._pmrem = t, this.updateFromTexture(t)));
|
|
23272
23274
|
}
|
|
23273
23275
|
setup(e) {
|
|
23274
23276
|
this._generator === null && (this._generator = new PM(e.renderer)), this.updateBefore(e);
|
|
23275
23277
|
let t = this.uvNode;
|
|
23276
|
-
t === null && e.context.getUV && (t = e.context.getUV(this)), t = Vy.mul(
|
|
23278
|
+
t === null && e.context.getUV && (t = e.context.getUV(this)), t = Vy.mul(B(t.x, t.y.negate(), t.z));
|
|
23277
23279
|
let s = this.levelNode;
|
|
23278
23280
|
return s === null && e.context.getTextureLevel && (s = e.context.getTextureLevel(this)), CM(this._texture, t, s, this._width, this._height, this._maxMip);
|
|
23279
23281
|
}
|
|
@@ -23293,7 +23295,7 @@ function kM(a) {
|
|
|
23293
23295
|
return a == null ? !1 : a.height > 0;
|
|
23294
23296
|
}
|
|
23295
23297
|
const a0 = /* @__PURE__ */ L(LM).setParameterLength(1, 3);
|
|
23296
|
-
|
|
23298
|
+
I(([a = qa()], { renderer: e, material: t }) => {
|
|
23297
23299
|
const s = xy(a.mul(2).sub(1));
|
|
23298
23300
|
let i;
|
|
23299
23301
|
if (t.alphaToCoverage && e.samples > 1) {
|
|
@@ -23303,10 +23305,10 @@ B(([a = qa()], { renderer: e, material: t }) => {
|
|
|
23303
23305
|
i = Et(s.greaterThan(1), 0, 1);
|
|
23304
23306
|
return i;
|
|
23305
23307
|
});
|
|
23306
|
-
const Va = /* @__PURE__ */
|
|
23308
|
+
const Va = /* @__PURE__ */ I(({ f0: a, f90: e, dotVH: t }) => {
|
|
23307
23309
|
const s = t.mul(-5.55473).sub(6.98316).mul(t).exp2();
|
|
23308
23310
|
return a.mul(s.oneMinus()).add(e.mul(s));
|
|
23309
|
-
}), zM = /* @__PURE__ */
|
|
23311
|
+
}), zM = /* @__PURE__ */ I(({ alpha: a, dotNL: e, dotNV: t }) => {
|
|
23310
23312
|
const s = a.pow2(), i = e.mul(s.add(s.oneMinus().mul(t.pow2())).sqrt()), n = t.mul(s.add(s.oneMinus().mul(e.pow2())).sqrt());
|
|
23311
23313
|
return $s(0.5, i.add(n).max(sv));
|
|
23312
23314
|
}).setLayout({
|
|
@@ -23317,8 +23319,8 @@ const Va = /* @__PURE__ */ B(({ f0: a, f90: e, dotVH: t }) => {
|
|
|
23317
23319
|
{ name: "dotNL", type: "float" },
|
|
23318
23320
|
{ name: "dotNV", type: "float" }
|
|
23319
23321
|
]
|
|
23320
|
-
}), GM = /* @__PURE__ */
|
|
23321
|
-
const l = o.mul(
|
|
23322
|
+
}), GM = /* @__PURE__ */ I(({ alphaT: a, alphaB: e, dotTV: t, dotBV: s, dotTL: i, dotBL: n, dotNV: r, dotNL: o }) => {
|
|
23323
|
+
const l = o.mul(B(a.mul(t), e.mul(s), r).length()), c = r.mul(B(a.mul(i), e.mul(n), o).length());
|
|
23322
23324
|
return $s(0.5, l.add(c)).saturate();
|
|
23323
23325
|
}).setLayout({
|
|
23324
23326
|
name: "V_GGX_SmithCorrelated_Anisotropic",
|
|
@@ -23333,7 +23335,7 @@ const Va = /* @__PURE__ */ B(({ f0: a, f90: e, dotVH: t }) => {
|
|
|
23333
23335
|
{ name: "dotNV", type: "float", qualifier: "in" },
|
|
23334
23336
|
{ name: "dotNL", type: "float", qualifier: "in" }
|
|
23335
23337
|
]
|
|
23336
|
-
}), VM = /* @__PURE__ */
|
|
23338
|
+
}), VM = /* @__PURE__ */ I(({ alpha: a, dotNH: e }) => {
|
|
23337
23339
|
const t = a.pow2(), s = e.pow2().mul(t.oneMinus()).oneMinus();
|
|
23338
23340
|
return t.div(s.pow2()).mul(1 / Math.PI);
|
|
23339
23341
|
}).setLayout({
|
|
@@ -23343,8 +23345,8 @@ const Va = /* @__PURE__ */ B(({ f0: a, f90: e, dotVH: t }) => {
|
|
|
23343
23345
|
{ name: "alpha", type: "float" },
|
|
23344
23346
|
{ name: "dotNH", type: "float" }
|
|
23345
23347
|
]
|
|
23346
|
-
}), HM = /* @__PURE__ */ O(1 / Math.PI), $M = /* @__PURE__ */
|
|
23347
|
-
const n = a.mul(e), r =
|
|
23348
|
+
}), HM = /* @__PURE__ */ O(1 / Math.PI), $M = /* @__PURE__ */ I(({ alphaT: a, alphaB: e, dotNH: t, dotTH: s, dotBH: i }) => {
|
|
23349
|
+
const n = a.mul(e), r = B(e.mul(s), a.mul(i), n.mul(t)), o = r.dot(r), l = n.div(o);
|
|
23348
23350
|
return HM.mul(n.mul(l.pow2()));
|
|
23349
23351
|
}).setLayout({
|
|
23350
23352
|
name: "D_GGX_Anisotropic",
|
|
@@ -23356,16 +23358,16 @@ const Va = /* @__PURE__ */ B(({ f0: a, f90: e, dotVH: t }) => {
|
|
|
23356
23358
|
{ name: "dotTH", type: "float", qualifier: "in" },
|
|
23357
23359
|
{ name: "dotBH", type: "float", qualifier: "in" }
|
|
23358
23360
|
]
|
|
23359
|
-
}), Af = /* @__PURE__ */
|
|
23361
|
+
}), Af = /* @__PURE__ */ I((a) => {
|
|
23360
23362
|
const { lightDirection: e, f0: t, f90: s, roughness: i, f: n, USE_IRIDESCENCE: r, USE_ANISOTROPY: o } = a, l = a.normalView || st, c = i.pow2(), h = e.add(Ye).normalize(), u = l.dot(e).clamp(), d = l.dot(Ye).clamp(), p = l.dot(h).clamp(), f = Ye.dot(h).clamp();
|
|
23361
23363
|
let m = Va({ f0: t, f90: s, dotVH: f }), y, g;
|
|
23362
|
-
if (
|
|
23364
|
+
if (Bp(r) && (m = $u.mix(m, n)), Bp(o)) {
|
|
23363
23365
|
const x = Jo.dot(e), _ = Jo.dot(Ye), b = Jo.dot(h), T = xr.dot(e), E = xr.dot(Ye), v = xr.dot(h);
|
|
23364
23366
|
y = GM({ alphaT: ou, alphaB: c, dotTV: _, dotBV: E, dotTL: x, dotBL: T, dotNV: d, dotNL: u }), g = $M({ alphaT: ou, alphaB: c, dotNH: p, dotTH: b, dotBH: v });
|
|
23365
23367
|
} else
|
|
23366
23368
|
y = zM({ alpha: c, dotNL: u, dotNV: d }), g = VM({ alpha: c, dotNH: p });
|
|
23367
23369
|
return m.mul(y).mul(g);
|
|
23368
|
-
}), Rr = /* @__PURE__ */
|
|
23370
|
+
}), Rr = /* @__PURE__ */ I((a) => a.diffuseColor.mul(1 / Math.PI)), o0 = /* @__PURE__ */ I(({ roughness: a, dotNV: e }) => {
|
|
23369
23371
|
const t = ne(-1, -0.0275, -0.572, 0.022), s = ne(1, 0.0425, 1.04, -0.04), i = a.mul(t).add(s), n = i.x.mul(i.x).min(e.mul(-9.28).exp2()).mul(i.x).add(i.y);
|
|
23370
23372
|
return V(-1.04, 1.04).mul(n).add(i.zw);
|
|
23371
23373
|
}).setLayout({
|
|
@@ -23375,9 +23377,9 @@ const Va = /* @__PURE__ */ B(({ f0: a, f90: e, dotVH: t }) => {
|
|
|
23375
23377
|
{ name: "roughness", type: "float" },
|
|
23376
23378
|
{ name: "dotNV", type: "vec3" }
|
|
23377
23379
|
]
|
|
23378
|
-
}), WM = /* @__PURE__ */
|
|
23380
|
+
}), WM = /* @__PURE__ */ I(({ f: a, f90: e, dotVH: t }) => {
|
|
23379
23381
|
const s = t.oneMinus().saturate(), i = s.mul(s), n = s.mul(i, i).clamp(0, 0.9999);
|
|
23380
|
-
return a.sub(
|
|
23382
|
+
return a.sub(B(e).mul(n)).div(n.oneMinus());
|
|
23381
23383
|
}).setLayout({
|
|
23382
23384
|
name: "Schlick_to_F0",
|
|
23383
23385
|
type: "vec3",
|
|
@@ -23386,16 +23388,16 @@ const Va = /* @__PURE__ */ B(({ f0: a, f90: e, dotVH: t }) => {
|
|
|
23386
23388
|
{ name: "f90", type: "float" },
|
|
23387
23389
|
{ name: "dotVH", type: "float" }
|
|
23388
23390
|
]
|
|
23389
|
-
}), jM = /* @__PURE__ */
|
|
23391
|
+
}), jM = /* @__PURE__ */ I((a) => {
|
|
23390
23392
|
if (a.geometry.hasAttribute("normal") === !1)
|
|
23391
23393
|
return O(0);
|
|
23392
23394
|
const e = js.dFdx().abs().max(js.dFdy().abs());
|
|
23393
23395
|
return e.x.max(e.y).max(e.z);
|
|
23394
|
-
}), l0 = /* @__PURE__ */
|
|
23396
|
+
}), l0 = /* @__PURE__ */ I((a) => {
|
|
23395
23397
|
const { roughness: e } = a, t = jM();
|
|
23396
23398
|
let s = e.max(0.0525);
|
|
23397
23399
|
return s = s.add(t), s = s.min(1), s;
|
|
23398
|
-
}), qM = /* @__PURE__ */
|
|
23400
|
+
}), qM = /* @__PURE__ */ I(([a, e]) => {
|
|
23399
23401
|
const t = a.x, s = a.y, i = a.z;
|
|
23400
23402
|
let n = e.element(0).mul(0.886227);
|
|
23401
23403
|
return n = n.add(e.element(1).mul(2 * 0.511664).mul(s)), n = n.add(e.element(2).mul(2 * 0.511664).mul(i)), n = n.add(e.element(3).mul(2 * 0.511664).mul(t)), n = n.add(e.element(4).mul(2 * 0.429043).mul(t).mul(s)), n = n.add(e.element(5).mul(2 * 0.429043).mul(s).mul(i)), n = n.add(e.element(6).mul(i.mul(i).mul(0.743125).sub(0.247708))), n = n.add(e.element(7).mul(2 * 0.429043).mul(t).mul(i)), n = n.add(e.element(8).mul(0.429043).mul(fe(t, t).sub(fe(s, s)))), n;
|
|
@@ -23440,7 +23442,7 @@ class hd extends xi {
|
|
|
23440
23442
|
const _ = h[g][x + 1], b = h[g][x], T = h[g + 1][x], E = h[g + 1][x + 1];
|
|
23441
23443
|
(g !== 0 || r > 0) && p.push(_, b, E), (g !== s - 1 || l < Math.PI) && p.push(b, T, E);
|
|
23442
23444
|
}
|
|
23443
|
-
this.setIndex(p), this.setAttribute("position", new
|
|
23445
|
+
this.setIndex(p), this.setAttribute("position", new Bt(f, 3)), this.setAttribute("normal", new Bt(m, 3)), this.setAttribute("uv", new Bt(y, 2));
|
|
23444
23446
|
}
|
|
23445
23447
|
copy(e) {
|
|
23446
23448
|
return super.copy(e), this.parameters = Object.assign({}, e.parameters), this;
|
|
@@ -23456,7 +23458,7 @@ class hd extends xi {
|
|
|
23456
23458
|
return new hd(e.radius, e.widthSegments, e.heightSegments, e.phiStart, e.phiLength, e.thetaStart, e.thetaLength);
|
|
23457
23459
|
}
|
|
23458
23460
|
}
|
|
23459
|
-
const Ts = /* @__PURE__ */ new
|
|
23461
|
+
const Ts = /* @__PURE__ */ new Bu();
|
|
23460
23462
|
class YM extends Hi {
|
|
23461
23463
|
/**
|
|
23462
23464
|
* Constructs a new background management component.
|
|
@@ -23906,7 +23908,7 @@ function d0(a) {
|
|
|
23906
23908
|
t !== void 0 && (Pa.delete(e), t.dispose());
|
|
23907
23909
|
}
|
|
23908
23910
|
function Rf(a, e) {
|
|
23909
|
-
e === vu ? a.mapping =
|
|
23911
|
+
e === vu ? a.mapping = Ba : e === wu && (a.mapping = gl);
|
|
23910
23912
|
}
|
|
23911
23913
|
const p0 = /* @__PURE__ */ L(iA).setParameterLength(1);
|
|
23912
23914
|
class Xl {
|
|
@@ -24604,7 +24606,7 @@ class m0 {
|
|
|
24604
24606
|
* @return {boolean} Whether the given texture is filtered or not.
|
|
24605
24607
|
*/
|
|
24606
24608
|
isFilteredTexture(e) {
|
|
24607
|
-
return e.magFilter === ns || e.magFilter === zh || e.magFilter ===
|
|
24609
|
+
return e.magFilter === ns || e.magFilter === zh || e.magFilter === Ia || e.magFilter === ai || e.minFilter === ns || e.minFilter === zh || e.minFilter === Ia || e.minFilter === ai;
|
|
24608
24610
|
}
|
|
24609
24611
|
/**
|
|
24610
24612
|
* Adds the given node to the internal node chain.
|
|
@@ -25978,7 +25980,7 @@ class RA extends dd {
|
|
|
25978
25980
|
return i;
|
|
25979
25981
|
}
|
|
25980
25982
|
}
|
|
25981
|
-
const NA = /* @__PURE__ */
|
|
25983
|
+
const NA = /* @__PURE__ */ I(([a, e]) => {
|
|
25982
25984
|
const t = a.abs().sub(e);
|
|
25983
25985
|
return hi(Mt(t, 0)).add(Mr(Mt(t.x, t.y), 0));
|
|
25984
25986
|
});
|
|
@@ -26080,7 +26082,7 @@ class OA extends Mn {
|
|
|
26080
26082
|
}
|
|
26081
26083
|
}
|
|
26082
26084
|
const Df = /* @__PURE__ */ new WeakMap();
|
|
26083
|
-
class
|
|
26085
|
+
class BA extends Br {
|
|
26084
26086
|
static get type() {
|
|
26085
26087
|
return "EnvironmentNode";
|
|
26086
26088
|
}
|
|
@@ -26100,7 +26102,7 @@ class IA extends Ir {
|
|
|
26100
26102
|
let d = Df.get(u);
|
|
26101
26103
|
d === void 0 && (d = a0(u), Df.set(u, d)), s = d;
|
|
26102
26104
|
}
|
|
26103
|
-
const n = t.useAnisotropy === !0 || t.anisotropy > 0 ? rE : st, r = s.context(Of(ti, n)).mul(Ec), o = s.context(
|
|
26105
|
+
const n = t.useAnisotropy === !0 || t.anisotropy > 0 ? rE : st, r = s.context(Of(ti, n)).mul(Ec), o = s.context(IA(id)).mul(Math.PI).mul(Ec), l = sl(r), c = sl(o);
|
|
26104
26106
|
e.context.radiance.addAssign(l), e.context.iblIrradiance.addAssign(c);
|
|
26105
26107
|
const h = e.context.lightingModel.clearcoatRadiance;
|
|
26106
26108
|
if (h) {
|
|
@@ -26115,11 +26117,11 @@ const Of = (a, e) => {
|
|
|
26115
26117
|
getUV: () => (t === null && (t = Ye.negate().reflect(e), t = a.mul(a).mix(t, e).normalize(), t = t.transformDirection(yi)), t),
|
|
26116
26118
|
getTextureLevel: () => a
|
|
26117
26119
|
};
|
|
26118
|
-
},
|
|
26120
|
+
}, IA = (a) => ({
|
|
26119
26121
|
getUV: () => a,
|
|
26120
26122
|
getTextureLevel: () => O(1)
|
|
26121
26123
|
});
|
|
26122
|
-
class pd extends
|
|
26124
|
+
class pd extends Br {
|
|
26123
26125
|
static get type() {
|
|
26124
26126
|
return "BasicEnvironmentNode";
|
|
26125
26127
|
}
|
|
@@ -26171,9 +26173,9 @@ class fd {
|
|
|
26171
26173
|
}
|
|
26172
26174
|
}
|
|
26173
26175
|
fd.isNodeFunction = !0;
|
|
26174
|
-
const LA = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?)\)/i, UA = /[a-z_0-9]+/ig,
|
|
26176
|
+
const LA = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?)\)/i, UA = /[a-z_0-9]+/ig, Bf = "#pragma main", kA = (a) => {
|
|
26175
26177
|
a = a.trim();
|
|
26176
|
-
const e = a.indexOf(
|
|
26178
|
+
const e = a.indexOf(Bf), t = e !== -1 ? a.slice(e + Bf.length) : a, s = t.match(LA);
|
|
26177
26179
|
if (s !== null && s.length === 5) {
|
|
26178
26180
|
const i = s[4], n = [];
|
|
26179
26181
|
let r = null;
|
|
@@ -26284,7 +26286,7 @@ class y0 extends Xl {
|
|
|
26284
26286
|
}
|
|
26285
26287
|
}
|
|
26286
26288
|
}
|
|
26287
|
-
const VA = () => O(0.25), HA = /* @__PURE__ */
|
|
26289
|
+
const VA = () => O(0.25), HA = /* @__PURE__ */ I(({ dotNH: a }) => lu.mul(O(0.5)).add(1).mul(O(1 / Math.PI)).mul(a.pow(lu))), $A = /* @__PURE__ */ I(({ lightDirection: a }) => {
|
|
26288
26290
|
const e = a.add(Ye).normalize(), t = st.dot(e).clamp(), s = Ye.dot(e).clamp(), i = Va({ f0: Jt, f90: 1, dotVH: s }), n = VA(), r = HA({ dotNH: t });
|
|
26289
26291
|
return i.mul(n).mul(r);
|
|
26290
26292
|
});
|
|
@@ -26317,10 +26319,10 @@ class x0 extends y0 {
|
|
|
26317
26319
|
i.indirectDiffuse.addAssign(s.mul(Rr({ diffuseColor: Se }))), i.indirectDiffuse.mulAssign(t);
|
|
26318
26320
|
}
|
|
26319
26321
|
}
|
|
26320
|
-
const _0 = /* @__PURE__ */
|
|
26322
|
+
const _0 = /* @__PURE__ */ I((a) => {
|
|
26321
26323
|
const { dotNV: e, specularColor: t, specularF90: s, roughness: i } = a, n = o0({ dotNV: e, roughness: i });
|
|
26322
26324
|
return t.mul(n.x).add(s.mul(n.y));
|
|
26323
|
-
}), WA = /* @__PURE__ */
|
|
26325
|
+
}), WA = /* @__PURE__ */ I(({ roughness: a, dotNH: e }) => {
|
|
26324
26326
|
const t = a.pow2(), s = O(1).div(t), n = e.pow2().oneMinus().max(78125e-7);
|
|
26325
26327
|
return O(2).add(s).mul(n.pow(s.mul(0.5))).div(2 * Math.PI);
|
|
26326
26328
|
}).setLayout({
|
|
@@ -26330,17 +26332,17 @@ const _0 = /* @__PURE__ */ B((a) => {
|
|
|
26330
26332
|
{ name: "roughness", type: "float" },
|
|
26331
26333
|
{ name: "dotNH", type: "float" }
|
|
26332
26334
|
]
|
|
26333
|
-
}), jA = /* @__PURE__ */
|
|
26335
|
+
}), jA = /* @__PURE__ */ I(({ dotNV: a, dotNL: e }) => O(1).div(O(4).mul(e.add(a).sub(e.mul(a))))).setLayout({
|
|
26334
26336
|
name: "V_Neubelt",
|
|
26335
26337
|
type: "float",
|
|
26336
26338
|
inputs: [
|
|
26337
26339
|
{ name: "dotNV", type: "float" },
|
|
26338
26340
|
{ name: "dotNL", type: "float" }
|
|
26339
26341
|
]
|
|
26340
|
-
}), qA = /* @__PURE__ */
|
|
26342
|
+
}), qA = /* @__PURE__ */ I(({ lightDirection: a }) => {
|
|
26341
26343
|
const e = a.add(Ye).normalize(), t = st.dot(a).clamp(), s = st.dot(Ye).clamp(), i = st.dot(e).clamp(), n = WA({ roughness: Hu, dotNH: i }), r = jA({ dotNV: s, dotNL: t });
|
|
26342
26344
|
return lr.mul(n).mul(r);
|
|
26343
|
-
}), YA = /* @__PURE__ */
|
|
26345
|
+
}), YA = /* @__PURE__ */ I(({ N: a, V: e, roughness: t }) => {
|
|
26344
26346
|
const n = 78125e-7, r = a.dot(e).saturate(), o = V(t, r.oneMinus().sqrt());
|
|
26345
26347
|
return o.assign(o.mul(0.984375).add(n)), o;
|
|
26346
26348
|
}).setLayout({
|
|
@@ -26351,7 +26353,7 @@ const _0 = /* @__PURE__ */ B((a) => {
|
|
|
26351
26353
|
{ name: "V", type: "vec3" },
|
|
26352
26354
|
{ name: "roughness", type: "float" }
|
|
26353
26355
|
]
|
|
26354
|
-
}), XA = /* @__PURE__ */
|
|
26356
|
+
}), XA = /* @__PURE__ */ I(({ f: a }) => {
|
|
26355
26357
|
const e = a.length();
|
|
26356
26358
|
return Mt(e.mul(e).add(a.z).div(e.add(1)), 0);
|
|
26357
26359
|
}).setLayout({
|
|
@@ -26360,7 +26362,7 @@ const _0 = /* @__PURE__ */ B((a) => {
|
|
|
26360
26362
|
inputs: [
|
|
26361
26363
|
{ name: "f", type: "vec3" }
|
|
26362
26364
|
]
|
|
26363
|
-
}), No = /* @__PURE__ */
|
|
26365
|
+
}), No = /* @__PURE__ */ I(({ v1: a, v2: e }) => {
|
|
26364
26366
|
const t = a.dot(e), s = t.abs().toVar(), i = s.mul(0.0145206).add(0.4965155).mul(s).add(0.8543985).toVar(), n = s.add(4.1616724).mul(s).add(3.417594).toVar(), r = i.div(n), o = t.greaterThan(0).select(r, Mt(t.mul(t).oneMinus(), 1e-7).inverseSqrt().mul(0.5).sub(r));
|
|
26365
26367
|
return a.cross(e).mul(o);
|
|
26366
26368
|
}).setLayout({
|
|
@@ -26370,11 +26372,11 @@ const _0 = /* @__PURE__ */ B((a) => {
|
|
|
26370
26372
|
{ name: "v1", type: "vec3" },
|
|
26371
26373
|
{ name: "v2", type: "vec3" }
|
|
26372
26374
|
]
|
|
26373
|
-
}),
|
|
26374
|
-
const l = n.sub(i).toVar(), c = o.sub(i).toVar(), h = l.cross(c), u =
|
|
26375
|
+
}), If = /* @__PURE__ */ I(({ N: a, V: e, P: t, mInv: s, p0: i, p1: n, p2: r, p3: o }) => {
|
|
26376
|
+
const l = n.sub(i).toVar(), c = o.sub(i).toVar(), h = l.cross(c), u = B().toVar();
|
|
26375
26377
|
return Qe(h.dot(t.sub(i)).greaterThanEqual(0), () => {
|
|
26376
|
-
const d = e.sub(a.mul(e.dot(a))).normalize(), p = a.cross(d).negate(), f = s.mul(
|
|
26377
|
-
_.addAssign(No({ v1: m, v2: y })), _.addAssign(No({ v1: y, v2: g })), _.addAssign(No({ v1: g, v2: x })), _.addAssign(No({ v1: x, v2: m })), u.assign(
|
|
26378
|
+
const d = e.sub(a.mul(e.dot(a))).normalize(), p = a.cross(d).negate(), f = s.mul(It(d, p, a).transpose()).toVar(), m = f.mul(i.sub(t)).normalize().toVar(), y = f.mul(n.sub(t)).normalize().toVar(), g = f.mul(r.sub(t)).normalize().toVar(), x = f.mul(o.sub(t)).normalize().toVar(), _ = B(0).toVar();
|
|
26379
|
+
_.addAssign(No({ v1: m, v2: y })), _.addAssign(No({ v1: y, v2: g })), _.addAssign(No({ v1: g, v2: x })), _.addAssign(No({ v1: x, v2: m })), u.assign(B(XA({ f: _ })));
|
|
26378
26380
|
}), u;
|
|
26379
26381
|
}).setLayout({
|
|
26380
26382
|
name: "LTC_Evaluate",
|
|
@@ -26389,8 +26391,8 @@ const _0 = /* @__PURE__ */ B((a) => {
|
|
|
26389
26391
|
{ name: "p2", type: "vec3" },
|
|
26390
26392
|
{ name: "p3", type: "vec3" }
|
|
26391
26393
|
]
|
|
26392
|
-
}), Lf = /* @__PURE__ */
|
|
26393
|
-
const n =
|
|
26394
|
+
}), Lf = /* @__PURE__ */ I(([a, e, t, s, i]) => {
|
|
26395
|
+
const n = B(by(e.negate(), ka(a), $s(1, s))), r = B(
|
|
26394
26396
|
hi(i[0].xyz),
|
|
26395
26397
|
hi(i[1].xyz),
|
|
26396
26398
|
hi(i[2].xyz)
|
|
@@ -26406,20 +26408,20 @@ const _0 = /* @__PURE__ */ B((a) => {
|
|
|
26406
26408
|
{ name: "ior", type: "float" },
|
|
26407
26409
|
{ name: "modelMatrix", type: "mat4" }
|
|
26408
26410
|
]
|
|
26409
|
-
}), ZA = /* @__PURE__ */
|
|
26411
|
+
}), ZA = /* @__PURE__ */ I(([a, e]) => a.mul(fi(e.mul(2).sub(2), 0, 1))).setLayout({
|
|
26410
26412
|
name: "applyIorToRoughness",
|
|
26411
26413
|
type: "float",
|
|
26412
26414
|
inputs: [
|
|
26413
26415
|
{ name: "roughness", type: "float" },
|
|
26414
26416
|
{ name: "ior", type: "float" }
|
|
26415
26417
|
]
|
|
26416
|
-
}), KA = /* @__PURE__ */ Ly(), QA = /* @__PURE__ */ Ly(), Uf = /* @__PURE__ */
|
|
26418
|
+
}), KA = /* @__PURE__ */ Ly(), QA = /* @__PURE__ */ Ly(), Uf = /* @__PURE__ */ I(([a, e, t], { material: s }) => {
|
|
26417
26419
|
const n = (s.side === jt ? KA : QA).sample(a), r = ci(hu.x).mul(ZA(e, t));
|
|
26418
26420
|
return bC(n, r);
|
|
26419
|
-
}), kf = /* @__PURE__ */
|
|
26421
|
+
}), kf = /* @__PURE__ */ I(([a, e, t]) => (Qe(t.notEqual(0), () => {
|
|
26420
26422
|
const s = hy(e).negate().div(t);
|
|
26421
26423
|
return cy(s.negate().mul(a));
|
|
26422
|
-
}),
|
|
26424
|
+
}), B(1))).setLayout({
|
|
26423
26425
|
name: "volumeAttenuation",
|
|
26424
26426
|
type: "vec3",
|
|
26425
26427
|
inputs: [
|
|
@@ -26427,11 +26429,11 @@ const _0 = /* @__PURE__ */ B((a) => {
|
|
|
26427
26429
|
{ name: "attenuationColor", type: "vec3" },
|
|
26428
26430
|
{ name: "attenuationDistance", type: "float" }
|
|
26429
26431
|
]
|
|
26430
|
-
}), JA = /* @__PURE__ */
|
|
26432
|
+
}), JA = /* @__PURE__ */ I(([a, e, t, s, i, n, r, o, l, c, h, u, d, p, f]) => {
|
|
26431
26433
|
let m, y;
|
|
26432
26434
|
if (f) {
|
|
26433
|
-
m = ne().toVar(), y =
|
|
26434
|
-
const T = h.sub(1).mul(f.mul(0.025)), E =
|
|
26435
|
+
m = ne().toVar(), y = B().toVar();
|
|
26436
|
+
const T = h.sub(1).mul(f.mul(0.025)), E = B(h.sub(T), h, h.add(T));
|
|
26435
26437
|
Ms({ start: 0, end: 3 }, ({ i: v }) => {
|
|
26436
26438
|
const A = E.element(v), N = Lf(a, e, u, A, o), k = r.add(N), H = c.mul(l.mul(ne(k, 1))), W = V(H.xy.div(H.w)).toVar();
|
|
26437
26439
|
W.addAssign(1), W.divAssign(2), W.assign(V(W.x, W.y.oneMinus()));
|
|
@@ -26442,7 +26444,7 @@ const _0 = /* @__PURE__ */ B((a) => {
|
|
|
26442
26444
|
const T = Lf(a, e, u, h, o), E = r.add(T), v = c.mul(l.mul(ne(E, 1))), A = V(v.xy.div(v.w)).toVar();
|
|
26443
26445
|
A.addAssign(1), A.divAssign(2), A.assign(V(A.x, A.y.oneMinus())), m = Uf(A, t, h), y = s.mul(kf(hi(T), d, p));
|
|
26444
26446
|
}
|
|
26445
|
-
const g = y.rgb.mul(m.rgb), x = a.dot(e).clamp(), _ =
|
|
26447
|
+
const g = y.rgb.mul(m.rgb), x = a.dot(e).clamp(), _ = B(_0({
|
|
26446
26448
|
// n, v, specularColor, specularF90, roughness
|
|
26447
26449
|
dotNV: x,
|
|
26448
26450
|
specularColor: i,
|
|
@@ -26450,7 +26452,7 @@ const _0 = /* @__PURE__ */ B((a) => {
|
|
|
26450
26452
|
roughness: t
|
|
26451
26453
|
})), b = y.r.add(y.g, y.b).div(3);
|
|
26452
26454
|
return ne(_.oneMinus().mul(g), m.a.oneMinus().mul(b).oneMinus());
|
|
26453
|
-
}), eR = /* @__PURE__ */
|
|
26455
|
+
}), eR = /* @__PURE__ */ It(
|
|
26454
26456
|
3.2404542,
|
|
26455
26457
|
-0.969266,
|
|
26456
26458
|
0.0556434,
|
|
@@ -26462,24 +26464,24 @@ const _0 = /* @__PURE__ */ B((a) => {
|
|
|
26462
26464
|
1.0572252
|
|
26463
26465
|
), tR = (a) => {
|
|
26464
26466
|
const e = a.sqrt();
|
|
26465
|
-
return
|
|
26467
|
+
return B(1).add(e).div(B(1).sub(e));
|
|
26466
26468
|
}, zf = (a, e) => a.sub(e).div(a.add(e)).pow2(), sR = (a, e) => {
|
|
26467
|
-
const t = a.mul(2 * Math.PI * 1e-9), s =
|
|
26469
|
+
const t = a.mul(2 * Math.PI * 1e-9), s = B(54856e-17, 44201e-17, 52481e-17), i = B(1681e3, 1795300, 2208400), n = B(43278e5, 93046e5, 66121e5), r = O(9747e-17 * Math.sqrt(2 * Math.PI * 45282e5)).mul(t.mul(2239900).add(e.x).cos()).mul(t.pow2().mul(-45282e5).exp());
|
|
26468
26470
|
let o = s.mul(n.mul(2 * Math.PI).sqrt()).mul(i.mul(t).add(e).cos()).mul(t.pow2().negate().mul(n).exp());
|
|
26469
|
-
return o =
|
|
26470
|
-
}, iR = /* @__PURE__ */
|
|
26471
|
+
return o = B(o.x.add(r), o.y, o.z).div(10685e-11), eR.mul(o);
|
|
26472
|
+
}, iR = /* @__PURE__ */ I(({ outsideIOR: a, eta2: e, cosTheta1: t, thinFilmThickness: s, baseF0: i }) => {
|
|
26471
26473
|
const n = He(a, e, Gi(0, 0.03, s)), o = a.div(n).pow2().mul(t.pow2().oneMinus()).oneMinus();
|
|
26472
|
-
Qe(o.lessThan(0), () =>
|
|
26473
|
-
const l = o.sqrt(), c = zf(n, a), h = Va({ f0: c, f90: 1, dotVH: t }), u = h.oneMinus(), d = n.lessThan(a).select(Math.PI, 0), p = O(Math.PI).sub(d), f = tR(i.clamp(0, 0.9999)), m = zf(f, n.toVec3()), y = Va({ f0: m, f90: 1, dotVH: l }), g =
|
|
26474
|
+
Qe(o.lessThan(0), () => B(1));
|
|
26475
|
+
const l = o.sqrt(), c = zf(n, a), h = Va({ f0: c, f90: 1, dotVH: t }), u = h.oneMinus(), d = n.lessThan(a).select(Math.PI, 0), p = O(Math.PI).sub(d), f = tR(i.clamp(0, 0.9999)), m = zf(f, n.toVec3()), y = Va({ f0: m, f90: 1, dotVH: l }), g = B(
|
|
26474
26476
|
f.x.lessThan(n).select(Math.PI, 0),
|
|
26475
26477
|
f.y.lessThan(n).select(Math.PI, 0),
|
|
26476
26478
|
f.z.lessThan(n).select(Math.PI, 0)
|
|
26477
|
-
), x = n.mul(s, l, 2), _ =
|
|
26479
|
+
), x = n.mul(s, l, 2), _ = B(p).add(g), b = h.mul(y).clamp(1e-5, 0.9999), T = b.sqrt(), E = u.pow2().mul(y).div(B(1).sub(b)), A = h.add(E).toVar(), N = E.sub(u).toVar();
|
|
26478
26480
|
return Ms({ start: 1, end: 2, condition: "<=", name: "m" }, ({ m: k }) => {
|
|
26479
26481
|
N.mulAssign(T);
|
|
26480
26482
|
const H = sR(O(k).mul(x), O(k).mul(_)).mul(2);
|
|
26481
26483
|
A.addAssign(N.mul(H));
|
|
26482
|
-
}), A.max(
|
|
26484
|
+
}), A.max(B(0));
|
|
26483
26485
|
}).setLayout({
|
|
26484
26486
|
name: "evalIridescence",
|
|
26485
26487
|
type: "vec3",
|
|
@@ -26490,7 +26492,7 @@ const _0 = /* @__PURE__ */ B((a) => {
|
|
|
26490
26492
|
{ name: "thinFilmThickness", type: "float" },
|
|
26491
26493
|
{ name: "baseF0", type: "vec3" }
|
|
26492
26494
|
]
|
|
26493
|
-
}), nR = /* @__PURE__ */
|
|
26495
|
+
}), nR = /* @__PURE__ */ I(({ normal: a, viewDir: e, roughness: t }) => {
|
|
26494
26496
|
const s = a.dot(e).saturate(), i = t.pow2(), n = Et(
|
|
26495
26497
|
t.lessThan(0.25),
|
|
26496
26498
|
O(-339.2).mul(i).add(O(161.4).mul(t)).sub(25.9),
|
|
@@ -26501,7 +26503,7 @@ const _0 = /* @__PURE__ */ B((a) => {
|
|
|
26501
26503
|
O(1.97).mul(i).sub(O(3.27).mul(t)).add(0.72)
|
|
26502
26504
|
);
|
|
26503
26505
|
return Et(t.lessThan(0.25), 0, O(0.1).mul(t).sub(0.025)).add(n.mul(s).add(r).exp()).mul(1 / Math.PI).saturate();
|
|
26504
|
-
}), th =
|
|
26506
|
+
}), th = B(0.04), sh = O(1);
|
|
26505
26507
|
class b0 extends Xl {
|
|
26506
26508
|
/**
|
|
26507
26509
|
* Constructs a new physical lighting model.
|
|
@@ -26523,7 +26525,7 @@ class b0 extends Xl {
|
|
|
26523
26525
|
* @param {NodeBuilder} builder - The current node builder.
|
|
26524
26526
|
*/
|
|
26525
26527
|
start(e) {
|
|
26526
|
-
if (this.clearcoat === !0 && (this.clearcoatRadiance =
|
|
26528
|
+
if (this.clearcoat === !0 && (this.clearcoatRadiance = B().toVar("clearcoatRadiance"), this.clearcoatSpecularDirect = B().toVar("clearcoatSpecularDirect"), this.clearcoatSpecularIndirect = B().toVar("clearcoatSpecularIndirect")), this.sheen === !0 && (this.sheenSpecularDirect = B().toVar("sheenSpecularDirect"), this.sheenSpecularIndirect = B().toVar("sheenSpecularIndirect")), this.iridescence === !0) {
|
|
26527
26529
|
const t = st.dot(Ye).clamp();
|
|
26528
26530
|
this.iridescenceFresnel = iR({
|
|
26529
26531
|
outsideIOR: O(1),
|
|
@@ -26589,12 +26591,12 @@ class b0 extends Xl {
|
|
|
26589
26591
|
* @param {NodeBuilder} builder - The current node builder.
|
|
26590
26592
|
*/
|
|
26591
26593
|
directRectArea({ lightColor: e, lightPosition: t, halfWidth: s, halfHeight: i, reflectedLight: n, ltc_1: r, ltc_2: o }) {
|
|
26592
|
-
const l = t.add(s).sub(i), c = t.sub(s).sub(i), h = t.sub(s).add(i), u = t.add(s).add(i), d = st, p = Ye, f = it.toVar(), m = YA({ N: d, V: p, roughness: ti }), y = r.sample(m).toVar(), g = o.sample(m).toVar(), x =
|
|
26593
|
-
|
|
26594
|
-
|
|
26595
|
-
|
|
26594
|
+
const l = t.add(s).sub(i), c = t.sub(s).sub(i), h = t.sub(s).add(i), u = t.add(s).add(i), d = st, p = Ye, f = it.toVar(), m = YA({ N: d, V: p, roughness: ti }), y = r.sample(m).toVar(), g = o.sample(m).toVar(), x = It(
|
|
26595
|
+
B(y.x, 0, y.y),
|
|
26596
|
+
B(0, 1, 0),
|
|
26597
|
+
B(y.z, 0, y.w)
|
|
26596
26598
|
).toVar(), _ = Jt.mul(g.x).add(Jt.oneMinus().mul(g.y)).toVar();
|
|
26597
|
-
n.directSpecular.addAssign(e.mul(_).mul(
|
|
26599
|
+
n.directSpecular.addAssign(e.mul(_).mul(If({ N: d, V: p, P: f, mInv: x, p0: l, p1: c, p2: h, p3: u }))), n.directDiffuse.addAssign(e.mul(Se).mul(If({ N: d, V: p, P: f, mInv: It(1, 0, 0, 0, 1, 0, 0, 0, 1), p0: l, p1: c, p2: h, p3: u })));
|
|
26598
26600
|
}
|
|
26599
26601
|
/**
|
|
26600
26602
|
* Implements the indirect lighting.
|
|
@@ -26636,7 +26638,7 @@ class b0 extends Xl {
|
|
|
26636
26638
|
});
|
|
26637
26639
|
this.clearcoatSpecularIndirect.addAssign(this.clearcoatRadiance.mul(u));
|
|
26638
26640
|
}
|
|
26639
|
-
const n =
|
|
26641
|
+
const n = B().toVar("singleScattering"), r = B().toVar("multiScattering"), o = s.mul(1 / Math.PI);
|
|
26640
26642
|
this.computeMultiscattering(n, r, Cl);
|
|
26641
26643
|
const l = n.add(r), c = Se.mul(l.r.max(l.g).max(l.b).oneMinus());
|
|
26642
26644
|
i.indirectSpecular.addAssign(t.mul(n)), i.indirectSpecular.addAssign(r.mul(o)), i.indirectDiffuse.addAssign(c.mul(o));
|
|
@@ -26909,10 +26911,10 @@ class rR extends Hi {
|
|
|
26909
26911
|
if (t.fog !== s) {
|
|
26910
26912
|
const i = this.getCacheNode("fog", s, () => {
|
|
26911
26913
|
if (s.isFogExp2) {
|
|
26912
|
-
const n =
|
|
26914
|
+
const n = Ie("color", "color", s).setGroup(K), r = Ie("density", "float", s).setGroup(K);
|
|
26913
26915
|
return df(n, kC(r));
|
|
26914
26916
|
} else if (s.isFog) {
|
|
26915
|
-
const n =
|
|
26917
|
+
const n = Ie("color", "color", s).setGroup(K), r = Ie("near", "float", s).setGroup(K), o = Ie("far", "float", s).setGroup(K);
|
|
26916
26918
|
return df(n, UC(r, o));
|
|
26917
26919
|
} else
|
|
26918
26920
|
console.error("THREE.Renderer: Unsupported fog configuration.", s);
|
|
@@ -26977,7 +26979,7 @@ class rR extends Hi {
|
|
|
26977
26979
|
* @return {Node} The output node.
|
|
26978
26980
|
*/
|
|
26979
26981
|
getOutputNode(e) {
|
|
26980
|
-
const t = this.renderer, s = this.getOutputCacheKey(), i = e.isArrayTexture ? EC(e,
|
|
26982
|
+
const t = this.renderer, s = this.getOutputCacheKey(), i = e.isArrayTexture ? EC(e, B(_r, zl("gl_ViewID_OVR"))).renderOutput(t.toneMapping, t.currentColorSpace) : _e(e, _r).renderOutput(t.toneMapping, t.currentColorSpace);
|
|
26981
26983
|
return Gf.set(e, s), i;
|
|
26982
26984
|
}
|
|
26983
26985
|
/**
|
|
@@ -27480,7 +27482,7 @@ class md extends xi {
|
|
|
27480
27482
|
let f = 0;
|
|
27481
27483
|
const m = [], y = s / 2;
|
|
27482
27484
|
let g = 0;
|
|
27483
|
-
x(), r === !1 && (e > 0 && _(!0), t > 0 && _(!1)), this.setIndex(h), this.setAttribute("position", new
|
|
27485
|
+
x(), r === !1 && (e > 0 && _(!0), t > 0 && _(!1)), this.setIndex(h), this.setAttribute("position", new Bt(u, 3)), this.setAttribute("normal", new Bt(d, 3)), this.setAttribute("uv", new Bt(p, 2));
|
|
27484
27486
|
function x() {
|
|
27485
27487
|
const b = new R(), T = new R();
|
|
27486
27488
|
let E = 0;
|
|
@@ -27561,7 +27563,7 @@ class gd extends xi {
|
|
|
27561
27563
|
const _ = x + c * g, b = x + c * (g + 1), T = x + 1 + c * (g + 1), E = x + 1 + c * g;
|
|
27562
27564
|
p.push(_, b, E), p.push(b, T, E);
|
|
27563
27565
|
}
|
|
27564
|
-
this.setIndex(p), this.setAttribute("position", new
|
|
27566
|
+
this.setIndex(p), this.setAttribute("position", new Bt(f, 3)), this.setAttribute("normal", new Bt(m, 3)), this.setAttribute("uv", new Bt(y, 2));
|
|
27565
27567
|
}
|
|
27566
27568
|
copy(e) {
|
|
27567
27569
|
return super.copy(e), this.parameters = Object.assign({}, e.parameters), this;
|
|
@@ -27764,7 +27766,7 @@ class pR extends En {
|
|
|
27764
27766
|
}
|
|
27765
27767
|
);
|
|
27766
27768
|
h.autoAllocateDepthBuffer = !0;
|
|
27767
|
-
const u = new
|
|
27769
|
+
const u = new Bi({ color: 16777215, side: ni });
|
|
27768
27770
|
u.map = h.texture, u.map.offset.y = 1, u.map.repeat.y = -1;
|
|
27769
27771
|
const d = new mi(c, u);
|
|
27770
27772
|
d.position.copy(s), d.quaternion.copy(i);
|
|
@@ -27782,7 +27784,7 @@ class pR extends En {
|
|
|
27782
27784
|
renderTarget: h
|
|
27783
27785
|
};
|
|
27784
27786
|
if (this._layers.push(p), this._session !== null) {
|
|
27785
|
-
p.plane.material = new
|
|
27787
|
+
p.plane.material = new Bi({ color: 16777215, side: ni }), p.plane.material.blending = Ea, p.plane.material.blendEquation = Cs, p.plane.material.blendSrc = Ni, p.plane.material.blendDst = Ni, p.xrlayer = this._createXRLayer(p);
|
|
27786
27788
|
const f = this._session.renderState.layers;
|
|
27787
27789
|
f.unshift(p.xrlayer), this._session.updateRenderState({ layers: f });
|
|
27788
27790
|
} else
|
|
@@ -27830,7 +27832,7 @@ class pR extends En {
|
|
|
27830
27832
|
}
|
|
27831
27833
|
);
|
|
27832
27834
|
u.autoAllocateDepthBuffer = !0;
|
|
27833
|
-
const d = new
|
|
27835
|
+
const d = new Bi({ color: 16777215, side: jt });
|
|
27834
27836
|
d.map = u.texture, d.map.offset.y = 1, d.map.repeat.y = -1;
|
|
27835
27837
|
const p = new mi(h, d);
|
|
27836
27838
|
p.position.copy(i), p.quaternion.copy(n);
|
|
@@ -27849,7 +27851,7 @@ class pR extends En {
|
|
|
27849
27851
|
renderTarget: u
|
|
27850
27852
|
};
|
|
27851
27853
|
if (this._layers.push(f), this._session !== null) {
|
|
27852
|
-
f.plane.material = new
|
|
27854
|
+
f.plane.material = new Bi({ color: 16777215, side: jt }), f.plane.material.blending = Ea, f.plane.material.blendEquation = Cs, f.plane.material.blendSrc = Ni, f.plane.material.blendDst = Ni, f.xrlayer = this._createXRLayer(f);
|
|
27853
27855
|
const m = this._session.renderState.layers;
|
|
27854
27856
|
m.unshift(f.xrlayer), this._session.updateRenderState({ layers: m });
|
|
27855
27857
|
} else
|
|
@@ -27936,7 +27938,7 @@ class pR extends En {
|
|
|
27936
27938
|
}
|
|
27937
27939
|
), this._xrRenderTarget.hasExternalTextures = !0, this._xrRenderTarget.depth = this._useMultiview ? 2 : 1, this._supportsLayers = e.enabledFeatures.includes("layers"), this._referenceSpace = await e.requestReferenceSpace(this.getReferenceSpaceType()), this._supportsLayers)
|
|
27938
27940
|
for (const m of this._layers)
|
|
27939
|
-
m.plane.material = new
|
|
27941
|
+
m.plane.material = new Bi({ color: 16777215, side: m.type === "cylinder" ? jt : ni }), m.plane.material.blending = Ea, m.plane.material.blendEquation = Cs, m.plane.material.blendSrc = Ni, m.plane.material.blendDst = Ni, m.xrlayer = this._createXRLayer(m), d.unshift(m.xrlayer);
|
|
27940
27942
|
e.updateRenderState({ layers: d });
|
|
27941
27943
|
} else {
|
|
27942
27944
|
const r = {
|
|
@@ -28446,7 +28448,7 @@ class TR {
|
|
|
28446
28448
|
modelNormalViewMatrix: null
|
|
28447
28449
|
}, this.library = new T0(), this.lighting = new cR(), this._getFallback = c, this._pixelRatio = 1, this._width = this.domElement.width, this._height = this.domElement.height, this._viewport = new ge(0, 0, this._width, this._height), this._scissor = new ge(0, 0, this._width, this._height), this._scissorTest = !1, this._attributes = null, this._geometries = null, this._nodes = null, this._animation = null, this._bindings = null, this._objects = null, this._pipelines = null, this._bundles = null, this._renderLists = null, this._renderContexts = null, this._textures = null, this._background = null, this._quad = new od(new nt()), this._quad.material.name = "Renderer_output", this._currentRenderContext = null, this._opaqueSort = null, this._transparentSort = null, this._frameBufferTarget = null;
|
|
28448
28450
|
const d = this.alpha === !0 ? 0 : 1;
|
|
28449
|
-
this._clearColor = new
|
|
28451
|
+
this._clearColor = new Bu(0, 0, 0, d), this._clearDepth = 1, this._clearStencil = 0, this._renderTarget = null, this._activeCubeFace = 0, this._activeMipmapLevel = 0, this._outputRenderTarget = null, this._mrt = null, this._renderObjectFunction = null, this._currentRenderObjectFunction = null, this._currentRenderBundle = null, this._handleObjectFunction = this._renderObjectDirect, this._isDeviceLost = !1, this.onDeviceLost = this._onDeviceLost, this._colorBufferType = h, this._initialized = !1, this._initPromise = null, this._compilationPromises = null, this.transparent = !0, this.opaque = !0, this.shadowMap = {
|
|
28450
28452
|
enabled: !1,
|
|
28451
28453
|
type: Ab
|
|
28452
28454
|
}, this.xr = new pR(this, u), this.debug = {
|
|
@@ -31198,7 +31200,7 @@ class A0 {
|
|
|
31198
31200
|
*/
|
|
31199
31201
|
getClearColor() {
|
|
31200
31202
|
const e = this.renderer;
|
|
31201
|
-
return Zn = Zn || new
|
|
31203
|
+
return Zn = Zn || new Bu(), e.getClearColor(Zn), Zn.getRGB(Zn), Zn;
|
|
31202
31204
|
}
|
|
31203
31205
|
/**
|
|
31204
31206
|
* Returns the DOM element. If no DOM element exists, the backend
|
|
@@ -31257,7 +31259,7 @@ class A0 {
|
|
|
31257
31259
|
}
|
|
31258
31260
|
}
|
|
31259
31261
|
let OR = 0;
|
|
31260
|
-
class
|
|
31262
|
+
class BR {
|
|
31261
31263
|
constructor(e, t) {
|
|
31262
31264
|
this.buffers = [e.bufferGPU, t], this.type = e.type, this.bufferType = e.bufferType, this.pbo = e.pbo, this.byteLength = e.byteLength, this.bytesPerElement = e.BYTES_PER_ELEMENT, this.version = e.version, this.isInteger = e.isInteger, this.activeBufferIndex = 0, this.baseId = e.id;
|
|
31263
31265
|
}
|
|
@@ -31274,7 +31276,7 @@ class IR {
|
|
|
31274
31276
|
this.activeBufferIndex ^= 1;
|
|
31275
31277
|
}
|
|
31276
31278
|
}
|
|
31277
|
-
class
|
|
31279
|
+
class IR {
|
|
31278
31280
|
/**
|
|
31279
31281
|
* Constructs a new utility object.
|
|
31280
31282
|
*
|
|
@@ -31325,7 +31327,7 @@ class BR {
|
|
|
31325
31327
|
};
|
|
31326
31328
|
if (e.isStorageBufferAttribute || e.isStorageInstancedBufferAttribute) {
|
|
31327
31329
|
const d = this._createBuffer(i, t, n, r);
|
|
31328
|
-
u = new
|
|
31330
|
+
u = new BR(u, d);
|
|
31329
31331
|
}
|
|
31330
31332
|
s.set(e, u);
|
|
31331
31333
|
}
|
|
@@ -32014,7 +32016,7 @@ class UR {
|
|
|
32014
32016
|
});
|
|
32015
32017
|
}
|
|
32016
32018
|
}
|
|
32017
|
-
let Zf = !1,
|
|
32019
|
+
let Zf = !1, Bo, ch, Kf;
|
|
32018
32020
|
class kR {
|
|
32019
32021
|
/**
|
|
32020
32022
|
* Constructs a new utility object.
|
|
@@ -32031,20 +32033,20 @@ class kR {
|
|
|
32031
32033
|
*/
|
|
32032
32034
|
_init() {
|
|
32033
32035
|
const e = this.gl;
|
|
32034
|
-
|
|
32036
|
+
Bo = {
|
|
32035
32037
|
[wr]: e.REPEAT,
|
|
32036
|
-
[
|
|
32038
|
+
[Ii]: e.CLAMP_TO_EDGE,
|
|
32037
32039
|
[Er]: e.MIRRORED_REPEAT
|
|
32038
32040
|
}, ch = {
|
|
32039
32041
|
[dt]: e.NEAREST,
|
|
32040
32042
|
[Mg]: e.NEAREST_MIPMAP_NEAREST,
|
|
32041
|
-
[
|
|
32043
|
+
[Ia]: e.NEAREST_MIPMAP_LINEAR,
|
|
32042
32044
|
[ns]: e.LINEAR,
|
|
32043
32045
|
[zh]: e.LINEAR_MIPMAP_NEAREST,
|
|
32044
32046
|
[ai]: e.LINEAR_MIPMAP_LINEAR
|
|
32045
32047
|
}, Kf = {
|
|
32046
32048
|
[Rg]: e.NEVER,
|
|
32047
|
-
[
|
|
32049
|
+
[Bg]: e.ALWAYS,
|
|
32048
32050
|
[Nu]: e.LESS,
|
|
32049
32051
|
[Pg]: e.LEQUAL,
|
|
32050
32052
|
[Ng]: e.EQUAL,
|
|
@@ -32099,10 +32101,10 @@ class kR {
|
|
|
32099
32101
|
*/
|
|
32100
32102
|
setTextureParameters(e, t) {
|
|
32101
32103
|
const { gl: s, extensions: i, backend: n } = this, r = ke.getPrimaries(ke.workingColorSpace), o = t.colorSpace === di ? null : ke.getPrimaries(t.colorSpace), l = t.colorSpace === di || r === o ? s.NONE : s.BROWSER_DEFAULT_WEBGL;
|
|
32102
|
-
s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL, t.flipY), s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL, t.premultiplyAlpha), s.pixelStorei(s.UNPACK_ALIGNMENT, t.unpackAlignment), s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL, l), s.texParameteri(e, s.TEXTURE_WRAP_S,
|
|
32104
|
+
s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL, t.flipY), s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL, t.premultiplyAlpha), s.pixelStorei(s.UNPACK_ALIGNMENT, t.unpackAlignment), s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL, l), s.texParameteri(e, s.TEXTURE_WRAP_S, Bo[t.wrapS]), s.texParameteri(e, s.TEXTURE_WRAP_T, Bo[t.wrapT]), (e === s.TEXTURE_3D || e === s.TEXTURE_2D_ARRAY) && (t.isArrayTexture || s.texParameteri(e, s.TEXTURE_WRAP_R, Bo[t.wrapR])), s.texParameteri(e, s.TEXTURE_MAG_FILTER, ch[t.magFilter]);
|
|
32103
32105
|
const c = t.mipmaps !== void 0 && t.mipmaps.length > 0, h = t.minFilter === ns && c ? ai : t.minFilter;
|
|
32104
32106
|
if (s.texParameteri(e, s.TEXTURE_MIN_FILTER, ch[h]), t.compareFunction && (s.texParameteri(e, s.TEXTURE_COMPARE_MODE, s.COMPARE_REF_TO_TEXTURE), s.texParameteri(e, s.TEXTURE_COMPARE_FUNC, Kf[t.compareFunction])), i.has("EXT_texture_filter_anisotropic") === !0) {
|
|
32105
|
-
if (t.magFilter === dt || t.minFilter !==
|
|
32107
|
+
if (t.magFilter === dt || t.minFilter !== Ia && t.minFilter !== ai || t.type === is && i.has("OES_texture_float_linear") === !1) return;
|
|
32106
32108
|
if (t.anisotropy > 1) {
|
|
32107
32109
|
const u = i.get("EXT_texture_filter_anisotropic");
|
|
32108
32110
|
s.texParameterf(e, u.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(t.anisotropy, n.getMaxAnisotropy()));
|
|
@@ -32696,7 +32698,7 @@ class tm extends A0 {
|
|
|
32696
32698
|
};
|
|
32697
32699
|
e.onDeviceLost(o);
|
|
32698
32700
|
}
|
|
32699
|
-
this._onContextLost = n, e.domElement.addEventListener("webglcontextlost", n, !1), this.gl = i, this.extensions = new zR(this), this.capabilities = new GR(this), this.attributeUtils = new
|
|
32701
|
+
this._onContextLost = n, e.domElement.addEventListener("webglcontextlost", n, !1), this.gl = i, this.extensions = new zR(this), this.capabilities = new GR(this), this.attributeUtils = new IR(this), this.textureUtils = new kR(this), this.bufferRenderer = new VR(this), this.state = new LR(this), this.utils = new UR(this), this.extensions.get("EXT_color_buffer_float"), this.extensions.get("WEBGL_clip_cull_distance"), this.extensions.get("OES_texture_float_linear"), this.extensions.get("EXT_color_buffer_half_float"), this.extensions.get("WEBGL_multisampled_render_to_texture"), this.extensions.get("WEBGL_render_shared_exponent"), this.extensions.get("WEBGL_multi_draw"), this.extensions.get("OVR_multiview2"), this.disjoint = this.extensions.get("EXT_disjoint_timer_query_webgl2"), this.parallel = this.extensions.get("KHR_parallel_shader_compile");
|
|
32700
32702
|
}
|
|
32701
32703
|
/**
|
|
32702
32704
|
* The coordinate system of the backend.
|
|
@@ -33924,7 +33926,7 @@ const hr = {
|
|
|
33924
33926
|
ThreeD: "3d"
|
|
33925
33927
|
}, $R = {
|
|
33926
33928
|
All: "all"
|
|
33927
|
-
},
|
|
33929
|
+
}, Io = {
|
|
33928
33930
|
Vertex: "vertex",
|
|
33929
33931
|
Instance: "instance"
|
|
33930
33932
|
}, gu = {
|
|
@@ -34262,7 +34264,7 @@ const KR = {
|
|
|
34262
34264
|
[Pg]: "less-equal",
|
|
34263
34265
|
[Fg]: "greater",
|
|
34264
34266
|
[Og]: "greater-equal",
|
|
34265
|
-
[
|
|
34267
|
+
[Bg]: "always",
|
|
34266
34268
|
[Dg]: "not-equal"
|
|
34267
34269
|
}, QR = [0, 1, 3, 2, 4, 5];
|
|
34268
34270
|
class JR {
|
|
@@ -34738,7 +34740,7 @@ class JR {
|
|
|
34738
34740
|
*/
|
|
34739
34741
|
_convertFilterMode(e) {
|
|
34740
34742
|
let t = mn.Linear;
|
|
34741
|
-
return (e === dt || e === Mg || e ===
|
|
34743
|
+
return (e === dt || e === Mg || e === Ia) && (t = mn.Nearest), t;
|
|
34742
34744
|
}
|
|
34743
34745
|
/**
|
|
34744
34746
|
* Returns the bytes-per-texel value for the given GPU texture format.
|
|
@@ -35162,7 +35164,7 @@ const Kn = typeof self < "u" ? self.GPUShaderStage : { VERTEX: 1, FRAGMENT: 2, C
|
|
|
35162
35164
|
[si.READ_WRITE]: "read_write"
|
|
35163
35165
|
}, am = {
|
|
35164
35166
|
[wr]: "repeat",
|
|
35165
|
-
[
|
|
35167
|
+
[Ii]: "clamp",
|
|
35166
35168
|
[Er]: "mirror"
|
|
35167
35169
|
}, Lo = {
|
|
35168
35170
|
vertex: Kn ? Kn.VERTEX : 1,
|
|
@@ -35329,7 +35331,7 @@ class l1 extends m0 {
|
|
|
35329
35331
|
return ${n}(
|
|
35330
35332
|
`;
|
|
35331
35333
|
const o = (l, c) => {
|
|
35332
|
-
l === wr ? (i.push(ls.repeatWrapping_float), r += ` tsl_repeatWrapping_float( coord.${c} )`) : l ===
|
|
35334
|
+
l === wr ? (i.push(ls.repeatWrapping_float), r += ` tsl_repeatWrapping_float( coord.${c} )`) : l === Ii ? (i.push(ls.clampWrapping_float), r += ` tsl_clampWrapping_float( coord.${c} )`) : l === Er ? (i.push(ls.mirrorWrapping_float), r += ` tsl_mirrorWrapping_float( coord.${c} )`) : (r += ` coord.${c}`, console.warn(`WebGPURenderer: Unsupported texture wrap type "${l}" for vertex shader.`));
|
|
35333
35335
|
};
|
|
35334
35336
|
o(e.wrapS, "x"), r += `,
|
|
35335
35337
|
`, o(e.wrapT, "y"), e.isData3DTexture && (r += `,
|
|
@@ -36546,7 +36548,7 @@ class p1 {
|
|
|
36546
36548
|
let l = s.get(o);
|
|
36547
36549
|
if (l === void 0) {
|
|
36548
36550
|
let u, d;
|
|
36549
|
-
n.isInterleavedBufferAttribute === !0 ? (u = n.data.stride * r, d = n.data.isInstancedInterleavedBuffer ?
|
|
36551
|
+
n.isInterleavedBufferAttribute === !0 ? (u = n.data.stride * r, d = n.data.isInstancedInterleavedBuffer ? Io.Instance : Io.Vertex) : (u = n.itemSize * r, d = n.isInstancedBufferAttribute ? Io.Instance : Io.Vertex), n.normalized === !1 && (n.array.constructor === Int16Array || n.array.constructor === Uint16Array) && (u = 4), l = {
|
|
36550
36552
|
arrayStride: u,
|
|
36551
36553
|
attributes: [],
|
|
36552
36554
|
stepMode: d
|
|
@@ -38507,7 +38509,7 @@ class F0 extends nt {
|
|
|
38507
38509
|
*/
|
|
38508
38510
|
setupEnvironment(e) {
|
|
38509
38511
|
let t = super.setupEnvironment(e);
|
|
38510
|
-
return t === null && e.environmentNode && (t = e.environmentNode), t ? new
|
|
38512
|
+
return t === null && e.environmentNode && (t = e.environmentNode), t ? new BA(t) : null;
|
|
38511
38513
|
}
|
|
38512
38514
|
/**
|
|
38513
38515
|
* Setups the lighting model.
|
|
@@ -38521,7 +38523,7 @@ class F0 extends nt {
|
|
|
38521
38523
|
* Setups the specular related node variables.
|
|
38522
38524
|
*/
|
|
38523
38525
|
setupSpecular() {
|
|
38524
|
-
const e = He(
|
|
38526
|
+
const e = He(B(0.04), Se.rgb, wl);
|
|
38525
38527
|
Jt.assign(e), Cl.assign(1);
|
|
38526
38528
|
}
|
|
38527
38529
|
/**
|
|
@@ -38724,7 +38726,7 @@ class w1 extends F0 {
|
|
|
38724
38726
|
*/
|
|
38725
38727
|
setupSpecular() {
|
|
38726
38728
|
const e = this.iorNode ? O(this.iorNode) : DE;
|
|
38727
|
-
el.assign(e), Jt.assign(He(Mr(yy(el.sub(1).div(el.add(1))).mul(yE),
|
|
38729
|
+
el.assign(e), Jt.assign(He(Mr(yy(el.sub(1).div(el.add(1))).mul(yE), B(1)).mul(Xp), Se.rgb, wl)), Cl.assign(He(Xp, 1, wl));
|
|
38728
38730
|
}
|
|
38729
38731
|
/**
|
|
38730
38732
|
* Setups the lighting model.
|
|
@@ -38745,7 +38747,7 @@ class w1 extends F0 {
|
|
|
38745
38747
|
au.assign(t), El.assign(l0({ roughness: s }));
|
|
38746
38748
|
}
|
|
38747
38749
|
if (this.useSheen) {
|
|
38748
|
-
const t = this.sheenNode ?
|
|
38750
|
+
const t = this.sheenNode ? B(this.sheenNode) : EE, s = this.sheenRoughnessNode ? O(this.sheenRoughnessNode) : CE;
|
|
38749
38751
|
lr.assign(t), Hu.assign(s);
|
|
38750
38752
|
}
|
|
38751
38753
|
if (this.useIridescence) {
|
|
@@ -38761,7 +38763,7 @@ class w1 extends F0 {
|
|
|
38761
38763
|
}), ou.assign(cn.pow2().mix(ti.pow2(), 1)), Jo.assign(xa[0].mul(t.x).add(xa[1].mul(t.y))), xr.assign(xa[1].mul(t.x).sub(xa[0].mul(t.y)));
|
|
38762
38764
|
}
|
|
38763
38765
|
if (this.useTransmission) {
|
|
38764
|
-
const t = this.transmissionNode ? O(this.transmissionNode) : PE, s = this.thicknessNode ? O(this.thicknessNode) : FE, i = this.attenuationDistanceNode ? O(this.attenuationDistanceNode) : OE, n = this.attenuationColorNode ?
|
|
38766
|
+
const t = this.transmissionNode ? O(this.transmissionNode) : PE, s = this.thicknessNode ? O(this.thicknessNode) : FE, i = this.attenuationDistanceNode ? O(this.attenuationDistanceNode) : OE, n = this.attenuationColorNode ? B(this.attenuationColorNode) : BE;
|
|
38765
38767
|
if (cu.assign(t), ny.assign(s), ry.assign(i), ay.assign(n), this.useDispersion) {
|
|
38766
38768
|
const r = this.dispersionNode ? O(this.dispersionNode) : GE;
|
|
38767
38769
|
oy.assign(r);
|
|
@@ -38774,7 +38776,7 @@ class w1 extends F0 {
|
|
|
38774
38776
|
* @return {Node<vec3>} The clearcoat normal.
|
|
38775
38777
|
*/
|
|
38776
38778
|
setupClearcoatNormal() {
|
|
38777
|
-
return this.clearcoatNormalNode ?
|
|
38779
|
+
return this.clearcoatNormalNode ? B(this.clearcoatNormalNode) : vE;
|
|
38778
38780
|
}
|
|
38779
38781
|
setup(e) {
|
|
38780
38782
|
e.context.setupClearcoatNormal = () => this.setupClearcoatNormal(e), super.setup(e);
|
|
@@ -38783,14 +38785,14 @@ class w1 extends F0 {
|
|
|
38783
38785
|
return this.clearcoatNode = e.clearcoatNode, this.clearcoatRoughnessNode = e.clearcoatRoughnessNode, this.clearcoatNormalNode = e.clearcoatNormalNode, this.sheenNode = e.sheenNode, this.sheenRoughnessNode = e.sheenRoughnessNode, this.iridescenceNode = e.iridescenceNode, this.iridescenceIORNode = e.iridescenceIORNode, this.iridescenceThicknessNode = e.iridescenceThicknessNode, this.specularIntensityNode = e.specularIntensityNode, this.specularColorNode = e.specularColorNode, this.transmissionNode = e.transmissionNode, this.thicknessNode = e.thicknessNode, this.attenuationDistanceNode = e.attenuationDistanceNode, this.attenuationColorNode = e.attenuationColorNode, this.dispersionNode = e.dispersionNode, this.anisotropyNode = e.anisotropyNode, super.copy(e);
|
|
38784
38786
|
}
|
|
38785
38787
|
}
|
|
38786
|
-
const E1 = /* @__PURE__ */
|
|
38788
|
+
const E1 = /* @__PURE__ */ I(({ normal: a, lightDirection: e, builder: t }) => {
|
|
38787
38789
|
const s = a.dot(e), i = V(s.mul(0.5).add(0.5), 0);
|
|
38788
38790
|
if (t.material.gradientMap) {
|
|
38789
38791
|
const n = Oi("gradientMap", "texture").context({ getUV: () => i });
|
|
38790
|
-
return
|
|
38792
|
+
return B(n.r);
|
|
38791
38793
|
} else {
|
|
38792
38794
|
const n = i.fwidth().mul(0.5);
|
|
38793
|
-
return He(
|
|
38795
|
+
return He(B(0.7), B(1), Gi(O(0.7).sub(n.x), O(0.7).add(n.x), i.x));
|
|
38794
38796
|
}
|
|
38795
38797
|
});
|
|
38796
38798
|
class C1 extends Xl {
|
|
@@ -38854,7 +38856,7 @@ class R1 extends nt {
|
|
|
38854
38856
|
return new C1();
|
|
38855
38857
|
}
|
|
38856
38858
|
}
|
|
38857
|
-
class N1 extends
|
|
38859
|
+
class N1 extends Br {
|
|
38858
38860
|
static get type() {
|
|
38859
38861
|
return "BasicLightMapNode";
|
|
38860
38862
|
}
|
|
@@ -38871,7 +38873,7 @@ class N1 extends Ir {
|
|
|
38871
38873
|
e.context.irradianceLightMap = this.lightMapNode.mul(t);
|
|
38872
38874
|
}
|
|
38873
38875
|
}
|
|
38874
|
-
const P1 = /* @__PURE__ */ new
|
|
38876
|
+
const P1 = /* @__PURE__ */ new Bi();
|
|
38875
38877
|
class F1 extends nt {
|
|
38876
38878
|
static get type() {
|
|
38877
38879
|
return "MeshBasicNodeMaterial";
|
|
@@ -38951,7 +38953,7 @@ class D1 extends qt {
|
|
|
38951
38953
|
}
|
|
38952
38954
|
}
|
|
38953
38955
|
const O1 = /* @__PURE__ */ new D1();
|
|
38954
|
-
class
|
|
38956
|
+
class B1 extends nt {
|
|
38955
38957
|
static get type() {
|
|
38956
38958
|
return "MeshLambertNodeMaterial";
|
|
38957
38959
|
}
|
|
@@ -38983,7 +38985,7 @@ class I1 extends nt {
|
|
|
38983
38985
|
return new x0(!1);
|
|
38984
38986
|
}
|
|
38985
38987
|
}
|
|
38986
|
-
class
|
|
38988
|
+
class I1 extends qt {
|
|
38987
38989
|
/**
|
|
38988
38990
|
* Constructs a new mesh normal material.
|
|
38989
38991
|
*
|
|
@@ -39000,7 +39002,7 @@ class B1 extends qt {
|
|
|
39000
39002
|
return super.copy(e), this.bumpMap = e.bumpMap, this.bumpScale = e.bumpScale, this.normalMap = e.normalMap, this.normalMapType = e.normalMapType, this.normalScale.copy(e.normalScale), this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.flatShading = e.flatShading, this;
|
|
39001
39003
|
}
|
|
39002
39004
|
}
|
|
39003
|
-
const L1 = /* @__PURE__ */ new
|
|
39005
|
+
const L1 = /* @__PURE__ */ new I1();
|
|
39004
39006
|
class U1 extends nt {
|
|
39005
39007
|
static get type() {
|
|
39006
39008
|
return "MeshNormalNodeMaterial";
|
|
@@ -39060,7 +39062,7 @@ class G1 extends nt {
|
|
|
39060
39062
|
setupVariants(e) {
|
|
39061
39063
|
const t = Pw;
|
|
39062
39064
|
let s;
|
|
39063
|
-
e.material.matcap ? s = Oi("matcap", "texture").context({ getUV: () => t }) : s =
|
|
39065
|
+
e.material.matcap ? s = Oi("matcap", "texture").context({ getUV: () => t }) : s = B(He(0.2, 0.8, t.y)), Se.rgb.mulAssign(s.rgb);
|
|
39064
39066
|
}
|
|
39065
39067
|
}
|
|
39066
39068
|
class D0 extends qt {
|
|
@@ -39130,7 +39132,7 @@ class j1 extends nt {
|
|
|
39130
39132
|
* @param {NodeBuilder} builder - The current node builder.
|
|
39131
39133
|
*/
|
|
39132
39134
|
setupVariants() {
|
|
39133
|
-
const e = this.offsetNode ? O(this.offsetNode) : kE, t = this.dashScaleNode ? O(this.dashScaleNode) :
|
|
39135
|
+
const e = this.offsetNode ? O(this.offsetNode) : kE, t = this.dashScaleNode ? O(this.dashScaleNode) : IE, s = this.dashSizeNode ? O(this.dashSizeNode) : LE, i = this.gapSizeNode ? O(this.gapSizeNode) : UE;
|
|
39134
39136
|
xc.assign(s), Up.assign(i);
|
|
39135
39137
|
const n = Ns(Vi("lineDistance").mul(t));
|
|
39136
39138
|
(e ? n.add(e) : n).mod(xc.add(Up)).greaterThan(xc).discard();
|
|
@@ -39174,7 +39176,7 @@ class O0 extends nt {
|
|
|
39174
39176
|
* @return {Node<vec3>} The position in view space.
|
|
39175
39177
|
*/
|
|
39176
39178
|
setupPositionView(e) {
|
|
39177
|
-
const { object: t, camera: s } = e, i = this.sizeAttenuation, { positionNode: n, rotationNode: r, scaleNode: o } = this, l = Gl.mul(
|
|
39179
|
+
const { object: t, camera: s } = e, i = this.sizeAttenuation, { positionNode: n, rotationNode: r, scaleNode: o } = this, l = Gl.mul(B(n || 0));
|
|
39178
39180
|
let c = V(vn[0].xyz.length(), vn[1].xyz.length());
|
|
39179
39181
|
if (o !== null && (c = c.mul(V(o))), i === !1)
|
|
39180
39182
|
if (s.isPerspectiveCamera)
|
|
@@ -39240,7 +39242,7 @@ class K1 extends O0 {
|
|
|
39240
39242
|
}
|
|
39241
39243
|
setupPositionView() {
|
|
39242
39244
|
const { positionNode: e } = this;
|
|
39243
|
-
return Gl.mul(
|
|
39245
|
+
return Gl.mul(B(e || wt)).xyz;
|
|
39244
39246
|
}
|
|
39245
39247
|
setupVertex(e) {
|
|
39246
39248
|
const t = super.setupVertex(e);
|
|
@@ -39918,7 +39920,7 @@ class fN extends T0 {
|
|
|
39918
39920
|
* Constructs a new standard node library.
|
|
39919
39921
|
*/
|
|
39920
39922
|
constructor() {
|
|
39921
|
-
super(), this.addMaterial(b1, "MeshPhongMaterial"), this.addMaterial(F0, "MeshStandardMaterial"), this.addMaterial(w1, "MeshPhysicalMaterial"), this.addMaterial(R1, "MeshToonMaterial"), this.addMaterial(F1, "MeshBasicMaterial"), this.addMaterial(
|
|
39923
|
+
super(), this.addMaterial(b1, "MeshPhongMaterial"), this.addMaterial(F0, "MeshStandardMaterial"), this.addMaterial(w1, "MeshPhysicalMaterial"), this.addMaterial(R1, "MeshToonMaterial"), this.addMaterial(F1, "MeshBasicMaterial"), this.addMaterial(B1, "MeshLambertMaterial"), this.addMaterial(U1, "MeshNormalMaterial"), this.addMaterial(G1, "MeshMatcapMaterial"), this.addMaterial(H1, "LineBasicMaterial"), this.addMaterial(j1, "LineDashedMaterial"), this.addMaterial(K1, "PointsMaterial"), this.addMaterial(O0, "SpriteMaterial"), this.addMaterial(tN, "ShadowMaterial"), this.addLight(_M, iN), this.addLight(MA, rN), this.addLight(AA, aN), this.addLight(dd, Td), this.addLight(FA, lN), this.addLight(DA, cN), this.addLight(OA, uN), this.addLight(RA, dN), this.addLight(PA, pN), this.addToneMapping(MC, Db), this.addToneMapping(AC, Ob), this.addToneMapping(RC, Bb), this.addToneMapping(PC, Ib), this.addToneMapping(BC, Lb), this.addToneMapping(IC, Ub);
|
|
39922
39924
|
}
|
|
39923
39925
|
}
|
|
39924
39926
|
class Uo extends TR {
|
|
@@ -39984,7 +39986,7 @@ class mN extends Us {
|
|
|
39984
39986
|
this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
|
|
39985
39987
|
}
|
|
39986
39988
|
}
|
|
39987
|
-
const dm = { type: "change" }, Sd = { type: "start" },
|
|
39989
|
+
const dm = { type: "change" }, Sd = { type: "start" }, B0 = { type: "end" }, ko = new Cx(), pm = new Mx(), gN = Math.cos(70 * Ax.DEG2RAD), ct = new Z(), Gt = 2 * Math.PI, De = {
|
|
39988
39990
|
NONE: -1,
|
|
39989
39991
|
ROTATE: 0,
|
|
39990
39992
|
DOLLY: 1,
|
|
@@ -40299,7 +40301,7 @@ function _N(a) {
|
|
|
40299
40301
|
function bN(a) {
|
|
40300
40302
|
switch (this._removePointer(a), this._pointers.length) {
|
|
40301
40303
|
case 0:
|
|
40302
|
-
this.domElement.releasePointerCapture(a.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(
|
|
40304
|
+
this.domElement.releasePointerCapture(a.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(B0), this.state = De.NONE;
|
|
40303
40305
|
break;
|
|
40304
40306
|
case 1:
|
|
40305
40307
|
const e = this._pointers[0], t = this._pointerPositions[e];
|
|
@@ -40367,7 +40369,7 @@ function SN(a) {
|
|
|
40367
40369
|
}
|
|
40368
40370
|
}
|
|
40369
40371
|
function vN(a) {
|
|
40370
|
-
this.enabled === !1 || this.enableZoom === !1 || this.state !== De.NONE || (a.preventDefault(), this.dispatchEvent(Sd), this._handleMouseWheel(this._customWheelEvent(a)), this.dispatchEvent(
|
|
40372
|
+
this.enabled === !1 || this.enableZoom === !1 || this.state !== De.NONE || (a.preventDefault(), this.dispatchEvent(Sd), this._handleMouseWheel(this._customWheelEvent(a)), this.dispatchEvent(B0));
|
|
40371
40373
|
}
|
|
40372
40374
|
function wN(a) {
|
|
40373
40375
|
this.enabled !== !1 && this._handleKeyDown(a);
|
|
@@ -40481,14 +40483,14 @@ function tn(a) {
|
|
|
40481
40483
|
function Ai(a) {
|
|
40482
40484
|
return a.isOrthographicCamera;
|
|
40483
40485
|
}
|
|
40484
|
-
const Jn = Math.PI * 2, fm = Math.PI / 2,
|
|
40486
|
+
const Jn = Math.PI * 2, fm = Math.PI / 2, I0 = 1e-5, aa = Math.PI / 180;
|
|
40485
40487
|
function Ss(a, e, t) {
|
|
40486
40488
|
return Math.max(e, Math.min(t, a));
|
|
40487
40489
|
}
|
|
40488
|
-
function Ue(a, e =
|
|
40490
|
+
function Ue(a, e = I0) {
|
|
40489
40491
|
return Math.abs(a) < e;
|
|
40490
40492
|
}
|
|
40491
|
-
function Ae(a, e, t =
|
|
40493
|
+
function Ae(a, e, t = I0) {
|
|
40492
40494
|
return Ue(a - e, t);
|
|
40493
40495
|
}
|
|
40494
40496
|
function mm(a, e) {
|
|
@@ -40600,7 +40602,7 @@ class NN {
|
|
|
40600
40602
|
}
|
|
40601
40603
|
var bh;
|
|
40602
40604
|
const PN = "2.10.1", Go = 1 / 8, FN = /Mac/.test((bh = globalThis?.navigator) === null || bh === void 0 ? void 0 : bh.platform);
|
|
40603
|
-
let J, ym, Vo, Th, Vt, oe, Te, er, ca, Os,
|
|
40605
|
+
let J, ym, Vo, Th, Vt, oe, Te, er, ca, Os, Bs, sn, xm, _m, os, ha, tr, bm, Sh, Tm, vh, wh, Ho;
|
|
40604
40606
|
class zs extends NN {
|
|
40605
40607
|
/**
|
|
40606
40608
|
* Injects THREE as the dependency. You can then proceed to use CameraControls.
|
|
@@ -40643,7 +40645,7 @@ class zs extends NN {
|
|
|
40643
40645
|
* @category Statics
|
|
40644
40646
|
*/
|
|
40645
40647
|
static install(e) {
|
|
40646
|
-
J = e.THREE, ym = Object.freeze(new J.Vector3(0, 0, 0)), Vo = Object.freeze(new J.Vector3(0, 1, 0)), Th = Object.freeze(new J.Vector3(0, 0, 1)), Vt = new J.Vector2(), oe = new J.Vector3(), Te = new J.Vector3(), er = new J.Vector3(), ca = new J.Vector3(), Os = new J.Vector3(),
|
|
40648
|
+
J = e.THREE, ym = Object.freeze(new J.Vector3(0, 0, 0)), Vo = Object.freeze(new J.Vector3(0, 1, 0)), Th = Object.freeze(new J.Vector3(0, 0, 1)), Vt = new J.Vector2(), oe = new J.Vector3(), Te = new J.Vector3(), er = new J.Vector3(), ca = new J.Vector3(), Os = new J.Vector3(), Bs = new J.Vector3(), sn = new J.Vector3(), xm = new J.Vector3(), _m = new J.Vector3(), os = new J.Spherical(), ha = new J.Spherical(), tr = new J.Box3(), bm = new J.Box3(), Sh = new J.Sphere(), Tm = new J.Quaternion(), vh = new J.Quaternion(), wh = new J.Matrix4(), Ho = new J.Raycaster();
|
|
40647
40649
|
}
|
|
40648
40650
|
/**
|
|
40649
40651
|
* list all ACTIONs
|
|
@@ -41194,8 +41196,8 @@ class zs extends NN {
|
|
|
41194
41196
|
* @category Methods
|
|
41195
41197
|
*/
|
|
41196
41198
|
truck(e, t, s = !1) {
|
|
41197
|
-
this._camera.updateMatrix(), Os.setFromMatrixColumn(this._camera.matrix, 0),
|
|
41198
|
-
const i = oe.copy(Os).add(
|
|
41199
|
+
this._camera.updateMatrix(), Os.setFromMatrixColumn(this._camera.matrix, 0), Bs.setFromMatrixColumn(this._camera.matrix, 1), Os.multiplyScalar(e), Bs.multiplyScalar(-t);
|
|
41200
|
+
const i = oe.copy(Os).add(Bs), n = Te.copy(this._targetEnd).add(i);
|
|
41199
41201
|
return this.moveTo(n.x, n.y, n.z, s);
|
|
41200
41202
|
}
|
|
41201
41203
|
/**
|
|
@@ -41389,9 +41391,9 @@ class zs extends NN {
|
|
|
41389
41391
|
* @category Methods
|
|
41390
41392
|
*/
|
|
41391
41393
|
setOrbitPoint(e, t, s) {
|
|
41392
|
-
this._camera.updateMatrixWorld(), Os.setFromMatrixColumn(this._camera.matrixWorldInverse, 0),
|
|
41394
|
+
this._camera.updateMatrixWorld(), Os.setFromMatrixColumn(this._camera.matrixWorldInverse, 0), Bs.setFromMatrixColumn(this._camera.matrixWorldInverse, 1), sn.setFromMatrixColumn(this._camera.matrixWorldInverse, 2);
|
|
41393
41395
|
const i = oe.set(e, t, s), n = i.distanceTo(this._camera.position), r = i.sub(this._camera.position);
|
|
41394
|
-
Os.multiplyScalar(r.x),
|
|
41396
|
+
Os.multiplyScalar(r.x), Bs.multiplyScalar(r.y), sn.multiplyScalar(r.z), oe.copy(Os).add(Bs).add(sn), oe.z = oe.z + n, this.dollyTo(n, !1), this.setFocalOffset(-oe.x, oe.y, -oe.z, !1), this.moveTo(e, t, s, !1);
|
|
41395
41397
|
}
|
|
41396
41398
|
/**
|
|
41397
41399
|
* Set the boundary box that encloses the target of the camera. box3 is in THREE.Box3
|
|
@@ -41607,7 +41609,7 @@ class zs extends NN {
|
|
|
41607
41609
|
}
|
|
41608
41610
|
this._camera.zoom !== this._zoom && (this._camera.zoom = this._zoom, this._camera.updateProjectionMatrix(), this._updateNearPlaneCorners(), this._needsUpdate = !0), this._dragNeedsUpdate = !0;
|
|
41609
41611
|
const l = this._collisionTest();
|
|
41610
|
-
this._spherical.radius = Math.min(this._spherical.radius, l), this._spherical.makeSafe(), this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target), this._camera.lookAt(this._target), (!Ue(this._focalOffset.x) || !Ue(this._focalOffset.y) || !Ue(this._focalOffset.z)) && (Os.setFromMatrixColumn(this._camera.matrix, 0),
|
|
41612
|
+
this._spherical.radius = Math.min(this._spherical.radius, l), this._spherical.makeSafe(), this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target), this._camera.lookAt(this._target), (!Ue(this._focalOffset.x) || !Ue(this._focalOffset.y) || !Ue(this._focalOffset.z)) && (Os.setFromMatrixColumn(this._camera.matrix, 0), Bs.setFromMatrixColumn(this._camera.matrix, 1), sn.setFromMatrixColumn(this._camera.matrix, 2), Os.multiplyScalar(this._focalOffset.x), Bs.multiplyScalar(-this._focalOffset.y), sn.multiplyScalar(this._focalOffset.z), oe.copy(Os).add(Bs).add(sn), this._camera.position.add(oe), this._camera.updateMatrixWorld()), this._boundaryEnclosesCamera && this._encloseToBoundary(this._camera.position.copy(this._target), oe.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse), 1);
|
|
41611
41613
|
const h = this._needsUpdate;
|
|
41612
41614
|
return h && !this._updatedLastTime ? (this._hasRested = !1, this.dispatchEvent({ type: "wake" }), this.dispatchEvent({ type: "update" })) : h ? (this.dispatchEvent({ type: "update" }), Ue(t, this.restThreshold) && Ue(s, this.restThreshold) && Ue(i, this.restThreshold) && Ue(n.x, this.restThreshold) && Ue(n.y, this.restThreshold) && Ue(n.z, this.restThreshold) && Ue(r.x, this.restThreshold) && Ue(r.y, this.restThreshold) && Ue(r.z, this.restThreshold) && Ue(o, this.restThreshold) && !this._hasRested && (this._hasRested = !0, this.dispatchEvent({ type: "rest" }))) : !h && this._updatedLastTime && this.dispatchEvent({ type: "sleep" }), this._lastDistance = this._spherical.radius, this._lastZoom = this._zoom, this._updatedLastTime = h, this._needsUpdate = !1, h;
|
|
41613
41615
|
}
|
|
@@ -41943,7 +41945,7 @@ void main() {
|
|
|
41943
41945
|
|
|
41944
41946
|
if (fragColor.a <= minAlpha) discard;
|
|
41945
41947
|
}`;
|
|
41946
|
-
class
|
|
41948
|
+
class BN extends Zm {
|
|
41947
41949
|
constructor(e) {
|
|
41948
41950
|
super({
|
|
41949
41951
|
extensions: {
|
|
@@ -41979,10 +41981,10 @@ class IN extends Zm {
|
|
|
41979
41981
|
});
|
|
41980
41982
|
}
|
|
41981
41983
|
}
|
|
41982
|
-
class
|
|
41984
|
+
class IN extends Y {
|
|
41983
41985
|
gridMaterial;
|
|
41984
41986
|
constructor(e) {
|
|
41985
|
-
const t = new
|
|
41987
|
+
const t = new BN(e);
|
|
41986
41988
|
super(new Km(), t), this.gridMaterial = t, this.frustumCulled = !1, this.name = "InfiniteGridHelper";
|
|
41987
41989
|
}
|
|
41988
41990
|
update() {
|
|
@@ -42284,7 +42286,7 @@ function Mh(a, e, t) {
|
|
|
42284
42286
|
return s[i];
|
|
42285
42287
|
return !1;
|
|
42286
42288
|
}
|
|
42287
|
-
const $o = new Jm(),
|
|
42289
|
+
const $o = new Jm(), Be = new Z(0, 1, 0), Cm = new Z(0, 0, 0), Mm = new Nl(), Wo = new es(), rl = new es(), Is = new Z(), Am = new Nl(), Ta = new Z(1, 0, 0), un = new Z(0, 1, 0), Sa = new Z(0, 0, 1), jo = new Z(), ua = new Z(), da = new Z();
|
|
42288
42290
|
class jN extends Tr {
|
|
42289
42291
|
constructor(e) {
|
|
42290
42292
|
super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
|
|
@@ -42549,10 +42551,10 @@ class qN extends Tr {
|
|
|
42549
42551
|
r.visible = !0, r.rotation.set(0, 0, 0), r.position.copy(this.worldPosition);
|
|
42550
42552
|
let o;
|
|
42551
42553
|
if (this.camera.isOrthographicCamera ? o = (this.camera.top - this.camera.bottom) / this.camera.zoom : o = this.worldPosition.distanceTo(this.cameraPosition) * Math.min(1.9 * Math.tan(Math.PI * this.camera.fov / 360) / this.camera.zoom, 7), r.scale.set(1, 1, 1).multiplyScalar(o * this.size / 4), r.tag === "helper") {
|
|
42552
|
-
r.visible = !1, r.name === "AXIS" ? (r.visible = !!this.axis, this.axis === "X" && (We.setFromEuler($o.set(0, 0, 0)), r.quaternion.copy(s).multiply(We), Math.abs(
|
|
42554
|
+
r.visible = !1, r.name === "AXIS" ? (r.visible = !!this.axis, this.axis === "X" && (We.setFromEuler($o.set(0, 0, 0)), r.quaternion.copy(s).multiply(We), Math.abs(Be.copy(Ta).applyQuaternion(s).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Y" && (We.setFromEuler($o.set(0, 0, Math.PI / 2)), r.quaternion.copy(s).multiply(We), Math.abs(Be.copy(un).applyQuaternion(s).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Z" && (We.setFromEuler($o.set(0, Math.PI / 2, 0)), r.quaternion.copy(s).multiply(We), Math.abs(Be.copy(Sa).applyQuaternion(s).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "XYZE" && (We.setFromEuler($o.set(0, Math.PI / 2, 0)), Be.copy(this.rotationAxis), r.quaternion.setFromRotationMatrix(Mm.lookAt(Cm, Be, un)), r.quaternion.multiply(We), r.visible = this.dragging), this.axis === "E" && (r.visible = !1)) : r.name === "START" ? (r.position.copy(this.worldPositionStart), r.visible = this.dragging) : r.name === "END" ? (r.position.copy(this.worldPosition), r.visible = this.dragging) : r.name === "DELTA" ? (r.position.copy(this.worldPositionStart), r.quaternion.copy(this.worldQuaternionStart), vt.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), vt.applyQuaternion(this.worldQuaternionStart.clone().invert()), r.scale.copy(vt), r.visible = this.dragging) : (r.quaternion.copy(s), this.dragging ? r.position.copy(this.worldPositionStart) : r.position.copy(this.worldPosition), this.axis && (r.visible = this.axis.search(r.name) !== -1));
|
|
42553
42555
|
continue;
|
|
42554
42556
|
}
|
|
42555
|
-
r.quaternion.copy(s), this.mode === "translate" || this.mode === "scale" ? (r.name === "X" && Math.abs(
|
|
42557
|
+
r.quaternion.copy(s), this.mode === "translate" || this.mode === "scale" ? (r.name === "X" && Math.abs(Be.copy(Ta).applyQuaternion(s).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Y" && Math.abs(Be.copy(un).applyQuaternion(s).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Z" && Math.abs(Be.copy(Sa).applyQuaternion(s).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XY" && Math.abs(Be.copy(Sa).applyQuaternion(s).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "YZ" && Math.abs(Be.copy(Ta).applyQuaternion(s).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XZ" && Math.abs(Be.copy(un).applyQuaternion(s).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1)) : this.mode === "rotate" && (Wo.copy(s), Be.copy(this.eye).applyQuaternion(We.copy(s).invert()), r.name.search("E") !== -1 && r.quaternion.setFromRotationMatrix(Mm.lookAt(this.eye, Cm, un)), r.name === "X" && (We.setFromAxisAngle(Ta, Math.atan2(-Be.y, Be.z)), We.multiplyQuaternions(Wo, We), r.quaternion.copy(We)), r.name === "Y" && (We.setFromAxisAngle(un, Math.atan2(Be.x, Be.z)), We.multiplyQuaternions(Wo, We), r.quaternion.copy(We)), r.name === "Z" && (We.setFromAxisAngle(Sa, Math.atan2(Be.y, Be.x)), We.multiplyQuaternions(Wo, We), r.quaternion.copy(We))), r.visible = r.visible && (r.name.indexOf("X") === -1 || this.showX), r.visible = r.visible && (r.name.indexOf("Y") === -1 || this.showY), r.visible = r.visible && (r.name.indexOf("Z") === -1 || this.showZ), r.visible = r.visible && (r.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), r.material._color = r.material._color || r.material.color.clone(), r.material._opacity = r.material._opacity || r.material.opacity, r.material.color.copy(r.material._color), r.material.opacity = r.material._opacity, this.enabled && this.axis && (r.name === this.axis || this.axis.split("").some(function(l) {
|
|
42556
42558
|
return r.name === l;
|
|
42557
42559
|
})) && (r.material.color.setHex(16776960), r.material.opacity = 1);
|
|
42558
42560
|
}
|
|
@@ -42568,39 +42570,39 @@ class YN extends Y {
|
|
|
42568
42570
|
}
|
|
42569
42571
|
updateMatrixWorld(e) {
|
|
42570
42572
|
let t = this.space;
|
|
42571
|
-
switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), jo.copy(Ta).applyQuaternion(t === "local" ? this.worldQuaternion : rl), ua.copy(un).applyQuaternion(t === "local" ? this.worldQuaternion : rl), da.copy(Sa).applyQuaternion(t === "local" ? this.worldQuaternion : rl),
|
|
42573
|
+
switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), jo.copy(Ta).applyQuaternion(t === "local" ? this.worldQuaternion : rl), ua.copy(un).applyQuaternion(t === "local" ? this.worldQuaternion : rl), da.copy(Sa).applyQuaternion(t === "local" ? this.worldQuaternion : rl), Be.copy(ua), this.mode) {
|
|
42572
42574
|
case "translate":
|
|
42573
42575
|
case "scale":
|
|
42574
42576
|
switch (this.axis) {
|
|
42575
42577
|
case "X":
|
|
42576
|
-
|
|
42578
|
+
Be.copy(this.eye).cross(jo), Is.copy(jo).cross(Be);
|
|
42577
42579
|
break;
|
|
42578
42580
|
case "Y":
|
|
42579
|
-
|
|
42581
|
+
Be.copy(this.eye).cross(ua), Is.copy(ua).cross(Be);
|
|
42580
42582
|
break;
|
|
42581
42583
|
case "Z":
|
|
42582
|
-
|
|
42584
|
+
Be.copy(this.eye).cross(da), Is.copy(da).cross(Be);
|
|
42583
42585
|
break;
|
|
42584
42586
|
case "XY":
|
|
42585
|
-
|
|
42587
|
+
Is.copy(da);
|
|
42586
42588
|
break;
|
|
42587
42589
|
case "YZ":
|
|
42588
|
-
|
|
42590
|
+
Is.copy(jo);
|
|
42589
42591
|
break;
|
|
42590
42592
|
case "XZ":
|
|
42591
|
-
|
|
42593
|
+
Be.copy(da), Is.copy(ua);
|
|
42592
42594
|
break;
|
|
42593
42595
|
case "XYZ":
|
|
42594
42596
|
case "E":
|
|
42595
|
-
|
|
42597
|
+
Is.set(0, 0, 0);
|
|
42596
42598
|
break;
|
|
42597
42599
|
}
|
|
42598
42600
|
break;
|
|
42599
42601
|
case "rotate":
|
|
42600
42602
|
default:
|
|
42601
|
-
|
|
42603
|
+
Is.set(0, 0, 0);
|
|
42602
42604
|
}
|
|
42603
|
-
|
|
42605
|
+
Is.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (Am.lookAt(vt.set(0, 0, 0), Is, Be), this.quaternion.setFromRotationMatrix(Am)), super.updateMatrixWorld(e);
|
|
42604
42606
|
}
|
|
42605
42607
|
}
|
|
42606
42608
|
class _t extends Dm {
|
|
@@ -43208,7 +43210,7 @@ class ut extends Ha {
|
|
|
43208
43210
|
helpersContainer = new Nx();
|
|
43209
43211
|
cameraHelpers = /* @__PURE__ */ new Map();
|
|
43210
43212
|
lightHelpers = /* @__PURE__ */ new Map();
|
|
43211
|
-
grid = new
|
|
43213
|
+
grid = new IN();
|
|
43212
43214
|
interactionHelper = new Px(25);
|
|
43213
43215
|
currentTransform;
|
|
43214
43216
|
// Tools
|
|
@@ -43278,11 +43280,11 @@ class ut extends Ha {
|
|
|
43278
43280
|
const n = {
|
|
43279
43281
|
Vector2: xt,
|
|
43280
43282
|
Vector3: Z,
|
|
43281
|
-
Vector4:
|
|
43283
|
+
Vector4: Ix,
|
|
43282
43284
|
Quaternion: es,
|
|
43283
43285
|
Matrix4: Nl,
|
|
43284
43286
|
Spherical: Dh,
|
|
43285
|
-
Box3:
|
|
43287
|
+
Box3: Bx,
|
|
43286
43288
|
Sphere: Ox,
|
|
43287
43289
|
Raycaster: Da
|
|
43288
43290
|
};
|
|
@@ -44576,8 +44578,8 @@ export {
|
|
|
44576
44578
|
wP as ElementProxy,
|
|
44577
44579
|
C_ as ElementProxyReceiver,
|
|
44578
44580
|
xn as ExportTexture,
|
|
44579
|
-
|
|
44580
|
-
|
|
44581
|
+
IN as InfiniteGridHelper,
|
|
44582
|
+
BN as InfiniteGridMaterial,
|
|
44581
44583
|
sP as Inspector,
|
|
44582
44584
|
ut as MultiView,
|
|
44583
44585
|
rg as NavButton,
|
|
@@ -44612,7 +44614,7 @@ export {
|
|
|
44612
44614
|
SP as generateCubemap,
|
|
44613
44615
|
m_ as getObjectMaterialObject,
|
|
44614
44616
|
f_ as getObjectMaterialProps,
|
|
44615
|
-
|
|
44617
|
+
Ih as hierarchyUUID,
|
|
44616
44618
|
bP as inspectComposer,
|
|
44617
44619
|
y_ as inspectComposerPass,
|
|
44618
44620
|
t_ as isColor,
|
|
@@ -44626,5 +44628,5 @@ export {
|
|
|
44626
44628
|
mP as rgbaToHex,
|
|
44627
44629
|
ws as round,
|
|
44628
44630
|
pP as roundTo,
|
|
44629
|
-
|
|
44631
|
+
Bh as totalThreeObjects
|
|
44630
44632
|
};
|