@tomorrowevening/hermes 0.1.14 → 0.1.16
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 +2 -2
- package/dist/hermes.es.js +674 -665
- package/package.json +1 -1
- package/types/core/remote/RemoteThree.d.ts +2 -1
package/dist/hermes.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { types as le, getProject as xx, createRafDriver as _x } from "@theatre/core";
|
|
2
|
-
import Wm, { useState as Ae, useEffect as wn, useRef as We, useMemo as
|
|
3
|
-
import { BufferGeometry as zi, Float32BufferAttribute as Vs, OrthographicCamera as dl, Texture as Gh, Scene as jm, MeshBasicMaterial as Sn, Mesh as Y, LinearSRGBColorSpace as Ia, ObjectLoader as Tx, AnimationMixer as Sx, AnimationClip as vx, Matrix4 as Ya, AlwaysStencilFunc as Zd, ReplaceStencilOp as Dn, NotEqualStencilFunc as Kd, EqualStencilFunc as Qd, KeepStencilOp as On, NormalBlending as qm, AddEquation as Xa, SrcAlphaFactor as Il, OneMinusSrcAlphaFactor as Ll, CustomBlending as Ul, OneFactor as kl, DstColorFactor as
|
|
2
|
+
import Wm, { useState as Ae, useEffect as wn, useRef as We, useMemo as Ca, Component as qa, createRef as Ni, forwardRef as bx } from "react";
|
|
3
|
+
import { BufferGeometry as zi, Float32BufferAttribute as Vs, OrthographicCamera as dl, Texture as Gh, Scene as jm, MeshBasicMaterial as Sn, Mesh as Y, LinearSRGBColorSpace as Ia, ObjectLoader as Tx, AnimationMixer as Sx, AnimationClip as vx, Matrix4 as Ya, AlwaysStencilFunc as Zd, ReplaceStencilOp as Dn, NotEqualStencilFunc as Kd, EqualStencilFunc as Qd, KeepStencilOp as On, NormalBlending as qm, AddEquation as Xa, SrcAlphaFactor as Il, OneMinusSrcAlphaFactor as Ll, CustomBlending as Ul, OneFactor as kl, DstColorFactor as Mu, OneMinusDstColorFactor as Au, WebGLRenderTarget as Ym, RGBAFormat as wx, EventDispatcher as Xm, RepeatWrapping as Jd, Color as En, ColorManagement as or, FrontSide as Ex, BackSide as Zm, DoubleSide as Ru, ZeroFactor as Km, SrcColorFactor as Qm, OneMinusSrcColorFactor as Jm, DstAlphaFactor as eg, OneMinusDstAlphaFactor as tg, SrcAlphaSaturateFactor as Cx, ConstantColorFactor as sg, OneMinusConstantColorFactor as ig, ConstantAlphaFactor as ng, OneMinusConstantAlphaFactor as rg, SubtractEquation as Mx, ReverseSubtractEquation as Ax, MinEquation as Rx, MaxEquation as Nx, NoBlending as Px, AdditiveBlending as Fx, SubtractiveBlending as Dx, MultiplyBlending as Ox, Line as Us, LineBasicMaterial as Nu, Controls as ag, Vector3 as Z, MOUSE as mr, TOUCH as lr, Quaternion as es, Spherical as Vh, Vector2 as xt, Ray as Bx, Plane as Ix, MathUtils as Lx, ShaderMaterial as og, GLSL3 as Ux, PlaneGeometry as lg, Raycaster as La, Object3D as Er, CylinderGeometry as zt, BoxGeometry as St, OctahedronGeometry as ro, TorusGeometry as Gr, SphereGeometry as cg, Euler as hg, CatmullRomCurve3 as ep, Group as kx, AxesHelper as zx, MeshDepthMaterial as Gx, MeshNormalMaterial as Vx, Sphere as Hx, Box3 as $x, Vector4 as Wx, WebGLRenderer as ga, PerspectiveCamera as tp, CameraHelper as jx, SkinnedMesh as qx, SpotLightHelper as Yx, PointLightHelper as Xx, HemisphereLightHelper as Zx, DirectionalLightHelper as Kx, Clock as Qx, SkeletonHelper as Jx, SRGBColorSpace as sp, NoToneMapping as ip, NoColorSpace as e_, LinearToneMapping as t_, ReinhardToneMapping as s_, CineonToneMapping as i_, ACESFilmicToneMapping as n_, AgXToneMapping as r_, NeutralToneMapping as a_, CustomToneMapping as o_ } from "three";
|
|
4
4
|
const pl = () => {
|
|
5
5
|
}, xP = () => {
|
|
6
6
|
};
|
|
@@ -167,9 +167,9 @@ const f_ = ({ mobileTiers: a = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
|
|
|
167
167
|
if ($ === 0) return;
|
|
168
168
|
const q = T.split(/[.,()\[\]/\s]/g).sort().filter((Te, lt, Ut) => lt === 0 || Te !== Ut[lt - 1]).join(" ");
|
|
169
169
|
let X, [Ee, , , , de] = $ > 1 ? W.map((Te) => [Te, d_(q, Te[2])]).sort(([, Te], [, lt]) => Te - lt)[0][0] : W[0], ye = Number.MAX_VALUE;
|
|
170
|
-
const { devicePixelRatio: se } = window,
|
|
170
|
+
const { devicePixelRatio: se } = window, Ce = c.width * se * c.height * se;
|
|
171
171
|
for (const Te of de) {
|
|
172
|
-
const [lt, Ut] = Te, kr = lt * Ut, Nn = Math.abs(
|
|
172
|
+
const [lt, Ut] = Te, kr = lt * Ut, Nn = Math.abs(Ce - kr);
|
|
173
173
|
Nn < ye && (ye = Nn, X = Te);
|
|
174
174
|
}
|
|
175
175
|
if (!X) return;
|
|
@@ -294,7 +294,7 @@ function EP() {
|
|
|
294
294
|
});
|
|
295
295
|
}, []), a;
|
|
296
296
|
}
|
|
297
|
-
async function
|
|
297
|
+
async function CP() {
|
|
298
298
|
for (; !document.getElementById("theatrejs-studio-root"); )
|
|
299
299
|
await new Promise((s) => setTimeout(s, 100));
|
|
300
300
|
const a = document.getElementById("theatrejs-studio-root");
|
|
@@ -315,7 +315,7 @@ async function MP() {
|
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function MP(a, e, t, s) {
|
|
319
319
|
s.sheetObject(a, e, {
|
|
320
320
|
transform: {
|
|
321
321
|
position: {
|
|
@@ -759,13 +759,13 @@ function kP(a) {
|
|
|
759
759
|
a.blending = Ul, a.blendEquation = Xa, a.blendSrc = Il, a.blendDst = kl, a.needsUpdate = !0;
|
|
760
760
|
}
|
|
761
761
|
function zP(a) {
|
|
762
|
-
a.blending = Ul, a.blendEquation = Xa, a.blendSrc =
|
|
762
|
+
a.blending = Ul, a.blendEquation = Xa, a.blendSrc = Mu, a.blendDst = Ll, a.needsUpdate = !0;
|
|
763
763
|
}
|
|
764
764
|
function GP(a) {
|
|
765
765
|
a.blending = Ul, a.blendEquation = Xa, a.blendSrc = Au, a.blendDst = kl, a.needsUpdate = !0;
|
|
766
766
|
}
|
|
767
767
|
let jh = [];
|
|
768
|
-
function
|
|
768
|
+
function C_(a, e, t = !0) {
|
|
769
769
|
_n.renderer = e.renderer;
|
|
770
770
|
const s = [];
|
|
771
771
|
s.push({
|
|
@@ -892,7 +892,7 @@ function M_(a, e, t = !0) {
|
|
|
892
892
|
}
|
|
893
893
|
function VP(a, e) {
|
|
894
894
|
a.passes.forEach((t) => {
|
|
895
|
-
|
|
895
|
+
C_(t, e);
|
|
896
896
|
});
|
|
897
897
|
}
|
|
898
898
|
function HP(a) {
|
|
@@ -973,7 +973,7 @@ const Ln = Fu([
|
|
|
973
973
|
"clientY",
|
|
974
974
|
"pageX",
|
|
975
975
|
"pageY"
|
|
976
|
-
]),
|
|
976
|
+
]), M_ = Fu([
|
|
977
977
|
"clientX",
|
|
978
978
|
"clientY",
|
|
979
979
|
"deltaX",
|
|
@@ -986,7 +986,7 @@ const Ln = Fu([
|
|
|
986
986
|
"keyCode"
|
|
987
987
|
]);
|
|
988
988
|
function R_(a, e) {
|
|
989
|
-
a.preventDefault(),
|
|
989
|
+
a.preventDefault(), M_(a, e);
|
|
990
990
|
}
|
|
991
991
|
function N_(a) {
|
|
992
992
|
a.preventDefault();
|
|
@@ -1895,7 +1895,7 @@ class ZP extends pg {
|
|
|
1895
1895
|
data: JSON.stringify({ group: e, prop: t, value: s })
|
|
1896
1896
|
});
|
|
1897
1897
|
}
|
|
1898
|
-
|
|
1898
|
+
addSplineCurve(e) {
|
|
1899
1899
|
setTimeout(() => {
|
|
1900
1900
|
this.send({
|
|
1901
1901
|
event: "addSpline",
|
|
@@ -1904,6 +1904,15 @@ class ZP extends pg {
|
|
|
1904
1904
|
});
|
|
1905
1905
|
}, 1);
|
|
1906
1906
|
}
|
|
1907
|
+
addSplineObject(e) {
|
|
1908
|
+
setTimeout(() => {
|
|
1909
|
+
this.send({
|
|
1910
|
+
event: "addSpline",
|
|
1911
|
+
target: "editor",
|
|
1912
|
+
data: JSON.stringify(e)
|
|
1913
|
+
});
|
|
1914
|
+
}, 1);
|
|
1915
|
+
}
|
|
1907
1916
|
// Renderer
|
|
1908
1917
|
setRenderer(e, t = null) {
|
|
1909
1918
|
if (this.renderer = e, this.canvas = e.domElement, this.inputElement = t !== null ? t : this.canvas, !this.debug) return;
|
|
@@ -2239,14 +2248,14 @@ function $_() {
|
|
|
2239
2248
|
}
|
|
2240
2249
|
return null;
|
|
2241
2250
|
}
|
|
2242
|
-
var q = Object.assign, X = 0, Ee, de, ye, se,
|
|
2251
|
+
var q = Object.assign, X = 0, Ee, de, ye, se, Ce, Ge, ot;
|
|
2243
2252
|
function Te() {
|
|
2244
2253
|
}
|
|
2245
2254
|
Te.__reactDisabledLog = !0;
|
|
2246
2255
|
function lt() {
|
|
2247
2256
|
{
|
|
2248
2257
|
if (X === 0) {
|
|
2249
|
-
Ee = console.log, de = console.info, ye = console.warn, se = console.error,
|
|
2258
|
+
Ee = console.log, de = console.info, ye = console.warn, se = console.error, Ce = console.group, Ge = console.groupCollapsed, ot = console.groupEnd;
|
|
2250
2259
|
var S = {
|
|
2251
2260
|
configurable: !0,
|
|
2252
2261
|
enumerable: !0,
|
|
@@ -2288,7 +2297,7 @@ function $_() {
|
|
|
2288
2297
|
value: se
|
|
2289
2298
|
}),
|
|
2290
2299
|
group: q({}, S, {
|
|
2291
|
-
value:
|
|
2300
|
+
value: Ce
|
|
2292
2301
|
}),
|
|
2293
2302
|
groupCollapsed: q({}, S, {
|
|
2294
2303
|
value: Ge
|
|
@@ -2741,15 +2750,15 @@ var pp;
|
|
|
2741
2750
|
function W_() {
|
|
2742
2751
|
return pp || (pp = 1, process.env.NODE_ENV === "production" ? oo.exports = H_() : oo.exports = $_()), oo.exports;
|
|
2743
2752
|
}
|
|
2744
|
-
var
|
|
2753
|
+
var C = W_();
|
|
2745
2754
|
function mg(a) {
|
|
2746
|
-
return a.title.search("<") > -1 ? /* @__PURE__ */
|
|
2755
|
+
return a.title.search("<") > -1 ? /* @__PURE__ */ C.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: a.title } }) : /* @__PURE__ */ C.jsx("button", { children: a.title });
|
|
2747
2756
|
}
|
|
2748
|
-
const j_ = /* @__PURE__ */
|
|
2749
|
-
/* @__PURE__ */
|
|
2750
|
-
/* @__PURE__ */
|
|
2751
|
-
/* @__PURE__ */
|
|
2752
|
-
] }), q_ = /* @__PURE__ */
|
|
2757
|
+
const j_ = /* @__PURE__ */ C.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
|
|
2758
|
+
/* @__PURE__ */ C.jsx("circle", { cx: "7", cy: "7", r: "6" }),
|
|
2759
|
+
/* @__PURE__ */ C.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
|
|
2760
|
+
/* @__PURE__ */ C.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
|
|
2761
|
+
] }), q_ = /* @__PURE__ */ C.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ C.jsx(
|
|
2753
2762
|
"path",
|
|
2754
2763
|
{
|
|
2755
2764
|
d: `M10.43,4H3.57C3.26,4,3,4.22,3,4.5v1C3,5.78,3.26,6,3.57,6h6.86C10.74,6,11,5.78,11,5.5v-1\r
|
|
@@ -2758,7 +2767,7 @@ C11,8.22,10.74,8,10.43,8z`
|
|
|
2758
2767
|
}
|
|
2759
2768
|
) });
|
|
2760
2769
|
function Y_(a) {
|
|
2761
|
-
return /* @__PURE__ */
|
|
2770
|
+
return /* @__PURE__ */ C.jsx(
|
|
2762
2771
|
"li",
|
|
2763
2772
|
{
|
|
2764
2773
|
className: `reorder-item ${a.draggingIndex === a.index ? "dragging" : ""}`,
|
|
@@ -2768,10 +2777,10 @@ function Y_(a) {
|
|
|
2768
2777
|
e.preventDefault(), a.onDragOver(a.index);
|
|
2769
2778
|
},
|
|
2770
2779
|
onDragEnd: a.onDragEnd,
|
|
2771
|
-
children: /* @__PURE__ */
|
|
2780
|
+
children: /* @__PURE__ */ C.jsxs("div", { children: [
|
|
2772
2781
|
q_,
|
|
2773
|
-
/* @__PURE__ */
|
|
2774
|
-
/* @__PURE__ */
|
|
2782
|
+
/* @__PURE__ */ C.jsx("span", { children: a.title }),
|
|
2783
|
+
/* @__PURE__ */ C.jsx("button", { className: "closeIcon", onClick: () => a.onDelete(a.index), children: j_ })
|
|
2775
2784
|
] })
|
|
2776
2785
|
}
|
|
2777
2786
|
);
|
|
@@ -2792,9 +2801,9 @@ function X_(a) {
|
|
|
2792
2801
|
a.onDragComplete(s), r(null);
|
|
2793
2802
|
};
|
|
2794
2803
|
let d = "dropdown draggable";
|
|
2795
|
-
return a.subdropdown && (d += " subdropdown"), /* @__PURE__ */
|
|
2796
|
-
/* @__PURE__ */
|
|
2797
|
-
/* @__PURE__ */
|
|
2804
|
+
return a.subdropdown && (d += " subdropdown"), /* @__PURE__ */ C.jsxs("div", { className: d, onMouseEnter: () => t(!0), onMouseLeave: () => t(!1), children: [
|
|
2805
|
+
/* @__PURE__ */ C.jsx(mg, { title: a.title }),
|
|
2806
|
+
/* @__PURE__ */ C.jsx("ul", { className: "reorder-list", style: { display: e ? "block" : "none" }, children: s.map((p, f) => /* @__PURE__ */ C.jsx(
|
|
2798
2807
|
Y_,
|
|
2799
2808
|
{
|
|
2800
2809
|
title: p,
|
|
@@ -2812,18 +2821,18 @@ function X_(a) {
|
|
|
2812
2821
|
function Z_(a) {
|
|
2813
2822
|
const [e, t] = Ae(!1), s = [];
|
|
2814
2823
|
a.options.map((n, r) => {
|
|
2815
|
-
a.onSelect !== void 0 && (n.onSelect = a.onSelect), s.push(/* @__PURE__ */
|
|
2824
|
+
a.onSelect !== void 0 && (n.onSelect = a.onSelect), s.push(/* @__PURE__ */ C.jsx(K_, { option: n }, r));
|
|
2816
2825
|
});
|
|
2817
2826
|
let i = "dropdown";
|
|
2818
|
-
return a.subdropdown && (i += " subdropdown"), /* @__PURE__ */
|
|
2827
|
+
return a.subdropdown && (i += " subdropdown"), /* @__PURE__ */ C.jsxs(
|
|
2819
2828
|
"div",
|
|
2820
2829
|
{
|
|
2821
2830
|
className: i,
|
|
2822
2831
|
onMouseEnter: () => t(!0),
|
|
2823
2832
|
onMouseLeave: () => t(!1),
|
|
2824
2833
|
children: [
|
|
2825
|
-
/* @__PURE__ */
|
|
2826
|
-
/* @__PURE__ */
|
|
2834
|
+
/* @__PURE__ */ C.jsx(mg, { title: a.title }),
|
|
2835
|
+
/* @__PURE__ */ C.jsx(
|
|
2827
2836
|
"ul",
|
|
2828
2837
|
{
|
|
2829
2838
|
style: { visibility: e ? "visible" : "hidden" },
|
|
@@ -2839,7 +2848,7 @@ function K_(a) {
|
|
|
2839
2848
|
let i;
|
|
2840
2849
|
switch (e.type) {
|
|
2841
2850
|
case "draggable":
|
|
2842
|
-
i = /* @__PURE__ */
|
|
2851
|
+
i = /* @__PURE__ */ C.jsx(
|
|
2843
2852
|
X_,
|
|
2844
2853
|
{
|
|
2845
2854
|
title: e.title,
|
|
@@ -2852,7 +2861,7 @@ function K_(a) {
|
|
|
2852
2861
|
);
|
|
2853
2862
|
break;
|
|
2854
2863
|
case "dropdown":
|
|
2855
|
-
i = /* @__PURE__ */
|
|
2864
|
+
i = /* @__PURE__ */ C.jsx(
|
|
2856
2865
|
Z_,
|
|
2857
2866
|
{
|
|
2858
2867
|
title: e.title,
|
|
@@ -2863,7 +2872,7 @@ function K_(a) {
|
|
|
2863
2872
|
);
|
|
2864
2873
|
break;
|
|
2865
2874
|
case "option":
|
|
2866
|
-
i = /* @__PURE__ */
|
|
2875
|
+
i = /* @__PURE__ */ C.jsx(
|
|
2867
2876
|
"button",
|
|
2868
2877
|
{
|
|
2869
2878
|
onClick: () => {
|
|
@@ -2874,14 +2883,14 @@ function K_(a) {
|
|
|
2874
2883
|
);
|
|
2875
2884
|
break;
|
|
2876
2885
|
}
|
|
2877
|
-
return /* @__PURE__ */
|
|
2886
|
+
return /* @__PURE__ */ C.jsx("li", { className: t === e.title ? "selected" : "", children: i }, gt());
|
|
2878
2887
|
}
|
|
2879
|
-
function
|
|
2888
|
+
function Ma(a) {
|
|
2880
2889
|
const [e, t] = Ae(a.open !== void 0 ? a.open : !1), [s, i] = Ae(a.visible !== void 0 ? a.visible : !1), n = !e || a.children === void 0, r = () => {
|
|
2881
2890
|
a.three.dispatchEvent({ type: ce.REMOVE_SCENE, value: a.scene });
|
|
2882
2891
|
};
|
|
2883
|
-
return /* @__PURE__ */
|
|
2884
|
-
/* @__PURE__ */
|
|
2892
|
+
return /* @__PURE__ */ C.jsxs("div", { className: `accordion ${n ? "hide" : ""}`, children: [
|
|
2893
|
+
/* @__PURE__ */ C.jsxs(
|
|
2885
2894
|
"button",
|
|
2886
2895
|
{
|
|
2887
2896
|
className: "toggle",
|
|
@@ -2890,19 +2899,19 @@ function Ca(a) {
|
|
|
2890
2899
|
a.onToggle !== void 0 && a.onToggle(o), t(o);
|
|
2891
2900
|
},
|
|
2892
2901
|
children: [
|
|
2893
|
-
/* @__PURE__ */
|
|
2902
|
+
/* @__PURE__ */ C.jsx(
|
|
2894
2903
|
"p",
|
|
2895
2904
|
{
|
|
2896
2905
|
className: `status ${e ? "open" : ""}`,
|
|
2897
2906
|
children: "Toggle"
|
|
2898
2907
|
}
|
|
2899
2908
|
),
|
|
2900
|
-
/* @__PURE__ */
|
|
2909
|
+
/* @__PURE__ */ C.jsx("p", { className: "label", children: fl(a.label) })
|
|
2901
2910
|
]
|
|
2902
2911
|
}
|
|
2903
2912
|
),
|
|
2904
|
-
a.onRefresh ? /* @__PURE__ */
|
|
2905
|
-
/* @__PURE__ */
|
|
2913
|
+
a.onRefresh ? /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
|
|
2914
|
+
/* @__PURE__ */ C.jsx(
|
|
2906
2915
|
"button",
|
|
2907
2916
|
{
|
|
2908
2917
|
className: "visibility",
|
|
@@ -2918,11 +2927,11 @@ function Ca(a) {
|
|
|
2918
2927
|
}
|
|
2919
2928
|
}
|
|
2920
2929
|
),
|
|
2921
|
-
/* @__PURE__ */
|
|
2922
|
-
/* @__PURE__ */
|
|
2930
|
+
/* @__PURE__ */ C.jsx("button", { className: "refresh", onClick: a.onRefresh }),
|
|
2931
|
+
/* @__PURE__ */ C.jsx("button", { className: "remove", onClick: r })
|
|
2923
2932
|
] }) : null,
|
|
2924
2933
|
a.button,
|
|
2925
|
-
/* @__PURE__ */
|
|
2934
|
+
/* @__PURE__ */ C.jsx("div", { className: e ? "open" : "", children: /* @__PURE__ */ C.jsx("div", { children: a.children }) }, Math.random())
|
|
2926
2935
|
] });
|
|
2927
2936
|
}
|
|
2928
2937
|
function gg(a) {
|
|
@@ -2930,7 +2939,7 @@ function gg(a) {
|
|
|
2930
2939
|
return console.log("Hermes - No child attached"), null;
|
|
2931
2940
|
const e = We(null), [t, s] = Ae(!1), i = a.child.children.length > 0, n = [];
|
|
2932
2941
|
return a.child.children.length > 0 && a.child.children.map((r, o) => {
|
|
2933
|
-
n.push(/* @__PURE__ */
|
|
2942
|
+
n.push(/* @__PURE__ */ C.jsx(gg, { child: r, three: a.three }, o));
|
|
2934
2943
|
}), wn(() => {
|
|
2935
2944
|
if (a.child) {
|
|
2936
2945
|
const r = a.child.uuid.split(".")[0], o = a.three.getScene(r);
|
|
@@ -2944,9 +2953,9 @@ function gg(a) {
|
|
|
2944
2953
|
else
|
|
2945
2954
|
console.log(`Hermes (ChildObject) - Can't find Scene: ${r} with child UUID: ${a.child.uuid}`, a.three.scenes, a.three.scene, o);
|
|
2946
2955
|
}
|
|
2947
|
-
}, [t]), /* @__PURE__ */
|
|
2948
|
-
/* @__PURE__ */
|
|
2949
|
-
i ? /* @__PURE__ */
|
|
2956
|
+
}, [t]), /* @__PURE__ */ C.jsxs("div", { className: "childObject", children: [
|
|
2957
|
+
/* @__PURE__ */ C.jsxs("div", { className: "child", children: [
|
|
2958
|
+
i ? /* @__PURE__ */ C.jsx(
|
|
2950
2959
|
"button",
|
|
2951
2960
|
{
|
|
2952
2961
|
className: "status",
|
|
@@ -2958,7 +2967,7 @@ function gg(a) {
|
|
|
2958
2967
|
}
|
|
2959
2968
|
}
|
|
2960
2969
|
) : null,
|
|
2961
|
-
/* @__PURE__ */
|
|
2970
|
+
/* @__PURE__ */ C.jsx(
|
|
2962
2971
|
"button",
|
|
2963
2972
|
{
|
|
2964
2973
|
className: "name",
|
|
@@ -2971,7 +2980,7 @@ function gg(a) {
|
|
|
2971
2980
|
children: a.child.name.length > 0 ? `${a.child.name} (${a.child.type})` : `${a.child.type}::${a.child.uuid}`
|
|
2972
2981
|
}
|
|
2973
2982
|
),
|
|
2974
|
-
/* @__PURE__ */
|
|
2983
|
+
/* @__PURE__ */ C.jsx(
|
|
2975
2984
|
"button",
|
|
2976
2985
|
{
|
|
2977
2986
|
className: "visibility",
|
|
@@ -2992,16 +3001,16 @@ function gg(a) {
|
|
|
2992
3001
|
}
|
|
2993
3002
|
}
|
|
2994
3003
|
),
|
|
2995
|
-
/* @__PURE__ */
|
|
3004
|
+
/* @__PURE__ */ C.jsx("div", { className: `icon ${U_(a.child)}` })
|
|
2996
3005
|
] }),
|
|
2997
|
-
/* @__PURE__ */
|
|
3006
|
+
/* @__PURE__ */ C.jsx("div", { className: t ? "open" : "", children: /* @__PURE__ */ C.jsx("div", { className: "container", children: n }) })
|
|
2998
3007
|
] }, Math.random());
|
|
2999
3008
|
}
|
|
3000
3009
|
function yc(a) {
|
|
3001
3010
|
const e = [];
|
|
3002
3011
|
return a.child?.children.map((t, s) => {
|
|
3003
|
-
e.push(/* @__PURE__ */
|
|
3004
|
-
}), /* @__PURE__ */
|
|
3012
|
+
e.push(/* @__PURE__ */ C.jsx(gg, { child: t, scene: a.scene, three: a.three }, s));
|
|
3013
|
+
}), /* @__PURE__ */ C.jsx("div", { className: `scene ${a.class !== void 0 ? a.class : ""}`, children: e });
|
|
3005
3014
|
}
|
|
3006
3015
|
function ya(a) {
|
|
3007
3016
|
const [e, t] = Ae(a.defaultValue);
|
|
@@ -3039,8 +3048,8 @@ function bn(a) {
|
|
|
3039
3048
|
onChange: (n) => {
|
|
3040
3049
|
i(n), a.onChange !== void 0 && a.onChange(a.prop, n);
|
|
3041
3050
|
}
|
|
3042
|
-
}), /* @__PURE__ */
|
|
3043
|
-
a.type === "number" && /* @__PURE__ */
|
|
3051
|
+
}), /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
|
|
3052
|
+
a.type === "number" && /* @__PURE__ */ C.jsx(
|
|
3044
3053
|
"input",
|
|
3045
3054
|
{
|
|
3046
3055
|
alt: a.alt,
|
|
@@ -3060,8 +3069,8 @@ function bn(a) {
|
|
|
3060
3069
|
}
|
|
3061
3070
|
}
|
|
3062
3071
|
),
|
|
3063
|
-
a.type === "range" && /* @__PURE__ */
|
|
3064
|
-
/* @__PURE__ */
|
|
3072
|
+
a.type === "range" && /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
|
|
3073
|
+
/* @__PURE__ */ C.jsx(
|
|
3065
3074
|
"input",
|
|
3066
3075
|
{
|
|
3067
3076
|
type: "text",
|
|
@@ -3077,7 +3086,7 @@ function bn(a) {
|
|
|
3077
3086
|
}
|
|
3078
3087
|
}
|
|
3079
3088
|
),
|
|
3080
|
-
/* @__PURE__ */
|
|
3089
|
+
/* @__PURE__ */ C.jsx(
|
|
3081
3090
|
"input",
|
|
3082
3091
|
{
|
|
3083
3092
|
disabled: a.disabled,
|
|
@@ -3162,11 +3171,11 @@ function Q_(a) {
|
|
|
3162
3171
|
r.current.style.left = `${Hh(m.min, m.max, u) * 100}%`, r.current.style.top = `${(1 - Hh(m.min, m.max, p)) * 100}%`;
|
|
3163
3172
|
}, [m, u, p]);
|
|
3164
3173
|
const A = a.step !== void 0 ? a.step : 0.01;
|
|
3165
|
-
return /* @__PURE__ */
|
|
3166
|
-
/* @__PURE__ */
|
|
3167
|
-
/* @__PURE__ */
|
|
3168
|
-
/* @__PURE__ */
|
|
3169
|
-
/* @__PURE__ */
|
|
3174
|
+
return /* @__PURE__ */ C.jsxs("div", { className: "vector2", children: [
|
|
3175
|
+
/* @__PURE__ */ C.jsxs("div", { className: "fields", children: [
|
|
3176
|
+
/* @__PURE__ */ C.jsxs("div", { children: [
|
|
3177
|
+
/* @__PURE__ */ C.jsx("span", { ref: o, children: "X" }),
|
|
3178
|
+
/* @__PURE__ */ C.jsx(
|
|
3170
3179
|
"input",
|
|
3171
3180
|
{
|
|
3172
3181
|
ref: e,
|
|
@@ -3184,9 +3193,9 @@ function Q_(a) {
|
|
|
3184
3193
|
}
|
|
3185
3194
|
)
|
|
3186
3195
|
] }),
|
|
3187
|
-
/* @__PURE__ */
|
|
3188
|
-
/* @__PURE__ */
|
|
3189
|
-
/* @__PURE__ */
|
|
3196
|
+
/* @__PURE__ */ C.jsxs("div", { children: [
|
|
3197
|
+
/* @__PURE__ */ C.jsx("span", { ref: l, children: "Y" }),
|
|
3198
|
+
/* @__PURE__ */ C.jsx(
|
|
3190
3199
|
"input",
|
|
3191
3200
|
{
|
|
3192
3201
|
ref: t,
|
|
@@ -3204,9 +3213,9 @@ function Q_(a) {
|
|
|
3204
3213
|
}
|
|
3205
3214
|
)
|
|
3206
3215
|
] }),
|
|
3207
|
-
/* @__PURE__ */
|
|
3208
|
-
/* @__PURE__ */
|
|
3209
|
-
/* @__PURE__ */
|
|
3216
|
+
/* @__PURE__ */ C.jsxs("div", { children: [
|
|
3217
|
+
/* @__PURE__ */ C.jsx("span", { ref: c, children: "Min" }),
|
|
3218
|
+
/* @__PURE__ */ C.jsx(
|
|
3210
3219
|
"input",
|
|
3211
3220
|
{
|
|
3212
3221
|
ref: s,
|
|
@@ -3218,9 +3227,9 @@ function Q_(a) {
|
|
|
3218
3227
|
}
|
|
3219
3228
|
)
|
|
3220
3229
|
] }),
|
|
3221
|
-
/* @__PURE__ */
|
|
3222
|
-
/* @__PURE__ */
|
|
3223
|
-
/* @__PURE__ */
|
|
3230
|
+
/* @__PURE__ */ C.jsxs("div", { children: [
|
|
3231
|
+
/* @__PURE__ */ C.jsx("span", { ref: h, children: "Max" }),
|
|
3232
|
+
/* @__PURE__ */ C.jsx(
|
|
3224
3233
|
"input",
|
|
3225
3234
|
{
|
|
3226
3235
|
ref: i,
|
|
@@ -3233,16 +3242,16 @@ function Q_(a) {
|
|
|
3233
3242
|
)
|
|
3234
3243
|
] })
|
|
3235
3244
|
] }),
|
|
3236
|
-
/* @__PURE__ */
|
|
3237
|
-
/* @__PURE__ */
|
|
3238
|
-
/* @__PURE__ */
|
|
3239
|
-
/* @__PURE__ */
|
|
3245
|
+
/* @__PURE__ */ C.jsxs("div", { className: "input", ref: n, onMouseDown: _, onMouseUp: b, children: [
|
|
3246
|
+
/* @__PURE__ */ C.jsx("div", { className: "x" }),
|
|
3247
|
+
/* @__PURE__ */ C.jsx("div", { className: "y" }),
|
|
3248
|
+
/* @__PURE__ */ C.jsx("div", { className: "pt", ref: r })
|
|
3240
3249
|
] })
|
|
3241
3250
|
] });
|
|
3242
3251
|
}
|
|
3243
3252
|
const bt = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "2a", "2b", "2c", "2d", "2e", "2f", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "3a", "3b", "3c", "3d", "3e", "3f", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af", "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf", "c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df", "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff"];
|
|
3244
3253
|
let fp = 1234567;
|
|
3245
|
-
const Aa = Math.PI / 180,
|
|
3254
|
+
const Aa = Math.PI / 180, Cr = 180 / Math.PI;
|
|
3246
3255
|
function ni() {
|
|
3247
3256
|
const a = Math.random() * 4294967295 | 0, e = Math.random() * 4294967295 | 0, t = Math.random() * 4294967295 | 0, s = Math.random() * 4294967295 | 0;
|
|
3248
3257
|
return (bt[a & 255] + bt[a >> 8 & 255] + bt[a >> 16 & 255] + bt[a >> 24 & 255] + "-" + bt[e & 255] + bt[e >> 8 & 255] + "-" + bt[e >> 16 & 15 | 64] + bt[e >> 24 & 255] + "-" + bt[t & 63 | 128] + bt[t >> 8 & 255] + "-" + bt[t >> 16 & 255] + bt[t >> 24 & 255] + bt[s & 255] + bt[s >> 8 & 255] + bt[s >> 16 & 255] + bt[s >> 24 & 255]).toLowerCase();
|
|
@@ -3292,7 +3301,7 @@ function ml(a) {
|
|
|
3292
3301
|
return a * Aa;
|
|
3293
3302
|
}
|
|
3294
3303
|
function yg(a) {
|
|
3295
|
-
return a *
|
|
3304
|
+
return a * Cr;
|
|
3296
3305
|
}
|
|
3297
3306
|
function lb(a) {
|
|
3298
3307
|
return (a & a - 1) === 0 && a !== 0;
|
|
@@ -3370,7 +3379,7 @@ function ae(a, e) {
|
|
|
3370
3379
|
}
|
|
3371
3380
|
const db = {
|
|
3372
3381
|
DEG2RAD: Aa,
|
|
3373
|
-
RAD2DEG:
|
|
3382
|
+
RAD2DEG: Cr,
|
|
3374
3383
|
/**
|
|
3375
3384
|
* Generate a [UUID]{@link https://en.wikipedia.org/wiki/Universally_unique_identifier}
|
|
3376
3385
|
* (universally unique identifier).
|
|
@@ -3615,13 +3624,13 @@ const db = {
|
|
|
3615
3624
|
function mp(a) {
|
|
3616
3625
|
const e = a.value.x !== void 0 && a.value.y !== void 0 && a.value.z !== void 0, t = a.value.isEuler !== void 0, s = a.value.elements !== void 0, i = a.step !== void 0 ? a.step : 0.01, n = [];
|
|
3617
3626
|
if (t) {
|
|
3618
|
-
const r =
|
|
3627
|
+
const r = Ca(() => a.value, []);
|
|
3619
3628
|
["_x", "_y", "_z"].forEach((l) => {
|
|
3620
3629
|
const c = We(null);
|
|
3621
3630
|
n.push(
|
|
3622
|
-
/* @__PURE__ */
|
|
3623
|
-
/* @__PURE__ */
|
|
3624
|
-
/* @__PURE__ */
|
|
3631
|
+
/* @__PURE__ */ C.jsxs("div", { children: [
|
|
3632
|
+
/* @__PURE__ */ C.jsx("span", { ref: c, children: l.substring(1).toUpperCase() }),
|
|
3633
|
+
/* @__PURE__ */ C.jsx(
|
|
3625
3634
|
bn,
|
|
3626
3635
|
{
|
|
3627
3636
|
value: yg(r[l]),
|
|
@@ -3638,15 +3647,15 @@ function mp(a) {
|
|
|
3638
3647
|
);
|
|
3639
3648
|
});
|
|
3640
3649
|
} else if (e) {
|
|
3641
|
-
const r =
|
|
3650
|
+
const r = Ca(() => a.value, []), o = (c, h) => {
|
|
3642
3651
|
r[c] = h, a.onChange({ target: { value: r } });
|
|
3643
3652
|
};
|
|
3644
3653
|
["x", "y", "z"].forEach((c) => {
|
|
3645
3654
|
const h = We(null);
|
|
3646
3655
|
n.push(
|
|
3647
|
-
/* @__PURE__ */
|
|
3648
|
-
/* @__PURE__ */
|
|
3649
|
-
/* @__PURE__ */
|
|
3656
|
+
/* @__PURE__ */ C.jsxs("div", { children: [
|
|
3657
|
+
/* @__PURE__ */ C.jsx("label", { ref: h, children: c.toUpperCase() }),
|
|
3658
|
+
/* @__PURE__ */ C.jsx(
|
|
3650
3659
|
bn,
|
|
3651
3660
|
{
|
|
3652
3661
|
value: r[c],
|
|
@@ -3661,16 +3670,16 @@ function mp(a) {
|
|
|
3661
3670
|
);
|
|
3662
3671
|
});
|
|
3663
3672
|
} else if (s) {
|
|
3664
|
-
const r =
|
|
3673
|
+
const r = Ca(() => a.value, []), o = (l, c) => {
|
|
3665
3674
|
const h = Number(l);
|
|
3666
3675
|
r.elements[h] = c, a.onChange({ target: { value: r } });
|
|
3667
3676
|
};
|
|
3668
3677
|
for (let l = 0; l < 9; l++) {
|
|
3669
3678
|
const c = We(null);
|
|
3670
3679
|
n.push(
|
|
3671
|
-
/* @__PURE__ */
|
|
3672
|
-
/* @__PURE__ */
|
|
3673
|
-
/* @__PURE__ */
|
|
3680
|
+
/* @__PURE__ */ C.jsxs("div", { children: [
|
|
3681
|
+
/* @__PURE__ */ C.jsx("label", { ref: c, children: l + 1 }),
|
|
3682
|
+
/* @__PURE__ */ C.jsx(
|
|
3674
3683
|
bn,
|
|
3675
3684
|
{
|
|
3676
3685
|
value: r.elements[l],
|
|
@@ -3685,20 +3694,20 @@ function mp(a) {
|
|
|
3685
3694
|
);
|
|
3686
3695
|
}
|
|
3687
3696
|
}
|
|
3688
|
-
return /* @__PURE__ */
|
|
3697
|
+
return /* @__PURE__ */ C.jsx("div", { className: "grid3", children: n }, Math.random().toString());
|
|
3689
3698
|
}
|
|
3690
3699
|
function pb(a) {
|
|
3691
3700
|
const e = a.value.x !== void 0, t = a.step !== void 0 ? a.step : 0.01, s = [];
|
|
3692
3701
|
if (e) {
|
|
3693
|
-
const i =
|
|
3702
|
+
const i = Ca(() => a.value, []), n = (o, l) => {
|
|
3694
3703
|
i[o] = l, a.onChange({ target: { value: i } });
|
|
3695
3704
|
};
|
|
3696
3705
|
["x", "y", "z", "w"].forEach((o) => {
|
|
3697
3706
|
const l = We(null);
|
|
3698
3707
|
s.push(
|
|
3699
|
-
/* @__PURE__ */
|
|
3700
|
-
/* @__PURE__ */
|
|
3701
|
-
/* @__PURE__ */
|
|
3708
|
+
/* @__PURE__ */ C.jsxs("div", { children: [
|
|
3709
|
+
/* @__PURE__ */ C.jsx("label", { ref: l, children: o.toUpperCase() }),
|
|
3710
|
+
/* @__PURE__ */ C.jsx(
|
|
3702
3711
|
bn,
|
|
3703
3712
|
{
|
|
3704
3713
|
value: i[o],
|
|
@@ -3713,16 +3722,16 @@ function pb(a) {
|
|
|
3713
3722
|
);
|
|
3714
3723
|
});
|
|
3715
3724
|
} else {
|
|
3716
|
-
const i =
|
|
3725
|
+
const i = Ca(() => a.value, []), n = (r, o) => {
|
|
3717
3726
|
const l = Number(r);
|
|
3718
3727
|
i.elements[l] = o, a.onChange({ target: { value: i } });
|
|
3719
3728
|
};
|
|
3720
3729
|
for (let r = 0; r < 16; r++) {
|
|
3721
3730
|
const o = We(null);
|
|
3722
3731
|
s.push(
|
|
3723
|
-
/* @__PURE__ */
|
|
3724
|
-
/* @__PURE__ */
|
|
3725
|
-
/* @__PURE__ */
|
|
3732
|
+
/* @__PURE__ */ C.jsxs("div", { children: [
|
|
3733
|
+
/* @__PURE__ */ C.jsx("span", { ref: o, children: r + 1 }),
|
|
3734
|
+
/* @__PURE__ */ C.jsx(
|
|
3726
3735
|
bn,
|
|
3727
3736
|
{
|
|
3728
3737
|
value: i.elements[r],
|
|
@@ -3737,7 +3746,7 @@ function pb(a) {
|
|
|
3737
3746
|
);
|
|
3738
3747
|
}
|
|
3739
3748
|
}
|
|
3740
|
-
return /* @__PURE__ */
|
|
3749
|
+
return /* @__PURE__ */ C.jsx("div", { className: "grid4", children: s });
|
|
3741
3750
|
}
|
|
3742
3751
|
function fb(a) {
|
|
3743
3752
|
return !(a === "defaultAttributeValues" || a === "forceSinglePass" || a === "linecap" || a === "linejoin" || a === "linewidth" || a === "normalMapType" || a === "precision" || a === "shadowSide" || a === "uniformsGroups" || a === "uniformsNeedUpdate" || a === "userData" || a === "version" || a === "wireframeLinecap" || a === "wireframeLinejoin" || a === "wireframeLinewidth" || a.slice(0, 4) === "clip" || a.slice(0, 7) === "polygon" || a.slice(0, 7) === "stencil" || a.slice(0, 2) === "is");
|
|
@@ -4058,7 +4067,7 @@ const yb = [
|
|
|
4058
4067
|
},
|
|
4059
4068
|
{
|
|
4060
4069
|
title: "Subtract",
|
|
4061
|
-
value:
|
|
4070
|
+
value: Mx
|
|
4062
4071
|
},
|
|
4063
4072
|
{
|
|
4064
4073
|
title: "Reverse Subtract",
|
|
@@ -4107,7 +4116,7 @@ const yb = [
|
|
|
4107
4116
|
},
|
|
4108
4117
|
{
|
|
4109
4118
|
title: "Dst Color",
|
|
4110
|
-
value:
|
|
4119
|
+
value: Mu
|
|
4111
4120
|
},
|
|
4112
4121
|
{
|
|
4113
4122
|
title: "One Minus Dst Color",
|
|
@@ -4115,7 +4124,7 @@ const yb = [
|
|
|
4115
4124
|
},
|
|
4116
4125
|
{
|
|
4117
4126
|
title: "Src Alpha Saturate",
|
|
4118
|
-
value:
|
|
4127
|
+
value: Cx
|
|
4119
4128
|
},
|
|
4120
4129
|
{
|
|
4121
4130
|
title: "Constant Color",
|
|
@@ -4168,7 +4177,7 @@ const yb = [
|
|
|
4168
4177
|
},
|
|
4169
4178
|
{
|
|
4170
4179
|
title: "Dst Color",
|
|
4171
|
-
value:
|
|
4180
|
+
value: Mu
|
|
4172
4181
|
},
|
|
4173
4182
|
{
|
|
4174
4183
|
title: "One Minus Dst Color",
|
|
@@ -4288,10 +4297,10 @@ function wb(a, e, t, s) {
|
|
|
4288
4297
|
function Eb(a) {
|
|
4289
4298
|
return a.x !== void 0 && a.y !== void 0 && a.z === void 0;
|
|
4290
4299
|
}
|
|
4291
|
-
function
|
|
4300
|
+
function Cb(a) {
|
|
4292
4301
|
return a.x !== void 0 && a.y !== void 0 && a.z !== void 0 && a.w === void 0;
|
|
4293
4302
|
}
|
|
4294
|
-
function
|
|
4303
|
+
function Mb(a) {
|
|
4295
4304
|
return a.x !== void 0 && a.y !== void 0 && a.z !== void 0 && a.w !== void 0;
|
|
4296
4305
|
}
|
|
4297
4306
|
function qh(a) {
|
|
@@ -4385,7 +4394,7 @@ function xa(a, e, t, s, i = "", n = !1) {
|
|
|
4385
4394
|
}
|
|
4386
4395
|
}
|
|
4387
4396
|
};
|
|
4388
|
-
if (
|
|
4397
|
+
if (Cb(e))
|
|
4389
4398
|
return {
|
|
4390
4399
|
title: r,
|
|
4391
4400
|
prop: o,
|
|
@@ -4401,7 +4410,7 @@ function xa(a, e, t, s, i = "", n = !1) {
|
|
|
4401
4410
|
}
|
|
4402
4411
|
}
|
|
4403
4412
|
};
|
|
4404
|
-
if (
|
|
4413
|
+
if (Mb(e))
|
|
4405
4414
|
return {
|
|
4406
4415
|
title: r,
|
|
4407
4416
|
prop: o,
|
|
@@ -4558,7 +4567,7 @@ function Ab(a, e) {
|
|
|
4558
4567
|
const o = [], l = r.length;
|
|
4559
4568
|
for (let c = 0; c < l; c++)
|
|
4560
4569
|
o.push(
|
|
4561
|
-
/* @__PURE__ */
|
|
4570
|
+
/* @__PURE__ */ C.jsx(
|
|
4562
4571
|
ms,
|
|
4563
4572
|
{
|
|
4564
4573
|
three: e,
|
|
@@ -4568,9 +4577,9 @@ function Ab(a, e) {
|
|
|
4568
4577
|
`Material ${c}`
|
|
4569
4578
|
)
|
|
4570
4579
|
);
|
|
4571
|
-
return /* @__PURE__ */
|
|
4580
|
+
return /* @__PURE__ */ C.jsx(C.Fragment, { children: o });
|
|
4572
4581
|
} else
|
|
4573
|
-
return /* @__PURE__ */
|
|
4582
|
+
return /* @__PURE__ */ C.jsx(
|
|
4574
4583
|
ms,
|
|
4575
4584
|
{
|
|
4576
4585
|
three: e,
|
|
@@ -4613,16 +4622,16 @@ function Rb(a) {
|
|
|
4613
4622
|
break;
|
|
4614
4623
|
}
|
|
4615
4624
|
}
|
|
4616
|
-
return /* @__PURE__ */
|
|
4617
|
-
/* @__PURE__ */
|
|
4625
|
+
return /* @__PURE__ */ C.jsxs("div", { className: "imageField", children: [
|
|
4626
|
+
/* @__PURE__ */ C.jsx("img", { alt: a.title, ref: t, onClick: () => {
|
|
4618
4627
|
gb().then((x) => {
|
|
4619
4628
|
t.current.src = x, y(x, l, h, d, f);
|
|
4620
4629
|
});
|
|
4621
4630
|
}, src: o.src.length > 0 ? o.src : yp }),
|
|
4622
|
-
/* @__PURE__ */
|
|
4623
|
-
/* @__PURE__ */
|
|
4624
|
-
/* @__PURE__ */
|
|
4625
|
-
/* @__PURE__ */
|
|
4631
|
+
/* @__PURE__ */ C.jsxs("div", { className: "fields", children: [
|
|
4632
|
+
/* @__PURE__ */ C.jsxs("div", { children: [
|
|
4633
|
+
/* @__PURE__ */ C.jsx("span", { children: "Offset:" }),
|
|
4634
|
+
/* @__PURE__ */ C.jsx(
|
|
4626
4635
|
"input",
|
|
4627
4636
|
{
|
|
4628
4637
|
ref: s,
|
|
@@ -4633,7 +4642,7 @@ function Rb(a) {
|
|
|
4633
4642
|
onChange: g
|
|
4634
4643
|
}
|
|
4635
4644
|
),
|
|
4636
|
-
/* @__PURE__ */
|
|
4645
|
+
/* @__PURE__ */ C.jsx(
|
|
4637
4646
|
"input",
|
|
4638
4647
|
{
|
|
4639
4648
|
ref: i,
|
|
@@ -4645,9 +4654,9 @@ function Rb(a) {
|
|
|
4645
4654
|
}
|
|
4646
4655
|
)
|
|
4647
4656
|
] }),
|
|
4648
|
-
/* @__PURE__ */
|
|
4649
|
-
/* @__PURE__ */
|
|
4650
|
-
/* @__PURE__ */
|
|
4657
|
+
/* @__PURE__ */ C.jsxs("div", { children: [
|
|
4658
|
+
/* @__PURE__ */ C.jsx("span", { children: "Repeat:" }),
|
|
4659
|
+
/* @__PURE__ */ C.jsx(
|
|
4651
4660
|
"input",
|
|
4652
4661
|
{
|
|
4653
4662
|
ref: n,
|
|
@@ -4658,7 +4667,7 @@ function Rb(a) {
|
|
|
4658
4667
|
onChange: g
|
|
4659
4668
|
}
|
|
4660
4669
|
),
|
|
4661
|
-
/* @__PURE__ */
|
|
4670
|
+
/* @__PURE__ */ C.jsx(
|
|
4662
4671
|
"input",
|
|
4663
4672
|
{
|
|
4664
4673
|
ref: r,
|
|
@@ -4670,7 +4679,7 @@ function Rb(a) {
|
|
|
4670
4679
|
}
|
|
4671
4680
|
)
|
|
4672
4681
|
] }),
|
|
4673
|
-
/* @__PURE__ */
|
|
4682
|
+
/* @__PURE__ */ C.jsx("button", { onClick: () => {
|
|
4674
4683
|
y("", l, h, d, f), t.current.src = yp;
|
|
4675
4684
|
}, children: "Clear" })
|
|
4676
4685
|
] })
|
|
@@ -4693,9 +4702,9 @@ function el(a) {
|
|
|
4693
4702
|
a.disabled && (r.opacity = 0.8);
|
|
4694
4703
|
const o = a.type === "field" || a.type === "string" && (t.length > 100 || t.search(`
|
|
4695
4704
|
`) > -1), l = o || a.type === "image" || a.type === "vector2";
|
|
4696
|
-
return /* @__PURE__ */
|
|
4697
|
-
a.type !== "button" && /* @__PURE__ */
|
|
4698
|
-
a.type === "string" && !o && /* @__PURE__ */
|
|
4705
|
+
return /* @__PURE__ */ C.jsxs("div", { className: `field ${l ? "block" : ""}`, style: r, children: [
|
|
4706
|
+
a.type !== "button" && /* @__PURE__ */ C.jsx("span", { ref: i, children: fl(a.title) }, "fieldLabel"),
|
|
4707
|
+
a.type === "string" && !o && /* @__PURE__ */ C.jsx(
|
|
4699
4708
|
"input",
|
|
4700
4709
|
{
|
|
4701
4710
|
type: "text",
|
|
@@ -4705,7 +4714,7 @@ function el(a) {
|
|
|
4705
4714
|
name: gt()
|
|
4706
4715
|
}
|
|
4707
4716
|
),
|
|
4708
|
-
(a.type === "field" || a.type === "string" && o) && /* @__PURE__ */
|
|
4717
|
+
(a.type === "field" || a.type === "string" && o) && /* @__PURE__ */ C.jsx(
|
|
4709
4718
|
"textarea",
|
|
4710
4719
|
{
|
|
4711
4720
|
cols: 50,
|
|
@@ -4719,7 +4728,7 @@ function el(a) {
|
|
|
4719
4728
|
name: gt()
|
|
4720
4729
|
}
|
|
4721
4730
|
),
|
|
4722
|
-
a.type === "boolean" && /* @__PURE__ */
|
|
4731
|
+
a.type === "boolean" && /* @__PURE__ */ C.jsx(
|
|
4723
4732
|
"input",
|
|
4724
4733
|
{
|
|
4725
4734
|
type: "checkbox",
|
|
@@ -4729,7 +4738,7 @@ function el(a) {
|
|
|
4729
4738
|
name: gt()
|
|
4730
4739
|
}
|
|
4731
4740
|
),
|
|
4732
|
-
a.type === "number" && /* @__PURE__ */
|
|
4741
|
+
a.type === "number" && /* @__PURE__ */ C.jsx(
|
|
4733
4742
|
bn,
|
|
4734
4743
|
{
|
|
4735
4744
|
value: t,
|
|
@@ -4743,7 +4752,7 @@ function el(a) {
|
|
|
4743
4752
|
onChange: a.onChange
|
|
4744
4753
|
}
|
|
4745
4754
|
),
|
|
4746
|
-
a.type === "range" && /* @__PURE__ */
|
|
4755
|
+
a.type === "range" && /* @__PURE__ */ C.jsx(
|
|
4747
4756
|
bn,
|
|
4748
4757
|
{
|
|
4749
4758
|
value: t,
|
|
@@ -4757,11 +4766,11 @@ function el(a) {
|
|
|
4757
4766
|
onChange: a.onChange
|
|
4758
4767
|
}
|
|
4759
4768
|
),
|
|
4760
|
-
a.type === "color" && /* @__PURE__ */
|
|
4761
|
-
/* @__PURE__ */
|
|
4762
|
-
/* @__PURE__ */
|
|
4769
|
+
a.type === "color" && /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
|
|
4770
|
+
/* @__PURE__ */ C.jsx("input", { type: "text", value: t.toString(), onChange: n, disabled: a.disabled, className: "color", name: gt() }),
|
|
4771
|
+
/* @__PURE__ */ C.jsx("input", { type: "color", value: t, onChange: n, disabled: a.disabled, name: gt() })
|
|
4763
4772
|
] }),
|
|
4764
|
-
a.type === "button" && /* @__PURE__ */
|
|
4773
|
+
a.type === "button" && /* @__PURE__ */ C.jsx(
|
|
4765
4774
|
"button",
|
|
4766
4775
|
{
|
|
4767
4776
|
disabled: a.disabled,
|
|
@@ -4771,21 +4780,21 @@ function el(a) {
|
|
|
4771
4780
|
children: a.title
|
|
4772
4781
|
}
|
|
4773
4782
|
),
|
|
4774
|
-
a.type === "image" && /* @__PURE__ */
|
|
4775
|
-
a.type === "option" && /* @__PURE__ */
|
|
4783
|
+
a.type === "image" && /* @__PURE__ */ C.jsx(Rb, { title: a.title, prop: a.prop, value: a.value, onChange: a.onChange }),
|
|
4784
|
+
a.type === "option" && /* @__PURE__ */ C.jsx(C.Fragment, { children: /* @__PURE__ */ C.jsx(
|
|
4776
4785
|
"select",
|
|
4777
4786
|
{
|
|
4778
4787
|
onChange: n,
|
|
4779
4788
|
disabled: a.disabled,
|
|
4780
4789
|
defaultValue: a.value,
|
|
4781
4790
|
name: gt(),
|
|
4782
|
-
children: a.options?.map((c, h) => /* @__PURE__ */
|
|
4791
|
+
children: a.options?.map((c, h) => /* @__PURE__ */ C.jsx("option", { value: c.value, children: fl(c.title) }, h))
|
|
4783
4792
|
}
|
|
4784
4793
|
) }),
|
|
4785
|
-
a.type === "vector2" && /* @__PURE__ */
|
|
4786
|
-
a.type === "grid3" && /* @__PURE__ */
|
|
4787
|
-
a.type === "grid4" && /* @__PURE__ */
|
|
4788
|
-
a.type === "euler" && /* @__PURE__ */
|
|
4794
|
+
a.type === "vector2" && /* @__PURE__ */ C.jsx(Q_, { step: a.step, value: t, min: 0, max: 1, onChange: n }),
|
|
4795
|
+
a.type === "grid3" && /* @__PURE__ */ C.jsx(mp, { step: a.step, value: t, onChange: n }),
|
|
4796
|
+
a.type === "grid4" && /* @__PURE__ */ C.jsx(pb, { step: a.step, value: t, onChange: n }),
|
|
4797
|
+
a.type === "euler" && /* @__PURE__ */ C.jsx(mp, { step: a.step, value: t, onChange: n })
|
|
4789
4798
|
] });
|
|
4790
4799
|
}
|
|
4791
4800
|
function Nb(a) {
|
|
@@ -4817,7 +4826,7 @@ class ms extends qa {
|
|
|
4817
4826
|
}
|
|
4818
4827
|
});
|
|
4819
4828
|
});
|
|
4820
|
-
const s = Ni(), i = /* @__PURE__ */
|
|
4829
|
+
const s = Ni(), i = /* @__PURE__ */ C.jsx(
|
|
4821
4830
|
ms,
|
|
4822
4831
|
{
|
|
4823
4832
|
three: this.props.three,
|
|
@@ -4848,12 +4857,12 @@ class ms extends qa {
|
|
|
4848
4857
|
return this.props.items.forEach((t) => {
|
|
4849
4858
|
if (Nb(t))
|
|
4850
4859
|
e.push(
|
|
4851
|
-
/* @__PURE__ */
|
|
4860
|
+
/* @__PURE__ */ C.jsx(ms, { three: this.props.three, title: fl(t.title), items: t.items }, Math.random())
|
|
4852
4861
|
);
|
|
4853
4862
|
else {
|
|
4854
4863
|
const s = this.valueOverrides.get(t.title), i = s !== void 0 ? s : t.value;
|
|
4855
4864
|
e.push(
|
|
4856
|
-
/* @__PURE__ */
|
|
4865
|
+
/* @__PURE__ */ C.jsx(
|
|
4857
4866
|
el,
|
|
4858
4867
|
{
|
|
4859
4868
|
title: t.title,
|
|
@@ -4876,8 +4885,8 @@ class ms extends qa {
|
|
|
4876
4885
|
)
|
|
4877
4886
|
);
|
|
4878
4887
|
}
|
|
4879
|
-
}), this.subgroupElements.forEach((t) => e.push(t)), /* @__PURE__ */
|
|
4880
|
-
|
|
4888
|
+
}), this.subgroupElements.forEach((t) => e.push(t)), /* @__PURE__ */ C.jsx(
|
|
4889
|
+
Ma,
|
|
4881
4890
|
{
|
|
4882
4891
|
three: this.props.three,
|
|
4883
4892
|
label: this.props.title,
|
|
@@ -4903,7 +4912,7 @@ class _e extends qa {
|
|
|
4903
4912
|
this.props.three.removeEventListener(ce.ADD_GROUP, this.addGroup), this.props.three.removeEventListener(ce.REMOVE_GROUP, this.removeGroup);
|
|
4904
4913
|
}
|
|
4905
4914
|
render() {
|
|
4906
|
-
return /* @__PURE__ */
|
|
4915
|
+
return /* @__PURE__ */ C.jsx("div", { className: "customGroups", children: _e.groups }, this.state.lastUpdate);
|
|
4907
4916
|
}
|
|
4908
4917
|
// Events
|
|
4909
4918
|
addGroup = (e) => {
|
|
@@ -4924,7 +4933,7 @@ class _e extends qa {
|
|
|
4924
4933
|
}
|
|
4925
4934
|
});
|
|
4926
4935
|
}), _e.groups.push(
|
|
4927
|
-
/* @__PURE__ */
|
|
4936
|
+
/* @__PURE__ */ C.jsx(
|
|
4928
4937
|
ms,
|
|
4929
4938
|
{
|
|
4930
4939
|
three: this.props.three,
|
|
@@ -4966,7 +4975,7 @@ class _e extends qa {
|
|
|
4966
4975
|
}
|
|
4967
4976
|
});
|
|
4968
4977
|
});
|
|
4969
|
-
const i = Ni(), n = /* @__PURE__ */
|
|
4978
|
+
const i = Ni(), n = /* @__PURE__ */ C.jsx(
|
|
4970
4979
|
ms,
|
|
4971
4980
|
{
|
|
4972
4981
|
three: _e.three,
|
|
@@ -5066,7 +5075,7 @@ function Pb(a, e) {
|
|
|
5066
5075
|
}
|
|
5067
5076
|
}
|
|
5068
5077
|
});
|
|
5069
|
-
return /* @__PURE__ */
|
|
5078
|
+
return /* @__PURE__ */ C.jsx(
|
|
5070
5079
|
ms,
|
|
5071
5080
|
{
|
|
5072
5081
|
three: e,
|
|
@@ -5190,7 +5199,7 @@ class Rs {
|
|
|
5190
5199
|
return t.delete(e[e.length - 1]);
|
|
5191
5200
|
}
|
|
5192
5201
|
}
|
|
5193
|
-
const _g = "177", Db = 0, Ob = 1, Bb = 2, Ib = 0, Lb = 1, tl = 3, ri = 0, jt = 1, gr = 2,
|
|
5202
|
+
const _g = "177", Db = 0, Ob = 1, Bb = 2, Ib = 0, Lb = 1, tl = 3, ri = 0, jt = 1, gr = 2, Mr = 0, ai = 1, gl = 2, yl = 3, xl = 4, Ra = 5, Cs = 100, bg = 101, Tg = 102, Ub = 103, kb = 104, Pi = 200, Sg = 201, vg = 202, wg = 203, _l = 204, bl = 205, Eg = 206, Cg = 207, Mg = 208, Ag = 209, Rg = 210, Ng = 0, Pg = 1, Fg = 2, Tl = 3, Dg = 4, Og = 5, Bg = 6, Ig = 7, Gl = 0, zb = 1, Gb = 2, yr = 0, Vb = 1, Hb = 2, $b = 3, Wb = 4, jb = 6, qb = 7, Ou = 300, ka = 301, Sl = 302, Bu = 303, Iu = 304, Yh = 306, Ar = 1e3, Li = 1001, Rr = 1002, dt = 1003, Lg = 1004, za = 1005, ns = 1006, Xh = 1007, oi = 1008, Ot = 1009, Na = 1010, Pa = 1011, cr = 1012, Pt = 1013, Ke = 1014, is = 1015, hs = 1016, Yb = 1017, Xb = 1018, ki = 1020, Ug = 35902, Zb = 1021, Lu = 1022, us = 1023, Hs = 1026, li = 1027, Uu = 1028, ku = 1029, xn = 1030, zu = 1031, Kb = 1032, Gu = 1033, xc = 33776, sl = 33777, il = 33778, nl = 33779, _p = 35840, bp = 35841, Tp = 35842, Sp = 35843, vp = 36196, Zh = 37492, Kh = 37496, Qh = 37808, Jh = 37809, eu = 37810, tu = 37811, su = 37812, iu = 37813, nu = 37814, ru = 37815, au = 37816, ou = 37817, lu = 37818, cu = 37819, hu = 37820, uu = 37821, _c = 36492, Qb = 36283, wp = 36284, Ep = 36285, Cp = 36286, Gi = 0, Jb = 1, pi = "", ts = "srgb", xr = "srgb-linear", vl = "linear", te = "srgb", eT = 0, hn = 7680, tT = 7681, sT = 7682, iT = 7683, nT = 34055, rT = 34056, aT = 5386, oT = 512, lT = 513, cT = 514, hT = 515, uT = 516, dT = 517, pT = 518, du = 519, kg = 512, Vu = 513, zg = 514, Gg = 515, Vg = 516, Hg = 517, $g = 518, Wg = 519, wl = 35044, hr = 35048, Ht = 2e3, Vi = 2001;
|
|
5194
5203
|
class Yt {
|
|
5195
5204
|
/**
|
|
5196
5205
|
* Constructs a new 3x3 matrix. The arguments are supposed to be
|
|
@@ -5574,9 +5583,9 @@ function fT() {
|
|
|
5574
5583
|
const a = pu("canvas");
|
|
5575
5584
|
return a.style.display = "block", a;
|
|
5576
5585
|
}
|
|
5577
|
-
const
|
|
5586
|
+
const Mp = {};
|
|
5578
5587
|
function fi(a) {
|
|
5579
|
-
a in
|
|
5588
|
+
a in Mp || (Mp[a] = !0, console.warn(a));
|
|
5580
5589
|
}
|
|
5581
5590
|
const Ap = /* @__PURE__ */ new Yt().set(
|
|
5582
5591
|
0.4123908,
|
|
@@ -7868,8 +7877,8 @@ class Le {
|
|
|
7868
7877
|
* @return {Matrix4} A reference to this matrix.
|
|
7869
7878
|
*/
|
|
7870
7879
|
multiplyMatrices(e, t) {
|
|
7871
|
-
const s = e.elements, i = t.elements, n = this.elements, r = s[0], o = s[4], l = s[8], c = s[12], h = s[1], u = s[5], d = s[9], p = s[13], f = s[2], m = s[6], y = s[10], g = s[14], x = s[3], _ = s[7], b = s[11], T = s[15], E = i[0], v = i[4], A = i[8], N = i[12], k = i[1], H = i[5], W = i[9], $ = i[13], q = i[2], X = i[6], Ee = i[10], de = i[14], ye = i[3], se = i[7],
|
|
7872
|
-
return n[0] = r * E + o * k + l * q + c * ye, n[4] = r * v + o * H + l * X + c * se, n[8] = r * A + o * W + l * Ee + c *
|
|
7880
|
+
const s = e.elements, i = t.elements, n = this.elements, r = s[0], o = s[4], l = s[8], c = s[12], h = s[1], u = s[5], d = s[9], p = s[13], f = s[2], m = s[6], y = s[10], g = s[14], x = s[3], _ = s[7], b = s[11], T = s[15], E = i[0], v = i[4], A = i[8], N = i[12], k = i[1], H = i[5], W = i[9], $ = i[13], q = i[2], X = i[6], Ee = i[10], de = i[14], ye = i[3], se = i[7], Ce = i[11], Ge = i[15];
|
|
7881
|
+
return n[0] = r * E + o * k + l * q + c * ye, n[4] = r * v + o * H + l * X + c * se, n[8] = r * A + o * W + l * Ee + c * Ce, n[12] = r * N + o * $ + l * de + c * Ge, n[1] = h * E + u * k + d * q + p * ye, n[5] = h * v + u * H + d * X + p * se, n[9] = h * A + u * W + d * Ee + p * Ce, n[13] = h * N + u * $ + d * de + p * Ge, n[2] = f * E + m * k + y * q + g * ye, n[6] = f * v + m * H + y * X + g * se, n[10] = f * A + m * W + y * Ee + g * Ce, n[14] = f * N + m * $ + y * de + g * Ge, n[3] = x * E + _ * k + b * q + T * ye, n[7] = x * v + _ * H + b * X + T * se, n[11] = x * A + _ * W + b * Ee + T * Ce, n[15] = x * N + _ * $ + b * de + T * Ge, this;
|
|
7873
7882
|
}
|
|
7874
7883
|
/**
|
|
7875
7884
|
* Multiplies every component of the matrix by the given scalar.
|
|
@@ -9385,11 +9394,11 @@ const xT = (a) => Ga(a), Hu = (a) => Ga(a), El = (...a) => Ga(a);
|
|
|
9385
9394
|
function Yg(a, e = !1) {
|
|
9386
9395
|
const t = [];
|
|
9387
9396
|
a.isNode === !0 && (t.push(a.id), a = a.getSelf());
|
|
9388
|
-
for (const { property: s, childNode: i } of
|
|
9397
|
+
for (const { property: s, childNode: i } of Cl(a))
|
|
9389
9398
|
t.push(Ga(s.slice(0, -4)), i.getCacheKey(e));
|
|
9390
9399
|
return Ga(t);
|
|
9391
9400
|
}
|
|
9392
|
-
function*
|
|
9401
|
+
function* Cl(a, e = !1) {
|
|
9393
9402
|
for (const t in a) {
|
|
9394
9403
|
if (t.startsWith("_") === !0) continue;
|
|
9395
9404
|
const s = a[t];
|
|
@@ -9418,7 +9427,7 @@ const _T = /* @__PURE__ */ new Map([
|
|
|
9418
9427
|
function bT(a) {
|
|
9419
9428
|
return _T.get(a);
|
|
9420
9429
|
}
|
|
9421
|
-
function
|
|
9430
|
+
function Ml(a) {
|
|
9422
9431
|
if (a == null) return null;
|
|
9423
9432
|
const e = typeof a;
|
|
9424
9433
|
return a.isNode === !0 ? "node" : e === "number" ? "float" : e === "boolean" ? "bool" : e === "string" ? "string" : e === "function" ? "shader" : a.isVector2 === !0 ? "vec2" : a.isVector3 === !0 ? "vec3" : a.isVector4 === !0 ? "vec4" : a.isMatrix2 === !0 ? "mat2" : a.isMatrix3 === !0 ? "mat3" : a.isMatrix4 === !0 ? "mat4" : a.isColor === !0 ? "color" : a instanceof ArrayBuffer ? "ArrayBuffer" : null;
|
|
@@ -9726,7 +9735,7 @@ class ET {
|
|
|
9726
9735
|
}
|
|
9727
9736
|
}
|
|
9728
9737
|
const Xi = [];
|
|
9729
|
-
class
|
|
9738
|
+
class CT {
|
|
9730
9739
|
/**
|
|
9731
9740
|
* Constructs a new render object management component.
|
|
9732
9741
|
*
|
|
@@ -9845,7 +9854,7 @@ const ds = {
|
|
|
9845
9854
|
INDEX: 2,
|
|
9846
9855
|
STORAGE: 3,
|
|
9847
9856
|
INDIRECT: 4
|
|
9848
|
-
}, Oi = 16,
|
|
9857
|
+
}, Oi = 16, MT = 211, AT = 212;
|
|
9849
9858
|
class RT extends Wi {
|
|
9850
9859
|
/**
|
|
9851
9860
|
* Constructs a new attribute management component.
|
|
@@ -11035,7 +11044,7 @@ function sy(a) {
|
|
|
11035
11044
|
s.push(i.id);
|
|
11036
11045
|
return Hu(s);
|
|
11037
11046
|
}
|
|
11038
|
-
let
|
|
11047
|
+
let Cn = class {
|
|
11039
11048
|
/**
|
|
11040
11049
|
* Adds the given event listener to the given event type.
|
|
11041
11050
|
*
|
|
@@ -11364,7 +11373,7 @@ class $T {
|
|
|
11364
11373
|
}
|
|
11365
11374
|
let WT = 0;
|
|
11366
11375
|
const Lp = /* @__PURE__ */ new R(), zn = /* @__PURE__ */ new Br(), Xs = /* @__PURE__ */ new Le(), po = /* @__PURE__ */ new R(), jr = /* @__PURE__ */ new R(), jT = /* @__PURE__ */ new R(), qT = /* @__PURE__ */ new Br(), Up = /* @__PURE__ */ new R(1, 0, 0), kp = /* @__PURE__ */ new R(0, 1, 0), zp = /* @__PURE__ */ new R(0, 0, 1), Gp = { type: "added" }, YT = { type: "removed" }, Gn = { type: "childadded", child: null }, wc = { type: "childremoved", child: null };
|
|
11367
|
-
class pt extends
|
|
11376
|
+
class pt extends Cn {
|
|
11368
11377
|
/**
|
|
11369
11378
|
* Constructs a new 3D object.
|
|
11370
11379
|
*/
|
|
@@ -12237,8 +12246,8 @@ function Ec(a) {
|
|
|
12237
12246
|
} : (console.warn("THREE.Texture: Unable to serialize Texture."), {});
|
|
12238
12247
|
}
|
|
12239
12248
|
let eS = 0;
|
|
12240
|
-
const
|
|
12241
|
-
class
|
|
12249
|
+
const Cc = /* @__PURE__ */ new R();
|
|
12250
|
+
class Ct extends Cn {
|
|
12242
12251
|
/**
|
|
12243
12252
|
* Constructs a new texture.
|
|
12244
12253
|
*
|
|
@@ -12253,26 +12262,26 @@ class Mt extends Mn {
|
|
|
12253
12262
|
* @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
|
|
12254
12263
|
* @param {string} [colorSpace=NoColorSpace] - The color space.
|
|
12255
12264
|
*/
|
|
12256
|
-
constructor(e =
|
|
12265
|
+
constructor(e = Ct.DEFAULT_IMAGE, t = Ct.DEFAULT_MAPPING, s = Li, i = Li, n = ns, r = oi, o = us, l = Ot, c = Ct.DEFAULT_ANISOTROPY, h = pi) {
|
|
12257
12266
|
super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: eS++ }), this.uuid = ni(), this.name = "", this.source = new ju(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 he(0, 0), this.repeat = new he(1, 1), this.center = new he(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;
|
|
12258
12267
|
}
|
|
12259
12268
|
/**
|
|
12260
12269
|
* The width of the texture in pixels.
|
|
12261
12270
|
*/
|
|
12262
12271
|
get width() {
|
|
12263
|
-
return this.source.getSize(
|
|
12272
|
+
return this.source.getSize(Cc).x;
|
|
12264
12273
|
}
|
|
12265
12274
|
/**
|
|
12266
12275
|
* The height of the texture in pixels.
|
|
12267
12276
|
*/
|
|
12268
12277
|
get height() {
|
|
12269
|
-
return this.source.getSize(
|
|
12278
|
+
return this.source.getSize(Cc).y;
|
|
12270
12279
|
}
|
|
12271
12280
|
/**
|
|
12272
12281
|
* The depth of the texture in pixels.
|
|
12273
12282
|
*/
|
|
12274
12283
|
get depth() {
|
|
12275
|
-
return this.source.getSize(
|
|
12284
|
+
return this.source.getSize(Cc).z;
|
|
12276
12285
|
}
|
|
12277
12286
|
/**
|
|
12278
12287
|
* The image object holding the texture data.
|
|
@@ -12451,10 +12460,10 @@ class Mt extends Mn {
|
|
|
12451
12460
|
e === !0 && this.pmremVersion++;
|
|
12452
12461
|
}
|
|
12453
12462
|
}
|
|
12454
|
-
|
|
12455
|
-
|
|
12456
|
-
|
|
12457
|
-
class $s extends
|
|
12463
|
+
Ct.DEFAULT_IMAGE = null;
|
|
12464
|
+
Ct.DEFAULT_MAPPING = Ou;
|
|
12465
|
+
Ct.DEFAULT_ANISOTROPY = 1;
|
|
12466
|
+
class $s extends Ct {
|
|
12458
12467
|
/**
|
|
12459
12468
|
* Constructs a new depth texture.
|
|
12460
12469
|
*
|
|
@@ -12683,7 +12692,7 @@ const fo = {
|
|
|
12683
12692
|
generate: "analyze"
|
|
12684
12693
|
};
|
|
12685
12694
|
let rS = 0;
|
|
12686
|
-
class re extends
|
|
12695
|
+
class re extends Cn {
|
|
12687
12696
|
static get type() {
|
|
12688
12697
|
return "Node";
|
|
12689
12698
|
}
|
|
@@ -12800,7 +12809,7 @@ class re extends Mn {
|
|
|
12800
12809
|
* @yields {Node} A child node.
|
|
12801
12810
|
*/
|
|
12802
12811
|
*getChildren() {
|
|
12803
|
-
for (const { childNode: e } of
|
|
12812
|
+
for (const { childNode: e } of Cl(this))
|
|
12804
12813
|
yield e;
|
|
12805
12814
|
}
|
|
12806
12815
|
/**
|
|
@@ -13066,7 +13075,7 @@ class re extends Mn {
|
|
|
13066
13075
|
* @return {Array<Object>} An iterable list of serialized child objects as JSON.
|
|
13067
13076
|
*/
|
|
13068
13077
|
getSerializeChildren() {
|
|
13069
|
-
return
|
|
13078
|
+
return Cl(this);
|
|
13070
13079
|
}
|
|
13071
13080
|
/**
|
|
13072
13081
|
* Serializes the node to JSON.
|
|
@@ -13427,7 +13436,7 @@ class Yu extends re {
|
|
|
13427
13436
|
super(t), this.isInputNode = !0, this.value = e, this.precision = null;
|
|
13428
13437
|
}
|
|
13429
13438
|
getNodeType() {
|
|
13430
|
-
return this.nodeType === null ?
|
|
13439
|
+
return this.nodeType === null ? Ml(this.value) : this.nodeType;
|
|
13431
13440
|
}
|
|
13432
13441
|
/**
|
|
13433
13442
|
* Returns the input type of the node which is by default the node type. Derived modules
|
|
@@ -13454,7 +13463,7 @@ class Yu extends re {
|
|
|
13454
13463
|
return this.precision = e, this;
|
|
13455
13464
|
}
|
|
13456
13465
|
serialize(e) {
|
|
13457
|
-
super.serialize(e), e.value = this.value, this.value && this.value.toArray && (e.value = this.value.toArray()), e.valueType =
|
|
13466
|
+
super.serialize(e), e.value = this.value, this.value && this.value.toArray && (e.value = this.value.toArray()), e.valueType = Ml(this.value), e.nodeType = this.nodeType, e.valueType === "ArrayBuffer" && (e.value = TT(e.value)), e.precision = this.precision;
|
|
13458
13467
|
}
|
|
13459
13468
|
deserialize(e) {
|
|
13460
13469
|
super.deserialize(e), this.nodeType = e.nodeType, this.value = Array.isArray(e.value) ? Xg(e.valueType, ...e.value) : e.value, this.precision = e.precision || null, this.value && this.value.fromArray && (this.value = this.value.fromArray(e.value));
|
|
@@ -13560,11 +13569,11 @@ const ny = (a) => a.replace(/r|s/g, "x").replace(/g|t/g, "y").replace(/b|p/g, "z
|
|
|
13560
13569
|
set(a, e, t, s) {
|
|
13561
13570
|
return typeof e == "string" && a[e] === void 0 && (/^[xyzwrgbastpq]{1,4}$/.test(e) === !0 || e === "width" || e === "height" || e === "depth" || /^\d+$/.test(e) === !0) ? (s[e].assign(t), !0) : Reflect.set(a, e, t, s);
|
|
13562
13571
|
}
|
|
13563
|
-
},
|
|
13564
|
-
const t =
|
|
13572
|
+
}, Mc = /* @__PURE__ */ new WeakMap(), qp = /* @__PURE__ */ new WeakMap(), uS = function(a, e = null) {
|
|
13573
|
+
const t = Ml(a);
|
|
13565
13574
|
if (t === "node") {
|
|
13566
|
-
let s =
|
|
13567
|
-
return s === void 0 && (s = new Proxy(a, ry),
|
|
13575
|
+
let s = Mc.get(a);
|
|
13576
|
+
return s === void 0 && (s = new Proxy(a, ry), Mc.set(a, s), Mc.set(s, s)), s;
|
|
13568
13577
|
} else {
|
|
13569
13578
|
if (e === null && (t === "float" || t === "boolean") || t && t !== "shader" && t !== "string")
|
|
13570
13579
|
return U(fu(a, e));
|
|
@@ -13717,7 +13726,7 @@ function ly(a) {
|
|
|
13717
13726
|
return Nr && Nr.add(a), a;
|
|
13718
13727
|
}
|
|
13719
13728
|
D("toStack", ly);
|
|
13720
|
-
const wS = new at("color"), O = new at("float", $l.float), ze = new at("int", $l.ints), ES = new at("uint", $l.uint), Qu = new at("bool", $l.bool), V = new at("vec2"), ei = new at("ivec2"),
|
|
13729
|
+
const wS = new at("color"), O = new at("float", $l.float), ze = new at("int", $l.ints), ES = new at("uint", $l.uint), Qu = new at("bool", $l.bool), V = new at("vec2"), ei = new at("ivec2"), CS = new at("uvec2"), MS = new at("bvec2"), B = new at("vec3"), AS = new at("ivec3"), RS = new at("uvec3"), NS = new at("bvec3"), ne = new at("vec4"), PS = new at("ivec4"), FS = new at("uvec4"), DS = new at("bvec4"), Ju = new at("mat2"), It = new at("mat3"), Tr = new at("mat4");
|
|
13721
13730
|
D("toColor", wS);
|
|
13722
13731
|
D("toFloat", O);
|
|
13723
13732
|
D("toInt", ze);
|
|
@@ -13725,8 +13734,8 @@ D("toUint", ES);
|
|
|
13725
13734
|
D("toBool", Qu);
|
|
13726
13735
|
D("toVec2", V);
|
|
13727
13736
|
D("toIVec2", ei);
|
|
13728
|
-
D("toUVec2",
|
|
13729
|
-
D("toBVec2",
|
|
13737
|
+
D("toUVec2", CS);
|
|
13738
|
+
D("toBVec2", MS);
|
|
13730
13739
|
D("toVec3", B);
|
|
13731
13740
|
D("toIVec3", AS);
|
|
13732
13741
|
D("toUVec3", RS);
|
|
@@ -14177,7 +14186,7 @@ D("decrement", lv);
|
|
|
14177
14186
|
const cv = (a, e) => (console.warn('THREE.TSL: "remainder()" is deprecated. Use "mod( int( ... ) )" instead.'), jl(a, e)), hv = (a, e) => (console.warn('THREE.TSL: "modInt()" is deprecated. Use "mod( int( ... ) )" instead.'), jl(ze(a), ze(e)));
|
|
14178
14187
|
D("remainder", cv);
|
|
14179
14188
|
D("modInt", hv);
|
|
14180
|
-
class
|
|
14189
|
+
class M extends rt {
|
|
14181
14190
|
static get type() {
|
|
14182
14191
|
return "MathNode";
|
|
14183
14192
|
}
|
|
@@ -14190,10 +14199,10 @@ class C extends rt {
|
|
|
14190
14199
|
* @param {?Node} [cNode=null] - The third input.
|
|
14191
14200
|
*/
|
|
14192
14201
|
constructor(e, t, s = null, i = null) {
|
|
14193
|
-
if (super(), (e ===
|
|
14194
|
-
let n = new
|
|
14202
|
+
if (super(), (e === M.MAX || e === M.MIN) && arguments.length > 3) {
|
|
14203
|
+
let n = new M(e, t, s);
|
|
14195
14204
|
for (let r = 2; r < arguments.length - 1; r++)
|
|
14196
|
-
n = new
|
|
14205
|
+
n = new M(e, n, arguments[r]);
|
|
14197
14206
|
t = n, s = arguments[arguments.length - 1], i = null;
|
|
14198
14207
|
}
|
|
14199
14208
|
this.method = e, this.aNode = t, this.bNode = s, this.cNode = i, this.isMathNode = !0;
|
|
@@ -14216,18 +14225,18 @@ class C extends rt {
|
|
|
14216
14225
|
*/
|
|
14217
14226
|
getNodeType(e) {
|
|
14218
14227
|
const t = this.method;
|
|
14219
|
-
return t ===
|
|
14228
|
+
return t === M.LENGTH || t === M.DISTANCE || t === M.DOT ? "float" : t === M.CROSS ? "vec3" : t === M.ALL || t === M.ANY ? "bool" : t === M.EQUALS ? e.changeComponentType(this.aNode.getNodeType(e), "bool") : this.getInputType(e);
|
|
14220
14229
|
}
|
|
14221
14230
|
setup(e) {
|
|
14222
14231
|
const { aNode: t, bNode: s, method: i } = this;
|
|
14223
14232
|
let n = null;
|
|
14224
|
-
if (i ===
|
|
14233
|
+
if (i === M.ONE_MINUS)
|
|
14225
14234
|
n = Ft(1, t);
|
|
14226
|
-
else if (i ===
|
|
14235
|
+
else if (i === M.RECIPROCAL)
|
|
14227
14236
|
n = Ws(1, t);
|
|
14228
|
-
else if (i ===
|
|
14237
|
+
else if (i === M.DIFFERENCE)
|
|
14229
14238
|
n = cs(Ft(t, s));
|
|
14230
|
-
else if (i ===
|
|
14239
|
+
else if (i === M.TRANSFORM_DIRECTION) {
|
|
14231
14240
|
let r = t, o = s;
|
|
14232
14241
|
e.isMatrix(r.getNodeType(e)) ? o = ne(B(o), 0) : r = ne(B(r), 0);
|
|
14233
14242
|
const l = fe(r, o).xyz;
|
|
@@ -14240,28 +14249,28 @@ class C extends rt {
|
|
|
14240
14249
|
return super.generate(e, t);
|
|
14241
14250
|
let i = this.method;
|
|
14242
14251
|
const n = this.getNodeType(e), r = this.getInputType(e), o = this.aNode, l = this.bNode, c = this.cNode, h = e.renderer.coordinateSystem;
|
|
14243
|
-
if (i ===
|
|
14252
|
+
if (i === M.NEGATE)
|
|
14244
14253
|
return e.format("( - " + o.build(e, r) + " )", n, t);
|
|
14245
14254
|
{
|
|
14246
14255
|
const u = [];
|
|
14247
|
-
return i ===
|
|
14256
|
+
return i === M.CROSS ? u.push(
|
|
14248
14257
|
o.build(e, n),
|
|
14249
14258
|
l.build(e, n)
|
|
14250
|
-
) : h === Ht && i ===
|
|
14259
|
+
) : h === Ht && i === M.STEP ? u.push(
|
|
14251
14260
|
o.build(e, e.getTypeLength(o.getNodeType(e)) === 1 ? "float" : r),
|
|
14252
14261
|
l.build(e, r)
|
|
14253
|
-
) : h === Ht && (i ===
|
|
14262
|
+
) : h === Ht && (i === M.MIN || i === M.MAX) ? u.push(
|
|
14254
14263
|
o.build(e, r),
|
|
14255
14264
|
l.build(e, e.getTypeLength(l.getNodeType(e)) === 1 ? "float" : r)
|
|
14256
|
-
) : i ===
|
|
14265
|
+
) : i === M.REFRACT ? u.push(
|
|
14257
14266
|
o.build(e, r),
|
|
14258
14267
|
l.build(e, r),
|
|
14259
14268
|
c.build(e, "float")
|
|
14260
|
-
) : i ===
|
|
14269
|
+
) : i === M.MIX ? u.push(
|
|
14261
14270
|
o.build(e, r),
|
|
14262
14271
|
l.build(e, r),
|
|
14263
14272
|
c.build(e, e.getTypeLength(c.getNodeType(e)) === 1 ? "float" : r)
|
|
14264
|
-
) : (h === Vi && i ===
|
|
14273
|
+
) : (h === Vi && i === M.ATAN && l !== null && (i = "atan2"), e.shaderStage !== "fragment" && (i === M.DFDX || i === M.DFDY) && (console.warn(`THREE.TSL: '${i}' is not supported in the ${e.shaderStage} stage.`), i = "/*" + i + "*/"), u.push(o.build(e, r)), l !== null && u.push(l.build(e, r)), c !== null && u.push(c.build(e, r))), e.format(`${e.getMethod(i, n)}( ${u.join(", ")} )`, n, t);
|
|
14265
14274
|
}
|
|
14266
14275
|
}
|
|
14267
14276
|
serialize(e) {
|
|
@@ -14271,62 +14280,62 @@ class C extends rt {
|
|
|
14271
14280
|
super.deserialize(e), this.method = e.method;
|
|
14272
14281
|
}
|
|
14273
14282
|
}
|
|
14274
|
-
|
|
14275
|
-
|
|
14276
|
-
|
|
14277
|
-
|
|
14278
|
-
|
|
14279
|
-
|
|
14280
|
-
|
|
14281
|
-
|
|
14282
|
-
|
|
14283
|
-
|
|
14284
|
-
|
|
14285
|
-
|
|
14286
|
-
|
|
14287
|
-
|
|
14288
|
-
|
|
14289
|
-
|
|
14290
|
-
|
|
14291
|
-
|
|
14292
|
-
|
|
14293
|
-
|
|
14294
|
-
|
|
14295
|
-
|
|
14296
|
-
|
|
14297
|
-
|
|
14298
|
-
|
|
14299
|
-
|
|
14300
|
-
|
|
14301
|
-
|
|
14302
|
-
|
|
14303
|
-
|
|
14304
|
-
|
|
14305
|
-
|
|
14306
|
-
|
|
14307
|
-
|
|
14308
|
-
|
|
14309
|
-
|
|
14310
|
-
|
|
14311
|
-
|
|
14312
|
-
|
|
14313
|
-
|
|
14314
|
-
|
|
14315
|
-
|
|
14316
|
-
|
|
14317
|
-
|
|
14318
|
-
|
|
14319
|
-
|
|
14320
|
-
|
|
14321
|
-
|
|
14322
|
-
|
|
14323
|
-
const uv = /* @__PURE__ */ O(1e-6), dv = /* @__PURE__ */ O(Math.PI), pv = /* @__PURE__ */ L(
|
|
14283
|
+
M.ALL = "all";
|
|
14284
|
+
M.ANY = "any";
|
|
14285
|
+
M.RADIANS = "radians";
|
|
14286
|
+
M.DEGREES = "degrees";
|
|
14287
|
+
M.EXP = "exp";
|
|
14288
|
+
M.EXP2 = "exp2";
|
|
14289
|
+
M.LOG = "log";
|
|
14290
|
+
M.LOG2 = "log2";
|
|
14291
|
+
M.SQRT = "sqrt";
|
|
14292
|
+
M.INVERSE_SQRT = "inversesqrt";
|
|
14293
|
+
M.FLOOR = "floor";
|
|
14294
|
+
M.CEIL = "ceil";
|
|
14295
|
+
M.NORMALIZE = "normalize";
|
|
14296
|
+
M.FRACT = "fract";
|
|
14297
|
+
M.SIN = "sin";
|
|
14298
|
+
M.COS = "cos";
|
|
14299
|
+
M.TAN = "tan";
|
|
14300
|
+
M.ASIN = "asin";
|
|
14301
|
+
M.ACOS = "acos";
|
|
14302
|
+
M.ATAN = "atan";
|
|
14303
|
+
M.ABS = "abs";
|
|
14304
|
+
M.SIGN = "sign";
|
|
14305
|
+
M.LENGTH = "length";
|
|
14306
|
+
M.NEGATE = "negate";
|
|
14307
|
+
M.ONE_MINUS = "oneMinus";
|
|
14308
|
+
M.DFDX = "dFdx";
|
|
14309
|
+
M.DFDY = "dFdy";
|
|
14310
|
+
M.ROUND = "round";
|
|
14311
|
+
M.RECIPROCAL = "reciprocal";
|
|
14312
|
+
M.TRUNC = "trunc";
|
|
14313
|
+
M.FWIDTH = "fwidth";
|
|
14314
|
+
M.TRANSPOSE = "transpose";
|
|
14315
|
+
M.BITCAST = "bitcast";
|
|
14316
|
+
M.EQUALS = "equals";
|
|
14317
|
+
M.MIN = "min";
|
|
14318
|
+
M.MAX = "max";
|
|
14319
|
+
M.STEP = "step";
|
|
14320
|
+
M.REFLECT = "reflect";
|
|
14321
|
+
M.DISTANCE = "distance";
|
|
14322
|
+
M.DIFFERENCE = "difference";
|
|
14323
|
+
M.DOT = "dot";
|
|
14324
|
+
M.CROSS = "cross";
|
|
14325
|
+
M.POW = "pow";
|
|
14326
|
+
M.TRANSFORM_DIRECTION = "transformDirection";
|
|
14327
|
+
M.MIX = "mix";
|
|
14328
|
+
M.CLAMP = "clamp";
|
|
14329
|
+
M.REFRACT = "refract";
|
|
14330
|
+
M.SMOOTHSTEP = "smoothstep";
|
|
14331
|
+
M.FACEFORWARD = "faceforward";
|
|
14332
|
+
const uv = /* @__PURE__ */ O(1e-6), dv = /* @__PURE__ */ O(Math.PI), pv = /* @__PURE__ */ L(M, M.ALL).setParameterLength(1), fv = /* @__PURE__ */ L(M, M.ANY).setParameterLength(1), mv = /* @__PURE__ */ L(M, M.RADIANS).setParameterLength(1), gv = /* @__PURE__ */ L(M, M.DEGREES).setParameterLength(1), _y = /* @__PURE__ */ L(M, M.EXP).setParameterLength(1), Va = /* @__PURE__ */ L(M, M.EXP2).setParameterLength(1), by = /* @__PURE__ */ L(M, M.LOG).setParameterLength(1), hi = /* @__PURE__ */ L(M, M.LOG2).setParameterLength(1), id = /* @__PURE__ */ L(M, M.SQRT).setParameterLength(1), yv = /* @__PURE__ */ L(M, M.INVERSE_SQRT).setParameterLength(1), Tn = /* @__PURE__ */ L(M, M.FLOOR).setParameterLength(1), nd = /* @__PURE__ */ L(M, M.CEIL).setParameterLength(1), Ha = /* @__PURE__ */ L(M, M.NORMALIZE).setParameterLength(1), ji = /* @__PURE__ */ L(M, M.FRACT).setParameterLength(1), Es = /* @__PURE__ */ L(M, M.SIN).setParameterLength(1), Fi = /* @__PURE__ */ L(M, M.COS).setParameterLength(1), xv = /* @__PURE__ */ L(M, M.TAN).setParameterLength(1), _v = /* @__PURE__ */ L(M, M.ASIN).setParameterLength(1), Ty = /* @__PURE__ */ L(M, M.ACOS).setParameterLength(1), Sy = /* @__PURE__ */ L(M, M.ATAN).setParameterLength(1, 2), cs = /* @__PURE__ */ L(M, M.ABS).setParameterLength(1), Dl = /* @__PURE__ */ L(M, M.SIGN).setParameterLength(1), ui = /* @__PURE__ */ L(M, M.LENGTH).setParameterLength(1), bv = /* @__PURE__ */ L(M, M.NEGATE).setParameterLength(1), Tv = /* @__PURE__ */ L(M, M.ONE_MINUS).setParameterLength(1), vy = /* @__PURE__ */ L(M, M.DFDX).setParameterLength(1), wy = /* @__PURE__ */ L(M, M.DFDY).setParameterLength(1), Sv = /* @__PURE__ */ L(M, M.ROUND).setParameterLength(1), vv = /* @__PURE__ */ L(M, M.RECIPROCAL).setParameterLength(1), wv = /* @__PURE__ */ L(M, M.TRUNC).setParameterLength(1), Ev = /* @__PURE__ */ L(M, M.FWIDTH).setParameterLength(1), Cv = /* @__PURE__ */ L(M, M.TRANSPOSE).setParameterLength(1), Mv = (a, e) => (console.warn('THREE.TSL: "equals" is deprecated. Use "equal" inside a vector instead, like: "bvec*( equal( ... ) )"'), xy(a, e)), Pr = /* @__PURE__ */ L(M, M.MIN).setParameterLength(2, 1 / 0), Mt = /* @__PURE__ */ L(M, M.MAX).setParameterLength(2, 1 / 0), Ey = /* @__PURE__ */ L(M, M.STEP).setParameterLength(2), Av = /* @__PURE__ */ L(M, M.REFLECT).setParameterLength(2), Rv = /* @__PURE__ */ L(M, M.DISTANCE).setParameterLength(2), Nv = /* @__PURE__ */ L(M, M.DIFFERENCE).setParameterLength(2), rd = /* @__PURE__ */ L(M, M.DOT).setParameterLength(2), Cy = /* @__PURE__ */ L(M, M.CROSS).setParameterLength(2), ql = /* @__PURE__ */ L(M, M.POW).setParameterLength(2), My = /* @__PURE__ */ L(M, M.POW, 2).setParameterLength(1), Pv = /* @__PURE__ */ L(M, M.POW, 3).setParameterLength(1), Fv = /* @__PURE__ */ L(M, M.POW, 4).setParameterLength(1), Dv = /* @__PURE__ */ L(M, M.TRANSFORM_DIRECTION).setParameterLength(2), Ov = (a) => fe(Dl(a), ql(cs(a), 1 / 3)), Ay = (a) => rd(a, a), Ve = /* @__PURE__ */ L(M, M.MIX).setParameterLength(3), mi = (a, e = 0, t = 1) => U(new M(M.CLAMP, U(a), U(e), U(t))), Ry = (a) => mi(a), Ny = /* @__PURE__ */ L(M, M.REFRACT).setParameterLength(3), Hi = /* @__PURE__ */ L(M, M.SMOOTHSTEP).setParameterLength(3), Bv = /* @__PURE__ */ L(M, M.FACEFORWARD).setParameterLength(3), Iv = /* @__PURE__ */ I(([a]) => {
|
|
14324
14333
|
const s = 43758.5453, i = rd(a.xy, V(12.9898, 78.233)), n = jl(i, dv);
|
|
14325
14334
|
return ji(Es(n).mul(s));
|
|
14326
14335
|
}), Lv = (a, e, t) => Ve(e, t, a), Uv = (a, e, t) => Hi(e, t, a), kv = (a, e) => (console.warn('THREE.TSL: "atan2" is overloaded. Use "atan" instead.'), Sy(a, e));
|
|
14327
14336
|
D("all", pv);
|
|
14328
14337
|
D("any", fv);
|
|
14329
|
-
D("equals",
|
|
14338
|
+
D("equals", Mv);
|
|
14330
14339
|
D("radians", mv);
|
|
14331
14340
|
D("degrees", gv);
|
|
14332
14341
|
D("exp", _y);
|
|
@@ -14359,14 +14368,14 @@ D("trunc", wv);
|
|
|
14359
14368
|
D("fwidth", Ev);
|
|
14360
14369
|
D("atan2", kv);
|
|
14361
14370
|
D("min", Pr);
|
|
14362
|
-
D("max",
|
|
14371
|
+
D("max", Mt);
|
|
14363
14372
|
D("step", Ey);
|
|
14364
14373
|
D("reflect", Av);
|
|
14365
14374
|
D("distance", Rv);
|
|
14366
14375
|
D("dot", rd);
|
|
14367
|
-
D("cross",
|
|
14376
|
+
D("cross", Cy);
|
|
14368
14377
|
D("pow", ql);
|
|
14369
|
-
D("pow2",
|
|
14378
|
+
D("pow2", My);
|
|
14370
14379
|
D("pow3", Pv);
|
|
14371
14380
|
D("pow4", Fv);
|
|
14372
14381
|
D("transformDirection", Dv);
|
|
@@ -14378,7 +14387,7 @@ D("faceForward", Bv);
|
|
|
14378
14387
|
D("difference", Nv);
|
|
14379
14388
|
D("saturate", Ry);
|
|
14380
14389
|
D("cbrt", Ov);
|
|
14381
|
-
D("transpose",
|
|
14390
|
+
D("transpose", Cv);
|
|
14382
14391
|
D("rand", Iv);
|
|
14383
14392
|
class zv extends re {
|
|
14384
14393
|
static get type() {
|
|
@@ -15939,7 +15948,7 @@ class ww extends re {
|
|
|
15939
15948
|
return e.addFlowTab(), r;
|
|
15940
15949
|
}
|
|
15941
15950
|
}
|
|
15942
|
-
const
|
|
15951
|
+
const Ms = (...a) => U(new ww(br(a, "int"))).toStack(), Ew = () => Fr("break").toStack();
|
|
15943
15952
|
class Qa {
|
|
15944
15953
|
/**
|
|
15945
15954
|
* Constructs a new bounding box.
|
|
@@ -16359,7 +16368,7 @@ function Nc(a, e, t, s, i) {
|
|
|
16359
16368
|
}
|
|
16360
16369
|
return !0;
|
|
16361
16370
|
}
|
|
16362
|
-
const
|
|
16371
|
+
const Cw = /* @__PURE__ */ new Qa(), Xr = /* @__PURE__ */ new R(), Pc = /* @__PURE__ */ new R();
|
|
16363
16372
|
class Yl {
|
|
16364
16373
|
/**
|
|
16365
16374
|
* Constructs a new sphere.
|
|
@@ -16392,7 +16401,7 @@ class Yl {
|
|
|
16392
16401
|
*/
|
|
16393
16402
|
setFromPoints(e, t) {
|
|
16394
16403
|
const s = this.center;
|
|
16395
|
-
t !== void 0 ? s.copy(t) :
|
|
16404
|
+
t !== void 0 ? s.copy(t) : Cw.setFromPoints(e).getCenter(s);
|
|
16396
16405
|
let i = 0;
|
|
16397
16406
|
for (let n = 0, r = e.length; n < r; n++)
|
|
16398
16407
|
i = Math.max(i, s.distanceToSquared(e[n]));
|
|
@@ -16654,7 +16663,7 @@ Fe.SCALE = "scale";
|
|
|
16654
16663
|
Fe.VIEW_POSITION = "viewPosition";
|
|
16655
16664
|
Fe.DIRECTION = "direction";
|
|
16656
16665
|
Fe.RADIUS = "radius";
|
|
16657
|
-
const
|
|
16666
|
+
const Mw = /* @__PURE__ */ L(Fe, Fe.POSITION).setParameterLength(1);
|
|
16658
16667
|
class Ly extends Ka {
|
|
16659
16668
|
static get type() {
|
|
16660
16669
|
return "BufferNode";
|
|
@@ -16718,7 +16727,7 @@ class Rw extends Ly {
|
|
|
16718
16727
|
* @param {?string} [elementType=null] - The data type of a buffer element.
|
|
16719
16728
|
*/
|
|
16720
16729
|
constructor(e, t = null) {
|
|
16721
|
-
super(null), this.array = e, this.elementType = t === null ?
|
|
16730
|
+
super(null), this.array = e, this.elementType = t === null ? Ml(e[0]) : t, this.paddedType = this.getPaddedType(), this.updateType = ue.RENDER, this.isArrayBufferNode = !0;
|
|
16722
16731
|
}
|
|
16723
16732
|
/**
|
|
16724
16733
|
* This method is overwritten since the node type is inferred from the
|
|
@@ -17118,7 +17127,7 @@ class Ww extends re {
|
|
|
17118
17127
|
return e.format(`${e.getMethod("textureDimensions")}( ${s}, ${i} )`, this.getNodeType(e), t);
|
|
17119
17128
|
}
|
|
17120
17129
|
}
|
|
17121
|
-
const wr = /* @__PURE__ */ L(Ww).setParameterLength(1, 2), Wy = /* @__PURE__ */ new
|
|
17130
|
+
const wr = /* @__PURE__ */ L(Ww).setParameterLength(1, 2), Wy = /* @__PURE__ */ new Ct();
|
|
17122
17131
|
class Lr extends Ka {
|
|
17123
17132
|
static get type() {
|
|
17124
17133
|
return "TextureNode";
|
|
@@ -17428,7 +17437,7 @@ const jw = /* @__PURE__ */ L(Lr).setParameterLength(1, 4).setName("texture"), be
|
|
|
17428
17437
|
let i;
|
|
17429
17438
|
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 = jw(a, e, t, s), i;
|
|
17430
17439
|
}, vs = (...a) => be(...a).setSampler(!1);
|
|
17431
|
-
class qw extends
|
|
17440
|
+
class qw extends Ct {
|
|
17432
17441
|
/**
|
|
17433
17442
|
* Constructs a new framebuffer texture.
|
|
17434
17443
|
*
|
|
@@ -17741,7 +17750,7 @@ class Di {
|
|
|
17741
17750
|
return new this.constructor().copy(this);
|
|
17742
17751
|
}
|
|
17743
17752
|
}
|
|
17744
|
-
class
|
|
17753
|
+
class Mn extends Cn {
|
|
17745
17754
|
/**
|
|
17746
17755
|
* Render target options.
|
|
17747
17756
|
*
|
|
@@ -17788,7 +17797,7 @@ class Cn extends Mn {
|
|
|
17788
17797
|
depth: 1,
|
|
17789
17798
|
multiview: !1
|
|
17790
17799
|
}, s), this.isRenderTarget = !0, this.width = e, this.height = t, this.depth = s.depth, this.scissor = new ge(0, 0, e, t), this.scissorTest = !1, this.viewport = new ge(0, 0, e, t);
|
|
17791
|
-
const i = { width: e, height: t, depth: s.depth }, n = new
|
|
17800
|
+
const i = { width: e, height: t, depth: s.depth }, n = new Ct(i);
|
|
17792
17801
|
this.textures = [];
|
|
17793
17802
|
const r = s.count;
|
|
17794
17803
|
for (let o = 0; o < r; o++)
|
|
@@ -17893,16 +17902,16 @@ new R();
|
|
|
17893
17902
|
new R();
|
|
17894
17903
|
new ge();
|
|
17895
17904
|
new he();
|
|
17896
|
-
const eE = new
|
|
17905
|
+
const eE = new Mn();
|
|
17897
17906
|
vr.flipX();
|
|
17898
17907
|
eE.depthTexture = new $s(1, 1);
|
|
17899
17908
|
let tE = 0;
|
|
17900
|
-
class qt extends
|
|
17909
|
+
class qt extends Cn {
|
|
17901
17910
|
/**
|
|
17902
17911
|
* Constructs a new material.
|
|
17903
17912
|
*/
|
|
17904
17913
|
constructor() {
|
|
17905
|
-
super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: tE++ }), this.uuid = ni(), this.name = "", this.type = "Material", this.blending = ai, this.side = ri, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = _l, this.blendDst = bl, this.blendEquation =
|
|
17914
|
+
super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: tE++ }), this.uuid = ni(), this.name = "", this.type = "Material", this.blending = ai, this.side = ri, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = _l, this.blendDst = bl, this.blendEquation = Cs, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new we(0, 0, 0), this.blendAlpha = 0, this.depthFunc = Tl, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = du, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = hn, this.stencilZFail = hn, this.stencilZPass = hn, this.stencilWrite = !1, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.shadowSide = null, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaToCoverage = !1, this.premultipliedAlpha = !1, this.forceSinglePass = !1, this.allowOverride = !0, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0, this._alphaTest = 0;
|
|
17906
17915
|
}
|
|
17907
17916
|
/**
|
|
17908
17917
|
* Sets the alpha value to be used when running an alpha test. The material
|
|
@@ -18001,7 +18010,7 @@ class qt extends Mn {
|
|
|
18001
18010
|
generator: "Material.toJSON"
|
|
18002
18011
|
}
|
|
18003
18012
|
};
|
|
18004
|
-
s.uuid = this.uuid, s.type = this.type, this.name !== "" && (s.name = this.name), this.color && this.color.isColor && (s.color = this.color.getHex()), this.roughness !== void 0 && (s.roughness = this.roughness), this.metalness !== void 0 && (s.metalness = this.metalness), this.sheen !== void 0 && (s.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (s.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (s.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (s.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (s.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (s.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (s.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (s.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (s.shininess = this.shininess), this.clearcoat !== void 0 && (s.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (s.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (s.clearcoatMap = this.clearcoatMap.toJSON(e).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (s.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(e).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (s.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(e).uuid, s.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.dispersion !== void 0 && (s.dispersion = this.dispersion), this.iridescence !== void 0 && (s.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (s.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (s.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (s.iridescenceMap = this.iridescenceMap.toJSON(e).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (s.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(e).uuid), this.anisotropy !== void 0 && (s.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (s.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (s.anisotropyMap = this.anisotropyMap.toJSON(e).uuid), this.map && this.map.isTexture && (s.map = this.map.toJSON(e).uuid), this.matcap && this.matcap.isTexture && (s.matcap = this.matcap.toJSON(e).uuid), this.alphaMap && this.alphaMap.isTexture && (s.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap && this.lightMap.isTexture && (s.lightMap = this.lightMap.toJSON(e).uuid, s.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (s.aoMap = this.aoMap.toJSON(e).uuid, s.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (s.bumpMap = this.bumpMap.toJSON(e).uuid, s.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (s.normalMap = this.normalMap.toJSON(e).uuid, s.normalMapType = this.normalMapType, s.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (s.displacementMap = this.displacementMap.toJSON(e).uuid, s.displacementScale = this.displacementScale, s.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (s.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap && this.metalnessMap.isTexture && (s.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap && this.emissiveMap.isTexture && (s.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap && this.specularMap.isTexture && (s.specularMap = this.specularMap.toJSON(e).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (s.specularIntensityMap = this.specularIntensityMap.toJSON(e).uuid), this.specularColorMap && this.specularColorMap.isTexture && (s.specularColorMap = this.specularColorMap.toJSON(e).uuid), this.envMap && this.envMap.isTexture && (s.envMap = this.envMap.toJSON(e).uuid, this.combine !== void 0 && (s.combine = this.combine)), this.envMapRotation !== void 0 && (s.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (s.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (s.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (s.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (s.gradientMap = this.gradientMap.toJSON(e).uuid), this.transmission !== void 0 && (s.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (s.transmissionMap = this.transmissionMap.toJSON(e).uuid), this.thickness !== void 0 && (s.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (s.thicknessMap = this.thicknessMap.toJSON(e).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (s.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (s.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (s.size = this.size), this.shadowSide !== null && (s.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (s.sizeAttenuation = this.sizeAttenuation), this.blending !== ai && (s.blending = this.blending), this.side !== ri && (s.side = this.side), this.vertexColors === !0 && (s.vertexColors = !0), this.opacity < 1 && (s.opacity = this.opacity), this.transparent === !0 && (s.transparent = !0), this.blendSrc !== _l && (s.blendSrc = this.blendSrc), this.blendDst !== bl && (s.blendDst = this.blendDst), this.blendEquation !==
|
|
18013
|
+
s.uuid = this.uuid, s.type = this.type, this.name !== "" && (s.name = this.name), this.color && this.color.isColor && (s.color = this.color.getHex()), this.roughness !== void 0 && (s.roughness = this.roughness), this.metalness !== void 0 && (s.metalness = this.metalness), this.sheen !== void 0 && (s.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (s.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (s.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (s.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (s.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (s.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (s.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (s.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (s.shininess = this.shininess), this.clearcoat !== void 0 && (s.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (s.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (s.clearcoatMap = this.clearcoatMap.toJSON(e).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (s.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(e).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (s.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(e).uuid, s.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.dispersion !== void 0 && (s.dispersion = this.dispersion), this.iridescence !== void 0 && (s.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (s.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (s.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (s.iridescenceMap = this.iridescenceMap.toJSON(e).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (s.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(e).uuid), this.anisotropy !== void 0 && (s.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (s.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (s.anisotropyMap = this.anisotropyMap.toJSON(e).uuid), this.map && this.map.isTexture && (s.map = this.map.toJSON(e).uuid), this.matcap && this.matcap.isTexture && (s.matcap = this.matcap.toJSON(e).uuid), this.alphaMap && this.alphaMap.isTexture && (s.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap && this.lightMap.isTexture && (s.lightMap = this.lightMap.toJSON(e).uuid, s.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (s.aoMap = this.aoMap.toJSON(e).uuid, s.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (s.bumpMap = this.bumpMap.toJSON(e).uuid, s.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (s.normalMap = this.normalMap.toJSON(e).uuid, s.normalMapType = this.normalMapType, s.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (s.displacementMap = this.displacementMap.toJSON(e).uuid, s.displacementScale = this.displacementScale, s.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (s.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap && this.metalnessMap.isTexture && (s.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap && this.emissiveMap.isTexture && (s.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap && this.specularMap.isTexture && (s.specularMap = this.specularMap.toJSON(e).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (s.specularIntensityMap = this.specularIntensityMap.toJSON(e).uuid), this.specularColorMap && this.specularColorMap.isTexture && (s.specularColorMap = this.specularColorMap.toJSON(e).uuid), this.envMap && this.envMap.isTexture && (s.envMap = this.envMap.toJSON(e).uuid, this.combine !== void 0 && (s.combine = this.combine)), this.envMapRotation !== void 0 && (s.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (s.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (s.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (s.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (s.gradientMap = this.gradientMap.toJSON(e).uuid), this.transmission !== void 0 && (s.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (s.transmissionMap = this.transmissionMap.toJSON(e).uuid), this.thickness !== void 0 && (s.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (s.thicknessMap = this.thicknessMap.toJSON(e).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (s.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (s.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (s.size = this.size), this.shadowSide !== null && (s.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (s.sizeAttenuation = this.sizeAttenuation), this.blending !== ai && (s.blending = this.blending), this.side !== ri && (s.side = this.side), this.vertexColors === !0 && (s.vertexColors = !0), this.opacity < 1 && (s.opacity = this.opacity), this.transparent === !0 && (s.transparent = !0), this.blendSrc !== _l && (s.blendSrc = this.blendSrc), this.blendDst !== bl && (s.blendDst = this.blendDst), this.blendEquation !== Cs && (s.blendEquation = this.blendEquation), this.blendSrcAlpha !== null && (s.blendSrcAlpha = this.blendSrcAlpha), this.blendDstAlpha !== null && (s.blendDstAlpha = this.blendDstAlpha), this.blendEquationAlpha !== null && (s.blendEquationAlpha = this.blendEquationAlpha), this.blendColor && this.blendColor.isColor && (s.blendColor = this.blendColor.getHex()), this.blendAlpha !== 0 && (s.blendAlpha = this.blendAlpha), this.depthFunc !== Tl && (s.depthFunc = this.depthFunc), this.depthTest === !1 && (s.depthTest = this.depthTest), this.depthWrite === !1 && (s.depthWrite = this.depthWrite), this.colorWrite === !1 && (s.colorWrite = this.colorWrite), this.stencilWriteMask !== 255 && (s.stencilWriteMask = this.stencilWriteMask), this.stencilFunc !== du && (s.stencilFunc = this.stencilFunc), this.stencilRef !== 0 && (s.stencilRef = this.stencilRef), this.stencilFuncMask !== 255 && (s.stencilFuncMask = this.stencilFuncMask), this.stencilFail !== hn && (s.stencilFail = this.stencilFail), this.stencilZFail !== hn && (s.stencilZFail = this.stencilZFail), this.stencilZPass !== hn && (s.stencilZPass = this.stencilZPass), this.stencilWrite === !0 && (s.stencilWrite = this.stencilWrite), this.rotation !== void 0 && this.rotation !== 0 && (s.rotation = this.rotation), this.polygonOffset === !0 && (s.polygonOffset = !0), this.polygonOffsetFactor !== 0 && (s.polygonOffsetFactor = this.polygonOffsetFactor), this.polygonOffsetUnits !== 0 && (s.polygonOffsetUnits = this.polygonOffsetUnits), this.linewidth !== void 0 && this.linewidth !== 1 && (s.linewidth = this.linewidth), this.dashSize !== void 0 && (s.dashSize = this.dashSize), this.gapSize !== void 0 && (s.gapSize = this.gapSize), this.scale !== void 0 && (s.scale = this.scale), this.dithering === !0 && (s.dithering = !0), this.alphaTest > 0 && (s.alphaTest = this.alphaTest), this.alphaHash === !0 && (s.alphaHash = !0), this.alphaToCoverage === !0 && (s.alphaToCoverage = !0), this.premultipliedAlpha === !0 && (s.premultipliedAlpha = !0), this.forceSinglePass === !0 && (s.forceSinglePass = !0), this.wireframe === !0 && (s.wireframe = !0), this.wireframeLinewidth > 1 && (s.wireframeLinewidth = this.wireframeLinewidth), this.wireframeLinecap !== "round" && (s.wireframeLinecap = this.wireframeLinecap), this.wireframeLinejoin !== "round" && (s.wireframeLinejoin = this.wireframeLinejoin), this.flatShading === !0 && (s.flatShading = !0), this.visible === !1 && (s.visible = !1), this.toneMapped === !1 && (s.toneMapped = !1), this.fog === !1 && (s.fog = !1), Object.keys(this.userData).length > 0 && (s.userData = this.userData);
|
|
18005
18014
|
function i(n) {
|
|
18006
18015
|
const r = [];
|
|
18007
18016
|
for (const o in n) {
|
|
@@ -18071,7 +18080,7 @@ const af = /* @__PURE__ */ new gs(), Oc = /* @__PURE__ */ new Le(), sE = /* @__P
|
|
|
18071
18080
|
const t = e.environment !== null && a.envMap === null ? e.environmentRotation : a.envMapRotation;
|
|
18072
18081
|
return t ? (af.copy(t), Oc.makeRotationFromEuler(af)) : Oc.identity(), Oc;
|
|
18073
18082
|
}), iE = /* @__PURE__ */ Ye.negate().reflect(st), nE = /* @__PURE__ */ Ye.negate().refract(st, sE), rE = /* @__PURE__ */ iE.transformDirection(xi).toVar("reflectVector"), aE = /* @__PURE__ */ nE.transformDirection(xi).toVar("reflectVector");
|
|
18074
|
-
class ec extends
|
|
18083
|
+
class ec extends Ct {
|
|
18075
18084
|
/**
|
|
18076
18085
|
* Constructs a new cube texture.
|
|
18077
18086
|
*
|
|
@@ -18577,7 +18586,7 @@ F.POINT_SIZE = "size";
|
|
|
18577
18586
|
F.DISPERSION = "dispersion";
|
|
18578
18587
|
F.LIGHT_MAP = "light";
|
|
18579
18588
|
F.AO = "ao";
|
|
18580
|
-
const TE = /* @__PURE__ */ G(F, F.ALPHA_TEST), SE = /* @__PURE__ */ G(F, F.COLOR), vE = /* @__PURE__ */ G(F, F.SHININESS), wE = /* @__PURE__ */ G(F, F.EMISSIVE), t0 = /* @__PURE__ */ G(F, F.OPACITY), EE = /* @__PURE__ */ G(F, F.SPECULAR), hf = /* @__PURE__ */ G(F, F.SPECULAR_INTENSITY),
|
|
18589
|
+
const TE = /* @__PURE__ */ G(F, F.ALPHA_TEST), SE = /* @__PURE__ */ G(F, F.COLOR), vE = /* @__PURE__ */ G(F, F.SHININESS), wE = /* @__PURE__ */ G(F, F.EMISSIVE), t0 = /* @__PURE__ */ G(F, F.OPACITY), EE = /* @__PURE__ */ G(F, F.SPECULAR), hf = /* @__PURE__ */ G(F, F.SPECULAR_INTENSITY), CE = /* @__PURE__ */ G(F, F.SPECULAR_COLOR), hl = /* @__PURE__ */ G(F, F.SPECULAR_STRENGTH), Ic = /* @__PURE__ */ G(F, F.REFLECTIVITY), ME = /* @__PURE__ */ G(F, F.ROUGHNESS), AE = /* @__PURE__ */ G(F, F.METALNESS), RE = /* @__PURE__ */ G(F, F.NORMAL), NE = /* @__PURE__ */ G(F, F.CLEARCOAT), PE = /* @__PURE__ */ G(F, F.CLEARCOAT_ROUGHNESS), FE = /* @__PURE__ */ G(F, F.CLEARCOAT_NORMAL), DE = /* @__PURE__ */ G(F, F.ROTATION), OE = /* @__PURE__ */ G(F, F.SHEEN), BE = /* @__PURE__ */ G(F, F.SHEEN_ROUGHNESS), IE = /* @__PURE__ */ G(F, F.ANISOTROPY), LE = /* @__PURE__ */ G(F, F.IRIDESCENCE), UE = /* @__PURE__ */ G(F, F.IRIDESCENCE_IOR), kE = /* @__PURE__ */ G(F, F.IRIDESCENCE_THICKNESS), zE = /* @__PURE__ */ G(F, F.TRANSMISSION), GE = /* @__PURE__ */ G(F, F.THICKNESS), VE = /* @__PURE__ */ G(F, F.IOR), HE = /* @__PURE__ */ G(F, F.ATTENUATION_DISTANCE), $E = /* @__PURE__ */ G(F, F.ATTENUATION_COLOR), WE = /* @__PURE__ */ G(F, F.LINE_SCALE), jE = /* @__PURE__ */ G(F, F.LINE_DASH_SIZE), qE = /* @__PURE__ */ G(F, F.LINE_GAP_SIZE);
|
|
18581
18590
|
F.LINE_WIDTH;
|
|
18582
18591
|
const YE = /* @__PURE__ */ G(F, F.LINE_DASH_OFFSET), XE = /* @__PURE__ */ G(F, F.POINT_SIZE), ZE = /* @__PURE__ */ G(F, F.DISPERSION), s0 = /* @__PURE__ */ G(F, F.LIGHT_MAP), KE = /* @__PURE__ */ G(F, F.AO), Jr = /* @__PURE__ */ Q(new he()).onReference(function(a) {
|
|
18583
18592
|
return a.material;
|
|
@@ -18627,7 +18636,7 @@ class JE extends ps {
|
|
|
18627
18636
|
return e.meshPerAttribute = this.meshPerAttribute, e.isInstancedBufferAttribute = !0, e;
|
|
18628
18637
|
}
|
|
18629
18638
|
}
|
|
18630
|
-
class
|
|
18639
|
+
class eC extends re {
|
|
18631
18640
|
static get type() {
|
|
18632
18641
|
return "InstanceNode";
|
|
18633
18642
|
}
|
|
@@ -18688,7 +18697,7 @@ class eM extends re {
|
|
|
18688
18697
|
this.instanceMatrix.usage !== hr && this.buffer !== null && this.instanceMatrix.version !== this.buffer.version && (this.buffer.version = this.instanceMatrix.version), this.instanceColor && this.instanceColor.usage !== hr && this.bufferColor !== null && this.instanceColor.version !== this.bufferColor.version && (this.bufferColor.version = this.instanceColor.version);
|
|
18689
18698
|
}
|
|
18690
18699
|
}
|
|
18691
|
-
class
|
|
18700
|
+
class tC extends eC {
|
|
18692
18701
|
static get type() {
|
|
18693
18702
|
return "InstancedMeshNode";
|
|
18694
18703
|
}
|
|
@@ -18702,8 +18711,8 @@ class tM extends eM {
|
|
|
18702
18711
|
super(t, s, i), this.instancedMesh = e;
|
|
18703
18712
|
}
|
|
18704
18713
|
}
|
|
18705
|
-
const
|
|
18706
|
-
class
|
|
18714
|
+
const sC = /* @__PURE__ */ L(tC).setParameterLength(1);
|
|
18715
|
+
class iC extends re {
|
|
18707
18716
|
static get type() {
|
|
18708
18717
|
return "BatchNode";
|
|
18709
18718
|
}
|
|
@@ -18758,8 +18767,8 @@ class iM extends re {
|
|
|
18758
18767
|
js.assign(p), e.hasGeometryAttribute("tangent") && yd.mulAssign(u);
|
|
18759
18768
|
}
|
|
18760
18769
|
}
|
|
18761
|
-
const
|
|
18762
|
-
class
|
|
18770
|
+
const nC = /* @__PURE__ */ L(iC).setParameterLength(1), uf = /* @__PURE__ */ new WeakMap();
|
|
18771
|
+
class rC extends re {
|
|
18763
18772
|
static get type() {
|
|
18764
18773
|
return "SkinningNode";
|
|
18765
18774
|
}
|
|
@@ -18861,8 +18870,8 @@ class rM extends re {
|
|
|
18861
18870
|
uf.get(t) !== e.frameId && (uf.set(t, e.frameId), this.previousBoneMatricesNode !== null && t.previousBoneMatrices.set(t.boneMatrices), t.update());
|
|
18862
18871
|
}
|
|
18863
18872
|
}
|
|
18864
|
-
const
|
|
18865
|
-
class
|
|
18873
|
+
const aC = (a) => U(new rC(a));
|
|
18874
|
+
class oC extends Ct {
|
|
18866
18875
|
/**
|
|
18867
18876
|
* Constructs a new data array texture.
|
|
18868
18877
|
*
|
|
@@ -18897,7 +18906,7 @@ const Lc = /* @__PURE__ */ new WeakMap(), Kt = /* @__PURE__ */ new ge(), df = /*
|
|
|
18897
18906
|
const r = ze(bw).mul(t).add(n), o = r.div(s), l = r.sub(o.mul(s));
|
|
18898
18907
|
return vs(a, ei(l, o)).depth(i).xyz.mul(e);
|
|
18899
18908
|
});
|
|
18900
|
-
function
|
|
18909
|
+
function lC(a) {
|
|
18901
18910
|
const e = a.morphAttributes.position !== void 0, t = a.morphAttributes.normal !== void 0, s = a.morphAttributes.color !== void 0, i = a.morphAttributes.position || a.morphAttributes.normal || a.morphAttributes.color, n = i !== void 0 ? i.length : 0;
|
|
18902
18911
|
let r = Lc.get(a);
|
|
18903
18912
|
if (r === void 0 || r.count !== n) {
|
|
@@ -18911,7 +18920,7 @@ function lM(a) {
|
|
|
18911
18920
|
let u = a.attributes.position.count * h, d = 1;
|
|
18912
18921
|
const p = 4096;
|
|
18913
18922
|
u > p && (d = Math.ceil(u / p), u = p);
|
|
18914
|
-
const f = new Float32Array(u * d * 4 * n), m = new
|
|
18923
|
+
const f = new Float32Array(u * d * 4 * n), m = new oC(f, u, d, n);
|
|
18915
18924
|
m.type = is, m.needsUpdate = !0;
|
|
18916
18925
|
const y = h * 4;
|
|
18917
18926
|
for (let x = 0; x < n; x++) {
|
|
@@ -18930,7 +18939,7 @@ function lM(a) {
|
|
|
18930
18939
|
}
|
|
18931
18940
|
return r;
|
|
18932
18941
|
}
|
|
18933
|
-
class
|
|
18942
|
+
class cC extends re {
|
|
18934
18943
|
static get type() {
|
|
18935
18944
|
return "MorphNode";
|
|
18936
18945
|
}
|
|
@@ -18948,10 +18957,10 @@ class cM extends re {
|
|
|
18948
18957
|
* @param {NodeBuilder} builder - The current node builder.
|
|
18949
18958
|
*/
|
|
18950
18959
|
setup(e) {
|
|
18951
|
-
const { geometry: t } = e, s = t.morphAttributes.position !== void 0, i = t.hasAttribute("normal") && t.morphAttributes.normal !== void 0, n = t.morphAttributes.position || t.morphAttributes.normal || t.morphAttributes.color, r = n !== void 0 ? n.length : 0, { texture: o, stride: l, size: c } =
|
|
18960
|
+
const { geometry: t } = e, s = t.morphAttributes.position !== void 0, i = t.hasAttribute("normal") && t.morphAttributes.normal !== void 0, n = t.morphAttributes.position || t.morphAttributes.normal || t.morphAttributes.color, r = n !== void 0 ? n.length : 0, { texture: o, stride: l, size: c } = lC(t);
|
|
18952
18961
|
s === !0 && wt.mulAssign(this.morphBaseInfluence), i === !0 && js.mulAssign(this.morphBaseInfluence);
|
|
18953
18962
|
const h = ze(c.width);
|
|
18954
|
-
|
|
18963
|
+
Ms(r, ({ i: u }) => {
|
|
18955
18964
|
const d = O(0).toVar();
|
|
18956
18965
|
this.mesh.count > 1 && this.mesh.morphTexture !== null && this.mesh.morphTexture !== void 0 ? d.assign(vs(this.mesh.morphTexture, ei(ze(u).add(1), ze(dd))).r) : d.assign(Ie("morphTargetInfluences", "float").element(u).toVar()), Qe(d.notEqual(0), () => {
|
|
18957
18966
|
s === !0 && wt.addAssign(df({
|
|
@@ -18982,7 +18991,7 @@ class cM extends re {
|
|
|
18982
18991
|
this.mesh.geometry.morphTargetsRelative ? e.value = 1 : e.value = 1 - this.mesh.morphTargetInfluences.reduce((t, s) => t + s, 0);
|
|
18983
18992
|
}
|
|
18984
18993
|
}
|
|
18985
|
-
const
|
|
18994
|
+
const hC = /* @__PURE__ */ L(cC).setParameterLength(1);
|
|
18986
18995
|
class Ur extends re {
|
|
18987
18996
|
static get type() {
|
|
18988
18997
|
return "LightingNode";
|
|
@@ -18994,7 +19003,7 @@ class Ur extends re {
|
|
|
18994
19003
|
super("vec3"), this.isLightingNode = !0;
|
|
18995
19004
|
}
|
|
18996
19005
|
}
|
|
18997
|
-
class
|
|
19006
|
+
class uC extends Ur {
|
|
18998
19007
|
static get type() {
|
|
18999
19008
|
return "AONode";
|
|
19000
19009
|
}
|
|
@@ -19010,7 +19019,7 @@ class uM extends Ur {
|
|
|
19010
19019
|
e.context.ambientOcclusion.mulAssign(this.aoNode);
|
|
19011
19020
|
}
|
|
19012
19021
|
}
|
|
19013
|
-
class
|
|
19022
|
+
class dC extends Py {
|
|
19014
19023
|
static get type() {
|
|
19015
19024
|
return "LightingContextNode";
|
|
19016
19025
|
}
|
|
@@ -19059,8 +19068,8 @@ class dM extends Py {
|
|
|
19059
19068
|
return this.value = this._value || (this._value = this.getContext()), this.value.lightingModel = this.lightingModel || e.context.lightingModel, super.setup(e);
|
|
19060
19069
|
}
|
|
19061
19070
|
}
|
|
19062
|
-
const
|
|
19063
|
-
class
|
|
19071
|
+
const pC = /* @__PURE__ */ L(dC);
|
|
19072
|
+
class fC extends Ur {
|
|
19064
19073
|
static get type() {
|
|
19065
19074
|
return "IrradianceNode";
|
|
19066
19075
|
}
|
|
@@ -19112,7 +19121,7 @@ class fs extends re {
|
|
|
19112
19121
|
const s = O().toVar("distanceToPlane"), i = O().toVar("distanceToGradient"), n = O(1).toVar("clipOpacity"), r = t.length;
|
|
19113
19122
|
if (this.hardwareClipping === !1 && r > 0) {
|
|
19114
19123
|
const l = Gs(t);
|
|
19115
|
-
|
|
19124
|
+
Ms(r, ({ i: c }) => {
|
|
19116
19125
|
const h = l.element(c);
|
|
19117
19126
|
s.assign(it.dot(h.xyz).negate().add(h.w)), i.assign(s.fwidth().div(2)), n.mulAssign(Hi(i.negate(), i, s));
|
|
19118
19127
|
});
|
|
@@ -19120,7 +19129,7 @@ class fs extends re {
|
|
|
19120
19129
|
const o = e.length;
|
|
19121
19130
|
if (o > 0) {
|
|
19122
19131
|
const l = Gs(e), c = O(1).toVar("intersectionClipOpacity");
|
|
19123
|
-
|
|
19132
|
+
Ms(o, ({ i: h }) => {
|
|
19124
19133
|
const u = l.element(h);
|
|
19125
19134
|
s.assign(it.dot(u.xyz).negate().add(u.w)), i.assign(s.fwidth().div(2)), c.mulAssign(Hi(i.negate(), i, s).oneMinus());
|
|
19126
19135
|
}), n.mulAssign(c.oneMinus());
|
|
@@ -19140,7 +19149,7 @@ class fs extends re {
|
|
|
19140
19149
|
const s = t.length;
|
|
19141
19150
|
if (this.hardwareClipping === !1 && s > 0) {
|
|
19142
19151
|
const n = Gs(t);
|
|
19143
|
-
|
|
19152
|
+
Ms(s, ({ i: r }) => {
|
|
19144
19153
|
const o = n.element(r);
|
|
19145
19154
|
it.dot(o.xyz).greaterThan(o.w).discard();
|
|
19146
19155
|
});
|
|
@@ -19148,7 +19157,7 @@ class fs extends re {
|
|
|
19148
19157
|
const i = e.length;
|
|
19149
19158
|
if (i > 0) {
|
|
19150
19159
|
const n = Gs(e), r = Qu(!0).toVar("clipped");
|
|
19151
|
-
|
|
19160
|
+
Ms(i, ({ i: o }) => {
|
|
19152
19161
|
const l = n.element(o);
|
|
19153
19162
|
r.assign(it.dot(l.xyz).greaterThan(l.w).and(r));
|
|
19154
19163
|
}), r.discard();
|
|
@@ -19166,7 +19175,7 @@ class fs extends re {
|
|
|
19166
19175
|
const s = e.length;
|
|
19167
19176
|
return t.enableHardwareClipping(s), I(() => {
|
|
19168
19177
|
const i = Gs(e), n = Xl(t.getClipDistance());
|
|
19169
|
-
|
|
19178
|
+
Ms(s, ({ i: r }) => {
|
|
19170
19179
|
const o = i.element(r), l = it.dot(o.xyz).sub(o.w).negate();
|
|
19171
19180
|
n.element(r).assign(l);
|
|
19172
19181
|
});
|
|
@@ -19176,7 +19185,7 @@ class fs extends re {
|
|
|
19176
19185
|
fs.ALPHA_TO_COVERAGE = "alphaToCoverage";
|
|
19177
19186
|
fs.DEFAULT = "default";
|
|
19178
19187
|
fs.HARDWARE = "hardware";
|
|
19179
|
-
const
|
|
19188
|
+
const mC = () => U(new fs()), gC = () => U(new fs(fs.ALPHA_TO_COVERAGE)), yC = () => U(new fs(fs.HARDWARE)), xC = [
|
|
19180
19189
|
"alphaMap",
|
|
19181
19190
|
"alphaTest",
|
|
19182
19191
|
"anisotropy",
|
|
@@ -19232,14 +19241,14 @@ const mM = () => U(new fs()), gM = () => U(new fs(fs.ALPHA_TO_COVERAGE)), yM = (
|
|
|
19232
19241
|
"transmission",
|
|
19233
19242
|
"transmissionMap"
|
|
19234
19243
|
];
|
|
19235
|
-
class
|
|
19244
|
+
class _C {
|
|
19236
19245
|
/**
|
|
19237
19246
|
* Constructs a new node material observer.
|
|
19238
19247
|
*
|
|
19239
19248
|
* @param {NodeBuilder} builder - The node builder.
|
|
19240
19249
|
*/
|
|
19241
19250
|
constructor(e) {
|
|
19242
|
-
this.renderObjects = /* @__PURE__ */ new WeakMap(), this.hasNode = this.containsNode(e), this.hasAnimation = e.object.isSkinnedMesh === !0, this.refreshUniforms =
|
|
19251
|
+
this.renderObjects = /* @__PURE__ */ new WeakMap(), this.hasNode = this.containsNode(e), this.hasAnimation = e.object.isSkinnedMesh === !0, this.refreshUniforms = xC, this.renderId = 0;
|
|
19243
19252
|
}
|
|
19244
19253
|
/**
|
|
19245
19254
|
* Returns `true` if the given render object is verified for the first time of this observer.
|
|
@@ -19402,11 +19411,11 @@ class _M {
|
|
|
19402
19411
|
return i || n ? !1 : this.equals(e) !== !0;
|
|
19403
19412
|
}
|
|
19404
19413
|
}
|
|
19405
|
-
const
|
|
19406
|
-
const e =
|
|
19414
|
+
const bC = 0.05, pf = /* @__PURE__ */ I(([a]) => ji(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))))))), ff = /* @__PURE__ */ I(([a]) => pf(V(pf(a.xy), a.z))), TC = /* @__PURE__ */ I(([a]) => {
|
|
19415
|
+
const e = Mt(
|
|
19407
19416
|
ui(vy(a.xyz)),
|
|
19408
19417
|
ui(wy(a.xyz))
|
|
19409
|
-
), t = O(1).div(O(
|
|
19418
|
+
), t = O(1).div(O(bC).mul(e)).toVar("pixScale"), s = V(
|
|
19410
19419
|
Va(Tn(hi(t))),
|
|
19411
19420
|
Va(nd(hi(t)))
|
|
19412
19421
|
), i = V(
|
|
@@ -19425,7 +19434,7 @@ const bM = 0.05, pf = /* @__PURE__ */ I(([a]) => ji(fe(1e4, Es(fe(17, a.x).add(f
|
|
|
19425
19434
|
{ name: "position", type: "vec3" }
|
|
19426
19435
|
]
|
|
19427
19436
|
});
|
|
19428
|
-
class
|
|
19437
|
+
class SC extends Iy {
|
|
19429
19438
|
static get type() {
|
|
19430
19439
|
return "VertexColorNode";
|
|
19431
19440
|
}
|
|
@@ -19459,7 +19468,7 @@ class SM extends Iy {
|
|
|
19459
19468
|
super.deserialize(e), this.index = e.index;
|
|
19460
19469
|
}
|
|
19461
19470
|
}
|
|
19462
|
-
const
|
|
19471
|
+
const vC = (a = 0) => U(new SC(a));
|
|
19463
19472
|
class nt extends qt {
|
|
19464
19473
|
static get type() {
|
|
19465
19474
|
return "NodeMaterial";
|
|
@@ -19510,7 +19519,7 @@ class nt extends qt {
|
|
|
19510
19519
|
* @return {NodeMaterialObserver} The node material observer.
|
|
19511
19520
|
*/
|
|
19512
19521
|
setupObserver(e) {
|
|
19513
|
-
return new
|
|
19522
|
+
return new _C(e);
|
|
19514
19523
|
}
|
|
19515
19524
|
/**
|
|
19516
19525
|
* Setups the vertex and fragment stage of this node material.
|
|
@@ -19554,7 +19563,7 @@ class nt extends qt {
|
|
|
19554
19563
|
let i = null;
|
|
19555
19564
|
if (t.length > 0 || s.length > 0) {
|
|
19556
19565
|
const n = e.renderer.samples;
|
|
19557
|
-
this.alphaToCoverage && n > 1 ? i =
|
|
19566
|
+
this.alphaToCoverage && n > 1 ? i = gC() : e.stack.add(mC());
|
|
19558
19567
|
}
|
|
19559
19568
|
return i;
|
|
19560
19569
|
}
|
|
@@ -19566,7 +19575,7 @@ class nt extends qt {
|
|
|
19566
19575
|
setupHardwareClipping(e) {
|
|
19567
19576
|
if (this.hardwareClipping = !1, e.clippingContext === null) return;
|
|
19568
19577
|
const t = e.clippingContext.unionPlanes.length;
|
|
19569
|
-
t > 0 && t <= 8 && e.isAvailable("clipDistance") && (e.stack.add(
|
|
19578
|
+
t > 0 && t <= 8 && e.isAvailable("clipDistance") && (e.stack.add(yC()), this.hardwareClipping = !0);
|
|
19570
19579
|
}
|
|
19571
19580
|
/**
|
|
19572
19581
|
* Setups the depth of this material.
|
|
@@ -19618,11 +19627,11 @@ class nt extends qt {
|
|
|
19618
19627
|
*/
|
|
19619
19628
|
setupPosition(e) {
|
|
19620
19629
|
const { object: t, geometry: s } = e;
|
|
19621
|
-
if ((s.morphAttributes.position || s.morphAttributes.normal || s.morphAttributes.color) &&
|
|
19630
|
+
if ((s.morphAttributes.position || s.morphAttributes.normal || s.morphAttributes.color) && hC(t).toStack(), t.isSkinnedMesh === !0 && aC(t).toStack(), this.displacementMap) {
|
|
19622
19631
|
const i = Bi("displacementMap", "texture"), n = Bi("displacementScale", "float"), r = Bi("displacementBias", "float");
|
|
19623
19632
|
wt.addAssign(js.normalize().mul(i.x.mul(n).add(r)));
|
|
19624
19633
|
}
|
|
19625
|
-
return t.isBatchedMesh &&
|
|
19634
|
+
return t.isBatchedMesh && nC(t).toStack(), t.isInstancedMesh && t.instanceMatrix && t.instanceMatrix.isInstancedBufferAttribute === !0 && sC(t).toStack(), this.positionNode !== null && wt.assign(hw(this.positionNode, "POSITION")), wt;
|
|
19626
19635
|
}
|
|
19627
19636
|
/**
|
|
19628
19637
|
* Setups the computation of the material's diffuse color.
|
|
@@ -19633,11 +19642,11 @@ class nt extends qt {
|
|
|
19633
19642
|
setupDiffuseColor({ object: e, geometry: t }) {
|
|
19634
19643
|
this.maskNode !== null && Qu(this.maskNode).not().discard();
|
|
19635
19644
|
let s = this.colorNode ? ne(this.colorNode) : SE;
|
|
19636
|
-
this.vertexColors === !0 && t.hasAttribute("color") && (s = s.mul(
|
|
19645
|
+
this.vertexColors === !0 && t.hasAttribute("color") && (s = s.mul(vC())), e.instanceColor && (s = Rl("vec3", "vInstanceColor").mul(s)), e.isBatchedMesh && e._colorsTexture && (s = Rl("vec3", "vBatchColor").mul(s)), ve.assign(s);
|
|
19637
19646
|
const i = this.opacityNode ? O(this.opacityNode) : t0;
|
|
19638
19647
|
ve.a.assign(ve.a.mul(i));
|
|
19639
19648
|
let n = null;
|
|
19640
|
-
(this.alphaTestNode !== null || this.alphaTest > 0) && (n = this.alphaTestNode !== null ? O(this.alphaTestNode) : TE, ve.a.lessThanEqual(n).discard()), this.alphaHash === !0 && ve.a.lessThan(
|
|
19649
|
+
(this.alphaTestNode !== null || this.alphaTest > 0) && (n = this.alphaTestNode !== null ? O(this.alphaTestNode) : TE, ve.a.lessThanEqual(n).discard()), this.alphaHash === !0 && ve.a.lessThan(TC(wt)).discard(), this.transparent === !1 && this.blending === ai && this.alphaToCoverage === !1 ? ve.a.assign(1) : n === null && ve.a.lessThanEqual(0).discard();
|
|
19641
19650
|
}
|
|
19642
19651
|
/**
|
|
19643
19652
|
* Abstract interface method that can be implemented by derived materials
|
|
@@ -19682,7 +19691,7 @@ class nt extends qt {
|
|
|
19682
19691
|
*/
|
|
19683
19692
|
setupLightMap(e) {
|
|
19684
19693
|
let t = null;
|
|
19685
|
-
return e.material.lightMap && (t = new
|
|
19694
|
+
return e.material.lightMap && (t = new fC(s0)), t;
|
|
19686
19695
|
}
|
|
19687
19696
|
/**
|
|
19688
19697
|
* Setups the lights node based on the scene, environment and material.
|
|
@@ -19696,7 +19705,7 @@ class nt extends qt {
|
|
|
19696
19705
|
const i = this.setupLightMap(e);
|
|
19697
19706
|
if (i && i.isLightingNode && t.push(i), this.aoNode !== null || e.material.aoMap) {
|
|
19698
19707
|
const r = this.aoNode !== null ? this.aoNode : KE;
|
|
19699
|
-
t.push(new
|
|
19708
|
+
t.push(new uC(r));
|
|
19700
19709
|
}
|
|
19701
19710
|
let n = this.lightsNode || e.lightsNode;
|
|
19702
19711
|
return t.length > 0 && (n = e.renderer.lighting.createNode([...n.getLights(), ...t])), n;
|
|
@@ -19722,7 +19731,7 @@ class nt extends qt {
|
|
|
19722
19731
|
let l = this.setupOutgoingLight(e);
|
|
19723
19732
|
if (o && o.getScope().hasLights) {
|
|
19724
19733
|
const c = this.setupLightingModel(e) || null;
|
|
19725
|
-
l =
|
|
19734
|
+
l = pC(o, c, s, i);
|
|
19726
19735
|
} else s !== null && (l = B(i !== null ? Ve(l, s, i) : s));
|
|
19727
19736
|
return (n && n.isNode === !0 || t.emissive && t.emissive.isColor === !0) && (Kp.assign(B(n || wE)), l = l.add(Kp)), l;
|
|
19728
19737
|
}
|
|
@@ -19776,7 +19785,7 @@ class nt extends qt {
|
|
|
19776
19785
|
images: {},
|
|
19777
19786
|
nodes: {}
|
|
19778
19787
|
});
|
|
19779
|
-
const s = qt.prototype.toJSON.call(this, e), i =
|
|
19788
|
+
const s = qt.prototype.toJSON.call(this, e), i = Cl(this);
|
|
19780
19789
|
s.inputNodes = {};
|
|
19781
19790
|
for (const { property: r, childNode: o } of i)
|
|
19782
19791
|
s.inputNodes[r] = o.toJSON(e).uuid;
|
|
@@ -19804,14 +19813,14 @@ class nt extends qt {
|
|
|
19804
19813
|
return this.lightsNode = e.lightsNode, this.envNode = e.envNode, this.colorNode = e.colorNode, this.normalNode = e.normalNode, this.opacityNode = e.opacityNode, this.backdropNode = e.backdropNode, this.backdropAlphaNode = e.backdropAlphaNode, this.alphaTestNode = e.alphaTestNode, this.maskNode = e.maskNode, this.positionNode = e.positionNode, this.geometryNode = e.geometryNode, this.depthNode = e.depthNode, this.receivedShadowPositionNode = e.receivedShadowPositionNode, this.castShadowPositionNode = e.castShadowPositionNode, this.receivedShadowNode = e.receivedShadowNode, this.castShadowNode = e.castShadowNode, this.outputNode = e.outputNode, this.mrtNode = e.mrtNode, this.fragmentNode = e.fragmentNode, this.vertexNode = e.vertexNode, super.copy(e);
|
|
19805
19814
|
}
|
|
19806
19815
|
}
|
|
19807
|
-
let
|
|
19816
|
+
let wC = 0;
|
|
19808
19817
|
const as = /* @__PURE__ */ new Le(), Uc = /* @__PURE__ */ new pt(), jn = /* @__PURE__ */ new R(), Qt = /* @__PURE__ */ new Qa(), ea = /* @__PURE__ */ new Qa(), ft = /* @__PURE__ */ new R();
|
|
19809
|
-
class _i extends
|
|
19818
|
+
class _i extends Cn {
|
|
19810
19819
|
/**
|
|
19811
19820
|
* Constructs a new geometry.
|
|
19812
19821
|
*/
|
|
19813
19822
|
constructor() {
|
|
19814
|
-
super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value:
|
|
19823
|
+
super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: wC++ }), this.uuid = ni(), this.name = "", this.type = "BufferGeometry", this.index = null, this.indirect = null, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = !1, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = { start: 0, count: 1 / 0 }, this.userData = {};
|
|
19815
19824
|
}
|
|
19816
19825
|
/**
|
|
19817
19826
|
* Returns the index of this geometry.
|
|
@@ -20336,7 +20345,7 @@ class _i extends Mn {
|
|
|
20336
20345
|
}
|
|
20337
20346
|
}
|
|
20338
20347
|
const Ks = /* @__PURE__ */ new R(), kc = /* @__PURE__ */ new R(), xo = /* @__PURE__ */ new R(), wi = /* @__PURE__ */ new R(), zc = /* @__PURE__ */ new R(), _o = /* @__PURE__ */ new R(), Gc = /* @__PURE__ */ new R();
|
|
20339
|
-
class
|
|
20348
|
+
class EC {
|
|
20340
20349
|
/**
|
|
20341
20350
|
* Constructs a new ray.
|
|
20342
20351
|
*
|
|
@@ -20897,7 +20906,7 @@ class Ii extends qt {
|
|
|
20897
20906
|
return super.copy(e), this.color.copy(e.color), this.map = e.map, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.specularMap = e.specularMap, this.alphaMap = e.alphaMap, this.envMap = e.envMap, this.envMapRotation.copy(e.envMapRotation), this.combine = e.combine, this.reflectivity = e.reflectivity, this.refractionRatio = e.refractionRatio, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.fog = e.fog, this;
|
|
20898
20907
|
}
|
|
20899
20908
|
}
|
|
20900
|
-
const gf = /* @__PURE__ */ new Le(), Qi = /* @__PURE__ */ new
|
|
20909
|
+
const gf = /* @__PURE__ */ new Le(), Qi = /* @__PURE__ */ new EC(), bo = /* @__PURE__ */ new Yl(), yf = /* @__PURE__ */ new R(), To = /* @__PURE__ */ new R(), So = /* @__PURE__ */ new R(), vo = /* @__PURE__ */ new R(), Xc = /* @__PURE__ */ new R(), wo = /* @__PURE__ */ new R(), xf = /* @__PURE__ */ new R(), Eo = /* @__PURE__ */ new R();
|
|
20901
20910
|
class gi extends pt {
|
|
20902
20911
|
/**
|
|
20903
20912
|
* Constructs a new mesh.
|
|
@@ -20969,14 +20978,14 @@ class gi extends pt {
|
|
|
20969
20978
|
const y = d[f], g = r[y.materialIndex], x = Math.max(y.start, p.start), _ = Math.min(o.count, Math.min(y.start + y.count, p.start + p.count));
|
|
20970
20979
|
for (let b = x, T = _; b < T; b += 3) {
|
|
20971
20980
|
const E = o.getX(b), v = o.getX(b + 1), A = o.getX(b + 2);
|
|
20972
|
-
i =
|
|
20981
|
+
i = Co(this, g, e, s, c, h, u, E, v, A), i && (i.faceIndex = Math.floor(b / 3), i.face.materialIndex = y.materialIndex, t.push(i));
|
|
20973
20982
|
}
|
|
20974
20983
|
}
|
|
20975
20984
|
else {
|
|
20976
20985
|
const f = Math.max(0, p.start), m = Math.min(o.count, p.start + p.count);
|
|
20977
20986
|
for (let y = f, g = m; y < g; y += 3) {
|
|
20978
20987
|
const x = o.getX(y), _ = o.getX(y + 1), b = o.getX(y + 2);
|
|
20979
|
-
i =
|
|
20988
|
+
i = Co(this, r, e, s, c, h, u, x, _, b), i && (i.faceIndex = Math.floor(y / 3), t.push(i));
|
|
20980
20989
|
}
|
|
20981
20990
|
}
|
|
20982
20991
|
else if (l !== void 0)
|
|
@@ -20985,19 +20994,19 @@ class gi extends pt {
|
|
|
20985
20994
|
const y = d[f], g = r[y.materialIndex], x = Math.max(y.start, p.start), _ = Math.min(l.count, Math.min(y.start + y.count, p.start + p.count));
|
|
20986
20995
|
for (let b = x, T = _; b < T; b += 3) {
|
|
20987
20996
|
const E = b, v = b + 1, A = b + 2;
|
|
20988
|
-
i =
|
|
20997
|
+
i = Co(this, g, e, s, c, h, u, E, v, A), i && (i.faceIndex = Math.floor(b / 3), i.face.materialIndex = y.materialIndex, t.push(i));
|
|
20989
20998
|
}
|
|
20990
20999
|
}
|
|
20991
21000
|
else {
|
|
20992
21001
|
const f = Math.max(0, p.start), m = Math.min(l.count, p.start + p.count);
|
|
20993
21002
|
for (let y = f, g = m; y < g; y += 3) {
|
|
20994
21003
|
const x = y, _ = y + 1, b = y + 2;
|
|
20995
|
-
i =
|
|
21004
|
+
i = Co(this, r, e, s, c, h, u, x, _, b), i && (i.faceIndex = Math.floor(y / 3), t.push(i));
|
|
20996
21005
|
}
|
|
20997
21006
|
}
|
|
20998
21007
|
}
|
|
20999
21008
|
}
|
|
21000
|
-
function
|
|
21009
|
+
function CC(a, e, t, s, i, n, r, o) {
|
|
21001
21010
|
let l;
|
|
21002
21011
|
if (e.side === jt ? l = s.intersectTriangle(r, n, i, !0, o) : l = s.intersectTriangle(i, n, r, e.side === ri, o), l === null) return null;
|
|
21003
21012
|
Eo.copy(o), Eo.applyMatrix4(a.matrixWorld);
|
|
@@ -21008,9 +21017,9 @@ function MM(a, e, t, s, i, n, r, o) {
|
|
|
21008
21017
|
object: a
|
|
21009
21018
|
};
|
|
21010
21019
|
}
|
|
21011
|
-
function
|
|
21020
|
+
function Co(a, e, t, s, i, n, r, o, l, c) {
|
|
21012
21021
|
a.getVertexPosition(o, To), a.getVertexPosition(l, So), a.getVertexPosition(c, vo);
|
|
21013
|
-
const h =
|
|
21022
|
+
const h = CC(a, e, t, s, To, So, vo, xf);
|
|
21014
21023
|
if (h) {
|
|
21015
21024
|
const u = new R();
|
|
21016
21025
|
As.getBarycoord(xf, To, So, vo, u), i && (h.uv = As.getInterpolatedAttribute(i, o, l, c, u, new he())), n && (h.uv1 = As.getInterpolatedAttribute(n, o, l, c, u, new he())), r && (h.normal = As.getInterpolatedAttribute(r, o, l, c, u, new R()), h.normal.dot(s.direction) > 0 && h.normal.multiplyScalar(-1));
|
|
@@ -21090,7 +21099,7 @@ class xd extends Wu {
|
|
|
21090
21099
|
}
|
|
21091
21100
|
}
|
|
21092
21101
|
const Zc = /* @__PURE__ */ new xd(-1, 1, 1, -1, 0, 1);
|
|
21093
|
-
class
|
|
21102
|
+
class MC extends _i {
|
|
21094
21103
|
/**
|
|
21095
21104
|
* Constructs a new quad geometry.
|
|
21096
21105
|
*
|
|
@@ -21102,7 +21111,7 @@ class CM extends _i {
|
|
|
21102
21111
|
this.setAttribute("position", new Bt([-1, 3, 0, -1, -1, 0, 3, -1, 0], 3)), this.setAttribute("uv", new Bt(t, 2));
|
|
21103
21112
|
}
|
|
21104
21113
|
}
|
|
21105
|
-
const
|
|
21114
|
+
const AC = /* @__PURE__ */ new MC();
|
|
21106
21115
|
class _d extends gi {
|
|
21107
21116
|
/**
|
|
21108
21117
|
* Constructs a new quad mesh.
|
|
@@ -21110,7 +21119,7 @@ class _d extends gi {
|
|
|
21110
21119
|
* @param {?Material} [material=null] - The material to render the quad mesh with.
|
|
21111
21120
|
*/
|
|
21112
21121
|
constructor(e = null) {
|
|
21113
|
-
super(
|
|
21122
|
+
super(AC, e), this.camera = Zc, this.isQuadMesh = !0;
|
|
21114
21123
|
}
|
|
21115
21124
|
/**
|
|
21116
21125
|
* Async version of `render()`.
|
|
@@ -21134,7 +21143,7 @@ class _d extends gi {
|
|
|
21134
21143
|
const tc = 1 / 6, n0 = (a) => fe(tc, fe(a, fe(a, a.negate().add(3)).sub(3)).add(1)), bu = (a) => fe(tc, fe(a, fe(a, fe(3, a).sub(6))).add(4)), r0 = (a) => fe(tc, fe(a, fe(a, fe(-3, a).add(3)).add(3)).add(1)), Tu = (a) => fe(tc, ql(a, 3)), _f = (a) => n0(a).add(bu(a)), bf = (a) => r0(a).add(Tu(a)), Tf = (a) => Lt(-1, bu(a).div(n0(a).add(bu(a)))), Sf = (a) => Lt(1, Tu(a).div(r0(a).add(Tu(a)))), vf = (a, e, t) => {
|
|
21135
21144
|
const s = a.uvNode, i = fe(s, e.zw).add(0.5), n = Tn(i), r = ji(i), o = _f(r.x), l = bf(r.x), c = Tf(r.x), h = Sf(r.x), u = Tf(r.y), d = Sf(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 = _f(r.y).mul(Lt(o.mul(a.sample(p).level(t)), l.mul(a.sample(f).level(t)))), x = bf(r.y).mul(Lt(o.mul(a.sample(m).level(t)), l.mul(a.sample(y).level(t))));
|
|
21136
21145
|
return g.add(x);
|
|
21137
|
-
},
|
|
21146
|
+
}, RC = /* @__PURE__ */ I(([a, e = O(3)]) => {
|
|
21138
21147
|
const t = V(a.size(ze(e))), s = V(a.size(ze(e.add(1)))), i = Ws(1, t), n = Ws(1, s), r = vf(a, ne(i, t), Tn(e)), o = vf(a, ne(n, s), nd(e));
|
|
21139
21148
|
return ji(e).mix(r, o);
|
|
21140
21149
|
}), ta = /* @__PURE__ */ new gs(), Kc = /* @__PURE__ */ new Le();
|
|
@@ -21170,7 +21179,7 @@ class Wt extends re {
|
|
|
21170
21179
|
Wt.BACKGROUND_BLURRINESS = "backgroundBlurriness";
|
|
21171
21180
|
Wt.BACKGROUND_INTENSITY = "backgroundIntensity";
|
|
21172
21181
|
Wt.BACKGROUND_ROTATION = "backgroundRotation";
|
|
21173
|
-
const
|
|
21182
|
+
const NC = /* @__PURE__ */ G(Wt, Wt.BACKGROUND_BLURRINESS), wf = /* @__PURE__ */ G(Wt, Wt.BACKGROUND_INTENSITY), PC = /* @__PURE__ */ G(Wt, Wt.BACKGROUND_ROTATION), FC = I(({ texture: a, uv: e }) => {
|
|
21174
21183
|
const s = B().toVar();
|
|
21175
21184
|
return Qe(e.x.lessThan(1e-4), () => {
|
|
21176
21185
|
s.assign(B(1, 0, 0));
|
|
@@ -21189,7 +21198,7 @@ const NM = /* @__PURE__ */ G(Wt, Wt.BACKGROUND_BLURRINESS), wf = /* @__PURE__ */
|
|
|
21189
21198
|
s.assign(B(n, r, o));
|
|
21190
21199
|
}), s.normalize();
|
|
21191
21200
|
});
|
|
21192
|
-
class
|
|
21201
|
+
class DC extends Lr {
|
|
21193
21202
|
static get type() {
|
|
21194
21203
|
return "Texture3DNode";
|
|
21195
21204
|
}
|
|
@@ -21258,11 +21267,11 @@ class DM extends Lr {
|
|
|
21258
21267
|
* @return {Node<vec3>} TODO.
|
|
21259
21268
|
*/
|
|
21260
21269
|
normal(e) {
|
|
21261
|
-
return
|
|
21270
|
+
return FC({ texture: this, uv: e });
|
|
21262
21271
|
}
|
|
21263
21272
|
}
|
|
21264
|
-
const
|
|
21265
|
-
class
|
|
21273
|
+
const OC = /* @__PURE__ */ L(DC).setParameterLength(1, 3), Mo = /* @__PURE__ */ new he();
|
|
21274
|
+
class BC extends Lr {
|
|
21266
21275
|
static get type() {
|
|
21267
21276
|
return "PassTextureNode";
|
|
21268
21277
|
}
|
|
@@ -21282,7 +21291,7 @@ class BM extends Lr {
|
|
|
21282
21291
|
return new this.constructor(this.passNode, this.value);
|
|
21283
21292
|
}
|
|
21284
21293
|
}
|
|
21285
|
-
class Ef extends
|
|
21294
|
+
class Ef extends BC {
|
|
21286
21295
|
static get type() {
|
|
21287
21296
|
return "PassMultipleTextureNode";
|
|
21288
21297
|
}
|
|
@@ -21325,7 +21334,7 @@ class sc extends rt {
|
|
|
21325
21334
|
super("vec4"), this.scope = e, this.scene = t, this.camera = s, this.options = i, this._pixelRatio = 1, this._width = 1, this._height = 1;
|
|
21326
21335
|
const n = new $s();
|
|
21327
21336
|
n.isRenderTargetTexture = !0, n.name = "depth";
|
|
21328
|
-
const r = new
|
|
21337
|
+
const r = new Mn(this._width * this._pixelRatio, this._height * this._pixelRatio, { type: hs, ...i });
|
|
21329
21338
|
r.texture.name = "output", r.depthTexture = n, this.renderTarget = r, this._textures = {
|
|
21330
21339
|
output: r.texture,
|
|
21331
21340
|
depth: n
|
|
@@ -21460,7 +21469,7 @@ class sc extends rt {
|
|
|
21460
21469
|
const { renderer: t } = e, { scene: s } = this;
|
|
21461
21470
|
let i, n;
|
|
21462
21471
|
const r = t.getOutputRenderTarget();
|
|
21463
|
-
r && r.isXRRenderTarget === !0 ? (n = 1, i = t.xr.getCamera(), t.xr.updateCamera(i),
|
|
21472
|
+
r && r.isXRRenderTarget === !0 ? (n = 1, i = t.xr.getCamera(), t.xr.updateCamera(i), Mo.set(r.width, r.height)) : (i = this.camera, n = t.getPixelRatio(), t.getSize(Mo)), this._pixelRatio = n, this.setSize(Mo.width, Mo.height);
|
|
21464
21473
|
const o = t.getRenderTarget(), l = t.getMRT(), c = i.layers.mask;
|
|
21465
21474
|
this._cameraNear.value = i.near, this._cameraFar.value = i.far, this._layers !== null && (i.layers.mask = this._layers.mask);
|
|
21466
21475
|
for (const h in this._previousTextures)
|
|
@@ -21495,21 +21504,21 @@ class sc extends rt {
|
|
|
21495
21504
|
}
|
|
21496
21505
|
sc.COLOR = "color";
|
|
21497
21506
|
sc.DEPTH = "depth";
|
|
21498
|
-
const
|
|
21507
|
+
const IC = /* @__PURE__ */ I(([a, e]) => a.mul(e).clamp()).setLayout({
|
|
21499
21508
|
name: "linearToneMapping",
|
|
21500
21509
|
type: "vec3",
|
|
21501
21510
|
inputs: [
|
|
21502
21511
|
{ name: "color", type: "vec3" },
|
|
21503
21512
|
{ name: "exposure", type: "float" }
|
|
21504
21513
|
]
|
|
21505
|
-
}),
|
|
21514
|
+
}), LC = /* @__PURE__ */ I(([a, e]) => (a = a.mul(e), a.div(a.add(1)).clamp())).setLayout({
|
|
21506
21515
|
name: "reinhardToneMapping",
|
|
21507
21516
|
type: "vec3",
|
|
21508
21517
|
inputs: [
|
|
21509
21518
|
{ name: "color", type: "vec3" },
|
|
21510
21519
|
{ name: "exposure", type: "float" }
|
|
21511
21520
|
]
|
|
21512
|
-
}),
|
|
21521
|
+
}), UC = /* @__PURE__ */ I(([a, e]) => {
|
|
21513
21522
|
a = a.mul(e), a = a.sub(4e-3).max(0);
|
|
21514
21523
|
const t = a.mul(a.mul(6.2).add(0.5)), s = a.mul(a.mul(6.2).add(1.7)).add(0.06);
|
|
21515
21524
|
return t.div(s).pow(2.2);
|
|
@@ -21520,10 +21529,10 @@ const IM = /* @__PURE__ */ I(([a, e]) => a.mul(e).clamp()).setLayout({
|
|
|
21520
21529
|
{ name: "color", type: "vec3" },
|
|
21521
21530
|
{ name: "exposure", type: "float" }
|
|
21522
21531
|
]
|
|
21523
|
-
}),
|
|
21532
|
+
}), kC = /* @__PURE__ */ I(([a]) => {
|
|
21524
21533
|
const e = a.mul(a.add(0.0245786)).sub(90537e-9), t = a.mul(a.add(0.432951).mul(0.983729)).add(0.238081);
|
|
21525
21534
|
return e.div(t);
|
|
21526
|
-
}),
|
|
21535
|
+
}), zC = /* @__PURE__ */ I(([a, e]) => {
|
|
21527
21536
|
const t = It(
|
|
21528
21537
|
0.59719,
|
|
21529
21538
|
0.35458,
|
|
@@ -21545,7 +21554,7 @@ const IM = /* @__PURE__ */ I(([a, e]) => a.mul(e).clamp()).setLayout({
|
|
|
21545
21554
|
-0.07276,
|
|
21546
21555
|
1.07602
|
|
21547
21556
|
);
|
|
21548
|
-
return a = a.mul(e).div(0.6), a = t.mul(a), a =
|
|
21557
|
+
return a = a.mul(e).div(0.6), a = t.mul(a), a = kC(a), a = s.mul(a), a.clamp();
|
|
21549
21558
|
}).setLayout({
|
|
21550
21559
|
name: "acesFilmicToneMapping",
|
|
21551
21560
|
type: "vec3",
|
|
@@ -21553,12 +21562,12 @@ const IM = /* @__PURE__ */ I(([a, e]) => a.mul(e).clamp()).setLayout({
|
|
|
21553
21562
|
{ name: "color", type: "vec3" },
|
|
21554
21563
|
{ name: "exposure", type: "float" }
|
|
21555
21564
|
]
|
|
21556
|
-
}),
|
|
21565
|
+
}), GC = /* @__PURE__ */ It(B(1.6605, -0.1246, -0.0182), B(-0.5876, 1.1329, -0.1006), B(-0.0728, -83e-4, 1.1187)), VC = /* @__PURE__ */ It(B(0.6274, 0.0691, 0.0164), B(0.3293, 0.9195, 0.088), B(0.0433, 0.0113, 0.8956)), HC = /* @__PURE__ */ I(([a]) => {
|
|
21557
21566
|
const e = B(a).toVar(), t = B(e.mul(e)).toVar(), s = B(t.mul(t)).toVar();
|
|
21558
21567
|
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))));
|
|
21559
|
-
}), $
|
|
21568
|
+
}), $C = /* @__PURE__ */ I(([a, e]) => {
|
|
21560
21569
|
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);
|
|
21561
|
-
return t.mulAssign(e), t.assign(
|
|
21570
|
+
return t.mulAssign(e), t.assign(VC.mul(t)), t.assign(s.mul(t)), t.assign(Mt(t, 1e-10)), t.assign(hi(t)), t.assign(t.sub(n).div(r.sub(n))), t.assign(mi(t, 0, 1)), t.assign(HC(t)), t.assign(i.mul(t)), t.assign(ql(Mt(B(0), t), B(2.2))), t.assign(GC.mul(t)), t.assign(mi(t, 0, 1)), t;
|
|
21562
21571
|
}).setLayout({
|
|
21563
21572
|
name: "agxToneMapping",
|
|
21564
21573
|
type: "vec3",
|
|
@@ -21566,12 +21575,12 @@ const IM = /* @__PURE__ */ I(([a, e]) => a.mul(e).clamp()).setLayout({
|
|
|
21566
21575
|
{ name: "color", type: "vec3" },
|
|
21567
21576
|
{ name: "exposure", type: "float" }
|
|
21568
21577
|
]
|
|
21569
|
-
}),
|
|
21578
|
+
}), WC = /* @__PURE__ */ I(([a, e]) => {
|
|
21570
21579
|
const t = O(0.76), s = O(0.15);
|
|
21571
21580
|
a = a.mul(e);
|
|
21572
21581
|
const i = Pr(a.r, Pr(a.g, a.b)), n = Et(i.lessThan(0.08), i.sub(fe(6.25, i.mul(i))), 0.04);
|
|
21573
21582
|
a.subAssign(n);
|
|
21574
|
-
const r =
|
|
21583
|
+
const r = Mt(a.r, Mt(a.g, a.b));
|
|
21575
21584
|
Qe(r.lessThan(t), () => a);
|
|
21576
21585
|
const o = Ft(1, t), l = Ft(1, o.mul(o).div(r.add(o.sub(t))));
|
|
21577
21586
|
a.mulAssign(l.div(r));
|
|
@@ -21631,7 +21640,7 @@ class ht extends re {
|
|
|
21631
21640
|
super.deserialize(e), this.code = e.code, this.language = e.language;
|
|
21632
21641
|
}
|
|
21633
21642
|
}
|
|
21634
|
-
class
|
|
21643
|
+
class jC extends ht {
|
|
21635
21644
|
static get type() {
|
|
21636
21645
|
return "FunctionNode";
|
|
21637
21646
|
}
|
|
@@ -21682,14 +21691,14 @@ function a0(a) {
|
|
|
21682
21691
|
const t = a.context.getViewZ;
|
|
21683
21692
|
return t !== void 0 && (e = t(this)), (e || it.z).negate();
|
|
21684
21693
|
}
|
|
21685
|
-
const
|
|
21694
|
+
const qC = I(([a, e], t) => {
|
|
21686
21695
|
const s = a0(t);
|
|
21687
21696
|
return Hi(a, e, s);
|
|
21688
|
-
}),
|
|
21697
|
+
}), YC = I(([a], e) => {
|
|
21689
21698
|
const t = a0(e);
|
|
21690
21699
|
return a.mul(a, t, t).negate().exp().oneMinus();
|
|
21691
|
-
}),
|
|
21692
|
-
class
|
|
21700
|
+
}), Cf = I(([a, e]) => ne(e.toFloat().mix(Fa.rgb, a.toVec3()), Fa.a));
|
|
21701
|
+
class XC extends re {
|
|
21693
21702
|
/**
|
|
21694
21703
|
* Constructs a new barrier node.
|
|
21695
21704
|
*
|
|
@@ -21704,7 +21713,7 @@ class XM extends re {
|
|
|
21704
21713
|
`) : e.addLineFlowCode(`${t}Barrier()`, this);
|
|
21705
21714
|
}
|
|
21706
21715
|
}
|
|
21707
|
-
L(
|
|
21716
|
+
L(XC);
|
|
21708
21717
|
class Ys extends re {
|
|
21709
21718
|
static get type() {
|
|
21710
21719
|
return "AtomicFunctionNode";
|
|
@@ -21768,7 +21777,7 @@ function o0(a) {
|
|
|
21768
21777
|
const e = ic(a);
|
|
21769
21778
|
return e.shadowMatrix || (e.shadowMatrix = Q("mat4").setGroup(K).onRenderUpdate((t) => ((a.castShadow !== !0 || t.renderer.shadowMap.enabled === !1) && a.shadow.updateMatrices(a), a.shadow.matrix)));
|
|
21770
21779
|
}
|
|
21771
|
-
function
|
|
21780
|
+
function ZC(a, e = $a) {
|
|
21772
21781
|
const t = o0(a).mul(e);
|
|
21773
21782
|
return t.xyz.div(t.w);
|
|
21774
21783
|
}
|
|
@@ -21776,7 +21785,7 @@ function l0(a) {
|
|
|
21776
21785
|
const e = ic(a);
|
|
21777
21786
|
return e.position || (e.position = Q(new R()).setGroup(K).onRenderUpdate((t, s) => s.value.setFromMatrixPosition(a.matrixWorld)));
|
|
21778
21787
|
}
|
|
21779
|
-
function
|
|
21788
|
+
function KC(a) {
|
|
21780
21789
|
const e = ic(a);
|
|
21781
21790
|
return e.targetPosition || (e.targetPosition = Q(new R()).setGroup(K).onRenderUpdate((t, s) => s.value.setFromMatrixPosition(a.target.matrixWorld)));
|
|
21782
21791
|
}
|
|
@@ -21786,7 +21795,7 @@ function c0(a) {
|
|
|
21786
21795
|
s.value = s.value || new R(), s.value.setFromMatrixPosition(a.matrixWorld), s.value.applyMatrix4(t.matrixWorldInverse);
|
|
21787
21796
|
}));
|
|
21788
21797
|
}
|
|
21789
|
-
const h0 = (a) => xi.transformDirection(l0(a).sub(
|
|
21798
|
+
const h0 = (a) => xi.transformDirection(l0(a).sub(KC(a))), QC = (a) => a.sort((e, t) => e.id - t.id), JC = (a, e) => {
|
|
21790
21799
|
for (const t of e)
|
|
21791
21800
|
if (t.isAnalyticLightNode && t.light.id === a)
|
|
21792
21801
|
return t;
|
|
@@ -21849,13 +21858,13 @@ class u0 extends re {
|
|
|
21849
21858
|
* @param {NodeBuilder} builder - A reference to the current node builder.
|
|
21850
21859
|
*/
|
|
21851
21860
|
setupLightsNode(e) {
|
|
21852
|
-
const t = [], s = this._lightNodes, i =
|
|
21861
|
+
const t = [], s = this._lightNodes, i = QC(this._lights), n = e.renderer.library;
|
|
21853
21862
|
for (const r of i)
|
|
21854
21863
|
if (r.isNode)
|
|
21855
21864
|
t.push(U(r));
|
|
21856
21865
|
else {
|
|
21857
21866
|
let o = null;
|
|
21858
|
-
if (s !== null && (o =
|
|
21867
|
+
if (s !== null && (o = JC(r.id, s)), o === null) {
|
|
21859
21868
|
const l = n.getLightNodeClass(r.constructor);
|
|
21860
21869
|
if (l === null) {
|
|
21861
21870
|
console.warn(`LightsNode.setupNodeLights: Light node not found for ${r.constructor.name}`);
|
|
@@ -21955,7 +21964,7 @@ class u0 extends re {
|
|
|
21955
21964
|
return this._lights.length > 0;
|
|
21956
21965
|
}
|
|
21957
21966
|
}
|
|
21958
|
-
class
|
|
21967
|
+
class eM extends re {
|
|
21959
21968
|
static get type() {
|
|
21960
21969
|
return "ShadowBaseNode";
|
|
21961
21970
|
}
|
|
@@ -21977,34 +21986,34 @@ class eC extends re {
|
|
|
21977
21986
|
}
|
|
21978
21987
|
}
|
|
21979
21988
|
const d0 = /* @__PURE__ */ uy("vec3", "shadowPositionWorld");
|
|
21980
|
-
function
|
|
21989
|
+
function tM(a, e = {}) {
|
|
21981
21990
|
return e.toneMapping = a.toneMapping, e.toneMappingExposure = a.toneMappingExposure, e.outputColorSpace = a.outputColorSpace, e.renderTarget = a.getRenderTarget(), e.activeCubeFace = a.getActiveCubeFace(), e.activeMipmapLevel = a.getActiveMipmapLevel(), e.renderObjectFunction = a.getRenderObjectFunction(), e.pixelRatio = a.getPixelRatio(), e.mrt = a.getMRT(), e.clearColor = a.getClearColor(e.clearColor || new we()), e.clearAlpha = a.getClearAlpha(), e.autoClear = a.autoClear, e.scissorTest = a.getScissorTest(), e;
|
|
21982
21991
|
}
|
|
21983
|
-
function
|
|
21984
|
-
return e =
|
|
21992
|
+
function sM(a, e) {
|
|
21993
|
+
return e = tM(a, e), a.setMRT(null), a.setRenderObjectFunction(null), a.setClearColor(0, 1), a.autoClear = !0, e;
|
|
21985
21994
|
}
|
|
21986
|
-
function
|
|
21995
|
+
function iM(a, e) {
|
|
21987
21996
|
a.toneMapping = e.toneMapping, a.toneMappingExposure = e.toneMappingExposure, a.outputColorSpace = e.outputColorSpace, a.setRenderTarget(e.renderTarget, e.activeCubeFace, e.activeMipmapLevel), a.setRenderObjectFunction(e.renderObjectFunction), a.setPixelRatio(e.pixelRatio), a.setMRT(e.mrt), a.setClearColor(e.clearColor, e.clearAlpha), a.autoClear = e.autoClear, a.setScissorTest(e.scissorTest);
|
|
21988
21997
|
}
|
|
21989
|
-
function
|
|
21998
|
+
function nM(a, e = {}) {
|
|
21990
21999
|
return e.background = a.background, e.backgroundNode = a.backgroundNode, e.overrideMaterial = a.overrideMaterial, e;
|
|
21991
22000
|
}
|
|
21992
|
-
function
|
|
21993
|
-
return e =
|
|
22001
|
+
function rM(a, e) {
|
|
22002
|
+
return e = nM(a, e), a.background = null, a.backgroundNode = null, a.overrideMaterial = null, e;
|
|
21994
22003
|
}
|
|
21995
|
-
function
|
|
22004
|
+
function aM(a, e) {
|
|
21996
22005
|
a.background = e.background, a.backgroundNode = e.backgroundNode, a.overrideMaterial = e.overrideMaterial;
|
|
21997
22006
|
}
|
|
21998
|
-
function
|
|
21999
|
-
return t =
|
|
22007
|
+
function oM(a, e, t) {
|
|
22008
|
+
return t = sM(a, t), t = rM(e, t), t;
|
|
22000
22009
|
}
|
|
22001
|
-
function
|
|
22002
|
-
|
|
22010
|
+
function lM(a, e, t) {
|
|
22011
|
+
iM(a, t), aM(e, t);
|
|
22003
22012
|
}
|
|
22004
|
-
const
|
|
22013
|
+
const Mf = /* @__PURE__ */ new WeakMap(), cM = /* @__PURE__ */ I(({ depthTexture: a, shadowCoord: e, depthLayer: t }) => {
|
|
22005
22014
|
let s = be(a, e.xy).label("t_basic");
|
|
22006
22015
|
return a.isArrayTexture && (s = s.depth(t)), s.compare(e.z);
|
|
22007
|
-
}),
|
|
22016
|
+
}), hM = /* @__PURE__ */ I(({ depthTexture: a, shadowCoord: e, shadow: t, depthLayer: s }) => {
|
|
22008
22017
|
const i = (y, g) => {
|
|
22009
22018
|
let x = be(a, y);
|
|
22010
22019
|
return a.isArrayTexture && (x = x.depth(s)), x.compare(g);
|
|
@@ -22028,7 +22037,7 @@ const Cf = /* @__PURE__ */ new WeakMap(), cC = /* @__PURE__ */ I(({ depthTexture
|
|
|
22028
22037
|
i(e.xy.add(V(0, u)), e.z),
|
|
22029
22038
|
i(e.xy.add(V(h, u)), e.z)
|
|
22030
22039
|
).mul(1 / 17);
|
|
22031
|
-
}),
|
|
22040
|
+
}), uM = /* @__PURE__ */ I(({ depthTexture: a, shadowCoord: e, shadow: t, depthLayer: s }) => {
|
|
22032
22041
|
const i = (u, d) => {
|
|
22033
22042
|
let p = be(a, u);
|
|
22034
22043
|
return a.isArrayTexture && (p = p.depth(s)), p.compare(d);
|
|
@@ -22072,57 +22081,57 @@ const Cf = /* @__PURE__ */ new WeakMap(), cC = /* @__PURE__ */ I(({ depthTexture
|
|
|
22072
22081
|
h.y
|
|
22073
22082
|
)
|
|
22074
22083
|
).mul(1 / 9);
|
|
22075
|
-
}),
|
|
22084
|
+
}), dM = /* @__PURE__ */ I(({ depthTexture: a, shadowCoord: e, depthLayer: t }) => {
|
|
22076
22085
|
const s = O(1).toVar();
|
|
22077
22086
|
let i = be(a).sample(e.xy);
|
|
22078
22087
|
a.isArrayTexture && (i = i.depth(t)), i = i.rg;
|
|
22079
22088
|
const n = Ey(e.z, i.x);
|
|
22080
22089
|
return Qe(n.notEqual(O(1)), () => {
|
|
22081
|
-
const r = e.z.sub(i.x), o =
|
|
22090
|
+
const r = e.z.sub(i.x), o = Mt(0, i.y.mul(i.y));
|
|
22082
22091
|
let l = o.div(o.add(r.mul(r)));
|
|
22083
|
-
l = mi(Ft(l, 0.3).div(0.95 - 0.3)), s.assign(mi(
|
|
22092
|
+
l = mi(Ft(l, 0.3).div(0.95 - 0.3)), s.assign(mi(Mt(n, l)));
|
|
22084
22093
|
}), s;
|
|
22085
|
-
}),
|
|
22094
|
+
}), pM = /* @__PURE__ */ I(([a, e, t]) => {
|
|
22086
22095
|
let s = $a.sub(a).length();
|
|
22087
22096
|
return s = s.sub(e).div(t.sub(e)), s = s.saturate(), s;
|
|
22088
|
-
}),
|
|
22089
|
-
const e = a.shadow.camera, t = Ie("near", "float", e).setGroup(K), s = Ie("far", "float", e).setGroup(K), i =
|
|
22090
|
-
return
|
|
22091
|
-
},
|
|
22092
|
-
let e =
|
|
22097
|
+
}), fM = (a) => {
|
|
22098
|
+
const e = a.shadow.camera, t = Ie("near", "float", e).setGroup(K), s = Ie("far", "float", e).setGroup(K), i = Mw(a);
|
|
22099
|
+
return pM(i, t, s);
|
|
22100
|
+
}, mM = (a) => {
|
|
22101
|
+
let e = Mf.get(a);
|
|
22093
22102
|
if (e === void 0) {
|
|
22094
|
-
const t = a.isPointLight ?
|
|
22095
|
-
e = new nt(), e.colorNode = ne(0, 0, 0, 1), e.depthNode = t, e.isShadowPassMaterial = !0, e.name = "ShadowMaterial", e.fog = !1,
|
|
22103
|
+
const t = a.isPointLight ? fM(a) : null;
|
|
22104
|
+
e = new nt(), e.colorNode = ne(0, 0, 0, 1), e.depthNode = t, e.isShadowPassMaterial = !0, e.name = "ShadowMaterial", e.fog = !1, Mf.set(a, e);
|
|
22096
22105
|
}
|
|
22097
22106
|
return e;
|
|
22098
|
-
}, Af = /* @__PURE__ */ new Rs(), Xn = [],
|
|
22107
|
+
}, Af = /* @__PURE__ */ new Rs(), Xn = [], gM = (a, e, t, s) => {
|
|
22099
22108
|
Xn[0] = a, Xn[1] = e;
|
|
22100
22109
|
let i = Af.get(Xn);
|
|
22101
22110
|
return (i === void 0 || i.shadowType !== t || i.useVelocity !== s) && (i = (n, r, o, l, c, h, ...u) => {
|
|
22102
22111
|
(n.castShadow === !0 || n.receiveShadow && t === tl) && (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));
|
|
22103
22112
|
}, i.shadowType = t, i.useVelocity = s, Af.set(Xn, i)), Xn[0] = null, Xn[1] = null, i;
|
|
22104
|
-
},
|
|
22113
|
+
}, yM = /* @__PURE__ */ I(({ samples: a, radius: e, size: t, shadowPass: s, depthLayer: i }) => {
|
|
22105
22114
|
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));
|
|
22106
|
-
|
|
22115
|
+
Ms({ start: ze(0), end: ze(a), type: "int", condition: "<" }, ({ i: h }) => {
|
|
22107
22116
|
const u = l.add(O(h).mul(o));
|
|
22108
22117
|
let d = s.sample(Lt(Jl.xy, V(0, u).mul(e)).div(t));
|
|
22109
22118
|
s.value.isArrayTexture && (d = d.depth(i)), d = d.x, n.addAssign(d), r.addAssign(d.mul(d));
|
|
22110
22119
|
}), n.divAssign(a), r.divAssign(a);
|
|
22111
22120
|
const c = id(r.sub(n.mul(n)));
|
|
22112
22121
|
return V(n, c);
|
|
22113
|
-
}),
|
|
22122
|
+
}), xM = /* @__PURE__ */ I(({ samples: a, radius: e, size: t, shadowPass: s, depthLayer: i }) => {
|
|
22114
22123
|
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));
|
|
22115
|
-
|
|
22124
|
+
Ms({ start: ze(0), end: ze(a), type: "int", condition: "<" }, ({ i: h }) => {
|
|
22116
22125
|
const u = l.add(O(h).mul(o));
|
|
22117
22126
|
let d = s.sample(Lt(Jl.xy, V(u, 0).mul(e)).div(t));
|
|
22118
22127
|
s.value.isArrayTexture && (d = d.depth(i)), n.addAssign(d.x), r.addAssign(Lt(d.y.mul(d.y), d.x.mul(d.x)));
|
|
22119
22128
|
}), n.divAssign(a), r.divAssign(a);
|
|
22120
22129
|
const c = id(r.sub(n.mul(n)));
|
|
22121
22130
|
return V(n, c);
|
|
22122
|
-
}),
|
|
22131
|
+
}), _M = [cM, hM, uM, dM];
|
|
22123
22132
|
let Jc;
|
|
22124
22133
|
const Ro = /* @__PURE__ */ new _d();
|
|
22125
|
-
class p0 extends
|
|
22134
|
+
class p0 extends eM {
|
|
22126
22135
|
static get type() {
|
|
22127
22136
|
return "ShadowNode";
|
|
22128
22137
|
}
|
|
@@ -22182,7 +22191,7 @@ class p0 extends eC {
|
|
|
22182
22191
|
* @return {Function} The filtering function.
|
|
22183
22192
|
*/
|
|
22184
22193
|
getShadowFilterFn(e) {
|
|
22185
|
-
return
|
|
22194
|
+
return _M[e];
|
|
22186
22195
|
}
|
|
22187
22196
|
setupRenderTarget(e, t) {
|
|
22188
22197
|
const s = new $s(e.mapSize.width, e.mapSize.height);
|
|
@@ -22206,7 +22215,7 @@ class p0 extends eC {
|
|
|
22206
22215
|
r.isArrayTexture && (x = x.depth(this.depthLayer));
|
|
22207
22216
|
const _ = Ie("blurSamples", "float", i).setGroup(K), b = Ie("radius", "float", i).setGroup(K), T = Ie("mapSize", "vec2", i).setGroup(K);
|
|
22208
22217
|
let E = this.vsmMaterialVertical || (this.vsmMaterialVertical = new nt());
|
|
22209
|
-
E.fragmentNode =
|
|
22218
|
+
E.fragmentNode = yM({ 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 = xM({ samples: _, radius: b, size: T, shadowPass: x, depthLayer: this.depthLayer }).context(e.getSharedContext()), E.name = "VSMHorizontal";
|
|
22210
22219
|
}
|
|
22211
22220
|
const l = Ie("intensity", "float", i).setGroup(K), c = Ie("normalBias", "float", i).setGroup(K), h = o0(s).mul(d0.add(md.mul(c))), u = this.setupShadowCoord(e, h), d = i.filterNode || this.getShadowFilterFn(t.shadowMap.type) || null;
|
|
22212
22221
|
if (d === null)
|
|
@@ -22254,7 +22263,7 @@ class p0 extends eC {
|
|
|
22254
22263
|
const h = i.camera.layers.mask;
|
|
22255
22264
|
(i.camera.layers.mask & 4294967294) === 0 && (i.camera.layers.mask = o.layers.mask);
|
|
22256
22265
|
const u = n.getRenderObjectFunction(), d = n.getMRT(), p = d ? d.has("velocity") : !1;
|
|
22257
|
-
Jc =
|
|
22266
|
+
Jc = oM(n, r, Jc), r.overrideMaterial = mM(s), n.setRenderObjectFunction(gM(n, i, l, p)), n.setClearColor(0, 0), n.setRenderTarget(t), this.renderShadow(e), n.setRenderObjectFunction(u), l === tl && i.isPointLightShadow !== !0 && this.vsmPass(n), i.camera.layers.mask = h, lM(n, r, Jc);
|
|
22258
22267
|
}
|
|
22259
22268
|
/**
|
|
22260
22269
|
* For VSM additional render passes are required.
|
|
@@ -22282,8 +22291,8 @@ class p0 extends eC {
|
|
|
22282
22291
|
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));
|
|
22283
22292
|
}
|
|
22284
22293
|
}
|
|
22285
|
-
const
|
|
22286
|
-
const t = a.toVar(), s = cs(t), i = Ws(1,
|
|
22294
|
+
const bM = (a, e) => U(new p0(a, e)), TM = /* @__PURE__ */ new we(), Ls = /* @__PURE__ */ I(([a, e]) => {
|
|
22295
|
+
const t = a.toVar(), s = cs(t), i = Ws(1, Mt(s.x, Mt(s.y, s.z)));
|
|
22287
22296
|
s.mulAssign(i), t.mulAssign(i.mul(e.mul(2).oneMinus()));
|
|
22288
22297
|
const n = V(t.xy).toVar(), o = e.mul(1.5).oneMinus();
|
|
22289
22298
|
return Qe(s.z.greaterThanEqual(o), () => {
|
|
@@ -22304,10 +22313,10 @@ const bC = (a, e) => U(new p0(a, e)), TC = /* @__PURE__ */ new we(), Ls = /* @__
|
|
|
22304
22313
|
{ name: "pos", type: "vec3" },
|
|
22305
22314
|
{ name: "texelSizeY", type: "float" }
|
|
22306
22315
|
]
|
|
22307
|
-
}),
|
|
22316
|
+
}), SM = /* @__PURE__ */ I(({ depthTexture: a, bd3D: e, dp: t, texelSize: s }) => be(a, Ls(e, s.y)).compare(t)), vM = /* @__PURE__ */ I(({ depthTexture: a, bd3D: e, dp: t, texelSize: s, shadow: i }) => {
|
|
22308
22317
|
const n = Ie("radius", "float", i).setGroup(K), r = V(-1, 1).mul(n).mul(s.y);
|
|
22309
22318
|
return be(a, Ls(e.add(r.xyy), s.y)).compare(t).add(be(a, Ls(e.add(r.yyy), s.y)).compare(t)).add(be(a, Ls(e.add(r.xyx), s.y)).compare(t)).add(be(a, Ls(e.add(r.yyx), s.y)).compare(t)).add(be(a, Ls(e, s.y)).compare(t)).add(be(a, Ls(e.add(r.xxy), s.y)).compare(t)).add(be(a, Ls(e.add(r.yxy), s.y)).compare(t)).add(be(a, Ls(e.add(r.xxx), s.y)).compare(t)).add(be(a, Ls(e.add(r.yxx), s.y)).compare(t)).mul(1 / 9);
|
|
22310
|
-
}),
|
|
22319
|
+
}), wM = /* @__PURE__ */ I(({ filterFn: a, depthTexture: e, shadowCoord: t, shadow: s }) => {
|
|
22311
22320
|
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();
|
|
22312
22321
|
return Qe(n.sub(o).lessThanEqual(0).and(n.sub(r).greaterThanEqual(0)), () => {
|
|
22313
22322
|
const u = n.sub(r).div(o.sub(r)).toVar();
|
|
@@ -22316,7 +22325,7 @@ const bC = (a, e) => U(new p0(a, e)), TC = /* @__PURE__ */ new we(), Ls = /* @__
|
|
|
22316
22325
|
h.assign(a({ depthTexture: e, bd3D: d, dp: u, texelSize: p, shadow: s }));
|
|
22317
22326
|
}), h;
|
|
22318
22327
|
}), Rf = /* @__PURE__ */ new ge(), Zn = /* @__PURE__ */ new he(), ia = /* @__PURE__ */ new he();
|
|
22319
|
-
class
|
|
22328
|
+
class EM extends p0 {
|
|
22320
22329
|
static get type() {
|
|
22321
22330
|
return "PointShadowNode";
|
|
22322
22331
|
}
|
|
@@ -22337,7 +22346,7 @@ class EC extends p0 {
|
|
|
22337
22346
|
* @return {Function} The filtering function.
|
|
22338
22347
|
*/
|
|
22339
22348
|
getShadowFilterFn(e) {
|
|
22340
|
-
return e === Ib ?
|
|
22349
|
+
return e === Ib ? SM : vM;
|
|
22341
22350
|
}
|
|
22342
22351
|
/**
|
|
22343
22352
|
* Overwrites the default implementation so the unaltered shadow position is used.
|
|
@@ -22363,7 +22372,7 @@ class EC extends p0 {
|
|
|
22363
22372
|
* @return {Node<float>} The result node of the shadow filtering.
|
|
22364
22373
|
*/
|
|
22365
22374
|
setupShadowFilter(e, { filterFn: t, shadowTexture: s, depthTexture: i, shadowCoord: n, shadow: r }) {
|
|
22366
|
-
return
|
|
22375
|
+
return wM({ filterFn: t, shadowTexture: s, depthTexture: i, shadowCoord: n, shadow: r });
|
|
22367
22376
|
}
|
|
22368
22377
|
/**
|
|
22369
22378
|
* Overwrites the default implementation with point light specific
|
|
@@ -22374,7 +22383,7 @@ class EC extends p0 {
|
|
|
22374
22383
|
renderShadow(e) {
|
|
22375
22384
|
const { shadow: t, shadowMap: s, light: i } = this, { renderer: n, scene: r } = e, o = t.getFrameExtents();
|
|
22376
22385
|
ia.copy(t.mapSize), ia.multiply(o), s.setSize(ia.width, ia.height), Zn.copy(t.mapSize);
|
|
22377
|
-
const l = n.autoClear, c = n.getClearColor(
|
|
22386
|
+
const l = n.autoClear, c = n.getClearColor(TM), h = n.getClearAlpha();
|
|
22378
22387
|
n.autoClear = !1, n.setClearColor(t.clearColor, t.clearAlpha), n.clear();
|
|
22379
22388
|
const u = t.getViewportCount();
|
|
22380
22389
|
for (let d = 0; d < u; d++) {
|
|
@@ -22389,7 +22398,7 @@ class EC extends p0 {
|
|
|
22389
22398
|
n.autoClear = l, n.setClearColor(c, h);
|
|
22390
22399
|
}
|
|
22391
22400
|
}
|
|
22392
|
-
const
|
|
22401
|
+
const CM = (a, e) => U(new EM(a, e));
|
|
22393
22402
|
class An extends Ur {
|
|
22394
22403
|
static get type() {
|
|
22395
22404
|
return "AnalyticLightNode";
|
|
@@ -22440,7 +22449,7 @@ class An extends Ur {
|
|
|
22440
22449
|
* @return {ShadowNode} The created shadow node.
|
|
22441
22450
|
*/
|
|
22442
22451
|
setupShadowNode() {
|
|
22443
|
-
return
|
|
22452
|
+
return bM(this.light);
|
|
22444
22453
|
}
|
|
22445
22454
|
/**
|
|
22446
22455
|
* Setups the shadow for this light. This method is only executed if the light
|
|
@@ -22490,7 +22499,7 @@ const f0 = /* @__PURE__ */ I(({ lightDistance: a, cutoffDistance: e, decayExpone
|
|
|
22490
22499
|
s.mul(a.div(e).pow4().oneMinus().clamp().pow2()),
|
|
22491
22500
|
s
|
|
22492
22501
|
);
|
|
22493
|
-
}),
|
|
22502
|
+
}), MM = ({ color: a, lightVector: e, cutoffDistance: t, decayExponent: s }) => {
|
|
22494
22503
|
const i = e.normalize(), n = e.length(), r = f0({
|
|
22495
22504
|
lightDistance: n,
|
|
22496
22505
|
cutoffDistance: t,
|
|
@@ -22498,7 +22507,7 @@ const f0 = /* @__PURE__ */ I(({ lightDistance: a, cutoffDistance: e, decayExpone
|
|
|
22498
22507
|
}), o = a.mul(r);
|
|
22499
22508
|
return { lightDirection: i, lightColor: o };
|
|
22500
22509
|
};
|
|
22501
|
-
class
|
|
22510
|
+
class AM extends An {
|
|
22502
22511
|
static get type() {
|
|
22503
22512
|
return "PointLightNode";
|
|
22504
22513
|
}
|
|
@@ -22525,10 +22534,10 @@ class AC extends An {
|
|
|
22525
22534
|
* @return {PointShadowNode}
|
|
22526
22535
|
*/
|
|
22527
22536
|
setupShadowNode() {
|
|
22528
|
-
return
|
|
22537
|
+
return CM(this.light);
|
|
22529
22538
|
}
|
|
22530
22539
|
setupDirect(e) {
|
|
22531
|
-
return
|
|
22540
|
+
return MM({
|
|
22532
22541
|
color: this.colorNode,
|
|
22533
22542
|
lightVector: this.getLightVector(e),
|
|
22534
22543
|
cutoffDistance: this.cutoffDistanceNode,
|
|
@@ -22536,7 +22545,7 @@ class AC extends An {
|
|
|
22536
22545
|
});
|
|
22537
22546
|
}
|
|
22538
22547
|
}
|
|
22539
|
-
const Nf = /* @__PURE__ */ O(1), Su = /* @__PURE__ */ O(-2), No = /* @__PURE__ */ O(0.8), eh = /* @__PURE__ */ O(-1), Po = /* @__PURE__ */ O(0.4), th = /* @__PURE__ */ O(2), Fo = /* @__PURE__ */ O(0.305), sh = /* @__PURE__ */ O(3), Pf = /* @__PURE__ */ O(0.21),
|
|
22548
|
+
const Nf = /* @__PURE__ */ O(1), Su = /* @__PURE__ */ O(-2), No = /* @__PURE__ */ O(0.8), eh = /* @__PURE__ */ O(-1), Po = /* @__PURE__ */ O(0.4), th = /* @__PURE__ */ O(2), Fo = /* @__PURE__ */ O(0.305), sh = /* @__PURE__ */ O(3), Pf = /* @__PURE__ */ O(0.21), RM = /* @__PURE__ */ O(4), Ff = /* @__PURE__ */ O(4), NM = /* @__PURE__ */ O(16), PM = /* @__PURE__ */ I(([a]) => {
|
|
22540
22549
|
const e = B(cs(a)).toVar(), t = O(-1).toVar();
|
|
22541
22550
|
return Qe(e.x.greaterThan(e.z), () => {
|
|
22542
22551
|
Qe(e.x.greaterThan(e.y), () => {
|
|
@@ -22557,7 +22566,7 @@ const Nf = /* @__PURE__ */ O(1), Su = /* @__PURE__ */ O(-2), No = /* @__PURE__ *
|
|
|
22557
22566
|
inputs: [
|
|
22558
22567
|
{ name: "direction", type: "vec3" }
|
|
22559
22568
|
]
|
|
22560
|
-
}),
|
|
22569
|
+
}), FM = /* @__PURE__ */ I(([a, e]) => {
|
|
22561
22570
|
const t = V().toVar();
|
|
22562
22571
|
return Qe(e.equal(0), () => {
|
|
22563
22572
|
t.assign(V(a.z, a.y).div(cs(a.x)));
|
|
@@ -22579,7 +22588,7 @@ const Nf = /* @__PURE__ */ O(1), Su = /* @__PURE__ */ O(-2), No = /* @__PURE__ *
|
|
|
22579
22588
|
{ name: "direction", type: "vec3" },
|
|
22580
22589
|
{ name: "face", type: "float" }
|
|
22581
22590
|
]
|
|
22582
|
-
}),
|
|
22591
|
+
}), DM = /* @__PURE__ */ I(([a]) => {
|
|
22583
22592
|
const e = O(0).toVar();
|
|
22584
22593
|
return Qe(a.greaterThanEqual(No), () => {
|
|
22585
22594
|
e.assign(Nf.sub(a).mul(eh.sub(Su)).div(Nf.sub(No)).add(Su));
|
|
@@ -22588,7 +22597,7 @@ const Nf = /* @__PURE__ */ O(1), Su = /* @__PURE__ */ O(-2), No = /* @__PURE__ *
|
|
|
22588
22597
|
}).ElseIf(a.greaterThanEqual(Fo), () => {
|
|
22589
22598
|
e.assign(Po.sub(a).mul(sh.sub(th)).div(Po.sub(Fo)).add(th));
|
|
22590
22599
|
}).ElseIf(a.greaterThanEqual(Pf), () => {
|
|
22591
|
-
e.assign(Fo.sub(a).mul(
|
|
22600
|
+
e.assign(Fo.sub(a).mul(RM.sub(sh)).div(Fo.sub(Pf)).add(sh));
|
|
22592
22601
|
}).Else(() => {
|
|
22593
22602
|
e.assign(O(-2).mul(hi(fe(1.16, a))));
|
|
22594
22603
|
}), e;
|
|
@@ -22598,7 +22607,7 @@ const Nf = /* @__PURE__ */ O(1), Su = /* @__PURE__ */ O(-2), No = /* @__PURE__ *
|
|
|
22598
22607
|
inputs: [
|
|
22599
22608
|
{ name: "roughness", type: "float" }
|
|
22600
22609
|
]
|
|
22601
|
-
}),
|
|
22610
|
+
}), OM = /* @__PURE__ */ I(([a, e]) => {
|
|
22602
22611
|
const t = a.toVar();
|
|
22603
22612
|
t.assign(fe(2, t).sub(1));
|
|
22604
22613
|
const s = B(t, 1).toVar();
|
|
@@ -22622,29 +22631,29 @@ const Nf = /* @__PURE__ */ O(1), Su = /* @__PURE__ */ O(-2), No = /* @__PURE__ *
|
|
|
22622
22631
|
{ name: "uv", type: "vec2" },
|
|
22623
22632
|
{ name: "face", type: "float" }
|
|
22624
22633
|
]
|
|
22625
|
-
}),
|
|
22626
|
-
const r = O(t), o = B(e), l = mi(
|
|
22634
|
+
}), BM = /* @__PURE__ */ I(([a, e, t, s, i, n]) => {
|
|
22635
|
+
const r = O(t), o = B(e), l = mi(DM(r), Su, n), c = ji(l), h = Tn(l), u = B(vu(a, o, h, s, i, n)).toVar();
|
|
22627
22636
|
return Qe(c.notEqual(0), () => {
|
|
22628
22637
|
const d = B(vu(a, o, h.add(1), s, i, n)).toVar();
|
|
22629
22638
|
u.assign(Ve(u, d, c));
|
|
22630
22639
|
}), u;
|
|
22631
22640
|
}), vu = /* @__PURE__ */ I(([a, e, t, s, i, n]) => {
|
|
22632
|
-
const r = O(t).toVar(), o = B(e), l = O(
|
|
22633
|
-
r.assign(
|
|
22634
|
-
const h = O(Va(r)).toVar(), u = V(
|
|
22641
|
+
const r = O(t).toVar(), o = B(e), l = O(PM(o)).toVar(), c = O(Mt(Ff.sub(r), 0)).toVar();
|
|
22642
|
+
r.assign(Mt(r, Ff));
|
|
22643
|
+
const h = O(Va(r)).toVar(), u = V(FM(o, l).mul(h.sub(2)).add(1)).toVar();
|
|
22635
22644
|
return Qe(l.greaterThan(2), () => {
|
|
22636
22645
|
u.y.addAssign(h), l.subAssign(3);
|
|
22637
|
-
}), u.x.addAssign(l.mul(h)), u.x.addAssign(c.mul(fe(3,
|
|
22646
|
+
}), u.x.addAssign(l.mul(h)), u.x.addAssign(c.mul(fe(3, NM))), u.y.addAssign(fe(4, Va(n).sub(h))), u.x.mulAssign(s), u.y.mulAssign(i), a.sample(u).grad(V(), V());
|
|
22638
22647
|
}), ih = /* @__PURE__ */ I(({ envMap: a, mipInt: e, outputDirection: t, theta: s, axis: i, CUBEUV_TEXEL_WIDTH: n, CUBEUV_TEXEL_HEIGHT: r, CUBEUV_MAX_MIP: o }) => {
|
|
22639
22648
|
const l = Fi(s), c = t.mul(l).add(i.cross(t).mul(Es(s))).add(i.mul(i.dot(t).mul(l.oneMinus())));
|
|
22640
22649
|
return vu(a, c, e, n, r, o);
|
|
22641
|
-
}),
|
|
22642
|
-
const d = B(Et(e, t,
|
|
22650
|
+
}), IM = /* @__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 }) => {
|
|
22651
|
+
const d = B(Et(e, t, Cy(t, s))).toVar();
|
|
22643
22652
|
Qe(d.equal(B(0)), () => {
|
|
22644
22653
|
d.assign(B(s.z, 0, s.x.negate()));
|
|
22645
22654
|
}), d.assign(Ha(d));
|
|
22646
22655
|
const p = B().toVar();
|
|
22647
|
-
return p.addAssign(i.element(0).mul(ih({ theta: 0, axis: d, outputDirection: s, mipInt: o, envMap: l, CUBEUV_TEXEL_WIDTH: c, CUBEUV_TEXEL_HEIGHT: h, CUBEUV_MAX_MIP: u }))),
|
|
22656
|
+
return p.addAssign(i.element(0).mul(ih({ 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 }) => {
|
|
22648
22657
|
Qe(f.greaterThanEqual(n), () => {
|
|
22649
22658
|
Ew();
|
|
22650
22659
|
});
|
|
@@ -22677,7 +22686,7 @@ class ss extends Wu {
|
|
|
22677
22686
|
*/
|
|
22678
22687
|
setFocalLength(e) {
|
|
22679
22688
|
const t = 0.5 * this.getFilmHeight() / e;
|
|
22680
|
-
this.fov =
|
|
22689
|
+
this.fov = Cr * 2 * Math.atan(t), this.updateProjectionMatrix();
|
|
22681
22690
|
}
|
|
22682
22691
|
/**
|
|
22683
22692
|
* Returns the focal length from the current {@link PerspectiveCamera#fov} and
|
|
@@ -22695,7 +22704,7 @@ class ss extends Wu {
|
|
|
22695
22704
|
* @return {number} The effective FOV.
|
|
22696
22705
|
*/
|
|
22697
22706
|
getEffectiveFOV() {
|
|
22698
|
-
return
|
|
22707
|
+
return Cr * 2 * Math.atan(
|
|
22699
22708
|
Math.tan(Aa * 0.5 * this.fov) / this.zoom
|
|
22700
22709
|
);
|
|
22701
22710
|
}
|
|
@@ -22847,16 +22856,16 @@ class eo extends _i {
|
|
|
22847
22856
|
const k = b / v, H = T / A, W = b / 2, $ = T / 2, q = E / 2, X = v + 1, Ee = A + 1;
|
|
22848
22857
|
let de = 0, ye = 0;
|
|
22849
22858
|
const se = new R();
|
|
22850
|
-
for (let
|
|
22851
|
-
const Ge =
|
|
22859
|
+
for (let Ce = 0; Ce < Ee; Ce++) {
|
|
22860
|
+
const Ge = Ce * H - $;
|
|
22852
22861
|
for (let ot = 0; ot < X; ot++) {
|
|
22853
22862
|
const Te = ot * k - W;
|
|
22854
|
-
se[m] = Te * x, se[y] = Ge * _, se[g] = q, c.push(se.x, se.y, se.z), se[m] = 0, se[y] = 0, se[g] = E > 0 ? 1 : -1, h.push(se.x, se.y, se.z), u.push(ot / v), u.push(1 -
|
|
22863
|
+
se[m] = Te * x, se[y] = Ge * _, se[g] = q, c.push(se.x, se.y, se.z), se[m] = 0, se[y] = 0, se[g] = E > 0 ? 1 : -1, h.push(se.x, se.y, se.z), u.push(ot / v), u.push(1 - Ce / A), de += 1;
|
|
22855
22864
|
}
|
|
22856
22865
|
}
|
|
22857
|
-
for (let
|
|
22866
|
+
for (let Ce = 0; Ce < A; Ce++)
|
|
22858
22867
|
for (let Ge = 0; Ge < v; Ge++) {
|
|
22859
|
-
const ot = d + Ge + X *
|
|
22868
|
+
const ot = d + Ge + X * Ce, Te = d + Ge + X * (Ce + 1), lt = d + (Ge + 1) + X * (Ce + 1), Ut = d + (Ge + 1) + X * Ce;
|
|
22860
22869
|
l.push(ot, Te, Ut), l.push(Te, lt, Ut), ye += 6;
|
|
22861
22870
|
}
|
|
22862
22871
|
o.addGroup(p, ye, N), p += ye, d += de;
|
|
@@ -22876,7 +22885,7 @@ class eo extends _i {
|
|
|
22876
22885
|
return new eo(e.width, e.height, e.depth, e.widthSegments, e.heightSegments, e.depthSegments);
|
|
22877
22886
|
}
|
|
22878
22887
|
}
|
|
22879
|
-
const pr = 4, Bf = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582], gn = 20, nh = /* @__PURE__ */ new xd(-1, 1, 1, -1, 0, 1),
|
|
22888
|
+
const pr = 4, Bf = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582], gn = 20, nh = /* @__PURE__ */ new xd(-1, 1, 1, -1, 0, 1), LM = /* @__PURE__ */ new ss(90, 1), If = /* @__PURE__ */ new we();
|
|
22880
22889
|
let rh = null, ah = 0, oh = 0;
|
|
22881
22890
|
const dn = (1 + Math.sqrt(5)) / 2, Kn = 1 / dn, Lf = [
|
|
22882
22891
|
/* @__PURE__ */ new R(-dn, Kn, 0),
|
|
@@ -22889,15 +22898,15 @@ const dn = (1 + Math.sqrt(5)) / 2, Kn = 1 / dn, Lf = [
|
|
|
22889
22898
|
/* @__PURE__ */ new R(1, 1, -1),
|
|
22890
22899
|
/* @__PURE__ */ new R(-1, 1, 1),
|
|
22891
22900
|
/* @__PURE__ */ new R(1, 1, 1)
|
|
22892
|
-
],
|
|
22901
|
+
], UM = /* @__PURE__ */ new R(), m0 = /* @__PURE__ */ new WeakMap(), kM = [
|
|
22893
22902
|
3,
|
|
22894
22903
|
1,
|
|
22895
22904
|
5,
|
|
22896
22905
|
0,
|
|
22897
22906
|
4,
|
|
22898
22907
|
2
|
|
22899
|
-
], lh = /* @__PURE__ */
|
|
22900
|
-
class
|
|
22908
|
+
], lh = /* @__PURE__ */ OM(Ja(), $i("faceIndex")).normalize(), bd = /* @__PURE__ */ B(lh.x, lh.y, lh.z);
|
|
22909
|
+
class zM {
|
|
22901
22910
|
/**
|
|
22902
22911
|
* Constructs a new PMREM generator.
|
|
22903
22912
|
*
|
|
@@ -22929,7 +22938,7 @@ class zC {
|
|
|
22929
22938
|
fromScene(e, t = 0, s = 0.1, i = 100, n = {}) {
|
|
22930
22939
|
const {
|
|
22931
22940
|
size: r = 256,
|
|
22932
|
-
position: o =
|
|
22941
|
+
position: o = UM,
|
|
22933
22942
|
renderTarget: l = null
|
|
22934
22943
|
} = n;
|
|
22935
22944
|
if (this._setSize(r), this._hasInitialized === !1) {
|
|
@@ -23078,7 +23087,7 @@ class zC {
|
|
|
23078
23087
|
if (this._pingPongRenderTarget === null || this._pingPongRenderTarget.width !== e.width || this._pingPongRenderTarget.height !== e.height) {
|
|
23079
23088
|
this._pingPongRenderTarget !== null && this._dispose(), this._pingPongRenderTarget = Uf(e.width, e.height);
|
|
23080
23089
|
const { _lodMax: t } = this;
|
|
23081
|
-
({ sizeLods: this._sizeLods, lodPlanes: this._lodPlanes, sigmas: this._sigmas, lodMeshes: this._lodMeshes } =
|
|
23090
|
+
({ sizeLods: this._sizeLods, lodPlanes: this._lodPlanes, sigmas: this._sigmas, lodMeshes: this._lodMeshes } = GM(t)), this._blurMaterial = VM(t, e.width, e.height);
|
|
23082
23091
|
}
|
|
23083
23092
|
}
|
|
23084
23093
|
async _compileMaterial(e) {
|
|
@@ -23086,7 +23095,7 @@ class zC {
|
|
|
23086
23095
|
await this._renderer.compile(t, nh);
|
|
23087
23096
|
}
|
|
23088
23097
|
_sceneToCubeUV(e, t, s, i, n) {
|
|
23089
|
-
const r =
|
|
23098
|
+
const r = LM;
|
|
23090
23099
|
r.near = t, r.far = s;
|
|
23091
23100
|
const o = [1, 1, 1, 1, -1, 1], l = [1, -1, 1, -1, 1, -1], c = this._renderer, h = c.autoClear;
|
|
23092
23101
|
c.getClearColor(If), c.autoClear = !1;
|
|
@@ -23187,7 +23196,7 @@ class zC {
|
|
|
23187
23196
|
Do(t, T, E, 3 * b, 2 * b), l.setRenderTarget(t), l.render(u, nh);
|
|
23188
23197
|
}
|
|
23189
23198
|
}
|
|
23190
|
-
function
|
|
23199
|
+
function GM(a) {
|
|
23191
23200
|
const e = [], t = [], s = [], i = [];
|
|
23192
23201
|
let n = a;
|
|
23193
23202
|
const r = a - pr + 1 + Bf.length;
|
|
@@ -23217,7 +23226,7 @@ function GC(a) {
|
|
|
23217
23226
|
A,
|
|
23218
23227
|
N + 1,
|
|
23219
23228
|
0
|
|
23220
|
-
], H =
|
|
23229
|
+
], H = kM[v];
|
|
23221
23230
|
_.set(k, y * m * H), b.set(p, g * m * H);
|
|
23222
23231
|
const W = [H, H, H, H, H, H];
|
|
23223
23232
|
T.set(W, x * m * H);
|
|
@@ -23236,7 +23245,7 @@ function Uf(a, e) {
|
|
|
23236
23245
|
format: us,
|
|
23237
23246
|
colorSpace: xr
|
|
23238
23247
|
//depthBuffer: false
|
|
23239
|
-
}, s = new
|
|
23248
|
+
}, s = new Mn(a, e, t);
|
|
23240
23249
|
return s.texture.mapping = Yh, s.texture.name = "PMREM.cubeUv", s.texture.isPMREMTexture = !0, s.scissorTest = !0, s;
|
|
23241
23250
|
}
|
|
23242
23251
|
function Do(a, e, t, s, i) {
|
|
@@ -23244,9 +23253,9 @@ function Do(a, e, t, s, i) {
|
|
|
23244
23253
|
}
|
|
23245
23254
|
function Td(a) {
|
|
23246
23255
|
const e = new nt();
|
|
23247
|
-
return e.depthTest = !1, e.depthWrite = !1, e.blending =
|
|
23256
|
+
return e.depthTest = !1, e.depthWrite = !1, e.blending = Mr, e.name = `PMREM_${a}`, e;
|
|
23248
23257
|
}
|
|
23249
|
-
function
|
|
23258
|
+
function VM(a, e, t) {
|
|
23250
23259
|
const s = Gs(new Array(gn).fill(0)), i = Q(new R(0, 1, 0)), n = Q(0), r = O(gn), o = Q(0), l = Q(1), c = be(null), h = Q(0), u = O(1 / e), d = O(1 / t), p = O(a), f = {
|
|
23251
23260
|
n: r,
|
|
23252
23261
|
latitudinal: o,
|
|
@@ -23261,7 +23270,7 @@ function VC(a, e, t) {
|
|
|
23261
23270
|
CUBEUV_TEXEL_HEIGHT: d,
|
|
23262
23271
|
CUBEUV_MAX_MIP: p
|
|
23263
23272
|
}, m = Td("blur");
|
|
23264
|
-
return m.fragmentNode =
|
|
23273
|
+
return m.fragmentNode = IM({ ...f, latitudinal: o.equal(1) }), m0.set(m, f), m;
|
|
23265
23274
|
}
|
|
23266
23275
|
function kf(a) {
|
|
23267
23276
|
const e = Td("cubemap");
|
|
@@ -23272,21 +23281,21 @@ function zf(a) {
|
|
|
23272
23281
|
return e.fragmentNode = be(a, Gy(bd), 0), e;
|
|
23273
23282
|
}
|
|
23274
23283
|
const Gf = /* @__PURE__ */ new WeakMap();
|
|
23275
|
-
function
|
|
23284
|
+
function HM(a) {
|
|
23276
23285
|
const e = Math.log2(a) - 2, t = 1 / a;
|
|
23277
23286
|
return { texelWidth: 1 / (3 * Math.max(Math.pow(2, e), 7 * 16)), texelHeight: t, maxMip: e };
|
|
23278
23287
|
}
|
|
23279
|
-
function $
|
|
23280
|
-
const s =
|
|
23288
|
+
function $M(a, e, t) {
|
|
23289
|
+
const s = WM(e);
|
|
23281
23290
|
let i = s.get(a);
|
|
23282
23291
|
if ((i !== void 0 ? i.pmremVersion : -1) !== a.pmremVersion) {
|
|
23283
23292
|
const r = a.image;
|
|
23284
23293
|
if (a.isCubeTexture)
|
|
23285
|
-
if (
|
|
23294
|
+
if (qM(r))
|
|
23286
23295
|
i = t.fromCubemap(a, i);
|
|
23287
23296
|
else
|
|
23288
23297
|
return null;
|
|
23289
|
-
else if (
|
|
23298
|
+
else if (YM(r))
|
|
23290
23299
|
i = t.fromEquirectangular(a, i);
|
|
23291
23300
|
else
|
|
23292
23301
|
return null;
|
|
@@ -23294,11 +23303,11 @@ function $C(a, e, t) {
|
|
|
23294
23303
|
}
|
|
23295
23304
|
return i.texture;
|
|
23296
23305
|
}
|
|
23297
|
-
function
|
|
23306
|
+
function WM(a) {
|
|
23298
23307
|
let e = Gf.get(a);
|
|
23299
23308
|
return e === void 0 && (e = /* @__PURE__ */ new WeakMap(), Gf.set(a, e)), e;
|
|
23300
23309
|
}
|
|
23301
|
-
class
|
|
23310
|
+
class jM extends rt {
|
|
23302
23311
|
static get type() {
|
|
23303
23312
|
return "PMREMNode";
|
|
23304
23313
|
}
|
|
@@ -23311,7 +23320,7 @@ class jC extends rt {
|
|
|
23311
23320
|
*/
|
|
23312
23321
|
constructor(e, t = null, s = null) {
|
|
23313
23322
|
super("vec3"), this._value = e, this._pmrem = null, this.uvNode = t, this.levelNode = s, this._generator = null;
|
|
23314
|
-
const i = new
|
|
23323
|
+
const i = new Ct();
|
|
23315
23324
|
i.isRenderTargetTexture = !0, this._texture = be(i), this._width = Q(0), this._height = Q(0), this._maxMip = Q(0), this.updateBeforeType = ue.RENDER;
|
|
23316
23325
|
}
|
|
23317
23326
|
set value(e) {
|
|
@@ -23331,26 +23340,26 @@ class jC extends rt {
|
|
|
23331
23340
|
* @param {Texture} texture - The PMREM texture.
|
|
23332
23341
|
*/
|
|
23333
23342
|
updateFromTexture(e) {
|
|
23334
|
-
const t =
|
|
23343
|
+
const t = HM(e.image.height);
|
|
23335
23344
|
this._texture.value = e, this._width.value = t.texelWidth, this._height.value = t.texelHeight, this._maxMip.value = t.maxMip;
|
|
23336
23345
|
}
|
|
23337
23346
|
updateBefore(e) {
|
|
23338
23347
|
let t = this._pmrem;
|
|
23339
23348
|
const s = t ? t.pmremVersion : -1, i = this._value;
|
|
23340
|
-
s !== i.pmremVersion && (i.isPMREMTexture === !0 ? t = i : t = $
|
|
23349
|
+
s !== i.pmremVersion && (i.isPMREMTexture === !0 ? t = i : t = $M(i, e.renderer, this._generator), t !== null && (this._pmrem = t, this.updateFromTexture(t)));
|
|
23341
23350
|
}
|
|
23342
23351
|
setup(e) {
|
|
23343
|
-
this._generator === null && (this._generator = new
|
|
23352
|
+
this._generator === null && (this._generator = new zM(e.renderer)), this.updateBefore(e);
|
|
23344
23353
|
let t = this.uvNode;
|
|
23345
23354
|
t === null && e.context.getUV && (t = e.context.getUV(this)), t = Qy.mul(B(t.x, t.y.negate(), t.z));
|
|
23346
23355
|
let s = this.levelNode;
|
|
23347
|
-
return s === null && e.context.getTextureLevel && (s = e.context.getTextureLevel(this)),
|
|
23356
|
+
return s === null && e.context.getTextureLevel && (s = e.context.getTextureLevel(this)), BM(this._texture, t, s, this._width, this._height, this._maxMip);
|
|
23348
23357
|
}
|
|
23349
23358
|
dispose() {
|
|
23350
23359
|
super.dispose(), this._generator !== null && this._generator.dispose();
|
|
23351
23360
|
}
|
|
23352
23361
|
}
|
|
23353
|
-
function
|
|
23362
|
+
function qM(a) {
|
|
23354
23363
|
if (a == null) return !1;
|
|
23355
23364
|
let e = 0;
|
|
23356
23365
|
const t = 6;
|
|
@@ -23358,10 +23367,10 @@ function qC(a) {
|
|
|
23358
23367
|
a[s] !== void 0 && e++;
|
|
23359
23368
|
return e === t;
|
|
23360
23369
|
}
|
|
23361
|
-
function
|
|
23370
|
+
function YM(a) {
|
|
23362
23371
|
return a == null ? !1 : a.height > 0;
|
|
23363
23372
|
}
|
|
23364
|
-
const g0 = /* @__PURE__ */ L(
|
|
23373
|
+
const g0 = /* @__PURE__ */ L(jM).setParameterLength(1, 3);
|
|
23365
23374
|
I(([a = Ja()], { renderer: e, material: t }) => {
|
|
23366
23375
|
const s = Ay(a.mul(2).sub(1));
|
|
23367
23376
|
let i;
|
|
@@ -23375,7 +23384,7 @@ I(([a = Ja()], { renderer: e, material: t }) => {
|
|
|
23375
23384
|
const ja = /* @__PURE__ */ I(({ f0: a, f90: e, dotVH: t }) => {
|
|
23376
23385
|
const s = t.mul(-5.55473).sub(6.98316).mul(t).exp2();
|
|
23377
23386
|
return a.mul(s.oneMinus()).add(e.mul(s));
|
|
23378
|
-
}),
|
|
23387
|
+
}), XM = /* @__PURE__ */ I(({ alpha: a, dotNL: e, dotNV: t }) => {
|
|
23379
23388
|
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());
|
|
23380
23389
|
return Ws(0.5, i.add(n).max(uv));
|
|
23381
23390
|
}).setLayout({
|
|
@@ -23386,7 +23395,7 @@ const ja = /* @__PURE__ */ I(({ f0: a, f90: e, dotVH: t }) => {
|
|
|
23386
23395
|
{ name: "dotNL", type: "float" },
|
|
23387
23396
|
{ name: "dotNV", type: "float" }
|
|
23388
23397
|
]
|
|
23389
|
-
}),
|
|
23398
|
+
}), ZM = /* @__PURE__ */ I(({ alphaT: a, alphaB: e, dotTV: t, dotBV: s, dotTL: i, dotBL: n, dotNV: r, dotNL: o }) => {
|
|
23390
23399
|
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());
|
|
23391
23400
|
return Ws(0.5, l.add(c)).saturate();
|
|
23392
23401
|
}).setLayout({
|
|
@@ -23402,7 +23411,7 @@ const ja = /* @__PURE__ */ I(({ f0: a, f90: e, dotVH: t }) => {
|
|
|
23402
23411
|
{ name: "dotNV", type: "float", qualifier: "in" },
|
|
23403
23412
|
{ name: "dotNL", type: "float", qualifier: "in" }
|
|
23404
23413
|
]
|
|
23405
|
-
}),
|
|
23414
|
+
}), KM = /* @__PURE__ */ I(({ alpha: a, dotNH: e }) => {
|
|
23406
23415
|
const t = a.pow2(), s = e.pow2().mul(t.oneMinus()).oneMinus();
|
|
23407
23416
|
return t.div(s.pow2()).mul(1 / Math.PI);
|
|
23408
23417
|
}).setLayout({
|
|
@@ -23412,9 +23421,9 @@ const ja = /* @__PURE__ */ I(({ f0: a, f90: e, dotVH: t }) => {
|
|
|
23412
23421
|
{ name: "alpha", type: "float" },
|
|
23413
23422
|
{ name: "dotNH", type: "float" }
|
|
23414
23423
|
]
|
|
23415
|
-
}),
|
|
23424
|
+
}), QM = /* @__PURE__ */ O(1 / Math.PI), JM = /* @__PURE__ */ I(({ alphaT: a, alphaB: e, dotNH: t, dotTH: s, dotBH: i }) => {
|
|
23416
23425
|
const n = a.mul(e), r = B(e.mul(s), a.mul(i), n.mul(t)), o = r.dot(r), l = n.div(o);
|
|
23417
|
-
return
|
|
23426
|
+
return QM.mul(n.mul(l.pow2()));
|
|
23418
23427
|
}).setLayout({
|
|
23419
23428
|
name: "D_GGX_Anisotropic",
|
|
23420
23429
|
type: "float",
|
|
@@ -23430,9 +23439,9 @@ const ja = /* @__PURE__ */ I(({ f0: a, f90: e, dotVH: t }) => {
|
|
|
23430
23439
|
let m = ja({ f0: t, f90: s, dotVH: f }), y, g;
|
|
23431
23440
|
if (Xp(r) && (m = sd.mix(m, n)), Xp(o)) {
|
|
23432
23441
|
const x = rl.dot(e), _ = rl.dot(Ye), b = rl.dot(h), T = Sr.dot(e), E = Sr.dot(Ye), v = Sr.dot(h);
|
|
23433
|
-
y =
|
|
23442
|
+
y = ZM({ alphaT: gu, alphaB: c, dotTV: _, dotBV: E, dotTL: x, dotBL: T, dotNV: d, dotNL: u }), g = JM({ alphaT: gu, alphaB: c, dotNH: p, dotTH: b, dotBH: v });
|
|
23434
23443
|
} else
|
|
23435
|
-
y =
|
|
23444
|
+
y = XM({ alpha: c, dotNL: u, dotNV: d }), g = KM({ alpha: c, dotNH: p });
|
|
23436
23445
|
return m.mul(y).mul(g);
|
|
23437
23446
|
}), Dr = /* @__PURE__ */ I((a) => a.diffuseColor.mul(1 / Math.PI)), y0 = /* @__PURE__ */ I(({ roughness: a, dotNV: e }) => {
|
|
23438
23447
|
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);
|
|
@@ -23563,8 +23572,8 @@ class iA extends Wi {
|
|
|
23563
23572
|
};
|
|
23564
23573
|
const d = ad(ne(c).mul(wf), {
|
|
23565
23574
|
// @TODO: Add Texture2D support using node context
|
|
23566
|
-
getUV: () =>
|
|
23567
|
-
getTextureLevel: () =>
|
|
23575
|
+
getUV: () => PC.mul(fd),
|
|
23576
|
+
getTextureLevel: () => NC
|
|
23568
23577
|
});
|
|
23569
23578
|
let p = i0;
|
|
23570
23579
|
p = p.setZ(p.w);
|
|
@@ -23731,7 +23740,7 @@ class cA extends qt {
|
|
|
23731
23740
|
return Object.keys(s).length > 0 && (t.extensions = s), t;
|
|
23732
23741
|
}
|
|
23733
23742
|
}
|
|
23734
|
-
class hA extends
|
|
23743
|
+
class hA extends Mn {
|
|
23735
23744
|
/**
|
|
23736
23745
|
* Constructs a new 3D render target.
|
|
23737
23746
|
*
|
|
@@ -23873,7 +23882,7 @@ class uA extends hA {
|
|
|
23873
23882
|
vertexShader: s.vertexShader,
|
|
23874
23883
|
fragmentShader: s.fragmentShader,
|
|
23875
23884
|
side: jt,
|
|
23876
|
-
blending:
|
|
23885
|
+
blending: Mr
|
|
23877
23886
|
});
|
|
23878
23887
|
n.uniforms.tEquirect.value = t;
|
|
23879
23888
|
const r = new gi(i, n), o = t.minFilter;
|
|
@@ -23915,7 +23924,7 @@ class T0 extends uA {
|
|
|
23915
23924
|
const s = t.minFilter, i = t.generateMipmaps;
|
|
23916
23925
|
t.generateMipmaps = !0, this.texture.type = t.type, this.texture.colorSpace = t.colorSpace, this.texture.generateMipmaps = t.generateMipmaps, this.texture.minFilter = t.minFilter, this.texture.magFilter = t.magFilter;
|
|
23917
23926
|
const n = new eo(5, 5, 5), r = Gy(zy), o = new nt();
|
|
23918
|
-
o.colorNode = be(t, r, 0), o.side = jt, o.blending =
|
|
23927
|
+
o.colorNode = be(t, r, 0), o.side = jt, o.blending = Mr;
|
|
23919
23928
|
const l = new gi(n, o), c = new $u();
|
|
23920
23929
|
c.add(l), t.minFilter === oi && (t.minFilter = ns);
|
|
23921
23930
|
const h = new b0(1, 10, this), u = e.getMRT();
|
|
@@ -24265,7 +24274,7 @@ class EA extends qi {
|
|
|
24265
24274
|
super(e, t), this.isMatrix3Uniform = !0, this.boundary = 48, this.itemSize = 12;
|
|
24266
24275
|
}
|
|
24267
24276
|
}
|
|
24268
|
-
class
|
|
24277
|
+
class CA extends qi {
|
|
24269
24278
|
/**
|
|
24270
24279
|
* Constructs a new Number uniform.
|
|
24271
24280
|
*
|
|
@@ -24276,7 +24285,7 @@ class MA extends qi {
|
|
|
24276
24285
|
super(e, t), this.isMatrix4Uniform = !0, this.boundary = 64, this.itemSize = 16;
|
|
24277
24286
|
}
|
|
24278
24287
|
}
|
|
24279
|
-
class
|
|
24288
|
+
class MA extends _A {
|
|
24280
24289
|
/**
|
|
24281
24290
|
* Constructs a new node-based Number uniform.
|
|
24282
24291
|
*
|
|
@@ -24458,7 +24467,7 @@ class DA extends EA {
|
|
|
24458
24467
|
return this.nodeUniform.type;
|
|
24459
24468
|
}
|
|
24460
24469
|
}
|
|
24461
|
-
class OA extends
|
|
24470
|
+
class OA extends CA {
|
|
24462
24471
|
/**
|
|
24463
24472
|
* Constructs a new node-based Matrix4 uniform.
|
|
24464
24473
|
*
|
|
@@ -24525,7 +24534,7 @@ class E0 {
|
|
|
24525
24534
|
* @return {RenderTarget} The render target.
|
|
24526
24535
|
*/
|
|
24527
24536
|
createRenderTarget(e, t, s) {
|
|
24528
|
-
return new
|
|
24537
|
+
return new Mn(e, t, s);
|
|
24529
24538
|
}
|
|
24530
24539
|
/**
|
|
24531
24540
|
* Factory method for creating an instance of {@link CubeRenderTarget} with the given
|
|
@@ -25501,7 +25510,7 @@ class E0 {
|
|
|
25501
25510
|
* @return {FunctionNode} The build function node.
|
|
25502
25511
|
*/
|
|
25503
25512
|
buildFunctionNode(e) {
|
|
25504
|
-
const t = new
|
|
25513
|
+
const t = new jC(), s = this.currentFunctionNode;
|
|
25505
25514
|
return this.currentFunctionNode = t, t.code = this.buildFunctionCode(e), this.currentFunctionNode = s, t;
|
|
25506
25515
|
}
|
|
25507
25516
|
/**
|
|
@@ -25762,7 +25771,7 @@ class E0 {
|
|
|
25762
25771
|
* @return {Uniform} The uniform.
|
|
25763
25772
|
*/
|
|
25764
25773
|
getNodeUniform(e, t) {
|
|
25765
|
-
if (t === "float" || t === "int" || t === "uint") return new
|
|
25774
|
+
if (t === "float" || t === "int" || t === "uint") return new MA(e);
|
|
25766
25775
|
if (t === "vec2" || t === "ivec2" || t === "uvec2") return new AA(e);
|
|
25767
25776
|
if (t === "vec3" || t === "ivec3" || t === "uvec3") return new RA(e);
|
|
25768
25777
|
if (t === "vec4" || t === "ivec4" || t === "uvec4") return new NA(e);
|
|
@@ -26013,7 +26022,7 @@ class wd extends An {
|
|
|
26013
26022
|
getLightCoord(e) {
|
|
26014
26023
|
const t = e.getNodeProperties(this);
|
|
26015
26024
|
let s = t.projectionUV;
|
|
26016
|
-
return s === void 0 && (s =
|
|
26025
|
+
return s === void 0 && (s = ZC(this.light, e.context.positionWorld), t.projectionUV = s), s;
|
|
26017
26026
|
}
|
|
26018
26027
|
setupDirect(e) {
|
|
26019
26028
|
const { colorNode: t, cutoffDistanceNode: s, decayExponentNode: i, light: n } = this, r = this.getLightVector(e), o = r.normalize(), l = o.dot(h0(n)), c = this.getSpotAttenuation(e, l), h = r.length(), u = f0({
|
|
@@ -26049,7 +26058,7 @@ class UA extends wd {
|
|
|
26049
26058
|
}
|
|
26050
26059
|
const kA = /* @__PURE__ */ I(([a, e]) => {
|
|
26051
26060
|
const t = a.abs().sub(e);
|
|
26052
|
-
return ui(
|
|
26061
|
+
return ui(Mt(t, 0)).add(Pr(Mt(t.x, t.y), 0));
|
|
26053
26062
|
});
|
|
26054
26063
|
class zA extends wd {
|
|
26055
26064
|
static get type() {
|
|
@@ -26204,7 +26213,7 @@ class Ed extends Ur {
|
|
|
26204
26213
|
e.context.environment = v0(this.envNode);
|
|
26205
26214
|
}
|
|
26206
26215
|
}
|
|
26207
|
-
class
|
|
26216
|
+
class C0 {
|
|
26208
26217
|
/**
|
|
26209
26218
|
* The method parses the given native code an returns a node function.
|
|
26210
26219
|
*
|
|
@@ -26216,7 +26225,7 @@ class M0 {
|
|
|
26216
26225
|
console.warn("Abstract function.");
|
|
26217
26226
|
}
|
|
26218
26227
|
}
|
|
26219
|
-
class
|
|
26228
|
+
class Cd {
|
|
26220
26229
|
/**
|
|
26221
26230
|
* Constructs a new node function.
|
|
26222
26231
|
*
|
|
@@ -26239,7 +26248,7 @@ class Md {
|
|
|
26239
26248
|
console.warn("Abstract function.");
|
|
26240
26249
|
}
|
|
26241
26250
|
}
|
|
26242
|
-
|
|
26251
|
+
Cd.isNodeFunction = !0;
|
|
26243
26252
|
const jA = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?)\)/i, qA = /[a-z_0-9]+/ig, Xf = "#pragma main", YA = (a) => {
|
|
26244
26253
|
a = a.trim();
|
|
26245
26254
|
const e = a.indexOf(Xf), t = e !== -1 ? a.slice(e + Xf.length) : a, s = t.match(jA);
|
|
@@ -26274,7 +26283,7 @@ const jA = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]
|
|
|
26274
26283
|
} else
|
|
26275
26284
|
throw new Error("FunctionNode: Function is not a GLSL code.");
|
|
26276
26285
|
};
|
|
26277
|
-
class XA extends
|
|
26286
|
+
class XA extends Cd {
|
|
26278
26287
|
/**
|
|
26279
26288
|
* Constructs a new GLSL node function.
|
|
26280
26289
|
*
|
|
@@ -26302,7 +26311,7 @@ class XA extends Md {
|
|
|
26302
26311
|
return t;
|
|
26303
26312
|
}
|
|
26304
26313
|
}
|
|
26305
|
-
class ZA extends
|
|
26314
|
+
class ZA extends C0 {
|
|
26306
26315
|
/**
|
|
26307
26316
|
* The method parses the given GLSL code an returns a node function.
|
|
26308
26317
|
*
|
|
@@ -26313,7 +26322,7 @@ class ZA extends M0 {
|
|
|
26313
26322
|
return new XA(e);
|
|
26314
26323
|
}
|
|
26315
26324
|
}
|
|
26316
|
-
class
|
|
26325
|
+
class M0 extends nc {
|
|
26317
26326
|
/**
|
|
26318
26327
|
* Constructs a new basic lighting model.
|
|
26319
26328
|
*/
|
|
@@ -26357,7 +26366,7 @@ const KA = () => O(0.25), QA = /* @__PURE__ */ I(({ dotNH: a }) => yu.mul(O(0.5)
|
|
|
26357
26366
|
const e = a.add(Ye).normalize(), t = st.dot(e).clamp(), s = Ye.dot(e).clamp(), i = ja({ f0: Jt, f90: 1, dotVH: s }), n = KA(), r = QA({ dotNH: t });
|
|
26358
26367
|
return i.mul(n).mul(r);
|
|
26359
26368
|
});
|
|
26360
|
-
class A0 extends
|
|
26369
|
+
class A0 extends M0 {
|
|
26361
26370
|
/**
|
|
26362
26371
|
* Constructs a new phong lighting model.
|
|
26363
26372
|
*
|
|
@@ -26422,7 +26431,7 @@ const R0 = /* @__PURE__ */ I((a) => {
|
|
|
26422
26431
|
]
|
|
26423
26432
|
}), nR = /* @__PURE__ */ I(({ f: a }) => {
|
|
26424
26433
|
const e = a.length();
|
|
26425
|
-
return
|
|
26434
|
+
return Mt(e.mul(e).add(a.z).div(e.add(1)), 0);
|
|
26426
26435
|
}).setLayout({
|
|
26427
26436
|
name: "LTC_ClippedSphereFormFactor",
|
|
26428
26437
|
type: "float",
|
|
@@ -26430,7 +26439,7 @@ const R0 = /* @__PURE__ */ I((a) => {
|
|
|
26430
26439
|
{ name: "f", type: "vec3" }
|
|
26431
26440
|
]
|
|
26432
26441
|
}), Io = /* @__PURE__ */ I(({ v1: a, v2: e }) => {
|
|
26433
|
-
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,
|
|
26442
|
+
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));
|
|
26434
26443
|
return a.cross(e).mul(o);
|
|
26435
26444
|
}).setLayout({
|
|
26436
26445
|
name: "LTC_EdgeVectorFormFactor",
|
|
@@ -26484,7 +26493,7 @@ const R0 = /* @__PURE__ */ I((a) => {
|
|
|
26484
26493
|
]
|
|
26485
26494
|
}), aR = /* @__PURE__ */ qy(), oR = /* @__PURE__ */ qy(), Qf = /* @__PURE__ */ I(([a, e, t], { material: s }) => {
|
|
26486
26495
|
const n = (s.side === jt ? aR : oR).sample(a), r = hi(_u.x).mul(rR(e, t));
|
|
26487
|
-
return
|
|
26496
|
+
return RC(n, r);
|
|
26488
26497
|
}), Jf = /* @__PURE__ */ I(([a, e, t]) => (Qe(t.notEqual(0), () => {
|
|
26489
26498
|
const s = by(e).negate().div(t);
|
|
26490
26499
|
return _y(s.negate().mul(a));
|
|
@@ -26501,7 +26510,7 @@ const R0 = /* @__PURE__ */ I((a) => {
|
|
|
26501
26510
|
if (f) {
|
|
26502
26511
|
m = ne().toVar(), y = B().toVar();
|
|
26503
26512
|
const T = h.sub(1).mul(f.mul(0.025)), E = B(h.sub(T), h, h.add(T));
|
|
26504
|
-
|
|
26513
|
+
Ms({ start: 0, end: 3 }, ({ i: v }) => {
|
|
26505
26514
|
const A = E.element(v), N = Kf(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();
|
|
26506
26515
|
W.addAssign(1), W.divAssign(2), W.assign(V(W.x, W.y.oneMinus()));
|
|
26507
26516
|
const $ = Qf(W, t, A);
|
|
@@ -26544,7 +26553,7 @@ const R0 = /* @__PURE__ */ I((a) => {
|
|
|
26544
26553
|
f.y.lessThan(n).select(Math.PI, 0),
|
|
26545
26554
|
f.z.lessThan(n).select(Math.PI, 0)
|
|
26546
26555
|
), 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();
|
|
26547
|
-
return
|
|
26556
|
+
return Ms({ start: 1, end: 2, condition: "<=", name: "m" }, ({ m: k }) => {
|
|
26548
26557
|
N.mulAssign(T);
|
|
26549
26558
|
const H = uR(O(k).mul(x), O(k).mul(_)).mul(2);
|
|
26550
26559
|
A.addAssign(N.mul(H));
|
|
@@ -26979,10 +26988,10 @@ class fR extends Wi {
|
|
|
26979
26988
|
const i = this.getCacheNode("fog", s, () => {
|
|
26980
26989
|
if (s.isFogExp2) {
|
|
26981
26990
|
const n = Ie("color", "color", s).setGroup(K), r = Ie("density", "float", s).setGroup(K);
|
|
26982
|
-
return
|
|
26991
|
+
return Cf(n, YC(r));
|
|
26983
26992
|
} else if (s.isFog) {
|
|
26984
26993
|
const n = Ie("color", "color", s).setGroup(K), r = Ie("near", "float", s).setGroup(K), o = Ie("far", "float", s).setGroup(K);
|
|
26985
|
-
return
|
|
26994
|
+
return Cf(n, qC(r, o));
|
|
26986
26995
|
} else
|
|
26987
26996
|
console.error("THREE.Renderer: Unsupported fog configuration.", s);
|
|
26988
26997
|
});
|
|
@@ -27046,7 +27055,7 @@ class fR extends Wi {
|
|
|
27046
27055
|
* @return {Node} The output node.
|
|
27047
27056
|
*/
|
|
27048
27057
|
getOutputNode(e) {
|
|
27049
|
-
const t = this.renderer, s = this.getOutputCacheKey(), i = e.isArrayTexture ?
|
|
27058
|
+
const t = this.renderer, s = this.getOutputCacheKey(), i = e.isArrayTexture ? OC(e, B(vr, Xl("gl_ViewID_OVR"))).renderOutput(t.toneMapping, t.currentColorSpace) : be(e, vr).renderOutput(t.toneMapping, t.currentColorSpace);
|
|
27050
27059
|
return tm.set(e, s), i;
|
|
27051
27060
|
}
|
|
27052
27061
|
/**
|
|
@@ -27503,7 +27512,7 @@ class TR {
|
|
|
27503
27512
|
return e.joints[t.jointName];
|
|
27504
27513
|
}
|
|
27505
27514
|
}
|
|
27506
|
-
class Sa extends
|
|
27515
|
+
class Sa extends Mn {
|
|
27507
27516
|
/**
|
|
27508
27517
|
* Constructs a new XR render target.
|
|
27509
27518
|
*
|
|
@@ -27518,7 +27527,7 @@ class Sa extends Cn {
|
|
|
27518
27527
|
return super.copy(e), this.hasExternalTextures = e.hasExternalTextures, this.autoAllocateDepthBuffer = e.autoAllocateDepthBuffer, this;
|
|
27519
27528
|
}
|
|
27520
27529
|
}
|
|
27521
|
-
class
|
|
27530
|
+
class Md extends _i {
|
|
27522
27531
|
/**
|
|
27523
27532
|
* Constructs a new cylinder geometry.
|
|
27524
27533
|
*
|
|
@@ -27598,7 +27607,7 @@ class Cd extends _i {
|
|
|
27598
27607
|
* @return {CylinderGeometry} A new instance.
|
|
27599
27608
|
*/
|
|
27600
27609
|
static fromJSON(e) {
|
|
27601
|
-
return new
|
|
27610
|
+
return new Md(e.radiusTop, e.radiusBottom, e.height, e.radialSegments, e.heightSegments, e.openEnded, e.thetaStart, e.thetaLength);
|
|
27602
27611
|
}
|
|
27603
27612
|
}
|
|
27604
27613
|
class Ad extends _i {
|
|
@@ -27647,7 +27656,7 @@ class Ad extends _i {
|
|
|
27647
27656
|
}
|
|
27648
27657
|
}
|
|
27649
27658
|
const sm = /* @__PURE__ */ new R(), im = /* @__PURE__ */ new R();
|
|
27650
|
-
class SR extends
|
|
27659
|
+
class SR extends Cn {
|
|
27651
27660
|
/**
|
|
27652
27661
|
* Constructs a new XR manager.
|
|
27653
27662
|
*
|
|
@@ -27655,7 +27664,7 @@ class SR extends Mn {
|
|
|
27655
27664
|
* @param {boolean} [multiview=false] - Enables multiview if the device supports it.
|
|
27656
27665
|
*/
|
|
27657
27666
|
constructor(e, t = !1) {
|
|
27658
|
-
super(), this.enabled = !1, this.isPresenting = !1, this.cameraAutoUpdate = !0, this._renderer = e, this._cameraL = new ss(), this._cameraL.viewport = new ge(), this._cameraR = new ss(), this._cameraR.viewport = new ge(), this._cameras = [this._cameraL, this._cameraR], this._cameraXR = new _R(), this._currentDepthNear = null, this._currentDepthFar = null, this._controllers = [], this._controllerInputSources = [], this._xrRenderTarget = null, this._layers = [], this._supportsLayers = !1, this._frameBufferTargets = null, this._createXRLayer = AR.bind(this), this._gl = null, this._currentAnimationContext = null, this._currentAnimationLoop = null, this._currentPixelRatio = null, this._currentSize = new he(), this._onSessionEvent = ER.bind(this), this._onSessionEnd =
|
|
27667
|
+
super(), this.enabled = !1, this.isPresenting = !1, this.cameraAutoUpdate = !0, this._renderer = e, this._cameraL = new ss(), this._cameraL.viewport = new ge(), this._cameraR = new ss(), this._cameraR.viewport = new ge(), this._cameras = [this._cameraL, this._cameraR], this._cameraXR = new _R(), this._currentDepthNear = null, this._currentDepthFar = null, this._controllers = [], this._controllerInputSources = [], this._xrRenderTarget = null, this._layers = [], this._supportsLayers = !1, this._frameBufferTargets = null, this._createXRLayer = AR.bind(this), this._gl = null, this._currentAnimationContext = null, this._currentAnimationLoop = null, this._currentPixelRatio = null, this._currentSize = new he(), this._onSessionEvent = ER.bind(this), this._onSessionEnd = CR.bind(this), this._onInputSourcesChange = MR.bind(this), this._onAnimationFrame = RR.bind(this), this._referenceSpace = null, this._referenceSpaceType = "local-floor", this._customReferenceSpace = null, this._framebufferScaleFactor = 1, this._foveation = 1, this._session = null, this._glBaseLayer = null, this._glBinding = null, this._glProjLayer = null, this._xrFrame = null, this._useLayers = typeof XRWebGLBinding < "u" && "createProjectionLayer" in XRWebGLBinding.prototype, this._useMultiviewIfPossible = t, this._useMultiview = !1;
|
|
27659
27668
|
}
|
|
27660
27669
|
/**
|
|
27661
27670
|
* Returns an instance of `THREE.Group` that represents the transformation
|
|
@@ -27851,7 +27860,7 @@ class SR extends Mn {
|
|
|
27851
27860
|
renderTarget: h
|
|
27852
27861
|
};
|
|
27853
27862
|
if (this._layers.push(p), this._session !== null) {
|
|
27854
|
-
p.plane.material = new Ii({ color: 16777215, side: ri }), p.plane.material.blending = Ra, p.plane.material.blendEquation =
|
|
27863
|
+
p.plane.material = new Ii({ color: 16777215, side: ri }), p.plane.material.blending = Ra, p.plane.material.blendEquation = Cs, p.plane.material.blendSrc = Pi, p.plane.material.blendDst = Pi, p.xrlayer = this._createXRLayer(p);
|
|
27855
27864
|
const f = this._session.renderState.layers;
|
|
27856
27865
|
f.unshift(p.xrlayer), this._session.updateRenderState({ layers: f });
|
|
27857
27866
|
} else
|
|
@@ -27875,7 +27884,7 @@ class SR extends Mn {
|
|
|
27875
27884
|
* @return {Mesh} A mesh representing the cylindrical XR layer. This mesh should be added to the XR scene.
|
|
27876
27885
|
*/
|
|
27877
27886
|
createCylinderLayer(e, t, s, i, n, r, o, l, c = {}) {
|
|
27878
|
-
const h = new
|
|
27887
|
+
const h = new Md(e, e, e * t / s, 64, 64, !0, Math.PI - t / 2, t), u = new Sa(
|
|
27879
27888
|
r,
|
|
27880
27889
|
o,
|
|
27881
27890
|
{
|
|
@@ -27918,7 +27927,7 @@ class SR extends Mn {
|
|
|
27918
27927
|
renderTarget: u
|
|
27919
27928
|
};
|
|
27920
27929
|
if (this._layers.push(f), this._session !== null) {
|
|
27921
|
-
f.plane.material = new Ii({ color: 16777215, side: jt }), f.plane.material.blending = Ra, f.plane.material.blendEquation =
|
|
27930
|
+
f.plane.material = new Ii({ color: 16777215, side: jt }), f.plane.material.blending = Ra, f.plane.material.blendEquation = Cs, f.plane.material.blendSrc = Pi, f.plane.material.blendDst = Pi, f.xrlayer = this._createXRLayer(f);
|
|
27922
27931
|
const m = this._session.renderState.layers;
|
|
27923
27932
|
m.unshift(f.xrlayer), this._session.updateRenderState({ layers: m });
|
|
27924
27933
|
} else
|
|
@@ -28005,7 +28014,7 @@ class SR extends Mn {
|
|
|
28005
28014
|
}
|
|
28006
28015
|
), 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)
|
|
28007
28016
|
for (const m of this._layers)
|
|
28008
|
-
m.plane.material = new Ii({ color: 16777215, side: m.type === "cylinder" ? jt : ri }), m.plane.material.blending = Ra, m.plane.material.blendEquation =
|
|
28017
|
+
m.plane.material = new Ii({ color: 16777215, side: m.type === "cylinder" ? jt : ri }), m.plane.material.blending = Ra, m.plane.material.blendEquation = Cs, m.plane.material.blendSrc = Pi, m.plane.material.blendDst = Pi, m.xrlayer = this._createXRLayer(m), d.unshift(m.xrlayer);
|
|
28009
28018
|
e.updateRenderState({ layers: d });
|
|
28010
28019
|
} else {
|
|
28011
28020
|
const r = {
|
|
@@ -28078,7 +28087,7 @@ function nm(a, e) {
|
|
|
28078
28087
|
e === null ? a.matrixWorld.copy(a.matrix) : a.matrixWorld.multiplyMatrices(e.matrixWorld, a.matrix), a.matrixWorldInverse.copy(a.matrixWorld).invert();
|
|
28079
28088
|
}
|
|
28080
28089
|
function wR(a, e, t) {
|
|
28081
|
-
t === null ? a.matrix.copy(e.matrixWorld) : (a.matrix.copy(t.matrixWorld), a.matrix.invert(), a.matrix.multiply(e.matrixWorld)), a.matrix.decompose(a.position, a.quaternion, a.scale), a.updateMatrixWorld(!0), a.projectionMatrix.copy(e.projectionMatrix), a.projectionMatrixInverse.copy(e.projectionMatrixInverse), a.isPerspectiveCamera && (a.fov =
|
|
28090
|
+
t === null ? a.matrix.copy(e.matrixWorld) : (a.matrix.copy(t.matrixWorld), a.matrix.invert(), a.matrix.multiply(e.matrixWorld)), a.matrix.decompose(a.position, a.quaternion, a.scale), a.updateMatrixWorld(!0), a.projectionMatrix.copy(e.projectionMatrix), a.projectionMatrixInverse.copy(e.projectionMatrixInverse), a.isPerspectiveCamera && (a.fov = Cr * 2 * Math.atan(1 / a.projectionMatrix.elements[5]), a.zoom = 1);
|
|
28082
28091
|
}
|
|
28083
28092
|
function ER(a) {
|
|
28084
28093
|
const e = this._controllerInputSources.indexOf(a.inputSource);
|
|
@@ -28090,7 +28099,7 @@ function ER(a) {
|
|
|
28090
28099
|
t.update(a.inputSource, a.frame, s), t.dispatchEvent({ type: a.type, data: a.inputSource });
|
|
28091
28100
|
}
|
|
28092
28101
|
}
|
|
28093
|
-
function
|
|
28102
|
+
function CR() {
|
|
28094
28103
|
const a = this._session, e = this._renderer;
|
|
28095
28104
|
a.removeEventListener("select", this._onSessionEvent), a.removeEventListener("selectstart", this._onSessionEvent), a.removeEventListener("selectend", this._onSessionEvent), a.removeEventListener("squeeze", this._onSessionEvent), a.removeEventListener("squeezestart", this._onSessionEvent), a.removeEventListener("squeezeend", this._onSessionEvent), a.removeEventListener("end", this._onSessionEnd), a.removeEventListener("inputsourceschange", this._onInputSourcesChange);
|
|
28096
28105
|
for (let t = 0; t < this._controllers.length; t++) {
|
|
@@ -28124,7 +28133,7 @@ function MR() {
|
|
|
28124
28133
|
), t.renderTarget.isXRRenderTarget = !1, t.plane.material = t.material, t.material.map = t.renderTarget.texture, t.material.map.offset.y = 1, t.material.map.repeat.y = -1, delete t.xrlayer;
|
|
28125
28134
|
this.isPresenting = !1, this._useMultiview = !1, e._animation.stop(), e._animation.setAnimationLoop(this._currentAnimationLoop), e._animation.setContext(this._currentAnimationContext), e._animation.start(), e.setPixelRatio(this._currentPixelRatio), e.setSize(this._currentSize.width, this._currentSize.height, !1), this.dispatchEvent({ type: "sessionend" });
|
|
28126
28135
|
}
|
|
28127
|
-
function
|
|
28136
|
+
function MR(a) {
|
|
28128
28137
|
const e = this._controllers, t = this._controllerInputSources;
|
|
28129
28138
|
for (let s = 0; s < a.removed.length; s++) {
|
|
28130
28139
|
const i = a.removed[s], n = t.indexOf(i);
|
|
@@ -28472,7 +28481,7 @@ class Nd {
|
|
|
28472
28481
|
return new Nd();
|
|
28473
28482
|
}
|
|
28474
28483
|
}
|
|
28475
|
-
const rm = /* @__PURE__ */ new $u(), ko = /* @__PURE__ */ new he(), fh = /* @__PURE__ */ new ge(), mh = /* @__PURE__ */ new Rd(), gh = /* @__PURE__ */ new Nd(), zo = /* @__PURE__ */ new Le(),
|
|
28484
|
+
const rm = /* @__PURE__ */ new $u(), ko = /* @__PURE__ */ new he(), fh = /* @__PURE__ */ new ge(), mh = /* @__PURE__ */ new Rd(), gh = /* @__PURE__ */ new Nd(), zo = /* @__PURE__ */ new Le(), Ci = /* @__PURE__ */ new ge();
|
|
28476
28485
|
class NR {
|
|
28477
28486
|
/**
|
|
28478
28487
|
* Renderer options.
|
|
@@ -28554,7 +28563,7 @@ class NR {
|
|
|
28554
28563
|
return;
|
|
28555
28564
|
}
|
|
28556
28565
|
}
|
|
28557
|
-
this._nodes = new fR(this, s), this._animation = new Fb(this._nodes, this.info), this._attributes = new RT(s), this._background = new iA(this, this._nodes), this._geometries = new FT(this._attributes, this.info), this._textures = new sS(this, s, this.info), this._pipelines = new LT(s, this._nodes), this._bindings = new UT(s, this._nodes, this._textures, this._attributes, this._pipelines, this.info), this._objects = new
|
|
28566
|
+
this._nodes = new fR(this, s), this._animation = new Fb(this._nodes, this.info), this._attributes = new RT(s), this._background = new iA(this, this._nodes), this._geometries = new FT(this._attributes, this.info), this._textures = new sS(this, s, this.info), this._pipelines = new LT(s, this._nodes), this._bindings = new UT(s, this._nodes, this._textures, this._attributes, this._pipelines, this.info), this._objects = new CT(this, this._nodes, this._geometries, this._pipelines, this._bindings, this.info), this._renderLists = new GT(this.lighting), this._bundles = new gR(), this._renderContexts = new KT(), this._animation.start(), this._initialized = !0, e(this);
|
|
28558
28567
|
}), this._initPromise);
|
|
28559
28568
|
}
|
|
28560
28569
|
/**
|
|
@@ -28742,7 +28751,7 @@ Reason: ${e.reason}`), console.error(t), this._isDeviceLost = !0;
|
|
|
28742
28751
|
if (e !== yr === !1 && t !== xr === !1) return null;
|
|
28743
28752
|
const { width: n, height: r } = this.getDrawingBufferSize(ko), { depth: o, stencil: l } = this;
|
|
28744
28753
|
let c = this._frameBufferTarget;
|
|
28745
|
-
c === null && (c = new
|
|
28754
|
+
c === null && (c = new Mn(n, r, {
|
|
28746
28755
|
depthBuffer: o,
|
|
28747
28756
|
stencilBuffer: l,
|
|
28748
28757
|
type: this._colorBufferType,
|
|
@@ -29393,15 +29402,15 @@ Reason: ${e.reason}`), console.error(t), this._isDeviceLost = !0;
|
|
|
29393
29402
|
copyFramebufferToTexture(e, t = null) {
|
|
29394
29403
|
if (t !== null)
|
|
29395
29404
|
if (t.isVector2)
|
|
29396
|
-
t =
|
|
29405
|
+
t = Ci.set(t.x, t.y, e.image.width, e.image.height).floor();
|
|
29397
29406
|
else if (t.isVector4)
|
|
29398
|
-
t =
|
|
29407
|
+
t = Ci.copy(t).floor();
|
|
29399
29408
|
else {
|
|
29400
29409
|
console.error("THREE.Renderer.copyFramebufferToTexture: Invalid rectangle.");
|
|
29401
29410
|
return;
|
|
29402
29411
|
}
|
|
29403
29412
|
else
|
|
29404
|
-
t =
|
|
29413
|
+
t = Ci.set(0, 0, e.image.width, e.image.height);
|
|
29405
29414
|
let s = this._currentRenderContext, i;
|
|
29406
29415
|
s !== null ? i = s.renderTarget : (i = this._renderTarget || this._getFrameBufferTarget(), i !== null && (this._textures.updateRenderTarget(i), s = this._textures.get(i))), this._textures.updateTexture(e, { renderTarget: i }), this.backend.copyFramebufferToTexture(e, s, t);
|
|
29407
29416
|
}
|
|
@@ -29456,9 +29465,9 @@ Reason: ${e.reason}`), console.error(t), this._isDeviceLost = !0;
|
|
|
29456
29465
|
else if (e.isSprite) {
|
|
29457
29466
|
const l = t.isArrayCamera ? gh : mh;
|
|
29458
29467
|
if (!e.frustumCulled || l.intersectsSprite(e, t)) {
|
|
29459
|
-
this.sortObjects === !0 &&
|
|
29468
|
+
this.sortObjects === !0 && Ci.setFromMatrixPosition(e.matrixWorld).applyMatrix4(zo);
|
|
29460
29469
|
const { geometry: c, material: h } = e;
|
|
29461
|
-
h.visible && i.push(e, c, h, s,
|
|
29470
|
+
h.visible && i.push(e, c, h, s, Ci.z, null, n);
|
|
29462
29471
|
}
|
|
29463
29472
|
} else if (e.isLineLoop)
|
|
29464
29473
|
console.error("THREE.Renderer: Objects of type THREE.LineLoop are not supported. Please use THREE.Line or THREE.LineSegments.");
|
|
@@ -29466,13 +29475,13 @@ Reason: ${e.reason}`), console.error(t), this._isDeviceLost = !0;
|
|
|
29466
29475
|
const l = t.isArrayCamera ? gh : mh;
|
|
29467
29476
|
if (!e.frustumCulled || l.intersectsObject(e, t)) {
|
|
29468
29477
|
const { geometry: c, material: h } = e;
|
|
29469
|
-
if (this.sortObjects === !0 && (c.boundingSphere === null && c.computeBoundingSphere(),
|
|
29478
|
+
if (this.sortObjects === !0 && (c.boundingSphere === null && c.computeBoundingSphere(), Ci.copy(c.boundingSphere.center).applyMatrix4(e.matrixWorld).applyMatrix4(zo)), Array.isArray(h)) {
|
|
29470
29479
|
const u = c.groups;
|
|
29471
29480
|
for (let d = 0, p = u.length; d < p; d++) {
|
|
29472
29481
|
const f = u[d], m = h[f.materialIndex];
|
|
29473
|
-
m && m.visible && i.push(e, c, m, s,
|
|
29482
|
+
m && m.visible && i.push(e, c, m, s, Ci.z, f, n);
|
|
29474
29483
|
}
|
|
29475
|
-
} else h.visible && i.push(e, c, h, s,
|
|
29484
|
+
} else h.visible && i.push(e, c, h, s, Ci.z, null, n);
|
|
29476
29485
|
}
|
|
29477
29486
|
}
|
|
29478
29487
|
}
|
|
@@ -30028,7 +30037,7 @@ class L0 extends rc {
|
|
|
30028
30037
|
super(e, t, s, i), this.isSampledTexture3D = !0;
|
|
30029
30038
|
}
|
|
30030
30039
|
}
|
|
30031
|
-
class kR extends
|
|
30040
|
+
class kR extends Ct {
|
|
30032
30041
|
/**
|
|
30033
30042
|
* Constructs a new data texture.
|
|
30034
30043
|
*
|
|
@@ -31482,7 +31491,7 @@ class jR {
|
|
|
31482
31491
|
_init() {
|
|
31483
31492
|
const e = this.gl;
|
|
31484
31493
|
xh = {
|
|
31485
|
-
[
|
|
31494
|
+
[Cs]: e.FUNC_ADD,
|
|
31486
31495
|
[bg]: e.FUNC_SUBTRACT,
|
|
31487
31496
|
[Tg]: e.FUNC_REVERSE_SUBTRACT
|
|
31488
31497
|
}, oa = {
|
|
@@ -31491,12 +31500,12 @@ class jR {
|
|
|
31491
31500
|
[vg]: e.SRC_COLOR,
|
|
31492
31501
|
[_l]: e.SRC_ALPHA,
|
|
31493
31502
|
[Rg]: e.SRC_ALPHA_SATURATE,
|
|
31494
|
-
[
|
|
31503
|
+
[Mg]: e.DST_COLOR,
|
|
31495
31504
|
[Eg]: e.DST_ALPHA,
|
|
31496
31505
|
[wg]: e.ONE_MINUS_SRC_COLOR,
|
|
31497
31506
|
[bl]: e.ONE_MINUS_SRC_ALPHA,
|
|
31498
31507
|
[Ag]: e.ONE_MINUS_DST_COLOR,
|
|
31499
|
-
[
|
|
31508
|
+
[Cg]: e.ONE_MINUS_DST_ALPHA
|
|
31500
31509
|
};
|
|
31501
31510
|
const t = e.getParameter(e.SCISSOR_BOX), s = e.getParameter(e.VIEWPORT);
|
|
31502
31511
|
this.currentScissor = new ge().fromArray(t), this.currentViewport = new ge().fromArray(s), this._tempVec4 = new ge();
|
|
@@ -31582,13 +31591,13 @@ class jR {
|
|
|
31582
31591
|
*/
|
|
31583
31592
|
setBlending(e, t, s, i, n, r, o, l) {
|
|
31584
31593
|
const { gl: c } = this;
|
|
31585
|
-
if (e ===
|
|
31594
|
+
if (e === Mr) {
|
|
31586
31595
|
this.currentBlendingEnabled === !0 && (this.disable(c.BLEND), this.currentBlendingEnabled = !1);
|
|
31587
31596
|
return;
|
|
31588
31597
|
}
|
|
31589
31598
|
if (this.currentBlendingEnabled === !1 && (this.enable(c.BLEND), this.currentBlendingEnabled = !0), e !== Ra) {
|
|
31590
31599
|
if (e !== this.currentBlending || l !== this.currentPremultipledAlpha) {
|
|
31591
|
-
if ((this.currentBlendEquation !==
|
|
31600
|
+
if ((this.currentBlendEquation !== Cs || this.currentBlendEquationAlpha !== Cs) && (c.blendEquation(c.FUNC_ADD), this.currentBlendEquation = Cs, this.currentBlendEquationAlpha = Cs), l)
|
|
31592
31601
|
switch (e) {
|
|
31593
31602
|
case ai:
|
|
31594
31603
|
c.blendFuncSeparate(c.ONE, c.ONE_MINUS_SRC_ALPHA, c.ONE, c.ONE_MINUS_SRC_ALPHA);
|
|
@@ -31805,7 +31814,7 @@ class jR {
|
|
|
31805
31814
|
const { gl: i } = this;
|
|
31806
31815
|
e.side === gr ? this.disable(i.CULL_FACE) : this.enable(i.CULL_FACE);
|
|
31807
31816
|
let n = e.side === jt;
|
|
31808
|
-
t && (n = !n), this.setFlipSided(n), e.blending === ai && e.transparent === !1 ? this.setBlending(
|
|
31817
|
+
t && (n = !n), this.setFlipSided(n), e.blending === ai && e.transparent === !1 ? this.setBlending(Mr) : this.setBlending(e.blending, e.blendEquation, e.blendSrc, e.blendDst, e.blendEquationAlpha, e.blendSrcAlpha, e.blendDstAlpha, e.premultipliedAlpha), this.setDepthFunc(e.depthFunc), this.setDepthTest(e.depthTest), this.setDepthMask(e.depthWrite), this.setColorMask(e.colorWrite);
|
|
31809
31818
|
const r = e.stencilWrite;
|
|
31810
31819
|
if (this.setStencilTest(r), r && (this.setStencilMask(e.stencilWriteMask), this.setStencilFunc(e.stencilFunc, e.stencilRef, e.stencilFuncMask), this.setStencilOp(e.stencilFail, e.stencilZFail, e.stencilZPass)), this.setPolygonOffset(e.polygonOffset, e.polygonOffsetFactor, e.polygonOffsetUnits), e.alphaToCoverage === !0 && this.backend.renderer.samples > 1 ? this.enable(i.SAMPLE_ALPHA_TO_COVERAGE) : this.disable(i.SAMPLE_ALPHA_TO_COVERAGE), s > 0 && this.currentClippingPlanes !== s)
|
|
31811
31820
|
for (let l = 0; l < 8; l++)
|
|
@@ -32047,12 +32056,12 @@ class qR {
|
|
|
32047
32056
|
if (e === _c) return r === te ? n.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT : n.COMPRESSED_RGBA_BPTC_UNORM_EXT;
|
|
32048
32057
|
} else
|
|
32049
32058
|
return null;
|
|
32050
|
-
if (e === Qb || e === wp || e === Ep || e ===
|
|
32059
|
+
if (e === Qb || e === wp || e === Ep || e === Cp)
|
|
32051
32060
|
if (n = i.get("EXT_texture_compression_rgtc"), n !== null) {
|
|
32052
32061
|
if (e === _c) return n.COMPRESSED_RED_RGTC1_EXT;
|
|
32053
32062
|
if (e === wp) return n.COMPRESSED_SIGNED_RED_RGTC1_EXT;
|
|
32054
32063
|
if (e === Ep) return n.COMPRESSED_RED_GREEN_RGTC2_EXT;
|
|
32055
|
-
if (e ===
|
|
32064
|
+
if (e === Cp) return n.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT;
|
|
32056
32065
|
} else
|
|
32057
32066
|
return null;
|
|
32058
32067
|
return e === ki ? s.UNSIGNED_INT_24_8 : s[e] !== void 0 ? s[e] : null;
|
|
@@ -32321,8 +32330,8 @@ class YR {
|
|
|
32321
32330
|
if (e.isRenderTargetTexture || e.isDepthTexture) {
|
|
32322
32331
|
const q = l.get(e), X = l.get(t), Ee = l.get(q.renderTarget), de = l.get(X.renderTarget), ye = Ee.framebuffers[q.cacheKey], se = de.framebuffers[X.cacheKey];
|
|
32323
32332
|
c.bindFramebuffer(o.READ_FRAMEBUFFER, ye), c.bindFramebuffer(o.DRAW_FRAMEBUFFER, se);
|
|
32324
|
-
let
|
|
32325
|
-
e.isDepthTexture && (
|
|
32333
|
+
let Ce = o.COLOR_BUFFER_BIT;
|
|
32334
|
+
e.isDepthTexture && (Ce = o.DEPTH_BUFFER_BIT), o.blitFramebuffer(g, x, f, m, b, T, f, m, Ce, o.NEAREST), c.bindFramebuffer(o.READ_FRAMEBUFFER, null), c.bindFramebuffer(o.DRAW_FRAMEBUFFER, null);
|
|
32326
32335
|
} else
|
|
32327
32336
|
$ ? e.isDataTexture || e.isData3DTexture ? o.texSubImage3D(u, r, b, T, E, f, m, y, p, d, v.data) : t.isCompressedArrayTexture ? o.compressedTexSubImage3D(u, r, b, T, E, f, m, y, p, v.data) : o.texSubImage3D(u, r, b, T, E, f, m, y, p, d, v) : e.isDataTexture ? o.texSubImage2D(u, r, b, T, f, m, p, d, v.data) : e.isCompressedTexture ? o.compressedTexSubImage2D(u, r, b, T, v.width, v.height, p, v.data) : o.texSubImage2D(u, r, b, T, f, m, p, d, v);
|
|
32328
32337
|
o.pixelStorei(o.UNPACK_ROW_LENGTH, A), o.pixelStorei(o.UNPACK_IMAGE_HEIGHT, N), o.pixelStorei(o.UNPACK_SKIP_PIXELS, k), o.pixelStorei(o.UNPACK_SKIP_ROWS, H), o.pixelStorei(o.UNPACK_SKIP_IMAGES, W), r === 0 && t.generateMipmaps && o.generateMipmap(u), c.unbindTexture();
|
|
@@ -33139,10 +33148,10 @@ class mm extends U0 {
|
|
|
33139
33148
|
$ && (this.renderer._activeCubeFace = X, this._currentContext.activeCubeFace = X, this._setFramebuffer(this._currentContext));
|
|
33140
33149
|
const ye = de.viewport;
|
|
33141
33150
|
if (ye !== void 0) {
|
|
33142
|
-
const se = ye.x * H,
|
|
33151
|
+
const se = ye.x * H, Ce = ye.y * H, Ge = ye.width * H, ot = ye.height * H;
|
|
33143
33152
|
c.viewport(
|
|
33144
33153
|
Math.floor(se),
|
|
33145
|
-
Math.floor(e.context.height - ot -
|
|
33154
|
+
Math.floor(e.context.height - ot - Ce),
|
|
33146
33155
|
Math.floor(Ge),
|
|
33147
33156
|
Math.floor(ot)
|
|
33148
33157
|
);
|
|
@@ -33809,7 +33818,7 @@ const fr = {
|
|
|
33809
33818
|
Always: "always"
|
|
33810
33819
|
}, Nt = {
|
|
33811
33820
|
Store: "store"
|
|
33812
|
-
},
|
|
33821
|
+
}, Me = {
|
|
33813
33822
|
Load: "load",
|
|
33814
33823
|
Clear: "clear"
|
|
33815
33824
|
}, bh = {
|
|
@@ -33958,7 +33967,7 @@ const fr = {
|
|
|
33958
33967
|
}, gm = {
|
|
33959
33968
|
None: 0,
|
|
33960
33969
|
All: 15
|
|
33961
|
-
},
|
|
33970
|
+
}, Mi = {
|
|
33962
33971
|
Keep: "keep",
|
|
33963
33972
|
Zero: "zero",
|
|
33964
33973
|
Replace: "replace",
|
|
@@ -34238,7 +34247,7 @@ fn main( @location( 0 ) vTex : vec2<f32> ) -> @location( 0 ) vec4<f32> {
|
|
|
34238
34247
|
}), _ = d.beginRenderPass({
|
|
34239
34248
|
colorAttachments: [{
|
|
34240
34249
|
view: y,
|
|
34241
|
-
loadOp:
|
|
34250
|
+
loadOp: Me.Clear,
|
|
34242
34251
|
storeOp: Nt.Store,
|
|
34243
34252
|
clearValue: [0, 0, 0, 0]
|
|
34244
34253
|
}]
|
|
@@ -34296,7 +34305,7 @@ fn main( @location( 0 ) vTex : vec2<f32> ) -> @location( 0 ) vec4<f32> {
|
|
|
34296
34305
|
}), u = {
|
|
34297
34306
|
colorAttachments: [{
|
|
34298
34307
|
view: h,
|
|
34299
|
-
loadOp:
|
|
34308
|
+
loadOp: Me.Clear,
|
|
34300
34309
|
storeOp: Nt.Store,
|
|
34301
34310
|
clearValue: [0, 0, 0, 0]
|
|
34302
34311
|
}]
|
|
@@ -34368,7 +34377,7 @@ class l1 {
|
|
|
34368
34377
|
*/
|
|
34369
34378
|
createDefaultTexture(e) {
|
|
34370
34379
|
let t;
|
|
34371
|
-
const s =
|
|
34380
|
+
const s = Cu(e);
|
|
34372
34381
|
e.isCubeTexture ? t = this._getDefaultCubeTextureGPU(s) : e.isVideoTexture ? this.backend.get(e).externalTexture = this._getDefaultVideoFrame() : t = this._getDefaultTextureGPU(s), this.backend.get(e).texture = t;
|
|
34373
34382
|
}
|
|
34374
34383
|
/**
|
|
@@ -34384,7 +34393,7 @@ class l1 {
|
|
|
34384
34393
|
t.needsMipmaps === void 0 && (t.needsMipmaps = !1), t.levels === void 0 && (t.levels = 1), t.depth === void 0 && (t.depth = 1);
|
|
34385
34394
|
const { width: n, height: r, depth: o, levels: l } = t;
|
|
34386
34395
|
e.isFramebufferTexture && (t.renderTarget ? t.format = this.backend.utils.getCurrentColorFormat(t.renderTarget) : t.format = this.backend.utils.getPreferredCanvasFormat());
|
|
34387
|
-
const c = this._getDimension(e), h = e.internalFormat || t.format ||
|
|
34396
|
+
const c = this._getDimension(e), h = e.internalFormat || t.format || Cu(e, s.device);
|
|
34388
34397
|
i.format = h;
|
|
34389
34398
|
const { samples: u, primarySamples: d, isMSAA: p } = s.utils.getTextureSampleData(e);
|
|
34390
34399
|
let f = GPUTextureUsage.TEXTURE_BINDING | GPUTextureUsage.COPY_DST | GPUTextureUsage.COPY_SRC;
|
|
@@ -34568,7 +34577,7 @@ class l1 {
|
|
|
34568
34577
|
_getDefaultTextureGPU(e) {
|
|
34569
34578
|
let t = this.defaultTexture[e];
|
|
34570
34579
|
if (t === void 0) {
|
|
34571
|
-
const s = new
|
|
34580
|
+
const s = new Ct();
|
|
34572
34581
|
s.minFilter = dt, s.magFilter = dt, this.createTexture(s, { width: 1, height: 1, format: e }), this.defaultTexture[e] = t = s;
|
|
34573
34582
|
}
|
|
34574
34583
|
return this.backend.get(t).texture;
|
|
@@ -34878,7 +34887,7 @@ class l1 {
|
|
|
34878
34887
|
return e.isData3DTexture ? t = xm.ThreeD : t = xm.TwoD, t;
|
|
34879
34888
|
}
|
|
34880
34889
|
}
|
|
34881
|
-
function
|
|
34890
|
+
function Cu(a, e = null) {
|
|
34882
34891
|
const t = a.format, s = a.type, i = a.colorSpace, n = ke.getTransfer(i);
|
|
34883
34892
|
let r;
|
|
34884
34893
|
if (a.isCompressedTexture === !0 || a.isCompressedArrayTexture === !0)
|
|
@@ -35193,7 +35202,7 @@ const c1 = /^[fn]*\s*([a-z_0-9]+)?\s*\(([\s\S]*?)\)\s*[\-\>]*\s*([a-z_0-9]+(?:<[
|
|
|
35193
35202
|
} else
|
|
35194
35203
|
throw new Error("FunctionNode: Function is not a WGSL code.");
|
|
35195
35204
|
};
|
|
35196
|
-
class d1 extends
|
|
35205
|
+
class d1 extends Cd {
|
|
35197
35206
|
/**
|
|
35198
35207
|
* Constructs a new WGSL node function.
|
|
35199
35208
|
*
|
|
@@ -35214,7 +35223,7 @@ class d1 extends Md {
|
|
|
35214
35223
|
return `fn ${e} ( ${this.inputsCode.trim()} ) ${t}` + this.blockCode;
|
|
35215
35224
|
}
|
|
35216
35225
|
}
|
|
35217
|
-
class p1 extends
|
|
35226
|
+
class p1 extends C0 {
|
|
35218
35227
|
/**
|
|
35219
35228
|
* The method parses the given WGSL code an returns a node function.
|
|
35220
35229
|
*
|
|
@@ -36097,7 +36106,7 @@ ${t.join(`
|
|
|
36097
36106
|
else if (u.isData3DTexture === !0)
|
|
36098
36107
|
d = "texture_3d<f32>";
|
|
36099
36108
|
else if (l.node.isStorageTextureNode === !0) {
|
|
36100
|
-
const m =
|
|
36109
|
+
const m = Cu(u), y = this.getStorageAccess(l.node, e);
|
|
36101
36110
|
d = `texture_storage_2d<${m}, ${y}>`;
|
|
36102
36111
|
} else {
|
|
36103
36112
|
const m = this.getComponentTypeFromTexture(u).charAt(0);
|
|
@@ -36909,7 +36918,7 @@ class w1 {
|
|
|
36909
36918
|
}
|
|
36910
36919
|
const f = c.attributeUtils.createShaderVertexBuffers(e);
|
|
36911
36920
|
let m;
|
|
36912
|
-
i.blending !==
|
|
36921
|
+
i.blending !== Mr && (i.blending !== ai || i.transparent !== !1) && (m = this._getBlending(i));
|
|
36913
36922
|
let y = {};
|
|
36914
36923
|
i.stencilWrite === !0 && (y = {
|
|
36915
36924
|
compare: this._getStencilCompare(i),
|
|
@@ -37092,7 +37101,7 @@ class w1 {
|
|
|
37092
37101
|
case bl:
|
|
37093
37102
|
t = ie.OneMinusSrcAlpha;
|
|
37094
37103
|
break;
|
|
37095
|
-
case
|
|
37104
|
+
case Mg:
|
|
37096
37105
|
t = ie.Dst;
|
|
37097
37106
|
break;
|
|
37098
37107
|
case Ag:
|
|
@@ -37101,13 +37110,13 @@ class w1 {
|
|
|
37101
37110
|
case Eg:
|
|
37102
37111
|
t = ie.DstAlpha;
|
|
37103
37112
|
break;
|
|
37104
|
-
case
|
|
37113
|
+
case Cg:
|
|
37105
37114
|
t = ie.OneMinusDstAlpha;
|
|
37106
37115
|
break;
|
|
37107
37116
|
case Rg:
|
|
37108
37117
|
t = ie.SrcAlphaSaturated;
|
|
37109
37118
|
break;
|
|
37110
|
-
case
|
|
37119
|
+
case MT:
|
|
37111
37120
|
t = ie.Constant;
|
|
37112
37121
|
break;
|
|
37113
37122
|
case AT:
|
|
@@ -37169,28 +37178,28 @@ class w1 {
|
|
|
37169
37178
|
let t;
|
|
37170
37179
|
switch (e) {
|
|
37171
37180
|
case hn:
|
|
37172
|
-
t =
|
|
37181
|
+
t = Mi.Keep;
|
|
37173
37182
|
break;
|
|
37174
37183
|
case eT:
|
|
37175
|
-
t =
|
|
37184
|
+
t = Mi.Zero;
|
|
37176
37185
|
break;
|
|
37177
37186
|
case tT:
|
|
37178
|
-
t =
|
|
37187
|
+
t = Mi.Replace;
|
|
37179
37188
|
break;
|
|
37180
37189
|
case aT:
|
|
37181
|
-
t =
|
|
37190
|
+
t = Mi.Invert;
|
|
37182
37191
|
break;
|
|
37183
37192
|
case sT:
|
|
37184
|
-
t =
|
|
37193
|
+
t = Mi.IncrementClamp;
|
|
37185
37194
|
break;
|
|
37186
37195
|
case iT:
|
|
37187
|
-
t =
|
|
37196
|
+
t = Mi.DecrementClamp;
|
|
37188
37197
|
break;
|
|
37189
37198
|
case nT:
|
|
37190
|
-
t =
|
|
37199
|
+
t = Mi.IncrementWrap;
|
|
37191
37200
|
break;
|
|
37192
37201
|
case rT:
|
|
37193
|
-
t =
|
|
37202
|
+
t = Mi.DecrementWrap;
|
|
37194
37203
|
break;
|
|
37195
37204
|
default:
|
|
37196
37205
|
console.error("THREE.WebGPURenderer: Invalid stencil operation.", t);
|
|
@@ -37207,7 +37216,7 @@ class w1 {
|
|
|
37207
37216
|
_getBlendOperation(e) {
|
|
37208
37217
|
let t;
|
|
37209
37218
|
switch (e) {
|
|
37210
|
-
case
|
|
37219
|
+
case Cs:
|
|
37211
37220
|
t = tn.Add;
|
|
37212
37221
|
break;
|
|
37213
37222
|
case bg:
|
|
@@ -37436,7 +37445,7 @@ class E1 extends k0 {
|
|
|
37436
37445
|
}
|
|
37437
37446
|
}
|
|
37438
37447
|
}
|
|
37439
|
-
class
|
|
37448
|
+
class C1 extends U0 {
|
|
37440
37449
|
/**
|
|
37441
37450
|
* WebGPUBackend options.
|
|
37442
37451
|
*
|
|
@@ -37655,7 +37664,7 @@ class M1 extends U0 {
|
|
|
37655
37664
|
view: h.view,
|
|
37656
37665
|
depthSlice: h.depthSlice,
|
|
37657
37666
|
resolveTarget: h.resolveTarget,
|
|
37658
|
-
loadOp: t.loadOp ||
|
|
37667
|
+
loadOp: t.loadOp || Me.Load,
|
|
37659
37668
|
storeOp: t.storeOp || Nt.Store,
|
|
37660
37669
|
clearValue: u
|
|
37661
37670
|
});
|
|
@@ -37675,19 +37684,19 @@ class M1 extends U0 {
|
|
|
37675
37684
|
let n;
|
|
37676
37685
|
i > 0 && (t.currentOcclusionQuerySet && t.currentOcclusionQuerySet.destroy(), t.currentOcclusionQueryBuffer && t.currentOcclusionQueryBuffer.destroy(), t.currentOcclusionQuerySet = t.occlusionQuerySet, t.currentOcclusionQueryBuffer = t.occlusionQueryBuffer, t.currentOcclusionQueryObjects = t.occlusionQueryObjects, n = s.createQuerySet({ type: "occlusion", count: i, label: `occlusionQuerySet_${e.id}` }), t.occlusionQuerySet = n, t.occlusionQueryIndex = 0, t.occlusionQueryObjects = new Array(i), t.lastOcclusionObject = null);
|
|
37677
37686
|
let r;
|
|
37678
|
-
e.textures === null ? r = this._getDefaultRenderPassDescriptor() : r = this._getRenderPassDescriptor(e, { loadOp:
|
|
37687
|
+
e.textures === null ? r = this._getDefaultRenderPassDescriptor() : r = this._getRenderPassDescriptor(e, { loadOp: Me.Load }), this.initTimestampQuery(e, r), r.occlusionQuerySet = n;
|
|
37679
37688
|
const o = r.depthStencilAttachment;
|
|
37680
37689
|
if (e.textures !== null) {
|
|
37681
37690
|
const c = r.colorAttachments;
|
|
37682
37691
|
for (let h = 0; h < c.length; h++) {
|
|
37683
37692
|
const u = c[h];
|
|
37684
|
-
e.clearColor ? (u.clearValue = h === 0 ? e.clearColorValue : { r: 0, g: 0, b: 0, a: 1 }, u.loadOp =
|
|
37693
|
+
e.clearColor ? (u.clearValue = h === 0 ? e.clearColorValue : { r: 0, g: 0, b: 0, a: 1 }, u.loadOp = Me.Clear) : u.loadOp = Me.Load, u.storeOp = Nt.Store;
|
|
37685
37694
|
}
|
|
37686
37695
|
} else {
|
|
37687
37696
|
const c = r.colorAttachments[0];
|
|
37688
|
-
e.clearColor ? (c.clearValue = e.clearColorValue, c.loadOp =
|
|
37697
|
+
e.clearColor ? (c.clearValue = e.clearColorValue, c.loadOp = Me.Clear) : c.loadOp = Me.Load, c.storeOp = Nt.Store;
|
|
37689
37698
|
}
|
|
37690
|
-
e.depth && (e.clearDepth ? (o.depthClearValue = e.clearDepthValue, o.depthLoadOp =
|
|
37699
|
+
e.depth && (e.clearDepth ? (o.depthClearValue = e.clearDepthValue, o.depthLoadOp = Me.Clear) : o.depthLoadOp = Me.Load, o.depthStoreOp = Nt.Store), e.stencil && (e.clearStencil ? (o.stencilClearValue = e.clearStencilValue, o.stencilLoadOp = Me.Clear) : o.stencilLoadOp = Me.Load, o.stencilStoreOp = Nt.Store);
|
|
37691
37700
|
const l = s.createCommandEncoder({ label: "renderContext_" + e.id });
|
|
37692
37701
|
if (this._isRenderCameraDepthArray(e) === !0) {
|
|
37693
37702
|
const c = e.camera.cameras;
|
|
@@ -37746,7 +37755,7 @@ class M1 extends U0 {
|
|
|
37746
37755
|
arrayLayerCount: 1
|
|
37747
37756
|
})), l.depthStencilAttachment = {
|
|
37748
37757
|
view: r.viewCache[c],
|
|
37749
|
-
depthLoadOp: n.depthLoadOp ||
|
|
37758
|
+
depthLoadOp: n.depthLoadOp || Me.Clear,
|
|
37750
37759
|
depthStoreOp: n.depthStoreOp || Nt.Store,
|
|
37751
37760
|
depthClearValue: n.depthClearValue || 1
|
|
37752
37761
|
}, e.stencil && (l.depthStencilAttachment.stencilLoadOp = n.stencilLoadOp, l.depthStencilAttachment.stencilStoreOp = n.stencilStoreOp, l.depthStencilAttachment.stencilClearValue = n.stencilClearValue);
|
|
@@ -37769,7 +37778,7 @@ class M1 extends U0 {
|
|
|
37769
37778
|
const n = t.layerDescriptors[i];
|
|
37770
37779
|
if (n.depthStencilAttachment) {
|
|
37771
37780
|
const r = n.depthStencilAttachment;
|
|
37772
|
-
e.depth && (e.clearDepth ? (r.depthClearValue = e.clearDepthValue, r.depthLoadOp =
|
|
37781
|
+
e.depth && (e.clearDepth ? (r.depthClearValue = e.clearDepthValue, r.depthLoadOp = Me.Clear) : r.depthLoadOp = Me.Load), e.stencil && (e.clearStencil ? (r.stencilClearValue = e.clearStencilValue, r.stencilLoadOp = Me.Clear) : r.stencilLoadOp = Me.Load);
|
|
37773
37782
|
}
|
|
37774
37783
|
}
|
|
37775
37784
|
}
|
|
@@ -37899,20 +37908,20 @@ class M1 extends U0 {
|
|
|
37899
37908
|
if (e) {
|
|
37900
37909
|
o = f.colorAttachments;
|
|
37901
37910
|
const m = o[0];
|
|
37902
|
-
m.clearValue = c, m.loadOp =
|
|
37911
|
+
m.clearValue = c, m.loadOp = Me.Clear, m.storeOp = Nt.Store;
|
|
37903
37912
|
}
|
|
37904
37913
|
(h || u) && (l = f.depthStencilAttachment);
|
|
37905
37914
|
} else {
|
|
37906
37915
|
h = i.depth, u = i.stencil;
|
|
37907
37916
|
const f = {
|
|
37908
|
-
loadOp: e ?
|
|
37917
|
+
loadOp: e ? Me.Clear : Me.Load,
|
|
37909
37918
|
clearValue: e ? c : void 0
|
|
37910
37919
|
};
|
|
37911
|
-
h && (f.depthLoadOp = t ?
|
|
37920
|
+
h && (f.depthLoadOp = t ? Me.Clear : Me.Load, f.depthClearValue = t ? r.getClearDepth() : void 0, f.depthStoreOp = Nt.Store), u && (f.stencilLoadOp = s ? Me.Clear : Me.Load, f.stencilClearValue = s ? r.getClearStencil() : void 0, f.stencilStoreOp = Nt.Store);
|
|
37912
37921
|
const m = this._getRenderPassDescriptor(i, f);
|
|
37913
37922
|
o = m.colorAttachments, l = m.depthStencilAttachment;
|
|
37914
37923
|
}
|
|
37915
|
-
h && l && l.depthLoadOp === void 0 && (t ? (l.depthLoadOp =
|
|
37924
|
+
h && l && l.depthLoadOp === void 0 && (t ? (l.depthLoadOp = Me.Clear, l.depthClearValue = r.getClearDepth(), l.depthStoreOp = Nt.Store) : (l.depthLoadOp = Me.Load, l.depthStoreOp = Nt.Store)), u && l && l.stencilLoadOp === void 0 && (s ? (l.stencilLoadOp = Me.Clear, l.stencilClearValue = r.getClearStencil(), l.stencilStoreOp = Nt.Store) : (l.stencilLoadOp = Me.Load, l.stencilStoreOp = Nt.Store));
|
|
37916
37925
|
const d = n.createCommandEncoder({ label: "clear" });
|
|
37917
37926
|
d.beginRenderPass({
|
|
37918
37927
|
colorAttachments: o,
|
|
@@ -38462,8 +38471,8 @@ class M1 extends U0 {
|
|
|
38462
38471
|
), i.currentPass) {
|
|
38463
38472
|
const { descriptor: l } = i;
|
|
38464
38473
|
for (let c = 0; c < l.colorAttachments.length; c++)
|
|
38465
|
-
l.colorAttachments[c].loadOp =
|
|
38466
|
-
if (t.depth && (l.depthStencilAttachment.depthLoadOp =
|
|
38474
|
+
l.colorAttachments[c].loadOp = Me.Load;
|
|
38475
|
+
if (t.depth && (l.depthStencilAttachment.depthLoadOp = Me.Load), t.stencil && (l.depthStencilAttachment.stencilLoadOp = Me.Load), i.currentPass = o.beginRenderPass(l), i.currentSets = { attributes: {}, bindingGroups: [], pipeline: null, index: null }, t.viewport && this.updateViewport(t), t.scissor) {
|
|
38467
38476
|
const { x: c, y: h, width: u, height: d } = t.scissorValue;
|
|
38468
38477
|
i.currentPass.setScissorRect(c, h, u, d);
|
|
38469
38478
|
}
|
|
@@ -38472,7 +38481,7 @@ class M1 extends U0 {
|
|
|
38472
38481
|
e.generateMipmaps && this.textureUtils.generateMipmaps(e);
|
|
38473
38482
|
}
|
|
38474
38483
|
}
|
|
38475
|
-
class
|
|
38484
|
+
class M1 extends qt {
|
|
38476
38485
|
/**
|
|
38477
38486
|
* Constructs a new mesh phong material.
|
|
38478
38487
|
*
|
|
@@ -38489,7 +38498,7 @@ class C1 extends qt {
|
|
|
38489
38498
|
return super.copy(e), this.color.copy(e.color), this.specular.copy(e.specular), this.shininess = e.shininess, this.map = e.map, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.emissive.copy(e.emissive), this.emissiveMap = e.emissiveMap, this.emissiveIntensity = e.emissiveIntensity, 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.specularMap = e.specularMap, this.alphaMap = e.alphaMap, this.envMap = e.envMap, this.envMapRotation.copy(e.envMapRotation), this.combine = e.combine, this.reflectivity = e.reflectivity, this.refractionRatio = e.refractionRatio, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.flatShading = e.flatShading, this.fog = e.fog, this;
|
|
38490
38499
|
}
|
|
38491
38500
|
}
|
|
38492
|
-
const A1 = /* @__PURE__ */ new
|
|
38501
|
+
const A1 = /* @__PURE__ */ new M1();
|
|
38493
38502
|
class R1 extends nt {
|
|
38494
38503
|
static get type() {
|
|
38495
38504
|
return "MeshPhongNodeMaterial";
|
|
@@ -38601,7 +38610,7 @@ class V0 extends nt {
|
|
|
38601
38610
|
setupVariants() {
|
|
38602
38611
|
const e = this.metalnessNode ? O(this.metalnessNode) : AE;
|
|
38603
38612
|
Nl.assign(e);
|
|
38604
|
-
let t = this.roughnessNode ? O(this.roughnessNode) :
|
|
38613
|
+
let t = this.roughnessNode ? O(this.roughnessNode) : ME;
|
|
38605
38614
|
t = x0({ roughness: t }), si.assign(t), this.setupSpecular(), ve.assign(ne(ve.rgb.mul(e.oneMinus()), ve.a));
|
|
38606
38615
|
}
|
|
38607
38616
|
copy(e) {
|
|
@@ -38793,7 +38802,7 @@ class D1 extends V0 {
|
|
|
38793
38802
|
*/
|
|
38794
38803
|
setupSpecular() {
|
|
38795
38804
|
const e = this.iorNode ? O(this.iorNode) : VE;
|
|
38796
|
-
al.assign(e), Jt.assign(Ve(Pr(
|
|
38805
|
+
al.assign(e), Jt.assign(Ve(Pr(My(al.sub(1).div(al.add(1))).mul(CE), B(1)).mul(hf), ve.rgb, Nl)), Fl.assign(Ve(hf, 1, Nl));
|
|
38797
38806
|
}
|
|
38798
38807
|
/**
|
|
38799
38808
|
* Setups the lighting model.
|
|
@@ -38999,7 +39008,7 @@ class G1 extends nt {
|
|
|
38999
39008
|
* @return {BasicLightingModel} The lighting model.
|
|
39000
39009
|
*/
|
|
39001
39010
|
setupLightingModel() {
|
|
39002
|
-
return new
|
|
39011
|
+
return new M0();
|
|
39003
39012
|
}
|
|
39004
39013
|
}
|
|
39005
39014
|
class V1 extends qt {
|
|
@@ -39530,7 +39539,7 @@ class Fd {
|
|
|
39530
39539
|
return this.intensity !== 1 && (e.intensity = this.intensity), this.bias !== 0 && (e.bias = this.bias), this.normalBias !== 0 && (e.normalBias = this.normalBias), this.radius !== 1 && (e.radius = this.radius), (this.mapSize.x !== 512 || this.mapSize.y !== 512) && (e.mapSize = this.mapSize.toArray()), e.camera = this.camera.toJSON(!1).object, delete e.camera.matrix, e;
|
|
39531
39540
|
}
|
|
39532
39541
|
}
|
|
39533
|
-
const Em = /* @__PURE__ */ new Le(), la = /* @__PURE__ */ new R(),
|
|
39542
|
+
const Em = /* @__PURE__ */ new Le(), la = /* @__PURE__ */ new R(), Ch = /* @__PURE__ */ new R();
|
|
39534
39543
|
class uN extends Fd {
|
|
39535
39544
|
/**
|
|
39536
39545
|
* Constructs a new point light shadow.
|
|
@@ -39585,7 +39594,7 @@ class uN extends Fd {
|
|
|
39585
39594
|
*/
|
|
39586
39595
|
updateMatrices(e, t = 0) {
|
|
39587
39596
|
const s = this.camera, i = this.matrix, n = e.distance || s.far;
|
|
39588
|
-
n !== s.far && (s.far = n, s.updateProjectionMatrix()), la.setFromMatrixPosition(e.matrixWorld), s.position.copy(la),
|
|
39597
|
+
n !== s.far && (s.far = n, s.updateProjectionMatrix()), la.setFromMatrixPosition(e.matrixWorld), s.position.copy(la), Ch.copy(s.position), Ch.add(this._cubeDirections[t]), s.up.copy(this._cubeUps[t]), s.lookAt(Ch), s.updateMatrixWorld(), i.makeTranslation(-la.x, -la.y, -la.z), Em.multiplyMatrices(s.projectionMatrix, s.matrixWorldInverse), this._frustum.setFromProjectionMatrix(Em);
|
|
39589
39598
|
}
|
|
39590
39599
|
}
|
|
39591
39600
|
class dN extends Rn {
|
|
@@ -39684,7 +39693,7 @@ class gN extends Fd {
|
|
|
39684
39693
|
super(new ss(50, 1, 0.5, 500)), this.isSpotLightShadow = !0, this.focus = 1, this.aspect = 1;
|
|
39685
39694
|
}
|
|
39686
39695
|
updateMatrices(e) {
|
|
39687
|
-
const t = this.camera, s =
|
|
39696
|
+
const t = this.camera, s = Cr * 2 * e.angle * this.focus, i = this.mapSize.width / this.mapSize.height * this.aspect, n = e.distance || t.far;
|
|
39688
39697
|
(s !== t.fov || i !== t.aspect || n !== t.far) && (t.fov = s, t.aspect = i, t.far = n, t.updateProjectionMatrix()), super.updateMatrices(e);
|
|
39689
39698
|
}
|
|
39690
39699
|
copy(e) {
|
|
@@ -39987,7 +39996,7 @@ class vN extends P0 {
|
|
|
39987
39996
|
* Constructs a new standard node library.
|
|
39988
39997
|
*/
|
|
39989
39998
|
constructor() {
|
|
39990
|
-
super(), this.addMaterial(R1, "MeshPhongMaterial"), this.addMaterial(V0, "MeshStandardMaterial"), this.addMaterial(D1, "MeshPhysicalMaterial"), this.addMaterial(U1, "MeshToonMaterial"), this.addMaterial(G1, "MeshBasicMaterial"), this.addMaterial($1, "MeshLambertMaterial"), this.addMaterial(q1, "MeshNormalMaterial"), this.addMaterial(Z1, "MeshMatcapMaterial"), this.addMaterial(Q1, "LineBasicMaterial"), this.addMaterial(tN, "LineDashedMaterial"), this.addMaterial(aN, "PointsMaterial"), this.addMaterial($0, "SpriteMaterial"), this.addMaterial(hN, "ShadowMaterial"), this.addLight(
|
|
39999
|
+
super(), this.addMaterial(R1, "MeshPhongMaterial"), this.addMaterial(V0, "MeshStandardMaterial"), this.addMaterial(D1, "MeshPhysicalMaterial"), this.addMaterial(U1, "MeshToonMaterial"), this.addMaterial(G1, "MeshBasicMaterial"), this.addMaterial($1, "MeshLambertMaterial"), this.addMaterial(q1, "MeshNormalMaterial"), this.addMaterial(Z1, "MeshMatcapMaterial"), this.addMaterial(Q1, "LineBasicMaterial"), this.addMaterial(tN, "LineDashedMaterial"), this.addMaterial(aN, "PointsMaterial"), this.addMaterial($0, "SpriteMaterial"), this.addMaterial(hN, "ShadowMaterial"), this.addLight(AM, dN), this.addLight(IA, fN), this.addLight(LA, mN), this.addLight(wd, Dd), this.addLight(GA, yN), this.addLight(VA, xN), this.addLight(HA, bN), this.addLight(UA, TN), this.addLight(zA, SN), this.addToneMapping(IC, Vb), this.addToneMapping(LC, Hb), this.addToneMapping(UC, $b), this.addToneMapping(zC, Wb), this.addToneMapping($C, jb), this.addToneMapping(WC, qb);
|
|
39991
40000
|
}
|
|
39992
40001
|
}
|
|
39993
40002
|
class $o extends NR {
|
|
@@ -40014,7 +40023,7 @@ class $o extends NR {
|
|
|
40014
40023
|
*/
|
|
40015
40024
|
constructor(e = {}) {
|
|
40016
40025
|
let t;
|
|
40017
|
-
e.forceWebGL ? t = mm : (t =
|
|
40026
|
+
e.forceWebGL ? t = mm : (t = C1, e.getFallback = () => (console.warn("THREE.WebGPURenderer: WebGPU is not available, running under WebGL2 backend."), new mm(e)));
|
|
40018
40027
|
const s = new t(e);
|
|
40019
40028
|
super(s, e), this.library = new vN(), this.isWebGPURenderer = !0, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
|
|
40020
40029
|
}
|
|
@@ -40053,7 +40062,7 @@ class wN extends Us {
|
|
|
40053
40062
|
this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
|
|
40054
40063
|
}
|
|
40055
40064
|
}
|
|
40056
|
-
const
|
|
40065
|
+
const Cm = { type: "change" }, Od = { type: "start" }, W0 = { type: "end" }, Wo = new Bx(), Mm = new Ix(), EN = Math.cos(70 * Lx.DEG2RAD), ct = new Z(), Gt = 2 * Math.PI, De = {
|
|
40057
40066
|
NONE: -1,
|
|
40058
40067
|
ROTATE: 0,
|
|
40059
40068
|
DOLLY: 1,
|
|
@@ -40062,8 +40071,8 @@ const Mm = { type: "change" }, Od = { type: "start" }, W0 = { type: "end" }, Wo
|
|
|
40062
40071
|
TOUCH_PAN: 4,
|
|
40063
40072
|
TOUCH_DOLLY_PAN: 5,
|
|
40064
40073
|
TOUCH_DOLLY_ROTATE: 6
|
|
40065
|
-
},
|
|
40066
|
-
class
|
|
40074
|
+
}, Mh = 1e-6;
|
|
40075
|
+
class CN extends ag {
|
|
40067
40076
|
/**
|
|
40068
40077
|
* Constructs a new controls instance.
|
|
40069
40078
|
*
|
|
@@ -40071,7 +40080,7 @@ class MN extends ag {
|
|
|
40071
40080
|
* @param {?HTMLDOMElement} domElement - The HTML element used for event listeners.
|
|
40072
40081
|
*/
|
|
40073
40082
|
constructor(e, t = null) {
|
|
40074
|
-
super(e, t), this.state = De.NONE, this.target = new Z(), this.cursor = new Z(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: mr.ROTATE, MIDDLE: mr.DOLLY, RIGHT: mr.PAN }, this.touches = { ONE: lr.ROTATE, TWO: lr.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new Z(), this._lastQuaternion = new es(), this._lastTargetPosition = new Z(), this._quat = new es().setFromUnitVectors(e.up, new Z(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Vh(), this._sphericalDelta = new Vh(), this._scale = 1, this._panOffset = new Z(), this._rotateStart = new xt(), this._rotateEnd = new xt(), this._rotateDelta = new xt(), this._panStart = new xt(), this._panEnd = new xt(), this._panDelta = new xt(), this._dollyStart = new xt(), this._dollyEnd = new xt(), this._dollyDelta = new xt(), this._dollyDirection = new Z(), this._mouse = new xt(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = AN.bind(this), this._onPointerDown =
|
|
40083
|
+
super(e, t), this.state = De.NONE, this.target = new Z(), this.cursor = new Z(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: mr.ROTATE, MIDDLE: mr.DOLLY, RIGHT: mr.PAN }, this.touches = { ONE: lr.ROTATE, TWO: lr.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new Z(), this._lastQuaternion = new es(), this._lastTargetPosition = new Z(), this._quat = new es().setFromUnitVectors(e.up, new Z(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Vh(), this._sphericalDelta = new Vh(), this._scale = 1, this._panOffset = new Z(), this._rotateStart = new xt(), this._rotateEnd = new xt(), this._rotateDelta = new xt(), this._panStart = new xt(), this._panEnd = new xt(), this._panDelta = new xt(), this._dollyStart = new xt(), this._dollyEnd = new xt(), this._dollyDelta = new xt(), this._dollyDirection = new Z(), this._mouse = new xt(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = AN.bind(this), this._onPointerDown = MN.bind(this), this._onPointerUp = RN.bind(this), this._onContextMenu = IN.bind(this), this._onMouseWheel = FN.bind(this), this._onKeyDown = DN.bind(this), this._onTouchStart = ON.bind(this), this._onTouchMove = BN.bind(this), this._onMouseDown = NN.bind(this), this._onMouseMove = PN.bind(this), this._interceptControlDown = LN.bind(this), this._interceptControlUp = UN.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
|
|
40075
40084
|
}
|
|
40076
40085
|
connect(e) {
|
|
40077
40086
|
super.connect(e), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
|
|
@@ -40132,7 +40141,7 @@ class MN extends ag {
|
|
|
40132
40141
|
* was called, or the initial state.
|
|
40133
40142
|
*/
|
|
40134
40143
|
reset() {
|
|
40135
|
-
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(
|
|
40144
|
+
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Cm), this.update(), this.state = De.NONE;
|
|
40136
40145
|
}
|
|
40137
40146
|
update(e = null) {
|
|
40138
40147
|
const t = this.object.position;
|
|
@@ -40162,12 +40171,12 @@ class MN extends ag {
|
|
|
40162
40171
|
c.unproject(this.object), this.object.position.sub(c).add(o), this.object.updateMatrixWorld(), r = ct.length();
|
|
40163
40172
|
} else
|
|
40164
40173
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
|
|
40165
|
-
r !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(r).add(this.object.position) : (Wo.origin.copy(this.object.position), Wo.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Wo.direction)) < EN ? this.object.lookAt(this.target) : (
|
|
40174
|
+
r !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(r).add(this.object.position) : (Wo.origin.copy(this.object.position), Wo.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Wo.direction)) < EN ? this.object.lookAt(this.target) : (Mm.setFromNormalAndCoplanarPoint(this.object.up, this.target), Wo.intersectPlane(Mm, this.target))));
|
|
40166
40175
|
} else if (this.object.isOrthographicCamera) {
|
|
40167
40176
|
const r = this.object.zoom;
|
|
40168
40177
|
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), r !== this.object.zoom && (this.object.updateProjectionMatrix(), n = !0);
|
|
40169
40178
|
}
|
|
40170
|
-
return this._scale = 1, this._performCursorZoom = !1, n || this._lastPosition.distanceToSquared(this.object.position) >
|
|
40179
|
+
return this._scale = 1, this._performCursorZoom = !1, n || this._lastPosition.distanceToSquared(this.object.position) > Mh || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > Mh || this._lastTargetPosition.distanceToSquared(this.target) > Mh ? (this.dispatchEvent(Cm), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
|
|
40171
40180
|
}
|
|
40172
40181
|
_getAutoRotationAngle(e) {
|
|
40173
40182
|
return e !== null ? Gt / 60 * this.autoRotateSpeed * e : Gt / 60 / 60 * this.autoRotateSpeed;
|
|
@@ -40359,7 +40368,7 @@ class MN extends ag {
|
|
|
40359
40368
|
return e.ctrlKey && !this._controlActive && (s.deltaY *= 10), s;
|
|
40360
40369
|
}
|
|
40361
40370
|
}
|
|
40362
|
-
function
|
|
40371
|
+
function MN(a) {
|
|
40363
40372
|
this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(a.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(a) && (this._addPointer(a), a.pointerType === "touch" ? this._onTouchStart(a) : this._onMouseDown(a)));
|
|
40364
40373
|
}
|
|
40365
40374
|
function AN(a) {
|
|
@@ -41883,9 +41892,9 @@ const Bl = (a) => {
|
|
|
41883
41892
|
}, i = (r) => {
|
|
41884
41893
|
r !== e && (a.onSelect(r), t(r)), a.onToggle(!1);
|
|
41885
41894
|
}, n = a.open ? `${a.options.length * 31 - 1}px` : "0px";
|
|
41886
|
-
return /* @__PURE__ */
|
|
41887
|
-
/* @__PURE__ */
|
|
41888
|
-
/* @__PURE__ */
|
|
41895
|
+
return /* @__PURE__ */ C.jsxs("div", { className: `dropdown ${a.up === !0 ? "up" : ""}`, children: [
|
|
41896
|
+
/* @__PURE__ */ C.jsx("div", { className: "dropdown-toggle", onClick: s, children: `${a.title}: ${e}` }),
|
|
41897
|
+
/* @__PURE__ */ C.jsx("ul", { className: "dropdown-menu", style: { height: n }, children: a.options.map((r) => /* @__PURE__ */ C.jsx("li", { onClick: () => i(r), children: r }, r)) })
|
|
41889
41898
|
] });
|
|
41890
41899
|
}, an = bx(function(e, t) {
|
|
41891
41900
|
const s = [
|
|
@@ -41895,12 +41904,12 @@ const Bl = (a) => {
|
|
|
41895
41904
|
"UVs",
|
|
41896
41905
|
"Wireframe"
|
|
41897
41906
|
], [i, n] = Ae("Renderer"), [r, o] = Ae(!1), [l, c] = Ae(!1), [h, u] = Ae(!1);
|
|
41898
|
-
return /* @__PURE__ */
|
|
41899
|
-
/* @__PURE__ */
|
|
41907
|
+
return /* @__PURE__ */ C.jsxs("div", { className: `CameraWindow ${e.name}`, children: [
|
|
41908
|
+
/* @__PURE__ */ C.jsx("div", { ref: t, className: "clickable", onClick: () => {
|
|
41900
41909
|
h && u(!1);
|
|
41901
41910
|
} }),
|
|
41902
|
-
/* @__PURE__ */
|
|
41903
|
-
e.camera !== null && /* @__PURE__ */
|
|
41911
|
+
/* @__PURE__ */ C.jsxs("div", { className: "options", children: [
|
|
41912
|
+
e.camera !== null && /* @__PURE__ */ C.jsx(
|
|
41904
41913
|
Bl,
|
|
41905
41914
|
{
|
|
41906
41915
|
title: "Camera",
|
|
@@ -41914,7 +41923,7 @@ const Bl = (a) => {
|
|
|
41914
41923
|
up: !0
|
|
41915
41924
|
}
|
|
41916
41925
|
),
|
|
41917
|
-
/* @__PURE__ */
|
|
41926
|
+
/* @__PURE__ */ C.jsx(
|
|
41918
41927
|
Bl,
|
|
41919
41928
|
{
|
|
41920
41929
|
title: "Mode",
|
|
@@ -42060,7 +42069,7 @@ class WN extends Y {
|
|
|
42060
42069
|
}
|
|
42061
42070
|
function Bh(a) {
|
|
42062
42071
|
const [e, t] = Ae(a.selected), s = "toggle" + (e ? " selected" : "");
|
|
42063
|
-
return /* @__PURE__ */
|
|
42072
|
+
return /* @__PURE__ */ C.jsx(
|
|
42064
42073
|
"button",
|
|
42065
42074
|
{
|
|
42066
42075
|
className: s,
|
|
@@ -42598,8 +42607,8 @@ class sP extends Er {
|
|
|
42598
42607
|
const Ee = new Er();
|
|
42599
42608
|
for (const de in X)
|
|
42600
42609
|
for (let ye = X[de].length; ye--; ) {
|
|
42601
|
-
const se = X[de][ye][0].clone(),
|
|
42602
|
-
se.name = de, se.tag = Te,
|
|
42610
|
+
const se = X[de][ye][0].clone(), Ce = X[de][ye][1], Ge = X[de][ye][2], ot = X[de][ye][3], Te = X[de][ye][4];
|
|
42611
|
+
se.name = de, se.tag = Te, Ce && se.position.set(Ce[0], Ce[1], Ce[2]), Ge && se.rotation.set(Ge[0], Ge[1], Ge[2]), ot && se.scale.set(ot[0], ot[1], ot[2]), se.updateMatrix();
|
|
42603
42612
|
const lt = se.geometry.clone();
|
|
42604
42613
|
lt.applyMatrix4(se.matrix), se.geometry = lt, se.renderOrder = 1 / 0, se.position.set(0, 0, 0), se.rotation.set(0, 0, 0), se.scale.set(1, 1, 1), Ee.add(se);
|
|
42605
42614
|
}
|
|
@@ -43187,12 +43196,12 @@ class rP extends Er {
|
|
|
43187
43196
|
});
|
|
43188
43197
|
};
|
|
43189
43198
|
onAddSpline = (e) => {
|
|
43190
|
-
const t = JSON.parse(e.value), s = `Spline ${Jo + 1}`, i =
|
|
43199
|
+
const t = JSON.parse(e.value), s = t.name !== void 0 ? t.name : `Spline ${Jo + 1}`, i = new kh(s, this.camera);
|
|
43200
|
+
t.tension !== void 0 && (i.tension = t.tension), t.closed !== void 0 && (i.closed = t.closed), t.subdivide !== void 0 && (i.subdivide = t.subdivide), t.type !== void 0 && (i.curveType = t.type);
|
|
43201
|
+
const n = [];
|
|
43191
43202
|
t.points.forEach((r) => {
|
|
43192
|
-
|
|
43193
|
-
})
|
|
43194
|
-
const n = new kh(s, this.camera);
|
|
43195
|
-
n.addPoints(i), this.addSpline(n), Jo++;
|
|
43203
|
+
n.push(new Z(r[0], r[1], r[2]));
|
|
43204
|
+
}), i.addPoints(n), this.addSpline(i), Jo++;
|
|
43196
43205
|
};
|
|
43197
43206
|
isMouseDown = !1;
|
|
43198
43207
|
enableClickToDraw() {
|
|
@@ -43380,10 +43389,10 @@ class ut extends qa {
|
|
|
43380
43389
|
const e = [];
|
|
43381
43390
|
return this.cameras.forEach((t, s) => {
|
|
43382
43391
|
e.push(s);
|
|
43383
|
-
}), /* @__PURE__ */
|
|
43384
|
-
/* @__PURE__ */
|
|
43385
|
-
/* @__PURE__ */
|
|
43386
|
-
this.state.mode === "Single" && /* @__PURE__ */
|
|
43392
|
+
}), /* @__PURE__ */ C.jsxs("div", { className: "multiview", children: [
|
|
43393
|
+
/* @__PURE__ */ C.jsx("canvas", { ref: this.canvasRef }),
|
|
43394
|
+
/* @__PURE__ */ C.jsxs("div", { className: `cameras ${this.state.mode === "Single" || this.state.mode === "Stacked" ? "single" : ""}`, ref: this.containerRef, children: [
|
|
43395
|
+
this.state.mode === "Single" && /* @__PURE__ */ C.jsx(C.Fragment, { children: /* @__PURE__ */ C.jsx(
|
|
43387
43396
|
an,
|
|
43388
43397
|
{
|
|
43389
43398
|
name: "tl",
|
|
@@ -43400,8 +43409,8 @@ class ut extends qa {
|
|
|
43400
43409
|
}
|
|
43401
43410
|
}
|
|
43402
43411
|
) }),
|
|
43403
|
-
(this.state.mode === "Side by Side" || this.state.mode === "Stacked") && /* @__PURE__ */
|
|
43404
|
-
/* @__PURE__ */
|
|
43412
|
+
(this.state.mode === "Side by Side" || this.state.mode === "Stacked") && /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
|
|
43413
|
+
/* @__PURE__ */ C.jsx(
|
|
43405
43414
|
an,
|
|
43406
43415
|
{
|
|
43407
43416
|
name: "tl",
|
|
@@ -43418,7 +43427,7 @@ class ut extends qa {
|
|
|
43418
43427
|
}
|
|
43419
43428
|
}
|
|
43420
43429
|
),
|
|
43421
|
-
/* @__PURE__ */
|
|
43430
|
+
/* @__PURE__ */ C.jsx(
|
|
43422
43431
|
an,
|
|
43423
43432
|
{
|
|
43424
43433
|
name: "tr",
|
|
@@ -43436,8 +43445,8 @@ class ut extends qa {
|
|
|
43436
43445
|
}
|
|
43437
43446
|
)
|
|
43438
43447
|
] }),
|
|
43439
|
-
this.state.mode === "Quad" && /* @__PURE__ */
|
|
43440
|
-
/* @__PURE__ */
|
|
43448
|
+
this.state.mode === "Quad" && /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
|
|
43449
|
+
/* @__PURE__ */ C.jsx(
|
|
43441
43450
|
an,
|
|
43442
43451
|
{
|
|
43443
43452
|
name: "tl",
|
|
@@ -43454,7 +43463,7 @@ class ut extends qa {
|
|
|
43454
43463
|
}
|
|
43455
43464
|
}
|
|
43456
43465
|
),
|
|
43457
|
-
/* @__PURE__ */
|
|
43466
|
+
/* @__PURE__ */ C.jsx(
|
|
43458
43467
|
an,
|
|
43459
43468
|
{
|
|
43460
43469
|
name: "tr",
|
|
@@ -43471,7 +43480,7 @@ class ut extends qa {
|
|
|
43471
43480
|
}
|
|
43472
43481
|
}
|
|
43473
43482
|
),
|
|
43474
|
-
/* @__PURE__ */
|
|
43483
|
+
/* @__PURE__ */ C.jsx(
|
|
43475
43484
|
an,
|
|
43476
43485
|
{
|
|
43477
43486
|
name: "bl",
|
|
@@ -43488,7 +43497,7 @@ class ut extends qa {
|
|
|
43488
43497
|
}
|
|
43489
43498
|
}
|
|
43490
43499
|
),
|
|
43491
|
-
/* @__PURE__ */
|
|
43500
|
+
/* @__PURE__ */ C.jsx(
|
|
43492
43501
|
an,
|
|
43493
43502
|
{
|
|
43494
43503
|
name: "br",
|
|
@@ -43507,8 +43516,8 @@ class ut extends qa {
|
|
|
43507
43516
|
)
|
|
43508
43517
|
] })
|
|
43509
43518
|
] }),
|
|
43510
|
-
/* @__PURE__ */
|
|
43511
|
-
/* @__PURE__ */
|
|
43519
|
+
/* @__PURE__ */ C.jsxs("div", { className: "settings", children: [
|
|
43520
|
+
/* @__PURE__ */ C.jsx(
|
|
43512
43521
|
Bl,
|
|
43513
43522
|
{
|
|
43514
43523
|
title: "View",
|
|
@@ -43527,7 +43536,7 @@ class ut extends qa {
|
|
|
43527
43536
|
}
|
|
43528
43537
|
}
|
|
43529
43538
|
),
|
|
43530
|
-
/* @__PURE__ */
|
|
43539
|
+
/* @__PURE__ */ C.jsx(
|
|
43531
43540
|
Bl,
|
|
43532
43541
|
{
|
|
43533
43542
|
title: "Interact",
|
|
@@ -43549,7 +43558,7 @@ class ut extends qa {
|
|
|
43549
43558
|
}
|
|
43550
43559
|
}
|
|
43551
43560
|
),
|
|
43552
|
-
/* @__PURE__ */
|
|
43561
|
+
/* @__PURE__ */ C.jsx(
|
|
43553
43562
|
Bh,
|
|
43554
43563
|
{
|
|
43555
43564
|
name: "cameraHelper",
|
|
@@ -43567,7 +43576,7 @@ class ut extends qa {
|
|
|
43567
43576
|
}
|
|
43568
43577
|
}
|
|
43569
43578
|
),
|
|
43570
|
-
/* @__PURE__ */
|
|
43579
|
+
/* @__PURE__ */ C.jsx(
|
|
43571
43580
|
Bh,
|
|
43572
43581
|
{
|
|
43573
43582
|
name: "lightHelper",
|
|
@@ -43585,7 +43594,7 @@ class ut extends qa {
|
|
|
43585
43594
|
}
|
|
43586
43595
|
}
|
|
43587
43596
|
),
|
|
43588
|
-
/* @__PURE__ */
|
|
43597
|
+
/* @__PURE__ */ C.jsx(
|
|
43589
43598
|
Bh,
|
|
43590
43599
|
{
|
|
43591
43600
|
name: "gridHelper",
|
|
@@ -43620,7 +43629,7 @@ class ut extends qa {
|
|
|
43620
43629
|
const e = (n, r) => {
|
|
43621
43630
|
const o = new dl(-100, 100, 100, -100, 0, 3e3);
|
|
43622
43631
|
return o.name = n, o.position.copy(r), o.lookAt(0, 0, 0), this.cameras.set(n, o), o;
|
|
43623
|
-
}, t =
|
|
43632
|
+
}, t = 1e3;
|
|
43624
43633
|
e("Top", new Z(0, t, 0)), e("Bottom", new Z(0, -t, 0)), e("Left", new Z(-t, 0, 0)), e("Right", new Z(t, 0, 0)), e("Front", new Z(0, 0, t)), e("Back", new Z(0, 0, -t)), e("Orthographic", new Z(t, t, t)), e("UI", new Z()), this.debugCamera = new tp(60, 1, 0.01, 3e3), this.debugCamera.name = "Debug", this.debugCamera.position.set(300, 300, 300), this.debugCamera.lookAt(0, 0, 0), this.cameras.set("Debug", this.debugCamera), this.currentCamera = this.debugCamera;
|
|
43625
43634
|
const s = localStorage, i = this.props.three.name;
|
|
43626
43635
|
this.tlCam = this.cameras.get(s.getItem(`${i}_tlCam`)), this.trCam = this.cameras.get(s.getItem(`${i}_trCam`)), this.blCam = this.cameras.get(s.getItem(`${i}_blCam`)), this.brCam = this.cameras.get(s.getItem(`${i}_brCam`)), this.tlCam === void 0 && (this.tlCam = this.cameras.get("Debug")), this.trCam === void 0 && (this.trCam = this.cameras.get("Orthographic")), this.blCam === void 0 && (this.blCam = this.cameras.get("Front")), this.brCam === void 0 && (this.brCam = this.cameras.get("Top")), _e.addEditorGroup({
|
|
@@ -43872,7 +43881,7 @@ class ut extends qa {
|
|
|
43872
43881
|
createControls(e, t) {
|
|
43873
43882
|
const s = this.controls.get(e.name);
|
|
43874
43883
|
if (s !== void 0 && s.dispose(), this.controls.delete(e.name), e.name === "UI") return;
|
|
43875
|
-
const i = new
|
|
43884
|
+
const i = new CN(e, t);
|
|
43876
43885
|
switch (i.enableDamping = !0, i.dampingFactor = 0.1, e.name) {
|
|
43877
43886
|
case "Top":
|
|
43878
43887
|
case "Bottom":
|
|
@@ -44042,7 +44051,7 @@ class ac extends qa {
|
|
|
44042
44051
|
}
|
|
44043
44052
|
}
|
|
44044
44053
|
render() {
|
|
44045
|
-
return /* @__PURE__ */
|
|
44054
|
+
return /* @__PURE__ */ C.jsx(
|
|
44046
44055
|
ms,
|
|
44047
44056
|
{
|
|
44048
44057
|
three: this.props.three,
|
|
@@ -44167,7 +44176,7 @@ function cP(a, e) {
|
|
|
44167
44176
|
}
|
|
44168
44177
|
}));
|
|
44169
44178
|
}
|
|
44170
|
-
return /* @__PURE__ */
|
|
44179
|
+
return /* @__PURE__ */ C.jsx(
|
|
44171
44180
|
ms,
|
|
44172
44181
|
{
|
|
44173
44182
|
three: e,
|
|
@@ -44257,7 +44266,7 @@ function hP(a) {
|
|
|
44257
44266
|
}
|
|
44258
44267
|
return wn(() => () => {
|
|
44259
44268
|
h !== void 0 && di(h);
|
|
44260
|
-
}, []), /* @__PURE__ */
|
|
44269
|
+
}, []), /* @__PURE__ */ C.jsx(
|
|
44261
44270
|
ms,
|
|
44262
44271
|
{
|
|
44263
44272
|
three: a.three,
|
|
@@ -44297,17 +44306,17 @@ function uP(a) {
|
|
|
44297
44306
|
};
|
|
44298
44307
|
}, []);
|
|
44299
44308
|
const s = e.type.toLowerCase(), i = e.animations.length > 0 || e.mixer !== void 0, n = s.search("mesh") > -1 || s.search("line") > -1 || s.search("points") > -1;
|
|
44300
|
-
return /* @__PURE__ */
|
|
44301
|
-
|
|
44309
|
+
return /* @__PURE__ */ C.jsx(
|
|
44310
|
+
Ma,
|
|
44302
44311
|
{
|
|
44303
44312
|
three: a.three,
|
|
44304
44313
|
label: "Inspector",
|
|
44305
|
-
button: e.uuid.length > 0 ? /* @__PURE__ */
|
|
44314
|
+
button: e.uuid.length > 0 ? /* @__PURE__ */ C.jsx("button", { className: "remove", onClick: () => {
|
|
44306
44315
|
_t.instance.remove(e.name), t(zh);
|
|
44307
44316
|
} }) : void 0,
|
|
44308
|
-
children: /* @__PURE__ */
|
|
44309
|
-
/* @__PURE__ */
|
|
44310
|
-
/* @__PURE__ */
|
|
44317
|
+
children: /* @__PURE__ */ C.jsx("div", { id: "Inspector", className: a.class, children: e.uuid.length > 0 && /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
|
|
44318
|
+
/* @__PURE__ */ C.jsxs(C.Fragment, { children: [
|
|
44319
|
+
/* @__PURE__ */ C.jsx(
|
|
44311
44320
|
el,
|
|
44312
44321
|
{
|
|
44313
44322
|
type: "string",
|
|
@@ -44317,7 +44326,7 @@ function uP(a) {
|
|
|
44317
44326
|
disabled: !0
|
|
44318
44327
|
}
|
|
44319
44328
|
),
|
|
44320
|
-
/* @__PURE__ */
|
|
44329
|
+
/* @__PURE__ */ C.jsx(
|
|
44321
44330
|
el,
|
|
44322
44331
|
{
|
|
44323
44332
|
type: "string",
|
|
@@ -44327,7 +44336,7 @@ function uP(a) {
|
|
|
44327
44336
|
disabled: !0
|
|
44328
44337
|
}
|
|
44329
44338
|
),
|
|
44330
|
-
/* @__PURE__ */
|
|
44339
|
+
/* @__PURE__ */ C.jsx(
|
|
44331
44340
|
el,
|
|
44332
44341
|
{
|
|
44333
44342
|
type: "string",
|
|
@@ -44338,9 +44347,9 @@ function uP(a) {
|
|
|
44338
44347
|
}
|
|
44339
44348
|
)
|
|
44340
44349
|
] }),
|
|
44341
|
-
/* @__PURE__ */
|
|
44342
|
-
/* @__PURE__ */
|
|
44343
|
-
i ? /* @__PURE__ */
|
|
44350
|
+
/* @__PURE__ */ C.jsxs(C.Fragment, { children: [
|
|
44351
|
+
/* @__PURE__ */ C.jsx(ac, { object: e, three: a.three }),
|
|
44352
|
+
i ? /* @__PURE__ */ C.jsx(hP, { object: e, three: a.three }) : null,
|
|
44344
44353
|
s.search("camera") > -1 ? Pb(e, a.three) : null,
|
|
44345
44354
|
s.search("light") > -1 ? cP(e, a.three) : null,
|
|
44346
44355
|
n ? Ab(e, a.three) : null
|
|
@@ -44405,7 +44414,7 @@ class dP extends qa {
|
|
|
44405
44414
|
}));
|
|
44406
44415
|
}
|
|
44407
44416
|
};
|
|
44408
|
-
return /* @__PURE__ */
|
|
44417
|
+
return /* @__PURE__ */ C.jsx(
|
|
44409
44418
|
ms,
|
|
44410
44419
|
{
|
|
44411
44420
|
three: this.props.three,
|
|
@@ -44586,8 +44595,8 @@ function pP(a) {
|
|
|
44586
44595
|
const [e] = Ae([]), [t] = Ae([]), [s, i] = Ae(0), n = (c) => {
|
|
44587
44596
|
const h = c.value;
|
|
44588
44597
|
e.push(h), t.push(
|
|
44589
|
-
/* @__PURE__ */
|
|
44590
|
-
|
|
44598
|
+
/* @__PURE__ */ C.jsx(
|
|
44599
|
+
Ma,
|
|
44591
44600
|
{
|
|
44592
44601
|
three: a.three,
|
|
44593
44602
|
label: `Scene: ${h.name}`,
|
|
@@ -44597,7 +44606,7 @@ function pP(a) {
|
|
|
44597
44606
|
onRefresh: () => {
|
|
44598
44607
|
a.three.refreshScene(h.name);
|
|
44599
44608
|
},
|
|
44600
|
-
children: /* @__PURE__ */
|
|
44609
|
+
children: /* @__PURE__ */ C.jsx(yc, { child: h, scene: h, three: a.three })
|
|
44601
44610
|
},
|
|
44602
44611
|
h.name
|
|
44603
44612
|
)
|
|
@@ -44606,8 +44615,8 @@ function pP(a) {
|
|
|
44606
44615
|
const h = c.value;
|
|
44607
44616
|
for (let u = 0; u < e.length; u++)
|
|
44608
44617
|
if (h.uuid === e[u].uuid) {
|
|
44609
|
-
e[u] = h, t[u] = /* @__PURE__ */
|
|
44610
|
-
|
|
44618
|
+
e[u] = h, t[u] = /* @__PURE__ */ C.jsx(
|
|
44619
|
+
Ma,
|
|
44611
44620
|
{
|
|
44612
44621
|
three: a.three,
|
|
44613
44622
|
label: `Scene: ${h.name}`,
|
|
@@ -44617,7 +44626,7 @@ function pP(a) {
|
|
|
44617
44626
|
onRefresh: () => {
|
|
44618
44627
|
a.three.refreshScene(h.name);
|
|
44619
44628
|
},
|
|
44620
|
-
children: /* @__PURE__ */
|
|
44629
|
+
children: /* @__PURE__ */ C.jsx(yc, { child: h, scene: h, three: a.three })
|
|
44621
44630
|
},
|
|
44622
44631
|
h.name
|
|
44623
44632
|
), i(Date.now());
|
|
@@ -44635,8 +44644,8 @@ function pP(a) {
|
|
|
44635
44644
|
for (let u = 0; u < e.length; u++) {
|
|
44636
44645
|
const d = e[u];
|
|
44637
44646
|
if (d.name === h) {
|
|
44638
|
-
t[u] = /* @__PURE__ */
|
|
44639
|
-
|
|
44647
|
+
t[u] = /* @__PURE__ */ C.jsx(
|
|
44648
|
+
Ma,
|
|
44640
44649
|
{
|
|
44641
44650
|
three: a.three,
|
|
44642
44651
|
label: `Scene: ${d.name}`,
|
|
@@ -44646,7 +44655,7 @@ function pP(a) {
|
|
|
44646
44655
|
onRefresh: () => {
|
|
44647
44656
|
a.three.refreshScene(d.name);
|
|
44648
44657
|
},
|
|
44649
|
-
children: /* @__PURE__ */
|
|
44658
|
+
children: /* @__PURE__ */ C.jsx(yc, { child: d, scene: d, three: a.three })
|
|
44650
44659
|
},
|
|
44651
44660
|
d.name
|
|
44652
44661
|
);
|
|
@@ -44657,23 +44666,23 @@ function pP(a) {
|
|
|
44657
44666
|
};
|
|
44658
44667
|
return wn(() => (a.three.addEventListener(ce.ADD_SCENE, n), a.three.addEventListener(ce.SET_SCENE, l), a.three.addEventListener(ce.REFRESH_SCENE, r), a.three.addEventListener(ce.REMOVE_SCENE, o), () => {
|
|
44659
44668
|
a.three.removeEventListener(ce.ADD_SCENE, n), a.three.removeEventListener(ce.SET_SCENE, l), a.three.removeEventListener(ce.REFRESH_SCENE, r), a.three.removeEventListener(ce.REMOVE_SCENE, o);
|
|
44660
|
-
}), []), /* @__PURE__ */
|
|
44661
|
-
/* @__PURE__ */
|
|
44662
|
-
/* @__PURE__ */
|
|
44663
|
-
/* @__PURE__ */
|
|
44664
|
-
/* @__PURE__ */
|
|
44669
|
+
}), []), /* @__PURE__ */ C.jsxs("div", { id: "SidePanel", children: [
|
|
44670
|
+
/* @__PURE__ */ C.jsx("div", { className: "scenes", children: t }, s),
|
|
44671
|
+
/* @__PURE__ */ C.jsx(uP, { three: a.three }),
|
|
44672
|
+
/* @__PURE__ */ C.jsx(dP, { three: a.three }),
|
|
44673
|
+
/* @__PURE__ */ C.jsx(_e, { three: a.three })
|
|
44665
44674
|
] });
|
|
44666
44675
|
}
|
|
44667
44676
|
function fP(a) {
|
|
44668
|
-
return /* @__PURE__ */
|
|
44669
|
-
/* @__PURE__ */
|
|
44677
|
+
return /* @__PURE__ */ C.jsxs("div", { className: "editor", ref: a.ref, style: a.style, children: [
|
|
44678
|
+
/* @__PURE__ */ C.jsx("div", { className: "header", children: a.header }),
|
|
44670
44679
|
a.children,
|
|
44671
|
-
/* @__PURE__ */
|
|
44680
|
+
/* @__PURE__ */ C.jsx("div", { className: "footer", children: a.footer })
|
|
44672
44681
|
] });
|
|
44673
44682
|
}
|
|
44674
44683
|
function JP(a) {
|
|
44675
|
-
return /* @__PURE__ */
|
|
44676
|
-
/* @__PURE__ */
|
|
44684
|
+
return /* @__PURE__ */ C.jsx(fP, { children: /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
|
|
44685
|
+
/* @__PURE__ */ C.jsx(
|
|
44677
44686
|
ut,
|
|
44678
44687
|
{
|
|
44679
44688
|
three: a.three,
|
|
@@ -44683,11 +44692,11 @@ function JP(a) {
|
|
|
44683
44692
|
onSceneUpdate: a.onSceneUpdate
|
|
44684
44693
|
}
|
|
44685
44694
|
),
|
|
44686
|
-
/* @__PURE__ */
|
|
44695
|
+
/* @__PURE__ */ C.jsx(pP, { three: a.three })
|
|
44687
44696
|
] }) });
|
|
44688
44697
|
}
|
|
44689
44698
|
export {
|
|
44690
|
-
|
|
44699
|
+
Ma as Accordion,
|
|
44691
44700
|
YP as Application,
|
|
44692
44701
|
pg as BaseRemote,
|
|
44693
44702
|
gg as ChildObject,
|
|
@@ -44718,7 +44727,7 @@ export {
|
|
|
44718
44727
|
E_ as anchorGeometry,
|
|
44719
44728
|
FP as anchorGeometryTL,
|
|
44720
44729
|
AP as animateObjectMaterial,
|
|
44721
|
-
|
|
44730
|
+
MP as animateObjectTransform,
|
|
44722
44731
|
w_ as applyObjectMaterial,
|
|
44723
44732
|
fl as capitalize,
|
|
44724
44733
|
ln as clamp,
|
|
@@ -44727,7 +44736,7 @@ export {
|
|
|
44727
44736
|
l_ as copyToClipboard,
|
|
44728
44737
|
IP as createMask,
|
|
44729
44738
|
vP as cubicBezier,
|
|
44730
|
-
|
|
44739
|
+
CP as customizeTheatreElements,
|
|
44731
44740
|
TP as damp,
|
|
44732
44741
|
xP as defaultTheatreCallback,
|
|
44733
44742
|
m_ as detectMaxFrameRate,
|
|
@@ -44742,7 +44751,7 @@ export {
|
|
|
44742
44751
|
S_ as getObjectMaterialProps,
|
|
44743
44752
|
Wh as hierarchyUUID,
|
|
44744
44753
|
VP as inspectComposer,
|
|
44745
|
-
|
|
44754
|
+
C_ as inspectComposerPass,
|
|
44746
44755
|
c_ as isColor,
|
|
44747
44756
|
_P as map,
|
|
44748
44757
|
Ua as mix,
|