@tomorrowevening/hermes 0.1.37 → 0.1.38
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/{ThreeEditor-BIxyFFOU.js → ThreeEditor-BjAFHK3t.js} +9 -9
- package/dist/hermes.cjs.js +8 -8
- package/dist/hermes.es.js +225 -269
- package/dist/{index-BlO94fgk.js → index-dfUv_VcA.js} +40 -40
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/types/editor/sidePanel/inspector/utils/InspectRenderer.d.ts +0 -4
package/dist/hermes.es.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { types as P, getProject as Es } from "@tomorrowevening/theatre-core";
|
|
2
|
-
import { useState as L, useEffect as pe, useRef as z, useMemo as Ze, Component as
|
|
3
|
-
import { BufferGeometry as Vi, Float32BufferAttribute as ke, OrthographicCamera as Gi, Texture as
|
|
4
|
-
import { Color as
|
|
2
|
+
import { useState as L, useEffect as pe, useRef as z, useMemo as Ze, Component as Xe, createRef as ue, forwardRef as Bi } from "react";
|
|
3
|
+
import { BufferGeometry as Vi, Float32BufferAttribute as ke, OrthographicCamera as Gi, Texture as Vt, Scene as Ss, MeshBasicMaterial as Os, Mesh as $i, LinearSRGBColorSpace as je, ObjectLoader as ws, AnimationMixer as xs, AnimationClip as Ts, Matrix4 as Wi, AlwaysStencilFunc as ii, ReplaceStencilOp as Ee, NotEqualStencilFunc as si, EqualStencilFunc as ni, KeepStencilOp as Se, NormalBlending as Yi, AddEquation as Qe, SrcAlphaFactor as ft, OneMinusSrcAlphaFactor as gt, CustomBlending as vt, OneFactor as _t, DstColorFactor as Kt, OneMinusDstColorFactor as Xt, WebGLRenderTarget as Ms, RGBAFormat as As, EventDispatcher as Zi, RepeatWrapping as ri, Color as Je, FrontSide as Rs, BackSide as Ps, DoubleSide as qi, ZeroFactor as ji, SrcColorFactor as Ki, OneMinusSrcColorFactor as Xi, DstAlphaFactor as Qi, OneMinusDstAlphaFactor as Ji, SrcAlphaSaturateFactor as Ds, ConstantColorFactor as es, OneMinusConstantColorFactor as ts, ConstantAlphaFactor as is, OneMinusConstantAlphaFactor as ss, SubtractEquation as Is, ReverseSubtractEquation as Us, MinEquation as Ls, MaxEquation as ks, NoBlending as Ns, AdditiveBlending as Fs, SubtractiveBlending as zs, MultiplyBlending as Hs, ShaderMaterial as ns, GLSL3 as Bs, PlaneGeometry as Vs, Object3D as Gs, Vector3 as Le, Raycaster as $s, Vector2 as Ws, WebGLRenderer as ai, Euler as Ys, SkeletonHelper as Zs, SRGBColorSpace as oi, NoToneMapping as li, ColorManagement as et, NoColorSpace as qs, LinearToneMapping as js, ReinhardToneMapping as Ks, CineonToneMapping as Xs, ACESFilmicToneMapping as Qs, AgXToneMapping as Js, NeutralToneMapping as en, CustomToneMapping as tn } from "three";
|
|
4
|
+
import { Color as ht, ColorManagement as Et, WebGPURenderer as Ge, RenderTarget as sn, WebGLRenderTarget as nn, ComputeNode as rn, NodeMaterial as an, DoubleSide as on, Mesh as dt, PlaneGeometry as ln, BoxGeometry as cn, Vector2 as $e, Object3D as ci, CatmullRomCurve3 as hi, MeshBasicMaterial as Gt, LineBasicMaterial as hn, Line as dn, BufferGeometry as di, SphereGeometry as un, Raycaster as $t, Vector3 as ee, Group as pn, AxesHelper as mn, Scene as fn, Sphere as gn, Box3 as vn, Spherical as _n, Matrix4 as yn, Quaternion as Cn, Vector4 as bn, MeshNormalNodeMaterial as En, PerspectiveCamera as ui, OrthographicCamera as pi, CameraHelper as Sn, SkinnedMesh as On, SpotLightHelper as wn, PointLightHelper as xn, HemisphereLightHelper as Tn, DirectionalLightHelper as Mn } from "three/webgpu";
|
|
5
5
|
import { jsx as f, jsxs as M, Fragment as Y } from "react/jsx-runtime";
|
|
6
|
-
import { radToDeg as An, degToRad as
|
|
6
|
+
import { radToDeg as An, degToRad as Wt, lerp as St, mapLinear as Oe } from "three/src/math/MathUtils.js";
|
|
7
7
|
import { RectAreaLightHelper as Rn } from "three/examples/jsm/helpers/RectAreaLightHelper.js";
|
|
8
8
|
import { OrbitControls as Pn } from "three/examples/jsm/controls/OrbitControls.js";
|
|
9
|
-
import { uniform as we, varyingProperty as Dn, Fn as
|
|
9
|
+
import { uniform as we, varyingProperty as Dn, Fn as Ot, positionLocal as In, vec3 as Un, cameraPosition as tt, float as Z, fwidth as Ln, abs as mi, fract as kn, min as wt, max as fi, distance as Nn, log as gi, pow as vi, floor as Fn, mix as _i, If as zn, lessThanEqual as Hn, Discard as Bn, vec4 as Vn } from "three/tsl";
|
|
10
10
|
import rs from "three/src/materials/nodes/MeshBasicNodeMaterial.js";
|
|
11
11
|
import { remapClamp as Gn, linearDepth as $n, vec4 as as, uv as Wn } from "three/src/nodes/TSL.js";
|
|
12
12
|
import { TransformControls as Yn } from "three/examples/jsm/controls/TransformControls.js";
|
|
13
|
-
const
|
|
13
|
+
const ut = () => {
|
|
14
14
|
}, ka = () => {
|
|
15
15
|
};
|
|
16
|
-
function
|
|
16
|
+
function pt(i) {
|
|
17
17
|
return i.substring(0, 1).toUpperCase() + i.substring(1);
|
|
18
18
|
}
|
|
19
19
|
function Zn(i) {
|
|
@@ -33,7 +33,7 @@ function yi(i) {
|
|
|
33
33
|
}, r = n(e), a = n(t), o = n(s);
|
|
34
34
|
return "#" + r + a + o;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function xt(i, e, t, s) {
|
|
37
37
|
return new (t || (t = Promise))(function(n, r) {
|
|
38
38
|
function a(l) {
|
|
39
39
|
try {
|
|
@@ -105,7 +105,7 @@ class bi extends Error {
|
|
|
105
105
|
super(e), Object.setPrototypeOf(this, new.target.prototype);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
const
|
|
108
|
+
const Tt = [], Ei = [];
|
|
109
109
|
function Xn(i, e) {
|
|
110
110
|
if (i === e) return 0;
|
|
111
111
|
const t = i;
|
|
@@ -116,17 +116,17 @@ function Xn(i, e) {
|
|
|
116
116
|
for (; a < s && i.charCodeAt(a) === e.charCodeAt(a); ) a++;
|
|
117
117
|
if (s -= a, n -= a, s === 0) return n;
|
|
118
118
|
let o, c, l = 0, h = 0, d = 0;
|
|
119
|
-
for (; h < s; ) Ei[h] = i.charCodeAt(a + h),
|
|
120
|
-
for (; d < n; ) for (r = e.charCodeAt(a + d), o = d++, l = d, h = 0; h < s; h++) c = r === Ei[h] ? o : o + 1, o =
|
|
119
|
+
for (; h < s; ) Ei[h] = i.charCodeAt(a + h), Tt[h] = ++h;
|
|
120
|
+
for (; d < n; ) for (r = e.charCodeAt(a + d), o = d++, l = d, h = 0; h < s; h++) c = r === Ei[h] ? o : o + 1, o = Tt[h], l = Tt[h] = o > l ? c > l ? l + 1 : c : c > o ? o + 1 : c;
|
|
121
121
|
return l;
|
|
122
122
|
}
|
|
123
123
|
function Qn(i) {
|
|
124
124
|
return i != null;
|
|
125
125
|
}
|
|
126
|
-
const Jn = ({ mobileTiers: i = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60], override: t = {}, glContext: s, failIfMajorPerformanceCaveat: n = !1, benchmarksURL: r = "https://unpkg.com/detect-gpu@5.0.70/dist/benchmarks" } = {}) =>
|
|
126
|
+
const Jn = ({ mobileTiers: i = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60], override: t = {}, glContext: s, failIfMajorPerformanceCaveat: n = !1, benchmarksURL: r = "https://unpkg.com/detect-gpu@5.0.70/dist/benchmarks" } = {}) => xt(void 0, void 0, void 0, function* () {
|
|
127
127
|
const a = {};
|
|
128
128
|
if (os) return { tier: 0, type: "SSR" };
|
|
129
|
-
const { isIpad: o = !!re?.isIpad, isMobile: c = !!re?.isMobile, screenSize: l = window.screen, loadBenchmarks: h = (b) =>
|
|
129
|
+
const { isIpad: o = !!re?.isIpad, isMobile: c = !!re?.isMobile, screenSize: l = window.screen, loadBenchmarks: h = (b) => xt(void 0, void 0, void 0, function* () {
|
|
130
130
|
const O = yield fetch(`${r}/${b}`).then((w) => w.json());
|
|
131
131
|
if (parseInt(O.shift().split(".")[0], 10) < 4) throw new bi("Detect GPU benchmark data is out of date. Please update to version 4x");
|
|
132
132
|
return O;
|
|
@@ -151,7 +151,7 @@ const Jn = ({ mobileTiers: i = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
|
|
|
151
151
|
}
|
|
152
152
|
const v = (yield Promise.all(m.map(function(b) {
|
|
153
153
|
var O;
|
|
154
|
-
return
|
|
154
|
+
return xt(this, void 0, void 0, function* () {
|
|
155
155
|
const w = ((B) => {
|
|
156
156
|
const j = c ? ["adreno", "apple", "mali-t", "mali", "nvidia", "powervr", "samsung"] : ["intel", "apple", "amd", "radeon", "nvidia", "geforce", "adreno"];
|
|
157
157
|
for (const le of j) if (B.includes(le)) return le;
|
|
@@ -175,15 +175,15 @@ const Jn = ({ mobileTiers: i = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
|
|
|
175
175
|
const me = oe.length;
|
|
176
176
|
if (me === 0) return;
|
|
177
177
|
const be = b.split(/[.,()\[\]/\s]/g).sort().filter((B, j, le) => j === 0 || B !== le[j - 1]).join(" ");
|
|
178
|
-
let fe, [gs, , , , vs] = me > 1 ? oe.map((B) => [B, Xn(be, B[2])]).sort(([, B], [, j]) => B - j)[0][0] : oe[0],
|
|
179
|
-
const { devicePixelRatio:
|
|
178
|
+
let fe, [gs, , , , vs] = me > 1 ? oe.map((B) => [B, Xn(be, B[2])]).sort(([, B], [, j]) => B - j)[0][0] : oe[0], bt = Number.MAX_VALUE;
|
|
179
|
+
const { devicePixelRatio: ei } = window, _s = l.width * ei * l.height * ei;
|
|
180
180
|
for (const B of vs) {
|
|
181
|
-
const [j, le] = B, bs = j * le,
|
|
182
|
-
|
|
181
|
+
const [j, le] = B, bs = j * le, ti = Math.abs(_s - bs);
|
|
182
|
+
ti < bt && (bt = ti, fe = B);
|
|
183
183
|
}
|
|
184
184
|
if (!fe) return;
|
|
185
185
|
const [, , ys, Cs] = fe;
|
|
186
|
-
return [
|
|
186
|
+
return [bt, ys, gs, Cs];
|
|
187
187
|
});
|
|
188
188
|
}))).filter(Qn).sort(([b = Number.MAX_VALUE, O], [w = Number.MAX_VALUE, D]) => b === w ? O - D : b - w);
|
|
189
189
|
if (!v.length) {
|
|
@@ -386,21 +386,21 @@ class Na {
|
|
|
386
386
|
function ye(i, e, t) {
|
|
387
387
|
return Math.min(e, Math.max(i, t));
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function Yt(i, e, t) {
|
|
390
390
|
return (t - i) / (e - i);
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function Ke(i, e, t) {
|
|
393
393
|
return i * (1 - t) + e * t;
|
|
394
394
|
}
|
|
395
395
|
function Fa(i, e, t, s, n) {
|
|
396
|
-
return
|
|
396
|
+
return Ke(t, s, Yt(i, e, n));
|
|
397
397
|
}
|
|
398
398
|
function za(i, e) {
|
|
399
399
|
const t = i - e;
|
|
400
400
|
return Math.sqrt(t * t);
|
|
401
401
|
}
|
|
402
402
|
function Ha(i, e, t, s) {
|
|
403
|
-
return
|
|
403
|
+
return Ke(i, e, 1 - Math.exp(-t * s));
|
|
404
404
|
}
|
|
405
405
|
function te(i, e = 1) {
|
|
406
406
|
return Number(i.toFixed(e));
|
|
@@ -434,10 +434,10 @@ function Va(i, e, t, s, n) {
|
|
|
434
434
|
}
|
|
435
435
|
return ar(b, g, _, E, S);
|
|
436
436
|
}
|
|
437
|
-
const
|
|
437
|
+
const it = (i) => Math.round(Math.min(1, Math.max(0, i)) * 255).toString(16).padStart(2, "0");
|
|
438
438
|
function Ga({ r: i, g: e, b: t, a: s = 1 }) {
|
|
439
|
-
const n = `#${
|
|
440
|
-
return s < 1 ? `${n}${
|
|
439
|
+
const n = `#${it(i)}${it(e)}${it(t)}`;
|
|
440
|
+
return s < 1 ? `${n}${it(s)}` : n;
|
|
441
441
|
}
|
|
442
442
|
let xe;
|
|
443
443
|
function $a() {
|
|
@@ -744,10 +744,10 @@ function Za(i, e, t, s) {
|
|
|
744
744
|
hr(t, n, a);
|
|
745
745
|
});
|
|
746
746
|
}
|
|
747
|
-
const
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
747
|
+
const Qt = new Vi();
|
|
748
|
+
Qt.setAttribute("position", new ke([-0.5, -0.5, 0, 1.5, -0.5, 0, -0.5, 1.5, 0], 3));
|
|
749
|
+
Qt.setAttribute("normal", new ke([0, 0, 1, 0, 0, 1], 3));
|
|
750
|
+
Qt.setAttribute("uv", new ke([0, 0, 2, 0, 0, 2], 2));
|
|
751
751
|
const qa = new Gi(-0.5, 0.5, 0.5, -0.5, 0, 100), Oi = (i) => {
|
|
752
752
|
i?.dispose();
|
|
753
753
|
}, ls = (i) => {
|
|
@@ -757,13 +757,13 @@ const qa = new Gi(-0.5, 0.5, 0.5, -0.5, 0, 100), Oi = (i) => {
|
|
|
757
757
|
else {
|
|
758
758
|
for (const e in i) {
|
|
759
759
|
const t = i[e];
|
|
760
|
-
t !== null && t instanceof
|
|
760
|
+
t !== null && t instanceof Vt && Oi(t);
|
|
761
761
|
}
|
|
762
762
|
if (i.isShaderMaterial === !0) {
|
|
763
763
|
const e = i;
|
|
764
764
|
for (const t in e.uniforms) {
|
|
765
765
|
const s = e.uniforms[t];
|
|
766
|
-
s.value !== null && s.value instanceof
|
|
766
|
+
s.value !== null && s.value instanceof Vt && Oi(s.value);
|
|
767
767
|
}
|
|
768
768
|
}
|
|
769
769
|
i.dispose();
|
|
@@ -781,13 +781,13 @@ const qa = new Gi(-0.5, 0.5, 0.5, -0.5, 0, 100), Oi = (i) => {
|
|
|
781
781
|
i.dispose !== void 0 && i.dispose();
|
|
782
782
|
}
|
|
783
783
|
};
|
|
784
|
-
let
|
|
785
|
-
const
|
|
786
|
-
|
|
784
|
+
let Zt = 0;
|
|
785
|
+
const st = () => {
|
|
786
|
+
Zt = 0;
|
|
787
787
|
}, We = (i) => {
|
|
788
788
|
if (!i) return;
|
|
789
789
|
let e = i.name.replaceAll(" ", "").replaceAll("/", ".");
|
|
790
|
-
if (e.length === 0 && (e = `obj_${
|
|
790
|
+
if (e.length === 0 && (e = `obj_${Zt}`, Zt++), i.parent !== null && i.parent.uuid.length > 0 && (e = `${i.parent.uuid}.${e}`), i.uuid = e, i.isMesh !== void 0) {
|
|
791
791
|
const t = i;
|
|
792
792
|
if (Array.isArray(t.material))
|
|
793
793
|
t.material.forEach((s, n) => {
|
|
@@ -839,7 +839,7 @@ class ce {
|
|
|
839
839
|
this.material.map = e, this.renderer.render(this.scene, this.camera);
|
|
840
840
|
else {
|
|
841
841
|
const t = this.renderer.outputColorSpace, s = e.colorSpace;
|
|
842
|
-
this.renderer.outputColorSpace =
|
|
842
|
+
this.renderer.outputColorSpace = je, e.colorSpace = je, this.material.map = e, this.renderer.render(this.scene, this.camera), this.renderer.outputColorSpace = t, e.colorSpace = s;
|
|
843
843
|
}
|
|
844
844
|
return this.renderer.domElement;
|
|
845
845
|
}
|
|
@@ -897,28 +897,28 @@ function to(i, e, t = !0, s = !1) {
|
|
|
897
897
|
i.renderOrder = -e;
|
|
898
898
|
const n = i.material;
|
|
899
899
|
Array.isArray(n) ? n.forEach((r) => {
|
|
900
|
-
r.colorWrite = t, r.depthWrite = s, r.stencilWrite = !0, r.stencilRef = e, r.stencilFunc =
|
|
901
|
-
}) : (n.colorWrite = t, n.depthWrite = s, n.stencilWrite = !0, n.stencilRef = e, n.stencilFunc =
|
|
900
|
+
r.colorWrite = t, r.depthWrite = s, r.stencilWrite = !0, r.stencilRef = e, r.stencilFunc = ii, r.stencilFail = Ee, r.stencilZFail = Ee, r.stencilZPass = Ee;
|
|
901
|
+
}) : (n.colorWrite = t, n.depthWrite = s, n.stencilWrite = !0, n.stencilRef = e, n.stencilFunc = ii, n.stencilFail = Ee, n.stencilZFail = Ee, n.stencilZPass = Ee);
|
|
902
902
|
}
|
|
903
903
|
function io(i, e, t = !1) {
|
|
904
904
|
const s = i.material;
|
|
905
905
|
Array.isArray(s) ? s.forEach((n) => {
|
|
906
|
-
n.stencilWrite = !0, n.stencilRef = e, n.stencilFunc = t ?
|
|
907
|
-
}) : (s.stencilWrite = !0, s.stencilRef = e, s.stencilFunc = t ?
|
|
906
|
+
n.stencilWrite = !0, n.stencilRef = e, n.stencilFunc = t ? si : ni, n.stencilFail = Se, n.stencilZFail = Se, n.stencilZPass = Se;
|
|
907
|
+
}) : (s.stencilWrite = !0, s.stencilRef = e, s.stencilFunc = t ? si : ni, s.stencilFail = Se, s.stencilZFail = Se, s.stencilZPass = Se);
|
|
908
908
|
}
|
|
909
909
|
function so(i) {
|
|
910
|
-
i.blending = Yi, i.blendEquation =
|
|
910
|
+
i.blending = Yi, i.blendEquation = Qe, i.blendSrc = ft, i.blendDst = gt, i.needsUpdate = !0;
|
|
911
911
|
}
|
|
912
912
|
function no(i) {
|
|
913
|
-
i.blending =
|
|
913
|
+
i.blending = vt, i.blendEquation = Qe, i.blendSrc = ft, i.blendDst = _t, i.needsUpdate = !0;
|
|
914
914
|
}
|
|
915
915
|
function ro(i) {
|
|
916
|
-
i.blending =
|
|
916
|
+
i.blending = vt, i.blendEquation = Qe, i.blendSrc = Kt, i.blendDst = gt, i.needsUpdate = !0;
|
|
917
917
|
}
|
|
918
918
|
function ao(i) {
|
|
919
|
-
i.blending =
|
|
919
|
+
i.blending = vt, i.blendEquation = Qe, i.blendSrc = Xt, i.blendDst = _t, i.needsUpdate = !0;
|
|
920
920
|
}
|
|
921
|
-
let
|
|
921
|
+
let qt = [];
|
|
922
922
|
function ur(i, e, t = !0) {
|
|
923
923
|
ce.renderer = e.renderer;
|
|
924
924
|
const s = [];
|
|
@@ -1042,7 +1042,7 @@ function ur(i, e, t = !0) {
|
|
|
1042
1042
|
onUpdate: (a, o) => {
|
|
1043
1043
|
a === "Enabled" ? i.enabled = o : n(a, o);
|
|
1044
1044
|
}
|
|
1045
|
-
}),
|
|
1045
|
+
}), qt.push(r);
|
|
1046
1046
|
}
|
|
1047
1047
|
function oo(i, e) {
|
|
1048
1048
|
i.passes.forEach((t) => {
|
|
@@ -1050,9 +1050,9 @@ function oo(i, e) {
|
|
|
1050
1050
|
});
|
|
1051
1051
|
}
|
|
1052
1052
|
function lo(i) {
|
|
1053
|
-
|
|
1053
|
+
qt.forEach((e) => {
|
|
1054
1054
|
i.removeGroup(e);
|
|
1055
|
-
}),
|
|
1055
|
+
}), qt = [];
|
|
1056
1056
|
}
|
|
1057
1057
|
function co(i, e, t, s = 1024) {
|
|
1058
1058
|
return new Promise((n) => {
|
|
@@ -1116,7 +1116,7 @@ function Te(i, e, t, s, n, r) {
|
|
|
1116
1116
|
v.href = y, v.download = `${t.name}_${s}.png`, document.body.appendChild(v), v.click(), v.remove(), a();
|
|
1117
1117
|
});
|
|
1118
1118
|
}
|
|
1119
|
-
const Me =
|
|
1119
|
+
const Me = Jt([
|
|
1120
1120
|
"ctrlKey",
|
|
1121
1121
|
"metaKey",
|
|
1122
1122
|
"shiftKey",
|
|
@@ -1127,13 +1127,13 @@ const Me = ei([
|
|
|
1127
1127
|
"clientY",
|
|
1128
1128
|
"pageX",
|
|
1129
1129
|
"pageY"
|
|
1130
|
-
]), pr =
|
|
1130
|
+
]), pr = Jt([
|
|
1131
1131
|
"clientX",
|
|
1132
1132
|
"clientY",
|
|
1133
1133
|
"deltaX",
|
|
1134
1134
|
"deltaY",
|
|
1135
1135
|
"deltaMode"
|
|
1136
|
-
]), mr =
|
|
1136
|
+
]), mr = Jt([
|
|
1137
1137
|
"ctrlKey",
|
|
1138
1138
|
"metaKey",
|
|
1139
1139
|
"shiftKey",
|
|
@@ -1149,13 +1149,13 @@ function vr(i, e, t) {
|
|
|
1149
1149
|
for (const s of e)
|
|
1150
1150
|
t[s] = i[s];
|
|
1151
1151
|
}
|
|
1152
|
-
function
|
|
1152
|
+
function Jt(i) {
|
|
1153
1153
|
return function(t, s) {
|
|
1154
1154
|
const n = { type: t.type };
|
|
1155
1155
|
vr(t, i, n), s(n);
|
|
1156
1156
|
};
|
|
1157
1157
|
}
|
|
1158
|
-
function
|
|
1158
|
+
function Mt(i, e) {
|
|
1159
1159
|
const t = [], s = { type: i.type, touches: t };
|
|
1160
1160
|
for (let n = 0; n < i.touches.length; ++n) {
|
|
1161
1161
|
const r = i.touches[n];
|
|
@@ -1188,9 +1188,9 @@ const ho = {
|
|
|
1188
1188
|
pointerdown: Me,
|
|
1189
1189
|
pointermove: Me,
|
|
1190
1190
|
pointerup: Me,
|
|
1191
|
-
touchstart:
|
|
1192
|
-
touchmove:
|
|
1193
|
-
touchend:
|
|
1191
|
+
touchstart: Mt,
|
|
1192
|
+
touchmove: Mt,
|
|
1193
|
+
touchend: Mt,
|
|
1194
1194
|
wheel: fr,
|
|
1195
1195
|
keydown: yr
|
|
1196
1196
|
};
|
|
@@ -1273,7 +1273,7 @@ class br extends Zi {
|
|
|
1273
1273
|
this.left = e.left, this.top = e.top, this.width = e.width, this.height = e.height;
|
|
1274
1274
|
return;
|
|
1275
1275
|
}
|
|
1276
|
-
e.preventDefault =
|
|
1276
|
+
e.preventDefault = ut, e.stopPropagation = ut, this.dispatchEvent(e);
|
|
1277
1277
|
}
|
|
1278
1278
|
focus() {
|
|
1279
1279
|
}
|
|
@@ -1490,7 +1490,7 @@ class fo extends cs {
|
|
|
1490
1490
|
if (a === void 0) return;
|
|
1491
1491
|
const c = `${this.getSheetInstance(e, r)}_${t}`;
|
|
1492
1492
|
let l = this.sheetObjects.get(c), h = s;
|
|
1493
|
-
l !== void 0 && (h = { ...s, ...l.value }), l = a.object(t, h, { reconfigure: !0 }), this.sheetObjects.set(c, l), this.sheetObjectCBs.set(c, n !== void 0 ? n :
|
|
1493
|
+
l !== void 0 && (h = { ...s, ...l.value }), l = a.object(t, h, { reconfigure: !0 }), this.sheetObjects.set(c, l), this.sheetObjectCBs.set(c, n !== void 0 ? n : ut);
|
|
1494
1494
|
function d(m, y, v) {
|
|
1495
1495
|
if (typeof v == "object")
|
|
1496
1496
|
if (qn(v))
|
|
@@ -1740,7 +1740,7 @@ function Ae(i) {
|
|
|
1740
1740
|
}
|
|
1741
1741
|
return i.anisotropy !== void 0 && (e.anisotropy = i.anisotropy), i.clearcoat !== void 0 && (e.clearcoat = i.clearcoat), i.iridescence !== void 0 && (e.iridescence = i.iridescence), i.dispersion !== void 0 && (e.dispersion = i.dispersion), i.sheen !== void 0 && (e.sheen = i.sheen), i.transmission !== void 0 && (e.transmission = i.transmission), i.transmission !== void 0 && (e.transmission = i.transmission), e;
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1743
|
+
function At(i) {
|
|
1744
1744
|
i.updateMatrix();
|
|
1745
1745
|
const e = {
|
|
1746
1746
|
name: i.name,
|
|
@@ -1890,8 +1890,8 @@ function hs(i) {
|
|
|
1890
1890
|
return new Promise((e, t) => {
|
|
1891
1891
|
const s = new Image();
|
|
1892
1892
|
s.onload = () => {
|
|
1893
|
-
const n = new
|
|
1894
|
-
n.wrapS =
|
|
1893
|
+
const n = new Vt(s);
|
|
1894
|
+
n.wrapS = ri, n.wrapT = ri, n.needsUpdate = !0, e(n);
|
|
1895
1895
|
}, s.onerror = t, s.src = i;
|
|
1896
1896
|
});
|
|
1897
1897
|
}
|
|
@@ -1966,7 +1966,7 @@ class go extends cs {
|
|
|
1966
1966
|
}
|
|
1967
1967
|
setObject(e) {
|
|
1968
1968
|
this.renderer !== void 0 && (ce.renderer = this.renderer);
|
|
1969
|
-
const t =
|
|
1969
|
+
const t = At(e);
|
|
1970
1970
|
this.dispatchEvent({ type: "ToolEvents::setObject", value: t });
|
|
1971
1971
|
}
|
|
1972
1972
|
requestMethod(e, t, s, n) {
|
|
@@ -2081,20 +2081,16 @@ class go extends cs {
|
|
|
2081
2081
|
// Renderer
|
|
2082
2082
|
setRenderer(e, t = null) {
|
|
2083
2083
|
if (this.renderer = e, this.canvas = e.domElement, this.inputElement = t !== null ? t : this.canvas, !this.debug) return;
|
|
2084
|
-
const s = `#${e.getClearColor(new
|
|
2084
|
+
const s = `#${e.getClearColor(new ht()).getHexString()}`;
|
|
2085
2085
|
this.send({
|
|
2086
2086
|
event: "addRenderer",
|
|
2087
2087
|
target: "editor",
|
|
2088
2088
|
data: {
|
|
2089
|
-
autoClear: e.autoClear,
|
|
2090
2089
|
autoClearColor: e.autoClearColor,
|
|
2091
|
-
autoClearDepth: e.autoClearDepth,
|
|
2092
|
-
autoClearStencil: e.autoClearStencil,
|
|
2093
2090
|
outputColorSpace: e.outputColorSpace,
|
|
2094
|
-
localClippingEnabled: e.localClippingEnabled,
|
|
2095
2091
|
clearColor: s,
|
|
2096
2092
|
clearAlpha: e.getClearAlpha(),
|
|
2097
|
-
colorManagement:
|
|
2093
|
+
colorManagement: Et.enabled,
|
|
2098
2094
|
toneMapping: e.toneMapping,
|
|
2099
2095
|
toneMappingExposure: e.toneMappingExposure,
|
|
2100
2096
|
type: e.isWebGLRenderer ? "WebGLRenderer" : "WebGPURenderer"
|
|
@@ -2111,7 +2107,7 @@ class go extends cs {
|
|
|
2111
2107
|
// Scenes
|
|
2112
2108
|
addScene(e) {
|
|
2113
2109
|
if (e === void 0 || (this.scenes.set(e.name, e), !this.debug)) return;
|
|
2114
|
-
|
|
2110
|
+
st(), We(e);
|
|
2115
2111
|
const t = he(e);
|
|
2116
2112
|
this.send({
|
|
2117
2113
|
event: "addScene",
|
|
@@ -2151,7 +2147,7 @@ class go extends cs {
|
|
|
2151
2147
|
}
|
|
2152
2148
|
setScene(e) {
|
|
2153
2149
|
if (e === void 0 || (this.scene = e, !this.debug)) return;
|
|
2154
|
-
this.renderer !== void 0 && (ce.renderer = this.renderer),
|
|
2150
|
+
this.renderer !== void 0 && (ce.renderer = this.renderer), st(), We(e);
|
|
2155
2151
|
const t = he(e);
|
|
2156
2152
|
this.send({
|
|
2157
2153
|
event: "setScene",
|
|
@@ -2180,7 +2176,7 @@ class go extends cs {
|
|
|
2180
2176
|
// Cameras
|
|
2181
2177
|
addCamera(e) {
|
|
2182
2178
|
if (!this.debug) return;
|
|
2183
|
-
const t =
|
|
2179
|
+
const t = At(e);
|
|
2184
2180
|
this.send({
|
|
2185
2181
|
event: "addCamera",
|
|
2186
2182
|
target: "editor",
|
|
@@ -2189,7 +2185,7 @@ class go extends cs {
|
|
|
2189
2185
|
}
|
|
2190
2186
|
removeCamera(e) {
|
|
2191
2187
|
if (!this.debug) return;
|
|
2192
|
-
const t =
|
|
2188
|
+
const t = At(e);
|
|
2193
2189
|
this.send({
|
|
2194
2190
|
event: "removeCamera",
|
|
2195
2191
|
target: "editor",
|
|
@@ -2206,24 +2202,20 @@ class go extends cs {
|
|
|
2206
2202
|
});
|
|
2207
2203
|
break;
|
|
2208
2204
|
case "updateRenderer":
|
|
2209
|
-
this.renderer && (this.renderer.autoClearColor = e.data.autoClearColor, this.renderer.outputColorSpace = e.data.outputColorSpace, this.renderer.
|
|
2205
|
+
this.renderer && (this.renderer.autoClearColor = e.data.autoClearColor, this.renderer.outputColorSpace = e.data.outputColorSpace, this.renderer.setClearColor(e.data.clearColor, e.data.clearAlpha), this.renderer.toneMapping = e.data.toneMapping, this.renderer.toneMappingExposure = e.data.toneMappingExposure, Et.enabled = e.data.colorManagement);
|
|
2210
2206
|
break;
|
|
2211
2207
|
case "requestRenderer":
|
|
2212
2208
|
if (this.renderer !== void 0) {
|
|
2213
|
-
const t = `#${this.renderer.getClearColor(new
|
|
2209
|
+
const t = `#${this.renderer.getClearColor(new ht()).getHexString()}`;
|
|
2214
2210
|
this.send({
|
|
2215
2211
|
event: "addRenderer",
|
|
2216
2212
|
target: "editor",
|
|
2217
2213
|
data: {
|
|
2218
|
-
autoClear: this.renderer.autoClear,
|
|
2219
2214
|
autoClearColor: this.renderer.autoClearColor,
|
|
2220
|
-
autoClearDepth: this.renderer.autoClearDepth,
|
|
2221
|
-
autoClearStencil: this.renderer.autoClearStencil,
|
|
2222
2215
|
outputColorSpace: this.renderer.outputColorSpace,
|
|
2223
|
-
localClippingEnabled: this.renderer.localClippingEnabled,
|
|
2224
2216
|
clearColor: t,
|
|
2225
2217
|
clearAlpha: this.renderer.getClearAlpha(),
|
|
2226
|
-
colorManagement:
|
|
2218
|
+
colorManagement: Et.enabled,
|
|
2227
2219
|
toneMapping: this.renderer.toneMapping,
|
|
2228
2220
|
toneMappingExposure: this.renderer.toneMappingExposure,
|
|
2229
2221
|
type: this.renderer.isWebGLRenderer ? "WebGLRenderer" : "WebGPURenderer"
|
|
@@ -2233,12 +2225,12 @@ class go extends cs {
|
|
|
2233
2225
|
break;
|
|
2234
2226
|
case "requestScene":
|
|
2235
2227
|
this.scenes.forEach((t) => {
|
|
2236
|
-
|
|
2228
|
+
st(), We(t), this.send({
|
|
2237
2229
|
event: "addScene",
|
|
2238
2230
|
target: "editor",
|
|
2239
2231
|
data: he(t)
|
|
2240
2232
|
});
|
|
2241
|
-
}), this.scene !== void 0 && (this.renderer !== void 0 && (ce.renderer = this.renderer),
|
|
2233
|
+
}), this.scene !== void 0 && (this.renderer !== void 0 && (ce.renderer = this.renderer), st(), We(this.scene), this.send({
|
|
2242
2234
|
event: "setScene",
|
|
2243
2235
|
target: "editor",
|
|
2244
2236
|
data: he(this.scene)
|
|
@@ -2470,7 +2462,7 @@ function Ur(i) {
|
|
|
2470
2462
|
}
|
|
2471
2463
|
return /* @__PURE__ */ f("li", { className: t === e.title ? "selected" : "", children: n }, W());
|
|
2472
2464
|
}
|
|
2473
|
-
function
|
|
2465
|
+
function qe(i) {
|
|
2474
2466
|
const [e, t] = L(i.open !== void 0 ? i.open : !1), [s, n] = L(i.visible !== void 0 ? i.visible : !1), r = !e || i.children === void 0, a = () => {
|
|
2475
2467
|
i.three.dispatchEvent({ type: R.REMOVE_SCENE, value: i.scene });
|
|
2476
2468
|
};
|
|
@@ -2491,7 +2483,7 @@ function je(i) {
|
|
|
2491
2483
|
children: "Toggle"
|
|
2492
2484
|
}
|
|
2493
2485
|
),
|
|
2494
|
-
/* @__PURE__ */ f("p", { className: "label", children:
|
|
2486
|
+
/* @__PURE__ */ f("p", { className: "label", children: pt(i.label) })
|
|
2495
2487
|
]
|
|
2496
2488
|
}
|
|
2497
2489
|
),
|
|
@@ -2591,7 +2583,7 @@ function us(i) {
|
|
|
2591
2583
|
/* @__PURE__ */ f("div", { className: t ? "open" : "", children: /* @__PURE__ */ f("div", { className: "container", children: r }) })
|
|
2592
2584
|
] });
|
|
2593
2585
|
}
|
|
2594
|
-
function
|
|
2586
|
+
function Rt(i) {
|
|
2595
2587
|
const e = [];
|
|
2596
2588
|
return i.child?.children.map((t, s) => {
|
|
2597
2589
|
e.push(/* @__PURE__ */ f(us, { child: t, scene: i.scene, three: i.three }, s));
|
|
@@ -2682,7 +2674,7 @@ function Ce(i) {
|
|
|
2682
2674
|
step: i.step,
|
|
2683
2675
|
ref: t,
|
|
2684
2676
|
name: W(),
|
|
2685
|
-
onChange:
|
|
2677
|
+
onChange: ut
|
|
2686
2678
|
}
|
|
2687
2679
|
)
|
|
2688
2680
|
] })
|
|
@@ -2741,7 +2733,7 @@ function Lr(i) {
|
|
|
2741
2733
|
window.removeEventListener("mousemove", b), window.removeEventListener("mouseup", S), _(!1);
|
|
2742
2734
|
}
|
|
2743
2735
|
function b(x) {
|
|
2744
|
-
const N = r.current.getBoundingClientRect(), Q = ye(0, 99, x.clientX - N.left) / 99, oe = 1 - ye(0, 99, x.clientY - N.top) / 99, me = te(
|
|
2736
|
+
const N = r.current.getBoundingClientRect(), Q = ye(0, 99, x.clientX - N.left) / 99, oe = 1 - ye(0, 99, x.clientY - N.top) / 99, me = te(Ke(v.min, v.max, Q), 3), be = te(Ke(v.min, v.max, oe), 3);
|
|
2745
2737
|
i.onChange({ target: { value: { x: me, y: be } } }), u(me), y(be);
|
|
2746
2738
|
}
|
|
2747
2739
|
function O() {
|
|
@@ -2753,7 +2745,7 @@ function Lr(i) {
|
|
|
2753
2745
|
C({ min: v.min, max: x }), d > x && u(ye(v.min, x, d)), m > x && y(ye(v.min, x, m));
|
|
2754
2746
|
}
|
|
2755
2747
|
pe(() => {
|
|
2756
|
-
a.current.style.left = `${
|
|
2748
|
+
a.current.style.left = `${Yt(v.min, v.max, d) * 100}%`, a.current.style.top = `${(1 - Yt(v.min, v.max, m)) * 100}%`;
|
|
2757
2749
|
}, [v, d, m]);
|
|
2758
2750
|
const D = i.step !== void 0 ? i.step : 0.01;
|
|
2759
2751
|
return /* @__PURE__ */ M("div", { className: "vector2", children: [
|
|
@@ -2852,7 +2844,7 @@ function Ti(i) {
|
|
|
2852
2844
|
step: 0.1,
|
|
2853
2845
|
labelRef: l,
|
|
2854
2846
|
onChange: (h, d) => {
|
|
2855
|
-
a[h] =
|
|
2847
|
+
a[h] = Wt(d), i.onChange({ target: { value: a } });
|
|
2856
2848
|
}
|
|
2857
2849
|
}
|
|
2858
2850
|
)
|
|
@@ -3013,7 +3005,7 @@ function Fr(i) {
|
|
|
3013
3005
|
}
|
|
3014
3006
|
return i;
|
|
3015
3007
|
}
|
|
3016
|
-
function
|
|
3008
|
+
function yt(i) {
|
|
3017
3009
|
switch (i) {
|
|
3018
3010
|
case "alphaHash":
|
|
3019
3011
|
return "Alpha Hash";
|
|
@@ -3271,12 +3263,12 @@ const Hr = [
|
|
|
3271
3263
|
},
|
|
3272
3264
|
{
|
|
3273
3265
|
title: "Custom",
|
|
3274
|
-
value:
|
|
3266
|
+
value: vt
|
|
3275
3267
|
}
|
|
3276
3268
|
], Vr = [
|
|
3277
3269
|
{
|
|
3278
3270
|
title: "Add",
|
|
3279
|
-
value:
|
|
3271
|
+
value: Qe
|
|
3280
3272
|
},
|
|
3281
3273
|
{
|
|
3282
3274
|
title: "Subtract",
|
|
@@ -3301,7 +3293,7 @@ const Hr = [
|
|
|
3301
3293
|
},
|
|
3302
3294
|
{
|
|
3303
3295
|
title: "One",
|
|
3304
|
-
value:
|
|
3296
|
+
value: _t
|
|
3305
3297
|
},
|
|
3306
3298
|
{
|
|
3307
3299
|
title: "Src Color",
|
|
@@ -3313,11 +3305,11 @@ const Hr = [
|
|
|
3313
3305
|
},
|
|
3314
3306
|
{
|
|
3315
3307
|
title: "Src Alpha",
|
|
3316
|
-
value:
|
|
3308
|
+
value: ft
|
|
3317
3309
|
},
|
|
3318
3310
|
{
|
|
3319
3311
|
title: "One Minus Src Alpha",
|
|
3320
|
-
value:
|
|
3312
|
+
value: gt
|
|
3321
3313
|
},
|
|
3322
3314
|
{
|
|
3323
3315
|
title: "Dst Alpha",
|
|
@@ -3329,11 +3321,11 @@ const Hr = [
|
|
|
3329
3321
|
},
|
|
3330
3322
|
{
|
|
3331
3323
|
title: "Dst Color",
|
|
3332
|
-
value:
|
|
3324
|
+
value: Kt
|
|
3333
3325
|
},
|
|
3334
3326
|
{
|
|
3335
3327
|
title: "One Minus Dst Color",
|
|
3336
|
-
value:
|
|
3328
|
+
value: Xt
|
|
3337
3329
|
},
|
|
3338
3330
|
{
|
|
3339
3331
|
title: "Src Alpha Saturate",
|
|
@@ -3362,7 +3354,7 @@ const Hr = [
|
|
|
3362
3354
|
},
|
|
3363
3355
|
{
|
|
3364
3356
|
title: "One",
|
|
3365
|
-
value:
|
|
3357
|
+
value: _t
|
|
3366
3358
|
},
|
|
3367
3359
|
{
|
|
3368
3360
|
title: "Src Color",
|
|
@@ -3374,11 +3366,11 @@ const Hr = [
|
|
|
3374
3366
|
},
|
|
3375
3367
|
{
|
|
3376
3368
|
title: "Src Alpha",
|
|
3377
|
-
value:
|
|
3369
|
+
value: ft
|
|
3378
3370
|
},
|
|
3379
3371
|
{
|
|
3380
3372
|
title: "One Minus Src Alpha",
|
|
3381
|
-
value:
|
|
3373
|
+
value: gt
|
|
3382
3374
|
},
|
|
3383
3375
|
{
|
|
3384
3376
|
title: "Dst Alpha",
|
|
@@ -3390,11 +3382,11 @@ const Hr = [
|
|
|
3390
3382
|
},
|
|
3391
3383
|
{
|
|
3392
3384
|
title: "Dst Color",
|
|
3393
|
-
value:
|
|
3385
|
+
value: Kt
|
|
3394
3386
|
},
|
|
3395
3387
|
{
|
|
3396
3388
|
title: "One Minus Dst Color",
|
|
3397
|
-
value:
|
|
3389
|
+
value: Xt
|
|
3398
3390
|
},
|
|
3399
3391
|
{
|
|
3400
3392
|
title: "Constant Color",
|
|
@@ -3419,7 +3411,7 @@ function Ne(i, e) {
|
|
|
3419
3411
|
function Wr(i, e, t, s) {
|
|
3420
3412
|
return {
|
|
3421
3413
|
type: "boolean",
|
|
3422
|
-
title:
|
|
3414
|
+
title: yt(i),
|
|
3423
3415
|
prop: i,
|
|
3424
3416
|
value: e,
|
|
3425
3417
|
needsUpdate: !0,
|
|
@@ -3436,7 +3428,7 @@ function Wr(i, e, t, s) {
|
|
|
3436
3428
|
function Yr(i, e, t, s) {
|
|
3437
3429
|
const n = {
|
|
3438
3430
|
type: "number",
|
|
3439
|
-
title:
|
|
3431
|
+
title: yt(i),
|
|
3440
3432
|
prop: i,
|
|
3441
3433
|
value: e,
|
|
3442
3434
|
min: void 0,
|
|
@@ -3474,7 +3466,7 @@ function Yr(i, e, t, s) {
|
|
|
3474
3466
|
function Zr(i, e, t, s) {
|
|
3475
3467
|
const n = {
|
|
3476
3468
|
type: "string",
|
|
3477
|
-
title:
|
|
3469
|
+
title: yt(i),
|
|
3478
3470
|
prop: i,
|
|
3479
3471
|
value: e,
|
|
3480
3472
|
needsUpdate: !0,
|
|
@@ -3516,11 +3508,11 @@ function jr(i) {
|
|
|
3516
3508
|
function Kr(i) {
|
|
3517
3509
|
return i.x !== void 0 && i.y !== void 0 && i.z !== void 0 && i.w !== void 0;
|
|
3518
3510
|
}
|
|
3519
|
-
function
|
|
3511
|
+
function jt(i) {
|
|
3520
3512
|
i.sort((e, t) => e.title < t.title ? -1 : e.title > t.title ? 1 : 0);
|
|
3521
3513
|
}
|
|
3522
3514
|
function Ue(i, e, t, s, n = "", r = !1) {
|
|
3523
|
-
const a =
|
|
3515
|
+
const a = yt(i).split(".")[0].replaceAll("[", "").replaceAll("]", ""), o = n.length > 0 ? `${n}.${i}` : i, c = typeof e;
|
|
3524
3516
|
if (c === "object" && e !== null && e.__isUniform === !0)
|
|
3525
3517
|
return Ue(`${i}.value`, e.value, t, s, n, r);
|
|
3526
3518
|
if (c === "boolean" || c === "string")
|
|
@@ -3566,7 +3558,7 @@ function Ue(i, e, t, s, n = "", r = !1) {
|
|
|
3566
3558
|
value: e,
|
|
3567
3559
|
disabled: r,
|
|
3568
3560
|
onChange: (l, h) => {
|
|
3569
|
-
const d = new
|
|
3561
|
+
const d = new Je(h);
|
|
3570
3562
|
s.updateObject(t.uuid, `material.${o}`, d);
|
|
3571
3563
|
const u = s.getScene(t.uuid);
|
|
3572
3564
|
if (u !== null) {
|
|
@@ -3588,7 +3580,7 @@ function Ue(i, e, t, s, n = "", r = !1) {
|
|
|
3588
3580
|
}
|
|
3589
3581
|
}
|
|
3590
3582
|
if (l.length > 0)
|
|
3591
|
-
return
|
|
3583
|
+
return jt(l), {
|
|
3592
3584
|
title: a,
|
|
3593
3585
|
items: l
|
|
3594
3586
|
};
|
|
@@ -3732,7 +3724,7 @@ function Ue(i, e, t, s, n = "", r = !1) {
|
|
|
3732
3724
|
console.log("Hermes - Issue cycling through material object:", i, e);
|
|
3733
3725
|
}
|
|
3734
3726
|
if (l.length > 0)
|
|
3735
|
-
return
|
|
3727
|
+
return jt(l), {
|
|
3736
3728
|
title: a,
|
|
3737
3729
|
items: l
|
|
3738
3730
|
};
|
|
@@ -3757,7 +3749,7 @@ function Mi(i, e, t) {
|
|
|
3757
3749
|
o !== void 0 && s.push(o);
|
|
3758
3750
|
} else a !== void 0 && console.log("Hermes - Other Material Prop Type:", n, r, a);
|
|
3759
3751
|
}
|
|
3760
|
-
return
|
|
3752
|
+
return jt(s), s.push({
|
|
3761
3753
|
title: "Update Material",
|
|
3762
3754
|
type: "button",
|
|
3763
3755
|
onChange: () => {
|
|
@@ -3901,9 +3893,9 @@ function Qr(i) {
|
|
|
3901
3893
|
] })
|
|
3902
3894
|
] });
|
|
3903
3895
|
}
|
|
3904
|
-
function
|
|
3896
|
+
function ct(i) {
|
|
3905
3897
|
let e = i.value;
|
|
3906
|
-
e !== void 0 && (e.isColor !== void 0 ? e = yi(i.value) : i.type === "color" && (e = yi(new
|
|
3898
|
+
e !== void 0 && (e.isColor !== void 0 ? e = yi(i.value) : i.type === "color" && (e = yi(new Je().setStyle(i.value, je))));
|
|
3907
3899
|
const [t, s] = L(e), n = z(null), r = (l) => {
|
|
3908
3900
|
let h = l.target.value;
|
|
3909
3901
|
if (i.type === "boolean")
|
|
@@ -3919,7 +3911,7 @@ function ht(i) {
|
|
|
3919
3911
|
const o = i.type === "field" || i.type === "string" && (t.length > 100 || t.search(`
|
|
3920
3912
|
`) > -1), c = o || i.type === "image" || i.type === "vector2";
|
|
3921
3913
|
return /* @__PURE__ */ M("div", { className: `field ${c ? "block" : ""}`, style: a, children: [
|
|
3922
|
-
i.type !== "button" && /* @__PURE__ */ f("span", { ref: n, children:
|
|
3914
|
+
i.type !== "button" && /* @__PURE__ */ f("span", { ref: n, children: pt(i.title) }, "fieldLabel"),
|
|
3923
3915
|
i.type === "string" && !o && /* @__PURE__ */ f(
|
|
3924
3916
|
"input",
|
|
3925
3917
|
{
|
|
@@ -4004,7 +3996,7 @@ function ht(i) {
|
|
|
4004
3996
|
disabled: i.disabled,
|
|
4005
3997
|
defaultValue: i.value,
|
|
4006
3998
|
name: W(),
|
|
4007
|
-
children: i.options?.map((l, h) => /* @__PURE__ */ f("option", { value: l.value, children:
|
|
3999
|
+
children: i.options?.map((l, h) => /* @__PURE__ */ f("option", { value: l.value, children: pt(l.title) }, h))
|
|
4008
4000
|
}
|
|
4009
4001
|
) }),
|
|
4010
4002
|
i.type === "vector2" && /* @__PURE__ */ f(Lr, { step: i.step, value: t, min: 0, max: 1, onChange: r }),
|
|
@@ -4016,7 +4008,7 @@ function ht(i) {
|
|
|
4016
4008
|
function Jr(i) {
|
|
4017
4009
|
return "items" in i;
|
|
4018
4010
|
}
|
|
4019
|
-
class X extends
|
|
4011
|
+
class X extends Xe {
|
|
4020
4012
|
subgroupNames = [];
|
|
4021
4013
|
subgroupElements = [];
|
|
4022
4014
|
valueOverrides = /* @__PURE__ */ new Map();
|
|
@@ -4073,13 +4065,13 @@ class X extends Qe {
|
|
|
4073
4065
|
return this.props.items.forEach((t) => {
|
|
4074
4066
|
if (Jr(t))
|
|
4075
4067
|
e.push(
|
|
4076
|
-
/* @__PURE__ */ f(X, { three: this.props.three, title:
|
|
4068
|
+
/* @__PURE__ */ f(X, { three: this.props.three, title: pt(t.title), items: t.items }, t.title)
|
|
4077
4069
|
);
|
|
4078
4070
|
else {
|
|
4079
4071
|
const s = this.valueOverrides.get(t.title), n = s !== void 0 ? s : t.value;
|
|
4080
4072
|
e.push(
|
|
4081
4073
|
/* @__PURE__ */ f(
|
|
4082
|
-
|
|
4074
|
+
ct,
|
|
4083
4075
|
{
|
|
4084
4076
|
title: t.title,
|
|
4085
4077
|
prop: t.prop,
|
|
@@ -4102,7 +4094,7 @@ class X extends Qe {
|
|
|
4102
4094
|
);
|
|
4103
4095
|
}
|
|
4104
4096
|
}), this.subgroupElements.forEach((t) => e.push(t)), /* @__PURE__ */ f(
|
|
4105
|
-
|
|
4097
|
+
qe,
|
|
4106
4098
|
{
|
|
4107
4099
|
three: this.props.three,
|
|
4108
4100
|
label: this.props.title,
|
|
@@ -4115,7 +4107,7 @@ class X extends Qe {
|
|
|
4115
4107
|
);
|
|
4116
4108
|
}
|
|
4117
4109
|
}
|
|
4118
|
-
class I extends
|
|
4110
|
+
class I extends Xe {
|
|
4119
4111
|
static instance;
|
|
4120
4112
|
static groups = [];
|
|
4121
4113
|
static groupsRefs = [];
|
|
@@ -4388,7 +4380,7 @@ function ze(i) {
|
|
|
4388
4380
|
function He(i) {
|
|
4389
4381
|
return Math.abs(i) < Number.MAX_VALUE ? i : i * (1 / 0);
|
|
4390
4382
|
}
|
|
4391
|
-
function
|
|
4383
|
+
function nt(i, e, t, s, n = 1 / 0, r) {
|
|
4392
4384
|
s = Math.max(1e-4, s);
|
|
4393
4385
|
const a = 2 / s, o = a * r, c = 1 / (1 + o + 0.48 * o * o + 0.235 * o * o * o);
|
|
4394
4386
|
let l = i - e;
|
|
@@ -4414,12 +4406,12 @@ function Ii(i, e, t, s, n = 1 / 0, r, a) {
|
|
|
4414
4406
|
const x = C - i.x, N = g - i.y, Q = _ - i.z, oe = a.x - C, me = a.y - g, be = a.z - _;
|
|
4415
4407
|
return x * oe + N * me + Q * be > 0 && (a.x = C, a.y = g, a.z = _, t.x = (a.x - C) / r, t.y = (a.y - g) / r, t.z = (a.z - _) / r), a;
|
|
4416
4408
|
}
|
|
4417
|
-
function
|
|
4409
|
+
function Pt(i, e) {
|
|
4418
4410
|
e.set(0, 0), i.forEach((t) => {
|
|
4419
4411
|
e.x += t.clientX, e.y += t.clientY;
|
|
4420
4412
|
}), e.x /= i.length, e.y /= i.length;
|
|
4421
4413
|
}
|
|
4422
|
-
function
|
|
4414
|
+
function Dt(i, e) {
|
|
4423
4415
|
return de(i) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
|
|
4424
4416
|
}
|
|
4425
4417
|
class ta {
|
|
@@ -4486,9 +4478,9 @@ class ta {
|
|
|
4486
4478
|
}
|
|
4487
4479
|
}
|
|
4488
4480
|
}
|
|
4489
|
-
var
|
|
4490
|
-
const ia = "2.10.1",
|
|
4491
|
-
let T, Ui,
|
|
4481
|
+
var It;
|
|
4482
|
+
const ia = "2.10.1", rt = 1 / 8, sa = /Mac/.test((It = globalThis?.navigator) === null || It === void 0 ? void 0 : It.platform);
|
|
4483
|
+
let T, Ui, at, Ut, q, A, U, De, Be, se, ne, ve, Li, ki, K, Ve, Ie, Ni, Lt, Fi, kt, Nt, ot;
|
|
4492
4484
|
class ae extends ta {
|
|
4493
4485
|
/**
|
|
4494
4486
|
* Injects THREE as the dependency. You can then proceed to use CameraControls.
|
|
@@ -4531,7 +4523,7 @@ class ae extends ta {
|
|
|
4531
4523
|
* @category Statics
|
|
4532
4524
|
*/
|
|
4533
4525
|
static install(e) {
|
|
4534
|
-
T = e.THREE, Ui = Object.freeze(new T.Vector3(0, 0, 0)),
|
|
4526
|
+
T = e.THREE, Ui = Object.freeze(new T.Vector3(0, 0, 0)), at = Object.freeze(new T.Vector3(0, 1, 0)), Ut = Object.freeze(new T.Vector3(0, 0, 1)), q = new T.Vector2(), A = new T.Vector3(), U = new T.Vector3(), De = new T.Vector3(), Be = new T.Vector3(), se = new T.Vector3(), ne = new T.Vector3(), ve = new T.Vector3(), Li = new T.Vector3(), ki = new T.Vector3(), K = new T.Spherical(), Ve = new T.Spherical(), Ie = new T.Box3(), Ni = new T.Box3(), Lt = new T.Sphere(), Fi = new T.Quaternion(), kt = new T.Quaternion(), Nt = new T.Matrix4(), ot = new T.Raycaster();
|
|
4535
4527
|
}
|
|
4536
4528
|
/**
|
|
4537
4529
|
* list all ACTIONs
|
|
@@ -4585,7 +4577,7 @@ class ae extends ta {
|
|
|
4585
4577
|
}, this._zoomInternal = (g, _, E) => {
|
|
4586
4578
|
const S = Math.pow(0.95, g * this.dollySpeed), b = this._zoom, O = this._zoom * S;
|
|
4587
4579
|
this.zoomTo(O, !0), this.dollyToCursor && (this._changedZoom += O - b, this._dollyControlCoord.set(_, E));
|
|
4588
|
-
}, typeof T > "u" && console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."), this._camera = e, this._yAxisUpSpace = new T.Quaternion().setFromUnitVectors(this._camera.up,
|
|
4580
|
+
}, typeof T > "u" && console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."), this._camera = e, this._yAxisUpSpace = new T.Quaternion().setFromUnitVectors(this._camera.up, at), this._yAxisUpSpaceInverse = this._yAxisUpSpace.clone().invert(), this._state = p.NONE, this._target = new T.Vector3(), this._targetEnd = this._target.clone(), this._focalOffset = new T.Vector3(), this._focalOffsetEnd = this._focalOffset.clone(), this._spherical = new T.Spherical().setFromVector3(A.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)), this._sphericalEnd = this._spherical.clone(), this._lastDistance = this._spherical.radius, this._zoom = this._camera.zoom, this._zoomEnd = this._zoom, this._lastZoom = this._zoom, this._nearPlaneCorners = [
|
|
4589
4581
|
new T.Vector3(),
|
|
4590
4582
|
new T.Vector3(),
|
|
4591
4583
|
new T.Vector3(),
|
|
@@ -4720,7 +4712,7 @@ class ae extends ta {
|
|
|
4720
4712
|
}, u = (g) => {
|
|
4721
4713
|
if (!this._enabled)
|
|
4722
4714
|
return;
|
|
4723
|
-
if (
|
|
4715
|
+
if (Pt(this._activePointers, q), this._getClientRect(this._elementRect), s.copy(q), n.copy(q), this._activePointers.length >= 2) {
|
|
4724
4716
|
const E = q.x - this._activePointers[1].clientX, S = q.y - this._activePointers[1].clientY, b = Math.sqrt(E * E + S * S);
|
|
4725
4717
|
r.set(0, b);
|
|
4726
4718
|
const O = (this._activePointers[0].clientX + this._activePointers[1].clientX) * 0.5, w = (this._activePointers[0].clientY + this._activePointers[1].clientY) * 0.5;
|
|
@@ -4746,21 +4738,21 @@ class ae extends ta {
|
|
|
4746
4738
|
}, m = () => {
|
|
4747
4739
|
if (!this._enabled || !this._dragNeedsUpdate)
|
|
4748
4740
|
return;
|
|
4749
|
-
this._dragNeedsUpdate = !1,
|
|
4741
|
+
this._dragNeedsUpdate = !1, Pt(this._activePointers, q);
|
|
4750
4742
|
const _ = this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, E = _ ? -_.deltaX : n.x - q.x, S = _ ? -_.deltaY : n.y - q.y;
|
|
4751
4743
|
if (n.copy(q), ((this._state & p.ROTATE) === p.ROTATE || (this._state & p.TOUCH_ROTATE) === p.TOUCH_ROTATE || (this._state & p.TOUCH_DOLLY_ROTATE) === p.TOUCH_DOLLY_ROTATE || (this._state & p.TOUCH_ZOOM_ROTATE) === p.TOUCH_ZOOM_ROTATE) && (this._rotateInternal(E, S), this._isUserControllingRotate = !0), (this._state & p.DOLLY) === p.DOLLY || (this._state & p.ZOOM) === p.ZOOM) {
|
|
4752
4744
|
const b = this.dollyToCursor ? (s.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, O = this.dollyToCursor ? (s.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0, w = this.dollyDragInverted ? -1 : 1;
|
|
4753
|
-
(this._state & p.DOLLY) === p.DOLLY ? (this._dollyInternal(w * S *
|
|
4745
|
+
(this._state & p.DOLLY) === p.DOLLY ? (this._dollyInternal(w * S * rt, b, O), this._isUserControllingDolly = !0) : (this._zoomInternal(w * S * rt, b, O), this._isUserControllingZoom = !0);
|
|
4754
4746
|
}
|
|
4755
4747
|
if ((this._state & p.TOUCH_DOLLY) === p.TOUCH_DOLLY || (this._state & p.TOUCH_ZOOM) === p.TOUCH_ZOOM || (this._state & p.TOUCH_DOLLY_TRUCK) === p.TOUCH_DOLLY_TRUCK || (this._state & p.TOUCH_ZOOM_TRUCK) === p.TOUCH_ZOOM_TRUCK || (this._state & p.TOUCH_DOLLY_SCREEN_PAN) === p.TOUCH_DOLLY_SCREEN_PAN || (this._state & p.TOUCH_ZOOM_SCREEN_PAN) === p.TOUCH_ZOOM_SCREEN_PAN || (this._state & p.TOUCH_DOLLY_OFFSET) === p.TOUCH_DOLLY_OFFSET || (this._state & p.TOUCH_ZOOM_OFFSET) === p.TOUCH_ZOOM_OFFSET || (this._state & p.TOUCH_DOLLY_ROTATE) === p.TOUCH_DOLLY_ROTATE || (this._state & p.TOUCH_ZOOM_ROTATE) === p.TOUCH_ZOOM_ROTATE) {
|
|
4756
4748
|
const b = q.x - this._activePointers[1].clientX, O = q.y - this._activePointers[1].clientY, w = Math.sqrt(b * b + O * O), D = r.y - w;
|
|
4757
4749
|
r.set(0, w);
|
|
4758
4750
|
const x = this.dollyToCursor ? (n.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, N = this.dollyToCursor ? (n.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
|
|
4759
|
-
(this._state & p.TOUCH_DOLLY) === p.TOUCH_DOLLY || (this._state & p.TOUCH_DOLLY_ROTATE) === p.TOUCH_DOLLY_ROTATE || (this._state & p.TOUCH_DOLLY_TRUCK) === p.TOUCH_DOLLY_TRUCK || (this._state & p.TOUCH_DOLLY_SCREEN_PAN) === p.TOUCH_DOLLY_SCREEN_PAN || (this._state & p.TOUCH_DOLLY_OFFSET) === p.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(D *
|
|
4751
|
+
(this._state & p.TOUCH_DOLLY) === p.TOUCH_DOLLY || (this._state & p.TOUCH_DOLLY_ROTATE) === p.TOUCH_DOLLY_ROTATE || (this._state & p.TOUCH_DOLLY_TRUCK) === p.TOUCH_DOLLY_TRUCK || (this._state & p.TOUCH_DOLLY_SCREEN_PAN) === p.TOUCH_DOLLY_SCREEN_PAN || (this._state & p.TOUCH_DOLLY_OFFSET) === p.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(D * rt, x, N), this._isUserControllingDolly = !0) : (this._zoomInternal(D * rt, x, N), this._isUserControllingZoom = !0);
|
|
4760
4752
|
}
|
|
4761
4753
|
((this._state & p.TRUCK) === p.TRUCK || (this._state & p.TOUCH_TRUCK) === p.TOUCH_TRUCK || (this._state & p.TOUCH_DOLLY_TRUCK) === p.TOUCH_DOLLY_TRUCK || (this._state & p.TOUCH_ZOOM_TRUCK) === p.TOUCH_ZOOM_TRUCK) && (this._truckInternal(E, S, !1, !1), this._isUserControllingTruck = !0), ((this._state & p.SCREEN_PAN) === p.SCREEN_PAN || (this._state & p.TOUCH_SCREEN_PAN) === p.TOUCH_SCREEN_PAN || (this._state & p.TOUCH_DOLLY_SCREEN_PAN) === p.TOUCH_DOLLY_SCREEN_PAN || (this._state & p.TOUCH_ZOOM_SCREEN_PAN) === p.TOUCH_ZOOM_SCREEN_PAN) && (this._truckInternal(E, S, !1, !0), this._isUserControllingTruck = !0), ((this._state & p.OFFSET) === p.OFFSET || (this._state & p.TOUCH_OFFSET) === p.TOUCH_OFFSET || (this._state & p.TOUCH_DOLLY_OFFSET) === p.TOUCH_DOLLY_OFFSET || (this._state & p.TOUCH_ZOOM_OFFSET) === p.TOUCH_ZOOM_OFFSET) && (this._truckInternal(E, S, !0, !1), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
|
|
4762
4754
|
}, y = () => {
|
|
4763
|
-
|
|
4755
|
+
Pt(this._activePointers, q), n.copy(q), this._dragNeedsUpdate = !1, (this._activePointers.length === 0 || this._activePointers.length === 1 && this._activePointers[0] === this._lockedPointer) && (this._isDragging = !1), this._activePointers.length === 0 && this._domElement && (this._domElement.ownerDocument.removeEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", c), this.dispatchEvent({ type: "controlend" }));
|
|
4764
4756
|
};
|
|
4765
4757
|
this.lockPointer = () => {
|
|
4766
4758
|
!this._enabled || !this._domElement || (this.cancel(), this._lockedPointer = {
|
|
@@ -5152,10 +5144,10 @@ class ae extends ta {
|
|
|
5152
5144
|
l.isEmpty() && (console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"), Promise.resolve());
|
|
5153
5145
|
const h = Di(this._sphericalEnd.theta, Pi), d = Di(this._sphericalEnd.phi, Pi);
|
|
5154
5146
|
c.push(this.rotateTo(h, d, t));
|
|
5155
|
-
const u = A.setFromSpherical(this._sphericalEnd).normalize(), m = Fi.setFromUnitVectors(u,
|
|
5156
|
-
y && m.multiply(
|
|
5147
|
+
const u = A.setFromSpherical(this._sphericalEnd).normalize(), m = Fi.setFromUnitVectors(u, Ut), y = k(Math.abs(u.y), 1);
|
|
5148
|
+
y && m.multiply(kt.setFromAxisAngle(at, h)), m.multiply(this._yAxisUpSpaceInverse);
|
|
5157
5149
|
const v = Ni.makeEmpty();
|
|
5158
|
-
U.copy(l.min).applyQuaternion(m), v.expandByPoint(U), U.copy(l.min).setX(l.max.x).applyQuaternion(m), v.expandByPoint(U), U.copy(l.min).setY(l.max.y).applyQuaternion(m), v.expandByPoint(U), U.copy(l.max).setZ(l.min.z).applyQuaternion(m), v.expandByPoint(U), U.copy(l.min).setZ(l.max.z).applyQuaternion(m), v.expandByPoint(U), U.copy(l.max).setY(l.min.y).applyQuaternion(m), v.expandByPoint(U), U.copy(l.max).setX(l.min.x).applyQuaternion(m), v.expandByPoint(U), U.copy(l.max).applyQuaternion(m), v.expandByPoint(U), v.min.x -= n, v.min.y -= a, v.max.x += r, v.max.y += o, m.setFromUnitVectors(
|
|
5150
|
+
U.copy(l.min).applyQuaternion(m), v.expandByPoint(U), U.copy(l.min).setX(l.max.x).applyQuaternion(m), v.expandByPoint(U), U.copy(l.min).setY(l.max.y).applyQuaternion(m), v.expandByPoint(U), U.copy(l.max).setZ(l.min.z).applyQuaternion(m), v.expandByPoint(U), U.copy(l.min).setZ(l.max.z).applyQuaternion(m), v.expandByPoint(U), U.copy(l.max).setY(l.min.y).applyQuaternion(m), v.expandByPoint(U), U.copy(l.max).setX(l.min.x).applyQuaternion(m), v.expandByPoint(U), U.copy(l.max).applyQuaternion(m), v.expandByPoint(U), v.min.x -= n, v.min.y -= a, v.max.x += r, v.max.y += o, m.setFromUnitVectors(Ut, u), y && m.premultiply(kt.invert()), m.premultiply(this._yAxisUpSpace);
|
|
5159
5151
|
const C = v.getSize(A), g = v.getCenter(U).applyQuaternion(m);
|
|
5160
5152
|
if (ge(this._camera)) {
|
|
5161
5153
|
const _ = this.getDistanceToFitBox(C.x, C.y, C.z, s);
|
|
@@ -5173,7 +5165,7 @@ class ae extends ta {
|
|
|
5173
5165
|
* @category Methods
|
|
5174
5166
|
*/
|
|
5175
5167
|
fitToSphere(e, t) {
|
|
5176
|
-
const s = [], r = "isObject3D" in e ? ae.createBoundingSphere(e,
|
|
5168
|
+
const s = [], r = "isObject3D" in e ? ae.createBoundingSphere(e, Lt) : Lt.copy(e);
|
|
5177
5169
|
if (s.push(this.moveTo(r.center.x, r.center.y, r.center.z, t)), ge(this._camera)) {
|
|
5178
5170
|
const a = this.getDistanceToFitSphere(r.radius);
|
|
5179
5171
|
s.push(this.dollyTo(a, t));
|
|
@@ -5318,7 +5310,7 @@ class ae extends ta {
|
|
|
5318
5310
|
* @category Methods
|
|
5319
5311
|
*/
|
|
5320
5312
|
getDistanceToFitBox(e, t, s, n = !1) {
|
|
5321
|
-
if (
|
|
5313
|
+
if (Dt(this._camera, "getDistanceToFitBox"))
|
|
5322
5314
|
return this._spherical.radius;
|
|
5323
5315
|
const r = e / t, a = this._camera.getEffectiveFOV() * Fe, o = this._camera.aspect;
|
|
5324
5316
|
return ((n ? r > o : r < o) ? t : e / o) * 0.5 / Math.tan(a * 0.5) + s * 0.5;
|
|
@@ -5330,7 +5322,7 @@ class ae extends ta {
|
|
|
5330
5322
|
* @category Methods
|
|
5331
5323
|
*/
|
|
5332
5324
|
getDistanceToFitSphere(e) {
|
|
5333
|
-
if (
|
|
5325
|
+
if (Dt(this._camera, "getDistanceToFitSphere"))
|
|
5334
5326
|
return this._spherical.radius;
|
|
5335
5327
|
const t = this._camera.getEffectiveFOV() * Fe, s = Math.atan(Math.tan(t * 0.5) * this._camera.aspect) * 2, n = 1 < this._camera.aspect ? t : s;
|
|
5336
5328
|
return e / Math.sin(n * 0.5);
|
|
@@ -5415,7 +5407,7 @@ class ae extends ta {
|
|
|
5415
5407
|
* @category Methods
|
|
5416
5408
|
*/
|
|
5417
5409
|
updateCameraUp() {
|
|
5418
|
-
this._yAxisUpSpace.setFromUnitVectors(this._camera.up,
|
|
5410
|
+
this._yAxisUpSpace.setFromUnitVectors(this._camera.up, at), this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert();
|
|
5419
5411
|
}
|
|
5420
5412
|
/**
|
|
5421
5413
|
* Apply current camera-up direction to the camera.
|
|
@@ -5441,19 +5433,19 @@ class ae extends ta {
|
|
|
5441
5433
|
this._thetaVelocity.value = 0, this._spherical.theta = this._sphericalEnd.theta;
|
|
5442
5434
|
else {
|
|
5443
5435
|
const d = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
|
|
5444
|
-
this._spherical.theta =
|
|
5436
|
+
this._spherical.theta = nt(this._spherical.theta, this._sphericalEnd.theta, this._thetaVelocity, d, 1 / 0, e), this._needsUpdate = !0;
|
|
5445
5437
|
}
|
|
5446
5438
|
if (F(s))
|
|
5447
5439
|
this._phiVelocity.value = 0, this._spherical.phi = this._sphericalEnd.phi;
|
|
5448
5440
|
else {
|
|
5449
5441
|
const d = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
|
|
5450
|
-
this._spherical.phi =
|
|
5442
|
+
this._spherical.phi = nt(this._spherical.phi, this._sphericalEnd.phi, this._phiVelocity, d, 1 / 0, e), this._needsUpdate = !0;
|
|
5451
5443
|
}
|
|
5452
5444
|
if (F(n))
|
|
5453
5445
|
this._radiusVelocity.value = 0, this._spherical.radius = this._sphericalEnd.radius;
|
|
5454
5446
|
else {
|
|
5455
5447
|
const d = this._isUserControllingDolly ? this.draggingSmoothTime : this.smoothTime;
|
|
5456
|
-
this._spherical.radius =
|
|
5448
|
+
this._spherical.radius = nt(this._spherical.radius, this._sphericalEnd.radius, this._radiusVelocity, d, this.maxSpeed, e), this._needsUpdate = !0;
|
|
5457
5449
|
}
|
|
5458
5450
|
if (F(r.x) && F(r.y) && F(r.z))
|
|
5459
5451
|
this._targetVelocity.set(0, 0, 0), this._target.copy(this._targetEnd);
|
|
@@ -5471,7 +5463,7 @@ class ae extends ta {
|
|
|
5471
5463
|
this._zoomVelocity.value = 0, this._zoom = this._zoomEnd;
|
|
5472
5464
|
else {
|
|
5473
5465
|
const d = this._isUserControllingZoom ? this.draggingSmoothTime : this.smoothTime;
|
|
5474
|
-
this._zoom =
|
|
5466
|
+
this._zoom = nt(this._zoom, this._zoomEnd, this._zoomVelocity, d, 1 / 0, e);
|
|
5475
5467
|
}
|
|
5476
5468
|
if (this.dollyToCursor) {
|
|
5477
5469
|
if (ge(this._camera) && this._changedDolly !== 0) {
|
|
@@ -5608,16 +5600,16 @@ class ae extends ta {
|
|
|
5608
5600
|
// lateUpdate
|
|
5609
5601
|
_collisionTest() {
|
|
5610
5602
|
let e = 1 / 0;
|
|
5611
|
-
if (!(this.colliderMeshes.length >= 1) ||
|
|
5603
|
+
if (!(this.colliderMeshes.length >= 1) || Dt(this._camera, "_collisionTest"))
|
|
5612
5604
|
return e;
|
|
5613
5605
|
const s = this._getTargetDirection(Be);
|
|
5614
|
-
|
|
5606
|
+
Nt.lookAt(Ui, s, this._camera.up);
|
|
5615
5607
|
for (let n = 0; n < 4; n++) {
|
|
5616
5608
|
const r = U.copy(this._nearPlaneCorners[n]);
|
|
5617
|
-
r.applyMatrix4(
|
|
5609
|
+
r.applyMatrix4(Nt);
|
|
5618
5610
|
const a = De.addVectors(this._target, r);
|
|
5619
|
-
|
|
5620
|
-
const o =
|
|
5611
|
+
ot.set(a, s), ot.far = this._spherical.radius + 1;
|
|
5612
|
+
const o = ot.intersectObjects(this.colliderMeshes);
|
|
5621
5613
|
o.length !== 0 && o[0].distance < e && (e = o[0].distance);
|
|
5622
5614
|
}
|
|
5623
5615
|
return e;
|
|
@@ -5696,7 +5688,7 @@ class ae extends ta {
|
|
|
5696
5688
|
}), s.radius = Math.sqrt(r), s;
|
|
5697
5689
|
}
|
|
5698
5690
|
}
|
|
5699
|
-
const
|
|
5691
|
+
const mt = (i) => {
|
|
5700
5692
|
const [e, t] = L(i.options[i.index]), s = () => {
|
|
5701
5693
|
i.onToggle(!i.open);
|
|
5702
5694
|
}, n = (a) => {
|
|
@@ -5720,7 +5712,7 @@ const ft = (i) => {
|
|
|
5720
5712
|
} }),
|
|
5721
5713
|
/* @__PURE__ */ M("div", { className: "options", children: [
|
|
5722
5714
|
e.camera !== null && /* @__PURE__ */ f(
|
|
5723
|
-
|
|
5715
|
+
mt,
|
|
5724
5716
|
{
|
|
5725
5717
|
title: "Camera",
|
|
5726
5718
|
index: e.options.indexOf(e.camera.name),
|
|
@@ -5734,7 +5726,7 @@ const ft = (i) => {
|
|
|
5734
5726
|
}
|
|
5735
5727
|
),
|
|
5736
5728
|
/* @__PURE__ */ f(
|
|
5737
|
-
|
|
5729
|
+
mt,
|
|
5738
5730
|
{
|
|
5739
5731
|
title: "Mode",
|
|
5740
5732
|
index: s.indexOf(n),
|
|
@@ -5846,7 +5838,7 @@ class aa extends ns {
|
|
|
5846
5838
|
value: e?.divisions !== void 0 ? e?.divisions : 10
|
|
5847
5839
|
},
|
|
5848
5840
|
uColor: {
|
|
5849
|
-
value: e?.color !== void 0 ? e?.color : new
|
|
5841
|
+
value: e?.color !== void 0 ? e?.color : new Je(16777215)
|
|
5850
5842
|
},
|
|
5851
5843
|
uDistance: {
|
|
5852
5844
|
value: e?.distance !== void 0 ? e?.distance : 1e4
|
|
@@ -5920,24 +5912,24 @@ class la extends an {
|
|
|
5920
5912
|
uSubgridOpacity;
|
|
5921
5913
|
uGridOpacity;
|
|
5922
5914
|
constructor(e) {
|
|
5923
|
-
super(), this.name = "InfiniteGrid", this.side = on, this.transparent = !0, this.uScale = we(e?.scale ?? 0.1), this.uDivisions = we(e?.divisions ?? 10), this.uColor = we(e?.color ?? new
|
|
5915
|
+
super(), this.name = "InfiniteGrid", this.side = on, this.transparent = !0, this.uScale = we(e?.scale ?? 0.1), this.uDivisions = we(e?.divisions ?? 10), this.uColor = we(e?.color ?? new ht(16777215)), this.uDistance = we(e?.distance ?? 1e4), this.uSubgridOpacity = we(e?.subgridOpacity ?? 0.15), this.uGridOpacity = we(e?.gridOpacity ?? 0.25);
|
|
5924
5916
|
const { uScale: t, uDivisions: s, uColor: n, uDistance: r, uSubgridOpacity: a, uGridOpacity: o } = this, c = Dn("vec3", "vWorldPosition");
|
|
5925
|
-
this.positionNode =
|
|
5917
|
+
this.positionNode = Ot(() => {
|
|
5926
5918
|
const h = In.xzy.mul(r).add(
|
|
5927
|
-
Un(
|
|
5919
|
+
Un(tt.x, Z(0), tt.z)
|
|
5928
5920
|
);
|
|
5929
5921
|
return c.assign(h), h;
|
|
5930
5922
|
})();
|
|
5931
|
-
const l =
|
|
5932
|
-
const d = c.xz.div(h), u = Ln(d), m = mi(kn(d.sub(0.5)).sub(0.5)).div(u).div(2), y =
|
|
5933
|
-
return Z(1).sub(
|
|
5923
|
+
const l = Ot(([h]) => {
|
|
5924
|
+
const d = c.xz.div(h), u = Ln(d), m = mi(kn(d.sub(0.5)).sub(0.5)).div(u).div(2), y = wt(m.x, m.y);
|
|
5925
|
+
return Z(1).sub(wt(y, Z(1)));
|
|
5934
5926
|
});
|
|
5935
|
-
this.outputNode =
|
|
5936
|
-
const h = c, d = fi(Z(200), mi(
|
|
5927
|
+
this.outputNode = Ot(() => {
|
|
5928
|
+
const h = c, d = fi(Z(200), mi(tt.y.sub(h.y))), u = Z(Nn(tt, h)), m = gi(d).div(gi(s)), y = vi(s, Fn(m)), v = y.mul(s), C = v.mul(s), g = l(y.mul(t)), _ = l(v.mul(t)), E = l(C.mul(t)), S = d.sub(y).div(v.sub(y)), b = Z(0.3), O = fi(
|
|
5937
5929
|
S.sub(Z(1)).add(b),
|
|
5938
5930
|
Z(0)
|
|
5939
5931
|
).div(b), w = g.mul(
|
|
5940
|
-
vi(Z(1).sub(
|
|
5932
|
+
vi(Z(1).sub(wt(u.div(r), Z(1))), Z(3))
|
|
5941
5933
|
), D = Z(0.5), x = w.sub(O).mul(a), N = _i(
|
|
5942
5934
|
x,
|
|
5943
5935
|
w.mul(o).sub(
|
|
@@ -5970,7 +5962,7 @@ class la extends an {
|
|
|
5970
5962
|
this.uSubgridOpacity.value = e;
|
|
5971
5963
|
}
|
|
5972
5964
|
}
|
|
5973
|
-
class ca extends
|
|
5965
|
+
class ca extends dt {
|
|
5974
5966
|
gridMaterial;
|
|
5975
5967
|
constructor(e) {
|
|
5976
5968
|
const t = new la(e);
|
|
@@ -5996,7 +5988,7 @@ class ca extends ut {
|
|
|
5996
5988
|
this.gridMaterial.subgridOpacity = e;
|
|
5997
5989
|
}
|
|
5998
5990
|
}
|
|
5999
|
-
function
|
|
5991
|
+
function Ft(i) {
|
|
6000
5992
|
const [e, t] = L(i.selected), s = "toggle" + (e ? " selected" : "");
|
|
6001
5993
|
return /* @__PURE__ */ f(
|
|
6002
5994
|
"button",
|
|
@@ -6097,8 +6089,8 @@ class $ extends Zi {
|
|
|
6097
6089
|
return $._instance || ($._instance = new $()), $._instance;
|
|
6098
6090
|
}
|
|
6099
6091
|
}
|
|
6100
|
-
const ua = new cn(),
|
|
6101
|
-
class
|
|
6092
|
+
const ua = new cn(), zt = new $e();
|
|
6093
|
+
class Ht extends ci {
|
|
6102
6094
|
curve = new hi();
|
|
6103
6095
|
line;
|
|
6104
6096
|
draggable;
|
|
@@ -6115,12 +6107,12 @@ class Bt extends ci {
|
|
|
6115
6107
|
_draggableScale = 10;
|
|
6116
6108
|
_transform;
|
|
6117
6109
|
raycaster;
|
|
6118
|
-
draggedMat = new
|
|
6110
|
+
draggedMat = new Gt();
|
|
6119
6111
|
parentGroup;
|
|
6120
6112
|
group;
|
|
6121
6113
|
constructor(e, t) {
|
|
6122
|
-
const s = new
|
|
6123
|
-
super(), this.name = e, this.lineMaterial = new hn({ color: s }), this.line = new dn(new di(), this.lineMaterial), this.line.name = "line", this.line.visible = !1, this.add(this.line), this._camera = t, this.curveType = "catmullrom", this.draggedMat.color = s, this.draggable = new ci(), this.draggable.name = "draggablePoints", this.add(this.draggable), this.curvePos = new
|
|
6114
|
+
const s = new ht(St(0.5, 1, Math.random()), St(0.5, 1, Math.random()), St(0.5, 1, Math.random()));
|
|
6115
|
+
super(), this.name = e, this.lineMaterial = new hn({ color: s }), this.line = new dn(new di(), this.lineMaterial), this.line.name = "line", this.line.visible = !1, this.add(this.line), this._camera = t, this.curveType = "catmullrom", this.draggedMat.color = s, this.draggable = new ci(), this.draggable.name = "draggablePoints", this.add(this.draggable), this.curvePos = new dt(new un(1.5), new Gt({ color: s })), this.curvePos.name = "curvePos", this.curvePos.scale.setScalar(this._draggableScale), this.curvePos.visible = !1, this.add(this.curvePos), this.raycaster = new $t(), this.raycaster.params.Line.threshold = 3, this.enable();
|
|
6124
6116
|
}
|
|
6125
6117
|
enable() {
|
|
6126
6118
|
document.addEventListener("pointerdown", this.onMouseClick);
|
|
@@ -6164,7 +6156,7 @@ class Bt extends ci {
|
|
|
6164
6156
|
}
|
|
6165
6157
|
};
|
|
6166
6158
|
addPoint = (e, t = !0) => {
|
|
6167
|
-
const s = this.draggable.children.length, n = new
|
|
6159
|
+
const s = this.draggable.children.length, n = new dt(ua, this.draggedMat);
|
|
6168
6160
|
n.name = `point_${s}`, n.position.copy(e), n.scale.setScalar(this._draggableScale), this.draggable.add(n), this._transform?.attach(n);
|
|
6169
6161
|
const r = this.points.length > 1;
|
|
6170
6162
|
return r && t && this.updateSpline(), this.line.visible = r, this.updateCurrentPoint(), n;
|
|
@@ -6202,7 +6194,7 @@ class Bt extends ci {
|
|
|
6202
6194
|
onMouseClick = (e) => {
|
|
6203
6195
|
if (!G.instance || !G.instance.currentWindow || this._transform && !this._transform.getHelper().visible) return;
|
|
6204
6196
|
const s = G.instance.currentWindow.current.getBoundingClientRect();
|
|
6205
|
-
|
|
6197
|
+
zt.x = (e.clientX - s.x) / s.width * 2 - 1, zt.y = -((e.clientY - s.y) / s.height) * 2 + 1, this.raycaster.setFromCamera(zt, this.camera);
|
|
6206
6198
|
const n = this.raycaster.intersectObjects(this.draggable.children, !1);
|
|
6207
6199
|
if (n.length > 0) {
|
|
6208
6200
|
const r = n[0].object;
|
|
@@ -6435,7 +6427,7 @@ class Bt extends ci {
|
|
|
6435
6427
|
e.name, e.visible = this.draggable.visible;
|
|
6436
6428
|
};
|
|
6437
6429
|
}
|
|
6438
|
-
let
|
|
6430
|
+
let lt = 0;
|
|
6439
6431
|
class pa extends Gs {
|
|
6440
6432
|
defaultScale = 10;
|
|
6441
6433
|
currentSpline = null;
|
|
@@ -6522,8 +6514,8 @@ class pa extends Gs {
|
|
|
6522
6514
|
e.draggableScale = this.defaultScale, e.hideTransform(), this.group?.current !== null && e.initDebug(this.group.current, t), this.add(e), this.currentSpline = e;
|
|
6523
6515
|
}
|
|
6524
6516
|
createSpline = (e = []) => {
|
|
6525
|
-
const t = `Spline ${
|
|
6526
|
-
return s.addPoints(e), this.addSpline(s, !0),
|
|
6517
|
+
const t = `Spline ${lt + 1}`, s = new Ht(t, this._camera);
|
|
6518
|
+
return s.addPoints(e), this.addSpline(s, !0), lt++, s;
|
|
6527
6519
|
};
|
|
6528
6520
|
createSplineFromArray = (e) => {
|
|
6529
6521
|
const t = [];
|
|
@@ -6537,7 +6529,7 @@ class pa extends Gs {
|
|
|
6537
6529
|
e.points.forEach((n) => {
|
|
6538
6530
|
t.push(new Le(n[0], n[1], n[2]));
|
|
6539
6531
|
});
|
|
6540
|
-
const s = new
|
|
6532
|
+
const s = new Ht(e.name, this._camera);
|
|
6541
6533
|
return s.closed = e.closed, s.subdivide = e.subdivide, s.tension = e.tension, s.type = e.type, s.addPoints(t), s.updateSpline(), this.addSpline(s, !1), s;
|
|
6542
6534
|
};
|
|
6543
6535
|
showPoints = (e = !0) => {
|
|
@@ -6546,12 +6538,12 @@ class pa extends Gs {
|
|
|
6546
6538
|
});
|
|
6547
6539
|
};
|
|
6548
6540
|
onAddSpline = (e) => {
|
|
6549
|
-
const t = JSON.parse(e.value), s = t.name !== void 0 ? t.name : `Spline ${
|
|
6541
|
+
const t = JSON.parse(e.value), s = t.name !== void 0 ? t.name : `Spline ${lt + 1}`, n = new Ht(s, this.camera);
|
|
6550
6542
|
t.tension !== void 0 && (n.tension = t.tension), t.closed !== void 0 && (n.closed = t.closed), t.subdivide !== void 0 && (n.subdivide = t.subdivide), t.type !== void 0 && (n.curveType = t.type);
|
|
6551
6543
|
const r = [];
|
|
6552
6544
|
t.points.forEach((a) => {
|
|
6553
6545
|
r.push(new Le(a[0], a[1], a[2]));
|
|
6554
|
-
}), n.addPoints(r), this.addSpline(n, !1),
|
|
6546
|
+
}), n.addPoints(r), this.addSpline(n, !1), lt++;
|
|
6555
6547
|
};
|
|
6556
6548
|
isMouseDown = !1;
|
|
6557
6549
|
enableClickToDraw() {
|
|
@@ -6626,7 +6618,7 @@ const zi = [
|
|
|
6626
6618
|
"Stacked",
|
|
6627
6619
|
"Quad"
|
|
6628
6620
|
], ma = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC60lEQVRYhe2YT4hNcRTHP48xpmYaNAvRyEQxEhnKQljYsRm9/EmSyJiMFAsMZWNhJYoNIUVJ2VGiyb9ZzIpMpkQSahbGv9GMYWrM+1rc2zjvzvvdd+99rzdvMd+6de75nd+5387vnN/v/G5KEuWMKRNNIB8mCRaKiiL5qQb2ApuBuUAV0Ad0AJeB3sSeJRX6LJbULTf6JTUn9Z+KWMUpPyp/Avoa4CNQZ3Sj/lNpdL/xottR7AjOkHRUUpekN5I6JbVLavDH75lIfZN0UFKTpCWS0pJem/HeJBEMG6yV1ONYtgFJbZJ+GF1jDh+zJb03NuliEuwMkMo4yErS2RA/LcbuYVyCrm1mA7Dal/8Cu4FG4JD/HsTTkCy6a+SVMTPQuc1sBKb78nHghi+/A+YBxwL2lbhRY+ThuARdEVxu5JdGFvACr0otdoZ8Y4+Rn0Sn5sFFsMvI6YB9MzA1YJ8mN8k1wAHzfj4uQVdyrpI0aJL7oqTtkq4FiqPLyCOSbktqlbRL0jlJQ2b8QdwCUZ4qvhRStZL0XFK1pMd57CRvq5mfhKBriRfiFUMY6oD7eOdwPlQAN4G10dfWg+uouwXsiOssAj4AC+JMcEWwvnAuOTEr7gTXPmg34zagOwkbIIOXAo9CbDYBrcBXYN+4UUdy2sRflyS5zVNlfPX7ugpJW5V9nI7mmh+lYU0lCZ2B3TOnAVuAk0BTwC5nuhWro46KauBOQJch5OpRaoIW34GreGf+YZdRqS9NAj4Bp4ClQDvwOWxCqSM4ADQEdKE5XvbXzlITrAVe4TW+M6NMKDXBFLAMuAD0ACfIc7pMZBXXA2cY3/xmodQRHAL2A2+NLtj8ZiEKwUL/z2WMPAJcAVYALWSf8dZuDFGWeBHwKxm3sWYhiGG8Tfo6sA2vSfiSy4GrH3wGrDcfKSSKKf6v1E9yF0XK9Q1XBPuMXMw8HXTonQFwETwNzMFr64v1jzgFHIk9ybHEZYPJo65QlD3Bf2/Q/eaHPiSWAAAAAElFTkSuQmCC", fa = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAETklEQVRYhe2YXYhVVRTHf3d0/JhyUrMpFbImM+whSa3Mynww+4AeIgiKoozooQ+KyMyXIAujF6OXqHyI6iEKKYgIP/owsjSFqCkprdDUTEcjbWZ0HHV+Pex1ucfb9Z57Z9REXHA4Z++99l7/s/ZZ/7X2KaiczNLwfwPIk9MA+yunNMAG4DHgV+BvoB3YFff2TPstYEyfrajVroI6Sr1GvahsbJC63HzZq04pmztSvU5tVRuqYRiYg78JeBR4HPg5ntdmxovz9wJfA3uAxuibDLQCA+IqynnAQuBuYCnwMLC1rx48U12U8cZqdWqMDcx4cI16qTpYbVKHqa+ovWUeHKsujn7VL9ULq2HI+wY7gVeBJdGeFu3J4ZUiy/cAXeHRRuAQsC/GC0B3eG4BcH/0tUV7czUAeVsMsBF4Kha9HZgCvAncAuwPnXHA0wFuGLANuDrGuoGDwFxgTqzzQ7RX5FrP2eLsdb76vnogtme6+nE8H1YPlQXHwbi3q9eqn0e7Tb25VrsF68vFY0lb1AGcDTwItGQ8tQM4AIwGmqP/EPAu8A0wElgJfFGzxTo8mKWXu9Rd4ZF96jvqjSbauEC9Sn1O3R463epLaku99voCsFXdkAH3kNpcQW+IiT/bQne3eufxBtioPqP2mKhioXpWzpxb1T8C5Ifh4ZptVoriRmAIKdrI3Lujf3bobAPeJpF0NVkKrAFuI9HTOBIxnxFrF4OgQKKr/dnJlQA+AcwABgOHA4zAamA5cE7orQL+zAEHiWI+A2bFC7aSguheYCgpqAphZz3wSB7AecCICv2TgH8oFRib4gVqka0k0h8CXAxMBW6ooDejFoCvA9OBQUAvKWM0kDz4XUZvNKXtyZMWUl7vBbaQXq457PeEziDgx/KJlQAuIPFdMcEXv5OdYWBP9M8k8VpnDQCvB4aTSrCNJB5cSdrW3tBpIJVnR0qdUTxAfdGUOVTnmwqEanNmqltC/9OgqePKg5eom8PgdvW+oJ9Kupera0O3U50TL3lcAaI+oHaF4R3qa6Z822wq0Saq89T1lmSxOrxeW/Xm4uGkiqQDmECKuKHxHW0HdpMiewSpvGqKeR8Ay0iBsYIjg6261PE2o9Q3Yqv+MqWxO9R1Hl12qs+q49Vlppy82pSr+5xJKsko4AXgHlJ0t5NIeg3wLXAlqZhtIUV8J6nmWwX8QiLjdhL5TwMWkY4R6/rrwYKlMr1Y321QZ/vfwBijPqm+rF4Wc7PjE9QllurGVeoV5gRNHsAm9fnMom3qrKPoTjKdMXaYyrFygEWQ72XWW24qhPu8xcUc2UU6O8wFPjmK7jhgPHAuMJGUGQ6U6WwE5sfzTXGvei7KA9hFOiR9D/wOfFVFt4dS2tpfRe83Ur7/CPiJakfOGgBCypubatArl2r8VfOax/LfzABKtePAzHO/5FgC7KBEzB2kOrDfUm8mOeFySv9+OyFyGmB/5aQH+C9BVKmVCNuMZgAAAABJRU5ErkJggg==", ga = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAQ0lEQVQ4jWP8////fwYqAxYozUhFM/8zkaKYWIWkGEq0b0ZdSjQY5i79TyWagRGaTUdzFEEw6lLqGzqwLoVVJ1StpwA9sBwbUqAh5gAAAABJRU5ErkJggg==";
|
|
6629
|
-
class G extends
|
|
6621
|
+
class G extends Xe {
|
|
6630
6622
|
static instance = null;
|
|
6631
6623
|
scene;
|
|
6632
6624
|
renderer;
|
|
@@ -6649,7 +6641,7 @@ class G extends Qe {
|
|
|
6649
6641
|
depthMaterial;
|
|
6650
6642
|
normalsMaterial;
|
|
6651
6643
|
uvMaterial;
|
|
6652
|
-
wireframeMaterial = new
|
|
6644
|
+
wireframeMaterial = new Gt({
|
|
6653
6645
|
opacity: 0.33,
|
|
6654
6646
|
transparent: !0,
|
|
6655
6647
|
wireframe: !0
|
|
@@ -6678,7 +6670,7 @@ class G extends Qe {
|
|
|
6678
6670
|
cameraControlsStartTime = 0;
|
|
6679
6671
|
cameraControlsLastTime = 0;
|
|
6680
6672
|
debugCamera;
|
|
6681
|
-
raycaster = new
|
|
6673
|
+
raycaster = new $t();
|
|
6682
6674
|
pointer = new $e();
|
|
6683
6675
|
cameraControls = void 0;
|
|
6684
6676
|
// References
|
|
@@ -6719,7 +6711,7 @@ class G extends Qe {
|
|
|
6719
6711
|
Spherical: _n,
|
|
6720
6712
|
Box3: vn,
|
|
6721
6713
|
Sphere: gn,
|
|
6722
|
-
Raycaster:
|
|
6714
|
+
Raycaster: $t
|
|
6723
6715
|
};
|
|
6724
6716
|
ae.install({ THREE: r }), this.setupScene(), this.setupTools();
|
|
6725
6717
|
const a = localStorage.getItem(this.expandedCameraVisibility);
|
|
@@ -6871,7 +6863,7 @@ class G extends Qe {
|
|
|
6871
6863
|
] }),
|
|
6872
6864
|
/* @__PURE__ */ M("div", { className: "settings", children: [
|
|
6873
6865
|
/* @__PURE__ */ f(
|
|
6874
|
-
|
|
6866
|
+
mt,
|
|
6875
6867
|
{
|
|
6876
6868
|
title: "View",
|
|
6877
6869
|
index: zi.indexOf(this.state.mode),
|
|
@@ -6890,7 +6882,7 @@ class G extends Qe {
|
|
|
6890
6882
|
}
|
|
6891
6883
|
),
|
|
6892
6884
|
/* @__PURE__ */ f(
|
|
6893
|
-
|
|
6885
|
+
mt,
|
|
6894
6886
|
{
|
|
6895
6887
|
title: "Interact",
|
|
6896
6888
|
index: this.state.interactionMode === "Orbit" ? 0 : 1,
|
|
@@ -6912,7 +6904,7 @@ class G extends Qe {
|
|
|
6912
6904
|
}
|
|
6913
6905
|
),
|
|
6914
6906
|
/* @__PURE__ */ f(
|
|
6915
|
-
|
|
6907
|
+
Ft,
|
|
6916
6908
|
{
|
|
6917
6909
|
name: "cameraHelper",
|
|
6918
6910
|
icon: ma,
|
|
@@ -6930,7 +6922,7 @@ class G extends Qe {
|
|
|
6930
6922
|
}
|
|
6931
6923
|
),
|
|
6932
6924
|
/* @__PURE__ */ f(
|
|
6933
|
-
|
|
6925
|
+
Ft,
|
|
6934
6926
|
{
|
|
6935
6927
|
name: "lightHelper",
|
|
6936
6928
|
icon: fa,
|
|
@@ -6948,7 +6940,7 @@ class G extends Qe {
|
|
|
6948
6940
|
}
|
|
6949
6941
|
),
|
|
6950
6942
|
/* @__PURE__ */ f(
|
|
6951
|
-
|
|
6943
|
+
Ft,
|
|
6952
6944
|
{
|
|
6953
6945
|
name: "gridHelper",
|
|
6954
6946
|
icon: ga,
|
|
@@ -6967,12 +6959,16 @@ class G extends Qe {
|
|
|
6967
6959
|
setupRenderer = (e) => {
|
|
6968
6960
|
const t = e.value;
|
|
6969
6961
|
if (this.renderer) {
|
|
6970
|
-
if (this.renderer instanceof
|
|
6962
|
+
if (this.renderer instanceof ai && t.type === "WebGLRenderer" || this.renderer instanceof Ge && t.type === "WebGPURenderer") return;
|
|
6971
6963
|
this.renderer.dispose();
|
|
6972
6964
|
}
|
|
6973
6965
|
this.rendererReady = !1;
|
|
6974
6966
|
const s = this.canvasRef.current;
|
|
6975
|
-
|
|
6967
|
+
if (s === null) {
|
|
6968
|
+
setTimeout(() => this.props.three.requestRenderer(), 100);
|
|
6969
|
+
return;
|
|
6970
|
+
}
|
|
6971
|
+
this.props.three.canvas = s, t.type === "WebGLRenderer" ? (this.renderer = new ai({
|
|
6976
6972
|
canvas: s,
|
|
6977
6973
|
stencil: !1
|
|
6978
6974
|
}), this.grid && (this.scene.remove(this.grid), ie(this.grid)), this.grid = new oa(), this.scene.add(this.grid), this.rendererReady = !0) : t.type === "WebGPURenderer" && (this.renderer = new Ge({
|
|
@@ -7253,7 +7249,7 @@ class G extends Qe {
|
|
|
7253
7249
|
if (e.ctrlKey) {
|
|
7254
7250
|
if (this.currentCamera.name === "UI") return;
|
|
7255
7251
|
const t = this.controls.get(this.currentCamera.name);
|
|
7256
|
-
e.key === "0" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ae(this.currentCamera, this.currentWindow.current), this.selectedItem instanceof
|
|
7252
|
+
e.key === "0" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ae(this.currentCamera, this.currentWindow.current), this.selectedItem instanceof dt || this.selectedItem instanceof On ? (this.selectedItem.geometry.computeBoundingBox(), this.cameraControls.fitToBox(this.selectedItem.geometry.boundingBox, !0)) : this.cameraControls.fitToSphere(this.selectedItem, !0), this.updateCameraControls(t, !0)) : e.key === "1" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ae(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(0, Math.PI * 0.5, !0), this.cameraControls.moveTo(this.selectedItem.position.x, this.selectedItem.position.y, 0, !0), this.updateCameraControls(t)) : e.key === "2" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ae(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(0, 0, !0), this.cameraControls.moveTo(this.selectedItem.position.x, 0, this.selectedItem.position.z, !0), this.updateCameraControls(t)) : e.key === "3" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ae(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(Math.PI / 2, Math.PI / 2, !0), this.cameraControls.moveTo(0, this.selectedItem.position.y, this.selectedItem.position.z, !0), this.updateCameraControls(t)) : e.key === "4" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ae(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(Math.PI, Math.PI / 2, !0), this.cameraControls.moveTo(this.selectedItem.position.x, this.selectedItem.position.y, 0, !0), this.updateCameraControls(t)) : e.key === "5" && (e.preventDefault(), this.clearControls(), this.cameraControls = new ae(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(Wt(45), Wt(45), !0), this.updateCameraControls(t));
|
|
7257
7253
|
} else if (this.currentTransform !== void 0)
|
|
7258
7254
|
switch (e.key) {
|
|
7259
7255
|
case "r":
|
|
@@ -7299,7 +7295,7 @@ class G extends Qe {
|
|
|
7299
7295
|
x: this.selectedItem.rotation.x,
|
|
7300
7296
|
y: this.selectedItem.rotation.y,
|
|
7301
7297
|
z: this.selectedItem.rotation.z
|
|
7302
|
-
}), this.props.three.updateObject(this.selectedItem.uuid, "scale", this.selectedItem.scale),
|
|
7298
|
+
}), this.props.three.updateObject(this.selectedItem.uuid, "scale", this.selectedItem.scale), Ct.instance.update());
|
|
7303
7299
|
};
|
|
7304
7300
|
// Utils
|
|
7305
7301
|
clearLightHelpers = () => {
|
|
@@ -7398,7 +7394,7 @@ class G extends Qe {
|
|
|
7398
7394
|
this.cameraControlsStartTime = performance.now(), this.cameraControlsLastTime = this.cameraControlsStartTime, this.selectedItem.getWorldPosition(e.target0);
|
|
7399
7395
|
const n = () => {
|
|
7400
7396
|
const r = performance.now(), a = (r - this.cameraControlsLastTime) / 1e3;
|
|
7401
|
-
this.cameraControlsLastTime = r, this.cameraControls && this.cameraControls.update(a), t && (e.target.lerp(e.target0, s), e.object.position.lerp(e.position0, s), e.object.zoom =
|
|
7397
|
+
this.cameraControlsLastTime = r, this.cameraControls && this.cameraControls.update(a), t && (e.target.lerp(e.target0, s), e.object.position.lerp(e.position0, s), e.object.zoom = Ke(e.object.zoom, e.zoom0, s), e.object.updateProjectionMatrix(), e.dispatchEvent({ type: "change" })), (r - this.cameraControlsStartTime) / 1e3 >= 0.5 ? (cancelAnimationFrame(this.cameraControlsRafID), this.cameraControlsRafID = -1, this.clearControls()) : this.cameraControlsRafID = requestAnimationFrame(n);
|
|
7402
7398
|
};
|
|
7403
7399
|
n();
|
|
7404
7400
|
};
|
|
@@ -7481,7 +7477,7 @@ class G extends Qe {
|
|
|
7481
7477
|
return `${this.appID}_multiviewGridVisibility`;
|
|
7482
7478
|
}
|
|
7483
7479
|
}
|
|
7484
|
-
class
|
|
7480
|
+
class Ct extends Xe {
|
|
7485
7481
|
static instance;
|
|
7486
7482
|
matrix = new Wi();
|
|
7487
7483
|
position = new Le();
|
|
@@ -7494,7 +7490,7 @@ class bt extends Qe {
|
|
|
7494
7490
|
this.open = s, this.saveExpanded(), this.state = {
|
|
7495
7491
|
lastUpdated: 0,
|
|
7496
7492
|
expanded: s
|
|
7497
|
-
}, this.matrix.elements = e.object.matrix, e.object.uuid.length > 0 && (this.position.setFromMatrixPosition(this.matrix), this.rotation.setFromRotationMatrix(this.matrix), this.scale.setFromMatrixScale(this.matrix)),
|
|
7493
|
+
}, this.matrix.elements = e.object.matrix, e.object.uuid.length > 0 && (this.position.setFromMatrixPosition(this.matrix), this.rotation.setFromRotationMatrix(this.matrix), this.scale.setFromMatrixScale(this.matrix)), Ct.instance = this;
|
|
7498
7494
|
}
|
|
7499
7495
|
update() {
|
|
7500
7496
|
if (G.instance) {
|
|
@@ -7605,7 +7601,7 @@ function va(i, e) {
|
|
|
7605
7601
|
type: "color",
|
|
7606
7602
|
value: c,
|
|
7607
7603
|
onChange: (l, h) => {
|
|
7608
|
-
const d = new
|
|
7604
|
+
const d = new Je(h);
|
|
7609
7605
|
e.updateObject(i.uuid, l, d);
|
|
7610
7606
|
const u = e.getScene(i.uuid);
|
|
7611
7607
|
if (u !== null) {
|
|
@@ -7732,7 +7728,7 @@ function _a(i) {
|
|
|
7732
7728
|
}
|
|
7733
7729
|
);
|
|
7734
7730
|
}
|
|
7735
|
-
const
|
|
7731
|
+
const Bt = {
|
|
7736
7732
|
name: "",
|
|
7737
7733
|
uuid: "",
|
|
7738
7734
|
type: "",
|
|
@@ -7746,13 +7742,13 @@ const Vt = {
|
|
|
7746
7742
|
children: []
|
|
7747
7743
|
};
|
|
7748
7744
|
function ya(i) {
|
|
7749
|
-
const [e, t] = L(
|
|
7745
|
+
const [e, t] = L(Bt);
|
|
7750
7746
|
pe(() => {
|
|
7751
7747
|
function a(c) {
|
|
7752
7748
|
t(c.value);
|
|
7753
7749
|
}
|
|
7754
7750
|
function o() {
|
|
7755
|
-
t(
|
|
7751
|
+
t(Bt);
|
|
7756
7752
|
}
|
|
7757
7753
|
return i.three.addEventListener(R.CLEAR_OBJECT, o), i.three.addEventListener(R.SET_SCENE, o), i.three.addEventListener(R.SET_OBJECT, a), () => {
|
|
7758
7754
|
i.three.removeEventListener(R.CLEAR_OBJECT, o), i.three.removeEventListener(R.SET_SCENE, o), i.three.removeEventListener(R.SET_OBJECT, a);
|
|
@@ -7760,17 +7756,17 @@ function ya(i) {
|
|
|
7760
7756
|
}, []);
|
|
7761
7757
|
const s = e.type.toLowerCase(), n = e.animations.length > 0 || e.mixer !== void 0, r = s.search("mesh") > -1 || s.search("line") > -1 || s.search("points") > -1;
|
|
7762
7758
|
return /* @__PURE__ */ f(
|
|
7763
|
-
|
|
7759
|
+
qe,
|
|
7764
7760
|
{
|
|
7765
7761
|
three: i.three,
|
|
7766
7762
|
label: "Inspector",
|
|
7767
7763
|
button: e.uuid.length > 0 ? /* @__PURE__ */ f("button", { className: "remove", onClick: () => {
|
|
7768
|
-
$.instance.remove(e.name), t(
|
|
7764
|
+
$.instance.remove(e.name), t(Bt);
|
|
7769
7765
|
} }) : void 0,
|
|
7770
7766
|
children: /* @__PURE__ */ f("div", { id: "Inspector", className: i.class, children: e.uuid.length > 0 && /* @__PURE__ */ M(Y, { children: [
|
|
7771
7767
|
/* @__PURE__ */ M(Y, { children: [
|
|
7772
7768
|
/* @__PURE__ */ f(
|
|
7773
|
-
|
|
7769
|
+
ct,
|
|
7774
7770
|
{
|
|
7775
7771
|
type: "string",
|
|
7776
7772
|
title: "Name",
|
|
@@ -7780,7 +7776,7 @@ function ya(i) {
|
|
|
7780
7776
|
}
|
|
7781
7777
|
),
|
|
7782
7778
|
/* @__PURE__ */ f(
|
|
7783
|
-
|
|
7779
|
+
ct,
|
|
7784
7780
|
{
|
|
7785
7781
|
type: "string",
|
|
7786
7782
|
title: "Type",
|
|
@@ -7790,7 +7786,7 @@ function ya(i) {
|
|
|
7790
7786
|
}
|
|
7791
7787
|
),
|
|
7792
7788
|
/* @__PURE__ */ f(
|
|
7793
|
-
|
|
7789
|
+
ct,
|
|
7794
7790
|
{
|
|
7795
7791
|
type: "string",
|
|
7796
7792
|
title: "UUID",
|
|
@@ -7801,7 +7797,7 @@ function ya(i) {
|
|
|
7801
7797
|
)
|
|
7802
7798
|
] }),
|
|
7803
7799
|
/* @__PURE__ */ M(Y, { children: [
|
|
7804
|
-
/* @__PURE__ */ f(
|
|
7800
|
+
/* @__PURE__ */ f(Ct, { object: e, three: i.three }),
|
|
7805
7801
|
n ? /* @__PURE__ */ f(_a, { object: e, three: i.three }) : null,
|
|
7806
7802
|
s.search("camera") > -1 ? ea(e, i.three) : null,
|
|
7807
7803
|
s.search("light") > -1 ? va(e, i.three) : null,
|
|
@@ -7812,15 +7808,11 @@ function ya(i) {
|
|
|
7812
7808
|
"Inspector"
|
|
7813
7809
|
);
|
|
7814
7810
|
}
|
|
7815
|
-
class Ca extends
|
|
7811
|
+
class Ca extends Xe {
|
|
7816
7812
|
// Renderer
|
|
7817
|
-
autoClear = !0;
|
|
7818
7813
|
autoClearColor = !0;
|
|
7819
|
-
autoClearDepth = !0;
|
|
7820
|
-
autoClearStencil = !0;
|
|
7821
7814
|
outputColorSpace = oi;
|
|
7822
|
-
|
|
7823
|
-
clearColor = new et(0);
|
|
7815
|
+
clearColor = new Je(0);
|
|
7824
7816
|
clearAlpha = 1;
|
|
7825
7817
|
toneMapping = li;
|
|
7826
7818
|
toneMappingExposure = 1;
|
|
@@ -7833,7 +7825,7 @@ class Ca extends Qe {
|
|
|
7833
7825
|
lastUpdated: Date.now()
|
|
7834
7826
|
}, this.saveExpanded(s), G.instance) {
|
|
7835
7827
|
const n = G.instance.renderer;
|
|
7836
|
-
n && (this.
|
|
7828
|
+
n && (this.autoClearColor = n.autoClearColor, this.clearAlpha = n.getClearAlpha(), this.toneMapping = n.toneMapping, this.toneMappingExposure = n.toneMappingExposure);
|
|
7837
7829
|
}
|
|
7838
7830
|
this.props.three.addEventListener(R.ADD_RENDERER, this.onAddRenderer);
|
|
7839
7831
|
}
|
|
@@ -7842,9 +7834,9 @@ class Ca extends Qe {
|
|
|
7842
7834
|
}
|
|
7843
7835
|
onAddRenderer = (e) => {
|
|
7844
7836
|
const t = e.value;
|
|
7845
|
-
if (this.
|
|
7837
|
+
if (this.autoClearColor = t.autoClearColor, this.outputColorSpace = t.outputColorSpace, this.clearAlpha = t.clearAlpha, this.type = t.type, this.toneMapping = t.toneMapping, this.toneMappingExposure = t.toneMappingExposure, this.clearColor.setStyle(t.clearColor, je), et.enabled = t.colorManagement, G.instance) {
|
|
7846
7838
|
const s = G.instance.renderer;
|
|
7847
|
-
s && (s.autoClearColor = this.autoClearColor, s.outputColorSpace = this.outputColorSpace, s
|
|
7839
|
+
s && (s.autoClearColor = this.autoClearColor, s.outputColorSpace = this.outputColorSpace, s.toneMapping = this.toneMapping, s.toneMappingExposure = this.toneMappingExposure, s.setClearColor(t.clearColor, this.clearAlpha));
|
|
7848
7840
|
}
|
|
7849
7841
|
this.setState({ lastUpdated: Date.now() });
|
|
7850
7842
|
};
|
|
@@ -7852,16 +7844,12 @@ class Ca extends Qe {
|
|
|
7852
7844
|
const e = () => {
|
|
7853
7845
|
if (G.instance) {
|
|
7854
7846
|
const t = G.instance.renderer;
|
|
7855
|
-
t && (t.autoClearColor = this.autoClearColor, t.outputColorSpace = this.outputColorSpace, t
|
|
7856
|
-
autoClear: this.autoClear,
|
|
7847
|
+
t && (t.autoClearColor = this.autoClearColor, t.outputColorSpace = this.outputColorSpace, t.toneMapping = this.toneMapping, t.toneMappingExposure = this.toneMappingExposure, t.setClearColor(this.clearColor.getStyle(), this.clearAlpha), this.props.three.updateRenderer({
|
|
7857
7848
|
autoClearColor: this.autoClearColor,
|
|
7858
|
-
autoClearDepth: this.autoClearDepth,
|
|
7859
|
-
autoClearStencil: this.autoClearStencil,
|
|
7860
7849
|
outputColorSpace: this.outputColorSpace,
|
|
7861
|
-
localClippingEnabled: this.localClippingEnabled,
|
|
7862
7850
|
clearAlpha: this.clearAlpha,
|
|
7863
7851
|
clearColor: this.clearColor.getStyle(),
|
|
7864
|
-
colorManagement:
|
|
7852
|
+
colorManagement: et.enabled,
|
|
7865
7853
|
toneMapping: this.toneMapping,
|
|
7866
7854
|
toneMappingExposure: this.toneMappingExposure
|
|
7867
7855
|
}));
|
|
@@ -7874,14 +7862,6 @@ class Ca extends Qe {
|
|
|
7874
7862
|
title: "Renderer",
|
|
7875
7863
|
expanded: this.state.expanded,
|
|
7876
7864
|
items: [
|
|
7877
|
-
{
|
|
7878
|
-
type: "boolean",
|
|
7879
|
-
title: "Auto Clear",
|
|
7880
|
-
value: this.autoClear,
|
|
7881
|
-
onChange: (t, s) => {
|
|
7882
|
-
this.autoClear = s;
|
|
7883
|
-
}
|
|
7884
|
-
},
|
|
7885
7865
|
{
|
|
7886
7866
|
type: "boolean",
|
|
7887
7867
|
title: "Auto Clear Color",
|
|
@@ -7890,30 +7870,6 @@ class Ca extends Qe {
|
|
|
7890
7870
|
this.autoClearColor = s, e();
|
|
7891
7871
|
}
|
|
7892
7872
|
},
|
|
7893
|
-
{
|
|
7894
|
-
type: "boolean",
|
|
7895
|
-
title: "Auto Clear Depth",
|
|
7896
|
-
value: this.autoClearDepth,
|
|
7897
|
-
onChange: (t, s) => {
|
|
7898
|
-
this.autoClearDepth = s, e();
|
|
7899
|
-
}
|
|
7900
|
-
},
|
|
7901
|
-
{
|
|
7902
|
-
type: "boolean",
|
|
7903
|
-
title: "Auto Clear Stencil",
|
|
7904
|
-
value: this.autoClearStencil,
|
|
7905
|
-
onChange: (t, s) => {
|
|
7906
|
-
this.autoClearStencil = s, e();
|
|
7907
|
-
}
|
|
7908
|
-
},
|
|
7909
|
-
{
|
|
7910
|
-
type: "boolean",
|
|
7911
|
-
title: "Local Clipping",
|
|
7912
|
-
value: this.localClippingEnabled,
|
|
7913
|
-
onChange: (t, s) => {
|
|
7914
|
-
this.localClippingEnabled = s, e();
|
|
7915
|
-
}
|
|
7916
|
-
},
|
|
7917
7873
|
{
|
|
7918
7874
|
type: "color",
|
|
7919
7875
|
title: "Clear Color",
|
|
@@ -7936,9 +7892,9 @@ class Ca extends Qe {
|
|
|
7936
7892
|
{
|
|
7937
7893
|
type: "boolean",
|
|
7938
7894
|
title: "Color Management",
|
|
7939
|
-
value:
|
|
7895
|
+
value: et.enabled,
|
|
7940
7896
|
onChange: (t, s) => {
|
|
7941
|
-
|
|
7897
|
+
et.enabled = s, e();
|
|
7942
7898
|
}
|
|
7943
7899
|
},
|
|
7944
7900
|
{
|
|
@@ -7956,7 +7912,7 @@ class Ca extends Qe {
|
|
|
7956
7912
|
},
|
|
7957
7913
|
{
|
|
7958
7914
|
title: "Linear SRB Color Space",
|
|
7959
|
-
value:
|
|
7915
|
+
value: je
|
|
7960
7916
|
}
|
|
7961
7917
|
],
|
|
7962
7918
|
onChange: (t, s) => {
|
|
@@ -8051,7 +8007,7 @@ function ba(i) {
|
|
|
8051
8007
|
if (h.uuid === e[d].uuid) return;
|
|
8052
8008
|
e.push(h), t.push(
|
|
8053
8009
|
/* @__PURE__ */ f(
|
|
8054
|
-
|
|
8010
|
+
qe,
|
|
8055
8011
|
{
|
|
8056
8012
|
three: i.three,
|
|
8057
8013
|
label: `Scene: ${h.name}`,
|
|
@@ -8061,7 +8017,7 @@ function ba(i) {
|
|
|
8061
8017
|
onRefresh: () => {
|
|
8062
8018
|
i.three.refreshScene(h.name);
|
|
8063
8019
|
},
|
|
8064
|
-
children: /* @__PURE__ */ f(
|
|
8020
|
+
children: /* @__PURE__ */ f(Rt, { child: h, scene: h, three: i.three })
|
|
8065
8021
|
},
|
|
8066
8022
|
h.name
|
|
8067
8023
|
)
|
|
@@ -8071,7 +8027,7 @@ function ba(i) {
|
|
|
8071
8027
|
for (let d = 0; d < e.length; d++)
|
|
8072
8028
|
if (h.uuid === e[d].uuid) {
|
|
8073
8029
|
e[d] = h, t[d] = /* @__PURE__ */ f(
|
|
8074
|
-
|
|
8030
|
+
qe,
|
|
8075
8031
|
{
|
|
8076
8032
|
three: i.three,
|
|
8077
8033
|
label: `Scene: ${h.name}`,
|
|
@@ -8081,7 +8037,7 @@ function ba(i) {
|
|
|
8081
8037
|
onRefresh: () => {
|
|
8082
8038
|
i.three.refreshScene(h.name);
|
|
8083
8039
|
},
|
|
8084
|
-
children: /* @__PURE__ */ f(
|
|
8040
|
+
children: /* @__PURE__ */ f(Rt, { child: h, scene: h, three: i.three })
|
|
8085
8041
|
},
|
|
8086
8042
|
h.name
|
|
8087
8043
|
), n(Date.now());
|
|
@@ -8099,7 +8055,7 @@ function ba(i) {
|
|
|
8099
8055
|
for (let d = 0; d < e.length; d++) {
|
|
8100
8056
|
const u = e[d], m = u.name === h;
|
|
8101
8057
|
t[d] = /* @__PURE__ */ f(
|
|
8102
|
-
|
|
8058
|
+
qe,
|
|
8103
8059
|
{
|
|
8104
8060
|
three: i.three,
|
|
8105
8061
|
label: `Scene: ${u.name}`,
|
|
@@ -8109,7 +8065,7 @@ function ba(i) {
|
|
|
8109
8065
|
onRefresh: () => {
|
|
8110
8066
|
i.three.refreshScene(u.name);
|
|
8111
8067
|
},
|
|
8112
|
-
children: /* @__PURE__ */ f(
|
|
8068
|
+
children: /* @__PURE__ */ f(Rt, { child: u, scene: u, three: i.three })
|
|
8113
8069
|
},
|
|
8114
8070
|
u.name
|
|
8115
8071
|
);
|
|
@@ -8222,11 +8178,11 @@ class yo extends ns {
|
|
|
8222
8178
|
}
|
|
8223
8179
|
}
|
|
8224
8180
|
export {
|
|
8225
|
-
|
|
8181
|
+
qe as Accordion,
|
|
8226
8182
|
mo as Application,
|
|
8227
8183
|
cs as BaseRemote,
|
|
8228
8184
|
us as ChildObject,
|
|
8229
|
-
|
|
8185
|
+
Rt as ContainerObject,
|
|
8230
8186
|
ha as DepthNodeMaterial,
|
|
8231
8187
|
Dr as Draggable,
|
|
8232
8188
|
Pr as DraggableItem,
|
|
@@ -8249,7 +8205,7 @@ export {
|
|
|
8249
8205
|
fo as RemoteTheatre,
|
|
8250
8206
|
go as RemoteThree,
|
|
8251
8207
|
ba as SidePanel,
|
|
8252
|
-
|
|
8208
|
+
Ht as Spline,
|
|
8253
8209
|
pa as SplineEditor,
|
|
8254
8210
|
vo as ThreeEditor,
|
|
8255
8211
|
$ as Transform,
|
|
@@ -8261,7 +8217,7 @@ export {
|
|
|
8261
8217
|
Za as animateObjectMaterial,
|
|
8262
8218
|
Ya as animateObjectTransform,
|
|
8263
8219
|
hr as applyObjectMaterial,
|
|
8264
|
-
|
|
8220
|
+
pt as capitalize,
|
|
8265
8221
|
ye as clamp,
|
|
8266
8222
|
lo as clearComposerGroups,
|
|
8267
8223
|
yi as colorToHex,
|
|
@@ -8286,14 +8242,14 @@ export {
|
|
|
8286
8242
|
ur as inspectComposerPass,
|
|
8287
8243
|
qn as isColor,
|
|
8288
8244
|
Fa as map,
|
|
8289
|
-
|
|
8290
|
-
|
|
8291
|
-
|
|
8245
|
+
Ke as mix,
|
|
8246
|
+
ut as noop,
|
|
8247
|
+
Yt as normalize,
|
|
8292
8248
|
qa as orthoCamera,
|
|
8293
8249
|
ja as parseModelLite,
|
|
8294
8250
|
W as randomID,
|
|
8295
8251
|
Ka as renderToTexture,
|
|
8296
|
-
|
|
8252
|
+
st as resetThreeObjects,
|
|
8297
8253
|
Ga as rgbaToHex,
|
|
8298
8254
|
te as roundTo,
|
|
8299
8255
|
no as setMaterialBlendAdd,
|
|
@@ -8301,8 +8257,8 @@ export {
|
|
|
8301
8257
|
so as setMaterialBlendNormal,
|
|
8302
8258
|
ao as setMaterialBlendScreen,
|
|
8303
8259
|
eo as supportsOffscreenCanvas,
|
|
8304
|
-
|
|
8305
|
-
|
|
8260
|
+
Zt as totalThreeObjects,
|
|
8261
|
+
Qt as triangle,
|
|
8306
8262
|
Qa as updateCameraOrtho,
|
|
8307
8263
|
Ja as updateCameraOrtho16x9,
|
|
8308
8264
|
io as useMask,
|