@tomorrowevening/hermes 0.1.34 → 0.1.36
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 +10 -10
- package/dist/hermes.css +1 -1
- package/dist/hermes.es.js +620 -624
- package/dist/index-BZ8rDFhT.css +1 -0
- package/dist/{index-BgT-wgDk.js → index-DYxTFcfw.js} +660 -692
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/types/core/Application.d.ts +1 -1
- package/types/core/remote/BaseRemote.d.ts +2 -4
- package/types/editor/HermesApp.d.ts +2 -4
- package/dist/index-s97l09lN.css +0 -1
package/dist/hermes.es.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { types as P, getProject as
|
|
2
|
-
import { useState as L, useEffect as pe, useRef as z, useMemo as Ze, Component as Qe, createRef as ue, forwardRef as
|
|
3
|
-
import { BufferGeometry as
|
|
4
|
-
import { Color as dt, ColorManagement as St, WebGPURenderer as Ge, RenderTarget as
|
|
5
|
-
import { jsx as f, jsxs as M, Fragment as
|
|
6
|
-
import { radToDeg as
|
|
7
|
-
import { RectAreaLightHelper as
|
|
8
|
-
import { OrbitControls as
|
|
9
|
-
import { uniform as we, varyingProperty as
|
|
10
|
-
import
|
|
11
|
-
import { remapClamp as
|
|
12
|
-
import { TransformControls as
|
|
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 Qe, createRef as ue, forwardRef as Bi } from "react";
|
|
3
|
+
import { BufferGeometry as Vi, Float32BufferAttribute as ke, OrthographicCamera as Gi, Texture as Gt, Scene as Ss, MeshBasicMaterial as Os, Mesh as $i, LinearSRGBColorSpace as Ke, ObjectLoader as ws, AnimationMixer as xs, AnimationClip as Ts, Matrix4 as Wi, AlwaysStencilFunc as si, ReplaceStencilOp as Ee, NotEqualStencilFunc as ni, EqualStencilFunc as ri, KeepStencilOp as Se, NormalBlending as Yi, AddEquation as Je, SrcAlphaFactor as gt, OneMinusSrcAlphaFactor as vt, CustomBlending as _t, OneFactor as yt, DstColorFactor as Xt, OneMinusDstColorFactor as Qt, WebGLRenderTarget as Ms, RGBAFormat as As, EventDispatcher as Zi, RepeatWrapping as ai, Color as et, 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 qe, Euler as Ys, SkeletonHelper as Zs, SRGBColorSpace as oi, NoToneMapping as li, ColorManagement as tt, 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 dt, ColorManagement as St, WebGPURenderer as Ge, RenderTarget as sn, WebGLRenderTarget as nn, ComputeNode as rn, NodeMaterial as an, DoubleSide as on, Mesh as ut, PlaneGeometry as ln, BoxGeometry as cn, Vector2 as $e, Object3D as ci, CatmullRomCurve3 as hi, MeshBasicMaterial as $t, LineBasicMaterial as hn, Line as dn, BufferGeometry as di, SphereGeometry as un, Raycaster as Wt, 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
|
+
import { jsx as f, jsxs as M, Fragment as q } from "react/jsx-runtime";
|
|
6
|
+
import { radToDeg as An, degToRad as Yt, lerp as Ot, mapLinear as Oe } from "three/src/math/MathUtils.js";
|
|
7
|
+
import { RectAreaLightHelper as Rn } from "three/examples/jsm/helpers/RectAreaLightHelper.js";
|
|
8
|
+
import { OrbitControls as Pn } from "three/examples/jsm/controls/OrbitControls.js";
|
|
9
|
+
import { uniform as we, varyingProperty as Dn, Fn as wt, positionLocal as In, vec3 as Un, cameraPosition as it, float as Y, fwidth as Ln, abs as mi, fract as kn, min as xt, 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
|
+
import rs from "three/src/materials/nodes/MeshBasicNodeMaterial.js";
|
|
11
|
+
import { remapClamp as Gn, linearDepth as $n, vec4 as as, uv as Wn } from "three/src/nodes/TSL.js";
|
|
12
|
+
import { TransformControls as Yn } from "three/examples/jsm/controls/TransformControls.js";
|
|
13
13
|
const pt = () => {
|
|
14
|
-
},
|
|
14
|
+
}, Na = () => {
|
|
15
15
|
};
|
|
16
16
|
function mt(i) {
|
|
17
17
|
return i.substring(0, 1).toUpperCase() + i.substring(1);
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Zn(i) {
|
|
20
20
|
const e = JSON.stringify(i);
|
|
21
21
|
return navigator.clipboard.writeText(e), e;
|
|
22
22
|
}
|
|
23
23
|
function W() {
|
|
24
24
|
return Math.round(Math.random() * 1e6).toString();
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function qn(i) {
|
|
27
27
|
return i.r !== void 0 && i.g !== void 0 && i.b !== void 0;
|
|
28
28
|
}
|
|
29
29
|
function yi(i) {
|
|
@@ -58,16 +58,16 @@ function Tt(i, e, t, s) {
|
|
|
58
58
|
c((s = s.apply(i, [])).next());
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
-
const
|
|
61
|
+
const jn = ["geforce 320m", "geforce 8600", "geforce 8600m gt", "geforce 8800 gs", "geforce 8800 gt", "geforce 9400", "geforce 9400m g", "geforce 9400m", "geforce 9600m gt", "geforce 9600m", "geforce fx go5200", "geforce gt 120", "geforce gt 130", "geforce gt 330m", "geforce gtx 285", "google swiftshader", "intel g41", "intel g45", "intel gma 4500mhd", "intel gma x3100", "intel hd 3000", "intel q45", "legacy", "mali-2", "mali-3", "mali-4", "quadro fx 1500", "quadro fx 4", "quadro fx 5", "radeon hd 2400", "radeon hd 2600", "radeon hd 4670", "radeon hd 4850", "radeon hd 4870", "radeon hd 5670", "radeon hd 5750", "radeon hd 6290", "radeon hd 6300", "radeon hd 6310", "radeon hd 6320", "radeon hd 6490m", "radeon hd 6630m", "radeon hd 6750m", "radeon hd 6770m", "radeon hd 6970m", "sgx 543", "sgx543"];
|
|
62
62
|
function Ci(i) {
|
|
63
63
|
return i = i.toLowerCase().replace(/.*angle ?\((.+)\)(?: on vulkan [0-9.]+)?$/i, "$1").replace(/\s(\d{1,2}gb|direct3d.+$)|\(r\)| \([^)]+\)$/g, "").replace(/(?:vulkan|opengl) \d+\.\d+(?:\.\d+)?(?: \((.*)\))?/, "$1");
|
|
64
64
|
}
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
65
|
+
const os = typeof window > "u", re = (() => {
|
|
66
|
+
if (os) return;
|
|
67
67
|
const { userAgent: i, platform: e, maxTouchPoints: t } = window.navigator, s = /(iphone|ipod|ipad)/i.test(i), n = e === "iPad" || e === "MacIntel" && t > 0 && !window.MSStream;
|
|
68
68
|
return { isIpad: n, isMobile: /android/i.test(i) || s || n, isSafari12: /Version\/12.+Safari/.test(i), isFirefox: /Firefox/.test(i) };
|
|
69
69
|
})();
|
|
70
|
-
function
|
|
70
|
+
function Kn(i, e, t) {
|
|
71
71
|
if (!t) return [e];
|
|
72
72
|
const s = function(l) {
|
|
73
73
|
const h = `
|
|
@@ -87,9 +87,9 @@ function qn(i, e, t) {
|
|
|
87
87
|
enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);
|
|
88
88
|
gl_FragColor = enc;
|
|
89
89
|
}
|
|
90
|
-
`, u = l.createShader(35633),
|
|
91
|
-
if (!(
|
|
92
|
-
l.shaderSource(u, h), l.shaderSource(
|
|
90
|
+
`, u = l.createShader(35633), m = l.createShader(35632), y = l.createProgram();
|
|
91
|
+
if (!(m && u && y)) return;
|
|
92
|
+
l.shaderSource(u, h), l.shaderSource(m, d), l.compileShader(u), l.compileShader(m), l.attachShader(y, u), l.attachShader(y, m), l.linkProgram(y), l.detachShader(y, u), l.detachShader(y, m), l.deleteShader(u), l.deleteShader(m), l.useProgram(y);
|
|
93
93
|
const v = l.createBuffer();
|
|
94
94
|
l.bindBuffer(34962, v), l.bufferData(34962, new Float32Array([-1, -1, 0, 3, -1, 0, -1, 3, 0]), 35044);
|
|
95
95
|
const C = l.getAttribLocation(y, "aPosition");
|
|
@@ -106,7 +106,7 @@ class bi extends Error {
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
const Mt = [], Ei = [];
|
|
109
|
-
function
|
|
109
|
+
function Xn(i, e) {
|
|
110
110
|
if (i === e) return 0;
|
|
111
111
|
const t = i;
|
|
112
112
|
i.length > e.length && (i = e, e = t);
|
|
@@ -120,12 +120,12 @@ function jn(i, e) {
|
|
|
120
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 = Mt[h], l = Mt[h] = o > l ? c > l ? l + 1 : c : c > o ? o + 1 : c;
|
|
121
121
|
return l;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function Qn(i) {
|
|
124
124
|
return i != null;
|
|
125
125
|
}
|
|
126
|
-
const
|
|
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" } = {}) => Tt(void 0, void 0, void 0, function* () {
|
|
127
127
|
const a = {};
|
|
128
|
-
if (
|
|
128
|
+
if (os) return { tier: 0, type: "SSR" };
|
|
129
129
|
const { isIpad: o = !!re?.isIpad, isMobile: c = !!re?.isMobile, screenSize: l = window.screen, loadBenchmarks: h = (b) => Tt(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");
|
|
@@ -133,8 +133,8 @@ const Xn = ({ mobileTiers: i = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
|
|
|
133
133
|
}) } = t;
|
|
134
134
|
let { renderer: d } = t;
|
|
135
135
|
const u = (b, O, w, D, x) => ({ device: x, fps: D, gpu: w, isMobile: c, tier: b, type: O });
|
|
136
|
-
let
|
|
137
|
-
if (d) d = Ci(d),
|
|
136
|
+
let m, y = "";
|
|
137
|
+
if (d) d = Ci(d), m = [d];
|
|
138
138
|
else {
|
|
139
139
|
const b = s || function(w, D = !1) {
|
|
140
140
|
const x = { alpha: !1, antialias: !1, depth: !1, failIfMajorPerformanceCaveat: D, powerPreference: "high-performance", stencil: !1 };
|
|
@@ -145,11 +145,11 @@ const Xn = ({ mobileTiers: i = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
|
|
|
145
145
|
if (!b) return u(0, "WEBGL_UNSUPPORTED");
|
|
146
146
|
const O = re?.isFirefox ? null : b.getExtension("WEBGL_debug_renderer_info");
|
|
147
147
|
if (d = O ? b.getParameter(O.UNMASKED_RENDERER_WEBGL) : b.getParameter(b.RENDERER), !d) return u(1, "FALLBACK");
|
|
148
|
-
y = d, d = Ci(d),
|
|
149
|
-
return D === "apple gpu" ?
|
|
148
|
+
y = d, d = Ci(d), m = function(w, D, x) {
|
|
149
|
+
return D === "apple gpu" ? Kn(w, D, x) : [D];
|
|
150
150
|
}(b, d, c);
|
|
151
151
|
}
|
|
152
|
-
const v = (yield Promise.all(
|
|
152
|
+
const v = (yield Promise.all(m.map(function(b) {
|
|
153
153
|
var O;
|
|
154
154
|
return Tt(this, void 0, void 0, function* () {
|
|
155
155
|
const w = ((B) => {
|
|
@@ -175,19 +175,19 @@ const Xn = ({ 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, [
|
|
179
|
-
const { devicePixelRatio: ti } = window,
|
|
180
|
-
for (const B of
|
|
181
|
-
const [j, le] = B,
|
|
178
|
+
let fe, [gs, , , , vs] = me > 1 ? oe.map((B) => [B, Xn(be, B[2])]).sort(([, B], [, j]) => B - j)[0][0] : oe[0], Et = Number.MAX_VALUE;
|
|
179
|
+
const { devicePixelRatio: ti } = window, _s = l.width * ti * l.height * ti;
|
|
180
|
+
for (const B of vs) {
|
|
181
|
+
const [j, le] = B, bs = j * le, ii = Math.abs(_s - bs);
|
|
182
182
|
ii < Et && (Et = ii, fe = B);
|
|
183
183
|
}
|
|
184
184
|
if (!fe) return;
|
|
185
|
-
const [, ,
|
|
186
|
-
return [Et,
|
|
185
|
+
const [, , ys, Cs] = fe;
|
|
186
|
+
return [Et, ys, gs, Cs];
|
|
187
187
|
});
|
|
188
|
-
}))).filter(
|
|
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) {
|
|
190
|
-
const b =
|
|
190
|
+
const b = jn.find((O) => d.includes(O));
|
|
191
191
|
return b ? u(0, "BLOCKLISTED", b) : u(1, "FALLBACK", `${d} (${y})`);
|
|
192
192
|
}
|
|
193
193
|
const [, C, g, _] = v[0];
|
|
@@ -197,7 +197,7 @@ const Xn = ({ mobileTiers: i = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
|
|
|
197
197
|
for (let b = 0; b < E.length; b++) C >= E[b] && (S = b);
|
|
198
198
|
return u(S, "BENCHMARK", g, C, _);
|
|
199
199
|
});
|
|
200
|
-
function
|
|
200
|
+
function er(i) {
|
|
201
201
|
let e = 0;
|
|
202
202
|
const t = performance.now();
|
|
203
203
|
function s() {
|
|
@@ -211,9 +211,9 @@ function Qn(i) {
|
|
|
211
211
|
}
|
|
212
212
|
requestAnimationFrame(s);
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function tr(i = !1, e = !1) {
|
|
215
215
|
return new Promise((t) => {
|
|
216
|
-
|
|
216
|
+
Jn().then((s) => {
|
|
217
217
|
let n = !1;
|
|
218
218
|
const r = document.createElement("canvas"), a = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
219
219
|
if (n = "transferControlToOffscreen" in r, a) {
|
|
@@ -232,13 +232,13 @@ function Jn(i = !1, e = !1) {
|
|
|
232
232
|
dev: i,
|
|
233
233
|
editor: e
|
|
234
234
|
};
|
|
235
|
-
s.tier === 3 ? o.quality = "High" : s.tier === 2 && (o.quality = "Medium"),
|
|
235
|
+
s.tier === 3 ? o.quality = "High" : s.tier === 2 && (o.quality = "Medium"), er((c) => {
|
|
236
236
|
o.fps = c, t(o);
|
|
237
237
|
});
|
|
238
238
|
});
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
|
-
const
|
|
241
|
+
const ir = (
|
|
242
242
|
/* js */
|
|
243
243
|
`
|
|
244
244
|
self.onmessage = async ({ data }) => {
|
|
@@ -254,7 +254,7 @@ self.onmessage = async ({ data }) => {
|
|
|
254
254
|
};
|
|
255
255
|
`
|
|
256
256
|
);
|
|
257
|
-
class
|
|
257
|
+
class Fa {
|
|
258
258
|
worker;
|
|
259
259
|
source;
|
|
260
260
|
/** Intermediate 2D canvas used for GPU→CPU readback. Works with WebGPU and WebGL. */
|
|
@@ -279,7 +279,7 @@ class ka {
|
|
|
279
279
|
}),
|
|
280
280
|
onError: t.onError ?? ((r) => console.error("[ImageSequenceCapturer]", r))
|
|
281
281
|
};
|
|
282
|
-
const s = new Blob([
|
|
282
|
+
const s = new Blob([ir], { type: "application/javascript" }), n = URL.createObjectURL(s);
|
|
283
283
|
this.worker = new Worker(n), URL.revokeObjectURL(n), this.worker.onmessage = ({ data: r }) => {
|
|
284
284
|
r.type === "encoded" && (this.frames.set(r.index, r.blob), this._pending--, this._encoded++, this.opts.onProgress(this._captured, this._encoded));
|
|
285
285
|
}, this.worker.onerror = (r) => this.opts.onError(new Error(r.message));
|
|
@@ -392,55 +392,55 @@ function Zt(i, e, t) {
|
|
|
392
392
|
function Xe(i, e, t) {
|
|
393
393
|
return i * (1 - t) + e * t;
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function za(i, e, t, s, n) {
|
|
396
396
|
return Xe(t, s, Zt(i, e, n));
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function Ha(i, e) {
|
|
399
399
|
const t = i - e;
|
|
400
400
|
return Math.sqrt(t * t);
|
|
401
401
|
}
|
|
402
|
-
function
|
|
402
|
+
function Ba(i, e, t, s) {
|
|
403
403
|
return Xe(i, e, 1 - Math.exp(-t * s));
|
|
404
404
|
}
|
|
405
405
|
function te(i, e = 1) {
|
|
406
406
|
return Number(i.toFixed(e));
|
|
407
407
|
}
|
|
408
|
-
function
|
|
408
|
+
function Va(i, e, t, s) {
|
|
409
409
|
return Math.atan2(s - e, t - i);
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function sr(i, e, t, s) {
|
|
412
412
|
return i === e && t === s;
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function nr(i, e, t, s) {
|
|
415
415
|
return 1 / (3 * e * i * i + 2 * t * i + s);
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function rr(i, e, t, s, n) {
|
|
418
418
|
return e * (i * i * i) + t * (i * i) + s * i + n;
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function ar(i, e, t, s, n) {
|
|
421
421
|
const r = i * i;
|
|
422
422
|
return e * (r * i) + t * r + s * i + n;
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function Ga(i, e, t, s, n) {
|
|
425
425
|
if (i <= 0) return 0;
|
|
426
426
|
if (i >= 1) return 1;
|
|
427
|
-
if (
|
|
428
|
-
const r = 0, a = 0, o = e, c = t, l = s, h = n, d = 1, u = 1,
|
|
427
|
+
if (sr(e, t, s, n)) return i;
|
|
428
|
+
const r = 0, a = 0, o = e, c = t, l = s, h = n, d = 1, u = 1, m = d - 3 * l + 3 * o - r, y = 3 * l - 6 * o + 3 * r, v = 3 * o - 3 * r, C = r, g = u - 3 * h + 3 * c - a, _ = 3 * h - 6 * c + 3 * a, E = 3 * c - 3 * a, S = a;
|
|
429
429
|
let b = i;
|
|
430
430
|
for (let O = 0; O < 5; O++) {
|
|
431
|
-
const w =
|
|
432
|
-
let D =
|
|
431
|
+
const w = rr(b, m, y, v, C);
|
|
432
|
+
let D = nr(b, m, y, v);
|
|
433
433
|
D === 1 / 0 && (D = i), b -= (w - i) * D, b = Math.min(Math.max(b, 0), 1);
|
|
434
434
|
}
|
|
435
|
-
return
|
|
435
|
+
return ar(b, g, _, E, S);
|
|
436
436
|
}
|
|
437
437
|
const st = (i) => Math.round(Math.min(1, Math.max(0, i)) * 255).toString(16).padStart(2, "0");
|
|
438
|
-
function
|
|
438
|
+
function $a({ r: i, g: e, b: t, a: s = 1 }) {
|
|
439
439
|
const n = `#${st(i)}${st(e)}${st(t)}`;
|
|
440
440
|
return s < 1 ? `${n}${st(s)}` : n;
|
|
441
441
|
}
|
|
442
442
|
let xe;
|
|
443
|
-
function
|
|
443
|
+
function Wa() {
|
|
444
444
|
const [i, e] = L(xe);
|
|
445
445
|
return pe(() => {
|
|
446
446
|
xe || import("@tomorrowevening/theatre-studio").then((t) => {
|
|
@@ -448,7 +448,7 @@ function Ga() {
|
|
|
448
448
|
});
|
|
449
449
|
}, []), i;
|
|
450
450
|
}
|
|
451
|
-
async function
|
|
451
|
+
async function Ya() {
|
|
452
452
|
for (; !document.getElementById("theatrejs-studio-root"); )
|
|
453
453
|
await new Promise((s) => setTimeout(s, 100));
|
|
454
454
|
const i = document.getElementById("theatrejs-studio-root");
|
|
@@ -469,7 +469,7 @@ async function $a() {
|
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function Za(i, e, t, s) {
|
|
473
473
|
s.sheetObject(i, e, {
|
|
474
474
|
transform: {
|
|
475
475
|
position: {
|
|
@@ -494,7 +494,7 @@ function Wa(i, e, t, s) {
|
|
|
494
494
|
t.position.copy(r.position), t.rotation.copy(r.rotation), t.scale.copy(r.scale), t.visible = r.visible;
|
|
495
495
|
});
|
|
496
496
|
}
|
|
497
|
-
const
|
|
497
|
+
const or = [
|
|
498
498
|
"allowOverride",
|
|
499
499
|
"alphaHash",
|
|
500
500
|
"alphaTest",
|
|
@@ -599,10 +599,10 @@ function Si(i) {
|
|
|
599
599
|
}
|
|
600
600
|
return "object";
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function lr(i) {
|
|
603
603
|
const e = [];
|
|
604
604
|
for (const s in i) {
|
|
605
|
-
const n =
|
|
605
|
+
const n = or.find((o) => o === s), r = s.indexOf("_") === 0 || s.indexOf("is") === 0;
|
|
606
606
|
if (!(n || r))
|
|
607
607
|
if (s === "uniforms") {
|
|
608
608
|
const o = i.uniforms;
|
|
@@ -627,7 +627,7 @@ function ar(i) {
|
|
|
627
627
|
(s) => s.type !== "array" && s.type !== "object" && s.type !== "texture"
|
|
628
628
|
);
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function cr(i) {
|
|
631
631
|
const e = {}, t = { nudgeMultiplier: 0.01 };
|
|
632
632
|
return i.forEach((s) => {
|
|
633
633
|
let n = s.value;
|
|
@@ -714,7 +714,7 @@ function or(i) {
|
|
|
714
714
|
e[s.name] = n;
|
|
715
715
|
}), e;
|
|
716
716
|
}
|
|
717
|
-
function
|
|
717
|
+
function hr(i, e, t) {
|
|
718
718
|
e.forEach((s) => {
|
|
719
719
|
if (i[s.name] !== void 0)
|
|
720
720
|
switch (s.type) {
|
|
@@ -735,25 +735,25 @@ function lr(i, e, t) {
|
|
|
735
735
|
}
|
|
736
736
|
});
|
|
737
737
|
}
|
|
738
|
-
function
|
|
738
|
+
function qa(i, e, t, s) {
|
|
739
739
|
if (!t.isMaterial) return;
|
|
740
|
-
const n =
|
|
740
|
+
const n = lr(t), r = cr(n);
|
|
741
741
|
s.sheetObject(i, e, {
|
|
742
742
|
material: r
|
|
743
743
|
}, (a) => {
|
|
744
|
-
|
|
744
|
+
hr(t, n, a);
|
|
745
745
|
});
|
|
746
746
|
}
|
|
747
|
-
const Jt = new
|
|
747
|
+
const Jt = new Vi();
|
|
748
748
|
Jt.setAttribute("position", new ke([-0.5, -0.5, 0, 1.5, -0.5, 0, -0.5, 1.5, 0], 3));
|
|
749
749
|
Jt.setAttribute("normal", new ke([0, 0, 1, 0, 0, 1], 3));
|
|
750
750
|
Jt.setAttribute("uv", new ke([0, 0, 2, 0, 0, 2], 2));
|
|
751
|
-
const
|
|
751
|
+
const ja = new Gi(-0.5, 0.5, 0.5, -0.5, 0, 100), Oi = (i) => {
|
|
752
752
|
i?.dispose();
|
|
753
|
-
},
|
|
753
|
+
}, ls = (i) => {
|
|
754
754
|
if (i)
|
|
755
755
|
if (Array.isArray(i))
|
|
756
|
-
i.forEach((e) =>
|
|
756
|
+
i.forEach((e) => ls(e));
|
|
757
757
|
else {
|
|
758
758
|
for (const e in i) {
|
|
759
759
|
const t = i[e];
|
|
@@ -776,7 +776,7 @@ const Za = new Bi(-0.5, 0.5, 0.5, -0.5, 0, 100), Oi = (i) => {
|
|
|
776
776
|
}
|
|
777
777
|
if (i.parent && i.parent.remove(i), i.isMesh) {
|
|
778
778
|
const e = i;
|
|
779
|
-
e.geometry?.dispose(),
|
|
779
|
+
e.geometry?.dispose(), ls(e.material);
|
|
780
780
|
}
|
|
781
781
|
i.dispose !== void 0 && i.dispose();
|
|
782
782
|
}
|
|
@@ -829,10 +829,10 @@ class ce {
|
|
|
829
829
|
}
|
|
830
830
|
static renderToCanvas(e) {
|
|
831
831
|
if (this.material === null) {
|
|
832
|
-
this.camera = new
|
|
833
|
-
const t = new
|
|
832
|
+
this.camera = new Gi(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new Ss(), this.material = new Os();
|
|
833
|
+
const t = new Vi();
|
|
834
834
|
t.setAttribute("position", new ke([-0.5, -0.5, 0, 1.5, -0.5, 0, -0.5, 1.5, 0], 3)), t.setAttribute("normal", new ke([0, 0, 1, 0, 0, 1], 3)), t.setAttribute("uv", new ke([0, 0, 2, 0, 0, 2], 2));
|
|
835
|
-
const s = new
|
|
835
|
+
const s = new $i(t, this.material);
|
|
836
836
|
this.scene.add(s);
|
|
837
837
|
}
|
|
838
838
|
if (e.isRenderTargetTexture)
|
|
@@ -844,13 +844,13 @@ class ce {
|
|
|
844
844
|
return this.renderer.domElement;
|
|
845
845
|
}
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function Ka(i) {
|
|
848
848
|
return new Promise((e) => {
|
|
849
|
-
const t = new
|
|
849
|
+
const t = new ws();
|
|
850
850
|
t.parseAsync(i.scene).then((s) => {
|
|
851
|
-
const n = new
|
|
851
|
+
const n = new xs(s);
|
|
852
852
|
if (i.animations.length > 0) {
|
|
853
|
-
const a = i.animations.map((c) =>
|
|
853
|
+
const a = i.animations.map((c) => Ts.parse(c));
|
|
854
854
|
n.clipAction(a[0]).play(), n.getRoot().animations = i.animations, n.getRoot().mixer = n;
|
|
855
855
|
}
|
|
856
856
|
const r = [];
|
|
@@ -866,26 +866,26 @@ function qa(i) {
|
|
|
866
866
|
});
|
|
867
867
|
});
|
|
868
868
|
}
|
|
869
|
-
const
|
|
869
|
+
const Xa = (i, e, t, s) => {
|
|
870
870
|
i.setRenderTarget(s), i.clear(), i.render(e, t);
|
|
871
871
|
};
|
|
872
|
-
function
|
|
873
|
-
i.applyMatrix4(new
|
|
872
|
+
function dr(i, e, t, s) {
|
|
873
|
+
i.applyMatrix4(new Wi().makeTranslation(e, -t, -s));
|
|
874
874
|
}
|
|
875
|
-
function
|
|
875
|
+
function Qa(i) {
|
|
876
876
|
i.computeBoundingBox();
|
|
877
877
|
const e = i.boundingBox, t = (e.max.x - e.min.x) / 2, s = (e.max.y - e.min.y) / 2;
|
|
878
|
-
|
|
878
|
+
dr(i, t, s, 0);
|
|
879
879
|
}
|
|
880
|
-
function
|
|
880
|
+
function Ja(i, e, t) {
|
|
881
881
|
i.left = e / -2, i.right = e / 2, i.top = t / 2, i.bottom = t / -2, i.position.x = e / 2, i.position.y = t / -2, i.updateProjectionMatrix();
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function eo(i, e, t) {
|
|
884
884
|
const s = 1.7777777777777777, n = e / t;
|
|
885
885
|
let r = e, a = t;
|
|
886
886
|
n > s ? r = t * s : a = e / s, i.left = r / -2, i.right = r / 2, i.top = a / 2, i.bottom = a / -2, i.updateProjectionMatrix();
|
|
887
887
|
}
|
|
888
|
-
function
|
|
888
|
+
function to() {
|
|
889
889
|
let e = "transferControlToOffscreen" in document.createElement("canvas");
|
|
890
890
|
if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
|
|
891
891
|
const s = navigator.userAgent.match(/version\/(\d+)/i);
|
|
@@ -893,33 +893,33 @@ function Ja() {
|
|
|
893
893
|
}
|
|
894
894
|
return e;
|
|
895
895
|
}
|
|
896
|
-
function
|
|
896
|
+
function io(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
900
|
r.colorWrite = t, r.depthWrite = s, r.stencilWrite = !0, r.stencilRef = e, r.stencilFunc = si, r.stencilFail = Ee, r.stencilZFail = Ee, r.stencilZPass = Ee;
|
|
901
901
|
}) : (n.colorWrite = t, n.depthWrite = s, n.stencilWrite = !0, n.stencilRef = e, n.stencilFunc = si, n.stencilFail = Ee, n.stencilZFail = Ee, n.stencilZPass = Ee);
|
|
902
902
|
}
|
|
903
|
-
function
|
|
903
|
+
function so(i, e, t = !1) {
|
|
904
904
|
const s = i.material;
|
|
905
905
|
Array.isArray(s) ? s.forEach((n) => {
|
|
906
906
|
n.stencilWrite = !0, n.stencilRef = e, n.stencilFunc = t ? ni : ri, n.stencilFail = Se, n.stencilZFail = Se, n.stencilZPass = Se;
|
|
907
907
|
}) : (s.stencilWrite = !0, s.stencilRef = e, s.stencilFunc = t ? ni : ri, s.stencilFail = Se, s.stencilZFail = Se, s.stencilZPass = Se);
|
|
908
908
|
}
|
|
909
|
-
function
|
|
910
|
-
i.blending =
|
|
909
|
+
function no(i) {
|
|
910
|
+
i.blending = Yi, i.blendEquation = Je, i.blendSrc = gt, i.blendDst = vt, i.needsUpdate = !0;
|
|
911
911
|
}
|
|
912
|
-
function
|
|
912
|
+
function ro(i) {
|
|
913
913
|
i.blending = _t, i.blendEquation = Je, i.blendSrc = gt, i.blendDst = yt, i.needsUpdate = !0;
|
|
914
914
|
}
|
|
915
|
-
function
|
|
915
|
+
function ao(i) {
|
|
916
916
|
i.blending = _t, i.blendEquation = Je, i.blendSrc = Xt, i.blendDst = vt, i.needsUpdate = !0;
|
|
917
917
|
}
|
|
918
|
-
function
|
|
918
|
+
function oo(i) {
|
|
919
919
|
i.blending = _t, i.blendEquation = Je, i.blendSrc = Qt, i.blendDst = yt, i.needsUpdate = !0;
|
|
920
920
|
}
|
|
921
921
|
let jt = [];
|
|
922
|
-
function
|
|
922
|
+
function ur(i, e, t = !0) {
|
|
923
923
|
ce.renderer = e.renderer;
|
|
924
924
|
const s = [];
|
|
925
925
|
s.push({
|
|
@@ -1044,22 +1044,22 @@ function hr(i, e, t = !0) {
|
|
|
1044
1044
|
}
|
|
1045
1045
|
}), jt.push(r);
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1047
|
+
function lo(i, e) {
|
|
1048
1048
|
i.passes.forEach((t) => {
|
|
1049
|
-
|
|
1049
|
+
ur(t, e);
|
|
1050
1050
|
});
|
|
1051
1051
|
}
|
|
1052
|
-
function
|
|
1052
|
+
function co(i) {
|
|
1053
1053
|
jt.forEach((e) => {
|
|
1054
1054
|
i.removeGroup(e);
|
|
1055
1055
|
}), jt = [];
|
|
1056
1056
|
}
|
|
1057
|
-
function
|
|
1057
|
+
function ho(i, e, t, s = 1024) {
|
|
1058
1058
|
return new Promise((n) => {
|
|
1059
1059
|
const r = e.aspect, a = e.fov, o = e.rotation.clone(), c = t.outputBuffer;
|
|
1060
1060
|
e.aspect = 1, e.fov = 90, e.updateProjectionMatrix();
|
|
1061
|
-
const l = new
|
|
1062
|
-
format:
|
|
1061
|
+
const l = new Ms(s, s, {
|
|
1062
|
+
format: As,
|
|
1063
1063
|
depthBuffer: !0,
|
|
1064
1064
|
stencilBuffer: !1
|
|
1065
1065
|
});
|
|
@@ -1110,8 +1110,8 @@ function Te(i, e, t, s, n, r) {
|
|
|
1110
1110
|
d.data.set(c), h.putImageData(d, 0, 0);
|
|
1111
1111
|
const u = document.createElement("canvas");
|
|
1112
1112
|
u.width = u.height = r;
|
|
1113
|
-
const
|
|
1114
|
-
|
|
1113
|
+
const m = u.getContext("2d");
|
|
1114
|
+
m.translate(0, r), m.scale(1, -1), m.drawImage(l, 0, 0);
|
|
1115
1115
|
const y = u.toDataURL("image/png"), v = document.createElement("a");
|
|
1116
1116
|
v.href = y, v.download = `${t.name}_${s}.png`, document.body.appendChild(v), v.click(), v.remove(), a();
|
|
1117
1117
|
});
|
|
@@ -1127,32 +1127,32 @@ const Me = ei([
|
|
|
1127
1127
|
"clientY",
|
|
1128
1128
|
"pageX",
|
|
1129
1129
|
"pageY"
|
|
1130
|
-
]),
|
|
1130
|
+
]), pr = ei([
|
|
1131
1131
|
"clientX",
|
|
1132
1132
|
"clientY",
|
|
1133
1133
|
"deltaX",
|
|
1134
1134
|
"deltaY",
|
|
1135
1135
|
"deltaMode"
|
|
1136
|
-
]),
|
|
1136
|
+
]), mr = ei([
|
|
1137
1137
|
"ctrlKey",
|
|
1138
1138
|
"metaKey",
|
|
1139
1139
|
"shiftKey",
|
|
1140
1140
|
"keyCode"
|
|
1141
1141
|
]);
|
|
1142
|
-
function
|
|
1143
|
-
i.preventDefault(),
|
|
1142
|
+
function fr(i, e) {
|
|
1143
|
+
i.preventDefault(), pr(i, e);
|
|
1144
1144
|
}
|
|
1145
|
-
function
|
|
1145
|
+
function gr(i) {
|
|
1146
1146
|
i.preventDefault();
|
|
1147
1147
|
}
|
|
1148
|
-
function
|
|
1148
|
+
function vr(i, e, t) {
|
|
1149
1149
|
for (const s of e)
|
|
1150
1150
|
t[s] = i[s];
|
|
1151
1151
|
}
|
|
1152
1152
|
function ei(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
1158
|
function At(i, e) {
|
|
@@ -1166,7 +1166,7 @@ function At(i, e) {
|
|
|
1166
1166
|
}
|
|
1167
1167
|
e(s);
|
|
1168
1168
|
}
|
|
1169
|
-
const
|
|
1169
|
+
const _r = {
|
|
1170
1170
|
37: !0,
|
|
1171
1171
|
// left
|
|
1172
1172
|
38: !0,
|
|
@@ -1176,12 +1176,12 @@ const gr = {
|
|
|
1176
1176
|
40: !0
|
|
1177
1177
|
// down
|
|
1178
1178
|
};
|
|
1179
|
-
function
|
|
1179
|
+
function yr(i, e) {
|
|
1180
1180
|
const { keyCode: t } = i;
|
|
1181
|
-
|
|
1181
|
+
_r[t] && (i.preventDefault(), mr(i, e));
|
|
1182
1182
|
}
|
|
1183
|
-
const
|
|
1184
|
-
contextmenu:
|
|
1183
|
+
const uo = {
|
|
1184
|
+
contextmenu: gr,
|
|
1185
1185
|
mousedown: Me,
|
|
1186
1186
|
mousemove: Me,
|
|
1187
1187
|
mouseup: Me,
|
|
@@ -1191,15 +1191,15 @@ const co = {
|
|
|
1191
1191
|
touchstart: At,
|
|
1192
1192
|
touchmove: At,
|
|
1193
1193
|
touchend: At,
|
|
1194
|
-
wheel:
|
|
1195
|
-
keydown:
|
|
1194
|
+
wheel: fr,
|
|
1195
|
+
keydown: yr
|
|
1196
1196
|
};
|
|
1197
|
-
let
|
|
1198
|
-
class
|
|
1197
|
+
let Cr = 0;
|
|
1198
|
+
class po {
|
|
1199
1199
|
id;
|
|
1200
1200
|
worker;
|
|
1201
1201
|
constructor(e, t, s) {
|
|
1202
|
-
this.id =
|
|
1202
|
+
this.id = Cr++, this.worker = t;
|
|
1203
1203
|
const n = (a) => {
|
|
1204
1204
|
this.worker.postMessage({
|
|
1205
1205
|
type: "event",
|
|
@@ -1227,7 +1227,7 @@ class ho {
|
|
|
1227
1227
|
window.addEventListener("resize", r), r();
|
|
1228
1228
|
}
|
|
1229
1229
|
}
|
|
1230
|
-
class
|
|
1230
|
+
class br extends Zi {
|
|
1231
1231
|
style = {};
|
|
1232
1232
|
left = 0;
|
|
1233
1233
|
top = 0;
|
|
@@ -1281,13 +1281,13 @@ class yr extends Wi {
|
|
|
1281
1281
|
return this;
|
|
1282
1282
|
}
|
|
1283
1283
|
}
|
|
1284
|
-
class
|
|
1284
|
+
class mo {
|
|
1285
1285
|
targets = {};
|
|
1286
1286
|
constructor() {
|
|
1287
1287
|
this.handleEvent = this.handleEvent.bind(this);
|
|
1288
1288
|
}
|
|
1289
1289
|
makeProxy(e) {
|
|
1290
|
-
const { id: t } = e, s = new
|
|
1290
|
+
const { id: t } = e, s = new br();
|
|
1291
1291
|
this.targets[t] = s;
|
|
1292
1292
|
}
|
|
1293
1293
|
getProxy(e) {
|
|
@@ -1297,7 +1297,7 @@ class uo {
|
|
|
1297
1297
|
this.targets[e.id]?.handleEvent(e.data);
|
|
1298
1298
|
}
|
|
1299
1299
|
}
|
|
1300
|
-
class
|
|
1300
|
+
class fo {
|
|
1301
1301
|
assets = {
|
|
1302
1302
|
audio: /* @__PURE__ */ new Map(),
|
|
1303
1303
|
image: /* @__PURE__ */ new Map(),
|
|
@@ -1330,7 +1330,7 @@ class po {
|
|
|
1330
1330
|
}
|
|
1331
1331
|
detectSettings() {
|
|
1332
1332
|
return new Promise((e) => {
|
|
1333
|
-
|
|
1333
|
+
tr(this.settings.dev, this.settings.editor).then((t) => {
|
|
1334
1334
|
this.settings = t, e();
|
|
1335
1335
|
});
|
|
1336
1336
|
});
|
|
@@ -1370,24 +1370,18 @@ class po {
|
|
|
1370
1370
|
this.settings.editor = e;
|
|
1371
1371
|
}
|
|
1372
1372
|
}
|
|
1373
|
-
class
|
|
1373
|
+
class cs {
|
|
1374
1374
|
name;
|
|
1375
|
-
|
|
1376
|
-
|
|
1375
|
+
debug;
|
|
1376
|
+
editor;
|
|
1377
1377
|
broadcastChannel;
|
|
1378
1378
|
onMessageHandler;
|
|
1379
1379
|
constructor(e, t = !1, s = !1) {
|
|
1380
|
-
this.name = e, this.
|
|
1380
|
+
this.name = e, this.debug = t, this.editor = s, t && (this.broadcastChannel = new BroadcastChannel(e), this.onMessageHandler = this.messageHandler.bind(this), this.broadcastChannel.addEventListener("message", this.onMessageHandler));
|
|
1381
1381
|
}
|
|
1382
1382
|
dispose() {
|
|
1383
1383
|
this.broadcastChannel?.removeEventListener("message", this.onMessageHandler), this.broadcastChannel?.close();
|
|
1384
1384
|
}
|
|
1385
|
-
get debug() {
|
|
1386
|
-
return this._debug;
|
|
1387
|
-
}
|
|
1388
|
-
get editor() {
|
|
1389
|
-
return this._editor;
|
|
1390
|
-
}
|
|
1391
1385
|
// Broadcast
|
|
1392
1386
|
send(e) {
|
|
1393
1387
|
if (this.editor && e.target === "app" || !this.editor && e.target === "editor")
|
|
@@ -1406,15 +1400,15 @@ class os {
|
|
|
1406
1400
|
handleEditor(e) {
|
|
1407
1401
|
}
|
|
1408
1402
|
}
|
|
1409
|
-
function
|
|
1403
|
+
function Er(i, e, t, s, n) {
|
|
1410
1404
|
const r = 1 - i;
|
|
1411
1405
|
return r * r * r * e + 3 * r * r * i * t + 3 * r * i * i * s + i * i * i * n;
|
|
1412
1406
|
}
|
|
1413
|
-
function
|
|
1407
|
+
function Sr(i, e, t) {
|
|
1414
1408
|
if (i.type !== "bezier" || i.handles.length !== 4)
|
|
1415
1409
|
throw new Error("Invalid keyframe data for Bézier interpolation.");
|
|
1416
1410
|
const [s, n] = i.handles, r = (t - i.position) / (e.position - i.position);
|
|
1417
|
-
return
|
|
1411
|
+
return Er(
|
|
1418
1412
|
r,
|
|
1419
1413
|
i.value,
|
|
1420
1414
|
i.value + s,
|
|
@@ -1422,7 +1416,7 @@ function br(i, e, t) {
|
|
|
1422
1416
|
e.value
|
|
1423
1417
|
);
|
|
1424
1418
|
}
|
|
1425
|
-
class
|
|
1419
|
+
class go extends cs {
|
|
1426
1420
|
project;
|
|
1427
1421
|
sheets = /* @__PURE__ */ new Map();
|
|
1428
1422
|
sheetObjects = /* @__PURE__ */ new Map();
|
|
@@ -1437,7 +1431,7 @@ class mo extends os {
|
|
|
1437
1431
|
this.project = void 0, this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
|
|
1438
1432
|
}
|
|
1439
1433
|
loadProject(e, t) {
|
|
1440
|
-
return this.project =
|
|
1434
|
+
return this.project = Es(e, { state: t }), new Promise((s, n) => {
|
|
1441
1435
|
this.project?.ready.then(() => {
|
|
1442
1436
|
if (t) {
|
|
1443
1437
|
const r = t.sheetsById;
|
|
@@ -1497,10 +1491,10 @@ class mo extends os {
|
|
|
1497
1491
|
const c = `${this.getSheetInstance(e, r)}_${t}`;
|
|
1498
1492
|
let l = this.sheetObjects.get(c), h = s;
|
|
1499
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 : pt);
|
|
1500
|
-
function d(
|
|
1494
|
+
function d(m, y, v) {
|
|
1501
1495
|
if (typeof v == "object")
|
|
1502
|
-
if (
|
|
1503
|
-
|
|
1496
|
+
if (qn(v))
|
|
1497
|
+
m[y] = {
|
|
1504
1498
|
r: v.r,
|
|
1505
1499
|
g: v.g,
|
|
1506
1500
|
b: v.b,
|
|
@@ -1512,12 +1506,12 @@ class mo extends os {
|
|
|
1512
1506
|
typeof g == "object" && d(v, C, g);
|
|
1513
1507
|
}
|
|
1514
1508
|
}
|
|
1515
|
-
const u = l.onValuesChange((
|
|
1509
|
+
const u = l.onValuesChange((m) => {
|
|
1516
1510
|
const y = this.sheetObjectCBs.get(c);
|
|
1517
1511
|
if (this.editor) {
|
|
1518
|
-
for (const v in
|
|
1519
|
-
const C =
|
|
1520
|
-
typeof C == "object" && d(
|
|
1512
|
+
for (const v in m) {
|
|
1513
|
+
const C = m[v];
|
|
1514
|
+
typeof C == "object" && d(m, v, C);
|
|
1521
1515
|
}
|
|
1522
1516
|
this.send({
|
|
1523
1517
|
event: "updateSheetObject",
|
|
@@ -1525,11 +1519,11 @@ class mo extends os {
|
|
|
1525
1519
|
data: {
|
|
1526
1520
|
sheet: e,
|
|
1527
1521
|
sheetObject: c,
|
|
1528
|
-
values:
|
|
1522
|
+
values: m
|
|
1529
1523
|
}
|
|
1530
|
-
}), y && y(
|
|
1524
|
+
}), y && y(m);
|
|
1531
1525
|
} else
|
|
1532
|
-
y && y(
|
|
1526
|
+
y && y(m);
|
|
1533
1527
|
});
|
|
1534
1528
|
return this.sheetObjectUnsubscribe.set(c, u), l;
|
|
1535
1529
|
}
|
|
@@ -1545,21 +1539,21 @@ class mo extends os {
|
|
|
1545
1539
|
const n = `${e}_${t}`, r = this.sheetObjects.get(n);
|
|
1546
1540
|
if (r === void 0) return [];
|
|
1547
1541
|
const a = [], o = s.sequence.__experimental_getKeyframes(r.props.x), c = s.sequence.__experimental_getKeyframes(r.props.y), l = s.sequence.__experimental_getKeyframes(r.props.z), h = /* @__PURE__ */ new Set();
|
|
1548
|
-
return o.forEach((u) => h.add(u.position)), c.forEach((u) => h.add(u.position)), l.forEach((u) => h.add(u.position)), Array.from(h).sort((u,
|
|
1549
|
-
const
|
|
1542
|
+
return o.forEach((u) => h.add(u.position)), c.forEach((u) => h.add(u.position)), l.forEach((u) => h.add(u.position)), Array.from(h).sort((u, m) => u - m).forEach((u) => {
|
|
1543
|
+
const m = (y, v) => {
|
|
1550
1544
|
const C = y.find((E, S) => E.position <= v && (y[S + 1]?.position || 1 / 0) > v), g = y.find((E) => E.position > v);
|
|
1551
1545
|
if (!C) return g?.value || 0;
|
|
1552
1546
|
if (!g || C.position === v) return C.value;
|
|
1553
1547
|
if (C.type === "bezier")
|
|
1554
|
-
return
|
|
1548
|
+
return Sr(C, g, v);
|
|
1555
1549
|
const _ = (v - C.position) / (g.position - C.position);
|
|
1556
1550
|
return C.value + _ * (g.value - C.value);
|
|
1557
1551
|
};
|
|
1558
1552
|
a.push({
|
|
1559
1553
|
position: u,
|
|
1560
|
-
x:
|
|
1561
|
-
y:
|
|
1562
|
-
z:
|
|
1554
|
+
x: m(o, u),
|
|
1555
|
+
y: m(c, u),
|
|
1556
|
+
z: m(l, u)
|
|
1563
1557
|
});
|
|
1564
1558
|
}), a;
|
|
1565
1559
|
}
|
|
@@ -1652,7 +1646,7 @@ class mo extends os {
|
|
|
1652
1646
|
this.studio?.ui.hide();
|
|
1653
1647
|
}
|
|
1654
1648
|
}
|
|
1655
|
-
function
|
|
1649
|
+
function Or(i) {
|
|
1656
1650
|
if (i.name === "cameras")
|
|
1657
1651
|
return "camera";
|
|
1658
1652
|
if (i.name === "interactive")
|
|
@@ -1677,23 +1671,27 @@ function he(i) {
|
|
|
1677
1671
|
e.children.push(he(t));
|
|
1678
1672
|
}), e;
|
|
1679
1673
|
}
|
|
1680
|
-
function
|
|
1674
|
+
function wi(i) {
|
|
1675
|
+
return {
|
|
1676
|
+
src: i.image?.src ?? "",
|
|
1677
|
+
offset: [i.offset.x, i.offset.y],
|
|
1678
|
+
repeat: [i.repeat.x, i.repeat.y]
|
|
1679
|
+
};
|
|
1680
|
+
}
|
|
1681
|
+
const xi = { src: "", offset: [0, 0], repeat: [1, 1] };
|
|
1682
|
+
function wr(i) {
|
|
1681
1683
|
const e = {};
|
|
1682
1684
|
for (const t in i) {
|
|
1683
|
-
const s = i[t]
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
src: s.image.src,
|
|
1690
|
-
offset: [s.offset.x, s.offset.y],
|
|
1691
|
-
repeat: [s.repeat.x, s.repeat.y]
|
|
1692
|
-
});
|
|
1685
|
+
const s = i[t];
|
|
1686
|
+
if (s !== null && typeof s == "object" && Object.prototype.hasOwnProperty.call(s, "value")) {
|
|
1687
|
+
const r = s.value;
|
|
1688
|
+
r == null ? e[t] = { value: xi } : r.isTexture ? e[t] = { value: wi(r) } : e[t] = { value: r };
|
|
1689
|
+
} else
|
|
1690
|
+
s == null ? e[t] = xi : s.isTexture ? e[t] = wi(s) : e[t] = s;
|
|
1693
1691
|
}
|
|
1694
1692
|
return e;
|
|
1695
1693
|
}
|
|
1696
|
-
function
|
|
1694
|
+
function xr(i) {
|
|
1697
1695
|
switch (i) {
|
|
1698
1696
|
case "blendSrcAlpha":
|
|
1699
1697
|
case "blendDstAlpha":
|
|
@@ -1708,7 +1706,7 @@ function Or(i) {
|
|
|
1708
1706
|
function Ae(i) {
|
|
1709
1707
|
const e = {};
|
|
1710
1708
|
for (const t in i) {
|
|
1711
|
-
if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" ||
|
|
1709
|
+
if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" || xr(t)) continue;
|
|
1712
1710
|
const s = typeof i[t], n = i[t];
|
|
1713
1711
|
switch (s) {
|
|
1714
1712
|
case "boolean":
|
|
@@ -1730,7 +1728,7 @@ function Ae(i) {
|
|
|
1730
1728
|
__isUniform: !0,
|
|
1731
1729
|
value: r?.isTexture ? { src: ce.renderToBlob(r), offset: [r.offset.x, r.offset.y], repeat: [r.repeat.x, r.repeat.y] } : r
|
|
1732
1730
|
};
|
|
1733
|
-
} else t === "uniforms" ? e[t] =
|
|
1731
|
+
} else t === "uniforms" ? e[t] = wr(n) : t.search("Node") > -1 || (e[t] = n);
|
|
1734
1732
|
else
|
|
1735
1733
|
t === "glslVersion" ? e[t] = "" : t.search("Node") > -1 || (e[t] = {
|
|
1736
1734
|
src: "",
|
|
@@ -1822,7 +1820,7 @@ function Rt(i) {
|
|
|
1822
1820
|
});
|
|
1823
1821
|
return e;
|
|
1824
1822
|
}
|
|
1825
|
-
function
|
|
1823
|
+
function Tr(i, e) {
|
|
1826
1824
|
const t = e.split(".");
|
|
1827
1825
|
switch (t.length) {
|
|
1828
1826
|
case 1:
|
|
@@ -1839,7 +1837,7 @@ function wr(i, e) {
|
|
|
1839
1837
|
return i[t[0]][t[1]][t[2]][t[3]][t[4]][t[5]];
|
|
1840
1838
|
}
|
|
1841
1839
|
}
|
|
1842
|
-
function
|
|
1840
|
+
function Mr(i, e) {
|
|
1843
1841
|
for (const t in e) i[t] = e[t];
|
|
1844
1842
|
}
|
|
1845
1843
|
function V(i, e, t) {
|
|
@@ -1885,10 +1883,10 @@ function V(i, e, t) {
|
|
|
1885
1883
|
a = i[s[0]][s[1]][s[2]][s[3]][s[4]];
|
|
1886
1884
|
break;
|
|
1887
1885
|
}
|
|
1888
|
-
a != null ?
|
|
1886
|
+
a != null ? Mr(a, t) : console.log(`Hermes - Can't set props because target isn't found: ${e}`, t);
|
|
1889
1887
|
}
|
|
1890
1888
|
}
|
|
1891
|
-
function
|
|
1889
|
+
function hs(i) {
|
|
1892
1890
|
return new Promise((e, t) => {
|
|
1893
1891
|
const s = new Image();
|
|
1894
1892
|
s.onload = () => {
|
|
@@ -1898,7 +1896,7 @@ function ls(i) {
|
|
|
1898
1896
|
});
|
|
1899
1897
|
}
|
|
1900
1898
|
var R = /* @__PURE__ */ ((i) => (i.CUSTOM = "ToolEvents::custom", i.SELECT_DROPDOWN = "ToolEvents::selectDropdown", i.DRAG_UPDATE = "ToolEvents::dragUpdate", i.ADD_SCENE = "ToolEvents::addScene", i.REFRESH_SCENE = "ToolEvents::refreshScene", i.REMOVE_SCENE = "ToolEvents::removeScene", i.SET_SCENE = "ToolEvents::setScene", i.SET_OBJECT = "ToolEvents::setObject", i.CLEAR_OBJECT = "ToolEvents::clearObject", i.ADD_CAMERA = "ToolEvents::addCamera", i.REMOVE_CAMERA = "ToolEvents::removeCamera", i.ADD_GROUP = "ToolEvents::addGroup", i.REMOVE_GROUP = "ToolEvents::removeGroup", i.ADD_SPLINE = "ToolEvents::addSpline", i.ADD_RENDERER = "ToolEvents::addRenderer", i.UPDATE_RENDERER = "ToolEvents::updateRenderer", i))(R || {});
|
|
1901
|
-
class
|
|
1899
|
+
class vo extends cs {
|
|
1902
1900
|
name;
|
|
1903
1901
|
canvas = null;
|
|
1904
1902
|
// Canvas or OffscreenCanvas
|
|
@@ -1906,6 +1904,7 @@ class fo extends os {
|
|
|
1906
1904
|
// reference this to receive events
|
|
1907
1905
|
scene = void 0;
|
|
1908
1906
|
scenes = /* @__PURE__ */ new Map();
|
|
1907
|
+
// scene instances
|
|
1909
1908
|
renderer = void 0;
|
|
1910
1909
|
renderTargets = /* @__PURE__ */ new Map();
|
|
1911
1910
|
renderTargetsResize = /* @__PURE__ */ new Map();
|
|
@@ -1974,7 +1973,7 @@ class fo extends os {
|
|
|
1974
1973
|
const r = this.getObjectByUUID(e);
|
|
1975
1974
|
if (r)
|
|
1976
1975
|
try {
|
|
1977
|
-
n !== void 0 ?
|
|
1976
|
+
n !== void 0 ? Tr(r, n)[t](s) : r[t](s);
|
|
1978
1977
|
} catch (a) {
|
|
1979
1978
|
console.log("Hermes - Error requesting method:", e, t, s), console.log(a);
|
|
1980
1979
|
}
|
|
@@ -2031,7 +2030,7 @@ class fo extends os {
|
|
|
2031
2030
|
}
|
|
2032
2031
|
n.material.needsUpdate = !0;
|
|
2033
2032
|
};
|
|
2034
|
-
s.src.length > 0 ?
|
|
2033
|
+
s.src.length > 0 ? hs(s.src).then((a) => {
|
|
2035
2034
|
a.offset.set(s.offset[0], s.offset[1]), a.repeat.set(s.repeat[0], s.repeat[1]), r(a);
|
|
2036
2035
|
}) : r(null);
|
|
2037
2036
|
}
|
|
@@ -2311,7 +2310,7 @@ class fo extends os {
|
|
|
2311
2310
|
addRT(e, t = !0, s) {
|
|
2312
2311
|
if (!this.renderer) return;
|
|
2313
2312
|
let n;
|
|
2314
|
-
this.renderer instanceof Ge ? n = new
|
|
2313
|
+
this.renderer instanceof Ge ? n = new sn(32, 32, s) : n = new nn(32, 32, s), n.texture.name = e, this.renderTargets.set(e, n), this.renderTargetsResize.set(e, t);
|
|
2315
2314
|
}
|
|
2316
2315
|
removeRT(e) {
|
|
2317
2316
|
this.renderTargets.delete(e), this.renderTargetsResize.delete(e);
|
|
@@ -2337,14 +2336,14 @@ class fo extends os {
|
|
|
2337
2336
|
return this.renderer !== void 0 ? this.renderer.domElement.height / this.dpr : 0;
|
|
2338
2337
|
}
|
|
2339
2338
|
}
|
|
2340
|
-
function
|
|
2339
|
+
function ds(i) {
|
|
2341
2340
|
return i.title.search("<") > -1 ? /* @__PURE__ */ f("button", { className: "svg", dangerouslySetInnerHTML: { __html: i.title } }) : /* @__PURE__ */ f("button", { children: i.title });
|
|
2342
2341
|
}
|
|
2343
|
-
const
|
|
2342
|
+
const Ar = /* @__PURE__ */ M("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
|
|
2344
2343
|
/* @__PURE__ */ f("circle", { cx: "7", cy: "7", r: "6" }),
|
|
2345
2344
|
/* @__PURE__ */ f("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
|
|
2346
2345
|
/* @__PURE__ */ f("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
|
|
2347
|
-
] }),
|
|
2346
|
+
] }), Rr = /* @__PURE__ */ f("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ f(
|
|
2348
2347
|
"path",
|
|
2349
2348
|
{
|
|
2350
2349
|
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
|
|
@@ -2352,7 +2351,7 @@ C11,4.22,10.74,4,10.43,4z M10.43,8H3.57C3.26,8,3,8.22,3,8.5v1C3,9.78,3.26,10,3.5
|
|
|
2352
2351
|
C11,8.22,10.74,8,10.43,8z`
|
|
2353
2352
|
}
|
|
2354
2353
|
) });
|
|
2355
|
-
function
|
|
2354
|
+
function Pr(i) {
|
|
2356
2355
|
return /* @__PURE__ */ f(
|
|
2357
2356
|
"li",
|
|
2358
2357
|
{
|
|
@@ -2364,35 +2363,35 @@ function Ar(i) {
|
|
|
2364
2363
|
},
|
|
2365
2364
|
onDragEnd: i.onDragEnd,
|
|
2366
2365
|
children: /* @__PURE__ */ M("div", { children: [
|
|
2367
|
-
|
|
2366
|
+
Rr,
|
|
2368
2367
|
/* @__PURE__ */ f("span", { children: i.title }),
|
|
2369
|
-
/* @__PURE__ */ f("button", { className: "closeIcon", onClick: () => i.onDelete(i.index), children:
|
|
2368
|
+
/* @__PURE__ */ f("button", { className: "closeIcon", onClick: () => i.onDelete(i.index), children: Ar })
|
|
2370
2369
|
] })
|
|
2371
2370
|
}
|
|
2372
2371
|
);
|
|
2373
2372
|
}
|
|
2374
|
-
function
|
|
2375
|
-
const [e, t] = L(!1), [s, n] = L(i.options), [r, a] = L(null), o = (
|
|
2376
|
-
i.onDragComplete(
|
|
2377
|
-
}, c = (
|
|
2373
|
+
function Dr(i) {
|
|
2374
|
+
const [e, t] = L(!1), [s, n] = L(i.options), [r, a] = L(null), o = (m) => {
|
|
2375
|
+
i.onDragComplete(m), n(m);
|
|
2376
|
+
}, c = (m) => {
|
|
2378
2377
|
const y = [...s];
|
|
2379
|
-
y.splice(
|
|
2380
|
-
}, l = (
|
|
2381
|
-
a(
|
|
2382
|
-
}, h = (
|
|
2383
|
-
if (r ===
|
|
2378
|
+
y.splice(m, 1), o(y);
|
|
2379
|
+
}, l = (m) => {
|
|
2380
|
+
a(m);
|
|
2381
|
+
}, h = (m) => {
|
|
2382
|
+
if (r === m || r === null) return;
|
|
2384
2383
|
const y = [...s], v = y.splice(r, 1)[0];
|
|
2385
|
-
y.splice(
|
|
2384
|
+
y.splice(m, 0, v), a(m), n(y);
|
|
2386
2385
|
}, d = () => {
|
|
2387
2386
|
i.onDragComplete(s), a(null);
|
|
2388
2387
|
};
|
|
2389
2388
|
let u = "dropdown draggable";
|
|
2390
2389
|
return i.subdropdown && (u += " subdropdown"), /* @__PURE__ */ M("div", { className: u, onMouseEnter: () => t(!0), onMouseLeave: () => t(!1), children: [
|
|
2391
|
-
/* @__PURE__ */ f(
|
|
2392
|
-
/* @__PURE__ */ f("ul", { className: "reorder-list", style: { display: e ? "block" : "none" }, children: s.map((
|
|
2393
|
-
|
|
2390
|
+
/* @__PURE__ */ f(ds, { title: i.title }),
|
|
2391
|
+
/* @__PURE__ */ f("ul", { className: "reorder-list", style: { display: e ? "block" : "none" }, children: s.map((m, y) => /* @__PURE__ */ f(
|
|
2392
|
+
Pr,
|
|
2394
2393
|
{
|
|
2395
|
-
title:
|
|
2394
|
+
title: m,
|
|
2396
2395
|
index: y,
|
|
2397
2396
|
draggingIndex: r,
|
|
2398
2397
|
onDelete: c,
|
|
@@ -2400,14 +2399,14 @@ function Rr(i) {
|
|
|
2400
2399
|
onDragOver: h,
|
|
2401
2400
|
onDragEnd: d
|
|
2402
2401
|
},
|
|
2403
|
-
|
|
2402
|
+
m
|
|
2404
2403
|
)) })
|
|
2405
2404
|
] });
|
|
2406
2405
|
}
|
|
2407
|
-
function
|
|
2406
|
+
function Ir(i) {
|
|
2408
2407
|
const [e, t] = L(!1), s = [];
|
|
2409
2408
|
i.options.map((r, a) => {
|
|
2410
|
-
i.onSelect !== void 0 && (r.onSelect = i.onSelect), s.push(/* @__PURE__ */ f(
|
|
2409
|
+
i.onSelect !== void 0 && (r.onSelect = i.onSelect), s.push(/* @__PURE__ */ f(Ur, { option: r }, a));
|
|
2411
2410
|
});
|
|
2412
2411
|
let n = "dropdown";
|
|
2413
2412
|
return i.subdropdown && (n += " subdropdown"), /* @__PURE__ */ M(
|
|
@@ -2417,7 +2416,7 @@ function Pr(i) {
|
|
|
2417
2416
|
onMouseEnter: () => t(!0),
|
|
2418
2417
|
onMouseLeave: () => t(!1),
|
|
2419
2418
|
children: [
|
|
2420
|
-
/* @__PURE__ */ f(
|
|
2419
|
+
/* @__PURE__ */ f(ds, { title: i.title }),
|
|
2421
2420
|
/* @__PURE__ */ f(
|
|
2422
2421
|
"ul",
|
|
2423
2422
|
{
|
|
@@ -2429,13 +2428,13 @@ function Pr(i) {
|
|
|
2429
2428
|
}
|
|
2430
2429
|
);
|
|
2431
2430
|
}
|
|
2432
|
-
function
|
|
2431
|
+
function Ur(i) {
|
|
2433
2432
|
const { option: e } = i, [t, s] = L("");
|
|
2434
2433
|
let n;
|
|
2435
2434
|
switch (e.type) {
|
|
2436
2435
|
case "draggable":
|
|
2437
2436
|
n = /* @__PURE__ */ f(
|
|
2438
|
-
|
|
2437
|
+
Dr,
|
|
2439
2438
|
{
|
|
2440
2439
|
title: e.title,
|
|
2441
2440
|
options: e.value,
|
|
@@ -2448,7 +2447,7 @@ function Dr(i) {
|
|
|
2448
2447
|
break;
|
|
2449
2448
|
case "dropdown":
|
|
2450
2449
|
n = /* @__PURE__ */ f(
|
|
2451
|
-
|
|
2450
|
+
Ir,
|
|
2452
2451
|
{
|
|
2453
2452
|
title: e.title,
|
|
2454
2453
|
options: e.value,
|
|
@@ -2496,7 +2495,7 @@ function je(i) {
|
|
|
2496
2495
|
]
|
|
2497
2496
|
}
|
|
2498
2497
|
),
|
|
2499
|
-
i.onRefresh ? /* @__PURE__ */ M(
|
|
2498
|
+
i.onRefresh ? /* @__PURE__ */ M(q, { children: [
|
|
2500
2499
|
/* @__PURE__ */ f(
|
|
2501
2500
|
"button",
|
|
2502
2501
|
{
|
|
@@ -2520,12 +2519,12 @@ function je(i) {
|
|
|
2520
2519
|
/* @__PURE__ */ f("div", { className: e ? "open" : "", children: /* @__PURE__ */ f("div", { children: i.children }) })
|
|
2521
2520
|
] });
|
|
2522
2521
|
}
|
|
2523
|
-
function
|
|
2522
|
+
function us(i) {
|
|
2524
2523
|
if (i.child === void 0)
|
|
2525
2524
|
return console.log("Hermes - No child attached"), null;
|
|
2526
2525
|
const e = z(null), [t, s] = L(!1), n = i.child.children.length > 0, r = [];
|
|
2527
2526
|
return i.child.children.length > 0 && i.child.children.map((a, o) => {
|
|
2528
|
-
r.push(/* @__PURE__ */ f(
|
|
2527
|
+
r.push(/* @__PURE__ */ f(us, { child: a, three: i.three }, o));
|
|
2529
2528
|
}), pe(() => {
|
|
2530
2529
|
if (i.child) {
|
|
2531
2530
|
const a = i.child.uuid.split(".")[0], o = i.three.getScene(a);
|
|
@@ -2587,7 +2586,7 @@ function hs(i) {
|
|
|
2587
2586
|
}
|
|
2588
2587
|
}
|
|
2589
2588
|
),
|
|
2590
|
-
/* @__PURE__ */ f("div", { className: `icon ${
|
|
2589
|
+
/* @__PURE__ */ f("div", { className: `icon ${Or(i.child)}` })
|
|
2591
2590
|
] }),
|
|
2592
2591
|
/* @__PURE__ */ f("div", { className: t ? "open" : "", children: /* @__PURE__ */ f("div", { className: "container", children: r }) })
|
|
2593
2592
|
] });
|
|
@@ -2595,25 +2594,25 @@ function hs(i) {
|
|
|
2595
2594
|
function Pt(i) {
|
|
2596
2595
|
const e = [];
|
|
2597
2596
|
return i.child?.children.map((t, s) => {
|
|
2598
|
-
e.push(/* @__PURE__ */ f(
|
|
2597
|
+
e.push(/* @__PURE__ */ f(us, { child: t, scene: i.scene, three: i.three }, s));
|
|
2599
2598
|
}), /* @__PURE__ */ f("div", { className: `scene ${i.class !== void 0 ? i.class : ""}`, children: e });
|
|
2600
2599
|
}
|
|
2601
2600
|
function Ye(i) {
|
|
2602
2601
|
const [e, t] = L(i.defaultValue);
|
|
2603
2602
|
return pe(() => {
|
|
2604
2603
|
let s = !1, n = -1, r = 0, a = i.defaultValue, o = !1;
|
|
2605
|
-
const c = (
|
|
2606
|
-
o =
|
|
2607
|
-
}, l = (
|
|
2608
|
-
s = !0, r = Number(i.input.current?.value), n =
|
|
2609
|
-
}, h = (
|
|
2604
|
+
const c = (m) => {
|
|
2605
|
+
o = m.ctrlKey;
|
|
2606
|
+
}, l = (m) => {
|
|
2607
|
+
s = !0, r = Number(i.input.current?.value), n = m.clientX, document.addEventListener("mouseup", d, !1), document.addEventListener("mousemove", h, !1), document.addEventListener("contextmenu", d, !1);
|
|
2608
|
+
}, h = (m) => {
|
|
2610
2609
|
if (!s) return;
|
|
2611
|
-
const y = i.step !== void 0 ? i.step : 1, v = (
|
|
2610
|
+
const y = i.step !== void 0 ? i.step : 1, v = (m.clientX - n) * y * (o ? 10 : 1);
|
|
2612
2611
|
a = Number((r + v).toFixed(4)), i.min !== void 0 && (a = Math.max(a, i.min)), i.max !== void 0 && (a = Math.min(a, i.max)), i.onChange !== void 0 && i.onChange(a), t(a);
|
|
2613
2612
|
}, d = () => {
|
|
2614
2613
|
s = !1, document.removeEventListener("mouseup", d), document.removeEventListener("mousemove", h), document.removeEventListener("contextmenu", d);
|
|
2615
|
-
}, u = (
|
|
2616
|
-
const y = Number(
|
|
2614
|
+
}, u = (m) => {
|
|
2615
|
+
const y = Number(m.target.value);
|
|
2617
2616
|
i.onChange !== void 0 && i.onChange(y), t(y);
|
|
2618
2617
|
};
|
|
2619
2618
|
return i.label.current?.addEventListener("mousedown", l, !1), i.sliderRef !== void 0 && i.sliderRef.current?.addEventListener("input", u), document.addEventListener("keydown", c, !1), document.addEventListener("keyup", c, !1), () => {
|
|
@@ -2634,7 +2633,7 @@ function Ce(i) {
|
|
|
2634
2633
|
onChange: (r) => {
|
|
2635
2634
|
n(r), i.onChange !== void 0 && i.onChange(i.prop, r);
|
|
2636
2635
|
}
|
|
2637
|
-
}), /* @__PURE__ */ M(
|
|
2636
|
+
}), /* @__PURE__ */ M(q, { children: [
|
|
2638
2637
|
i.type === "number" && /* @__PURE__ */ f(
|
|
2639
2638
|
"input",
|
|
2640
2639
|
{
|
|
@@ -2655,7 +2654,7 @@ function Ce(i) {
|
|
|
2655
2654
|
}
|
|
2656
2655
|
}
|
|
2657
2656
|
),
|
|
2658
|
-
i.type === "range" && /* @__PURE__ */ M(
|
|
2657
|
+
i.type === "range" && /* @__PURE__ */ M(q, { children: [
|
|
2659
2658
|
/* @__PURE__ */ f(
|
|
2660
2659
|
"input",
|
|
2661
2660
|
{
|
|
@@ -2689,8 +2688,8 @@ function Ce(i) {
|
|
|
2689
2688
|
] })
|
|
2690
2689
|
] });
|
|
2691
2690
|
}
|
|
2692
|
-
function
|
|
2693
|
-
const e = z(null), t = z(null), s = z(null), n = z(null), r = z(null), a = z(null), o = z(null), c = z(null), l = z(null), h = z(null), [d, u] = L(i.value.x), [
|
|
2691
|
+
function Lr(i) {
|
|
2692
|
+
const e = z(null), t = z(null), s = z(null), n = z(null), r = z(null), a = z(null), o = z(null), c = z(null), l = z(null), h = z(null), [d, u] = L(i.value.x), [m, y] = L(i.value.y), [v, C] = L({
|
|
2694
2693
|
min: Math.min(i.min, Math.min(i.value.x, i.value.y)),
|
|
2695
2694
|
max: Math.max(i.max, Math.max(i.value.x, i.value.y))
|
|
2696
2695
|
}), [g, _] = L(!1);
|
|
@@ -2702,12 +2701,12 @@ function Ir(i) {
|
|
|
2702
2701
|
max: v.max,
|
|
2703
2702
|
step: 0.01,
|
|
2704
2703
|
onChange: (x) => {
|
|
2705
|
-
u(x), i.onChange({ target: { value: { x, y:
|
|
2704
|
+
u(x), i.onChange({ target: { value: { x, y: m } } });
|
|
2706
2705
|
}
|
|
2707
2706
|
}), Ye({
|
|
2708
2707
|
label: c,
|
|
2709
2708
|
input: t,
|
|
2710
|
-
defaultValue:
|
|
2709
|
+
defaultValue: m,
|
|
2711
2710
|
min: v.min,
|
|
2712
2711
|
max: v.max,
|
|
2713
2712
|
step: 0.01,
|
|
@@ -2747,15 +2746,15 @@ function Ir(i) {
|
|
|
2747
2746
|
}
|
|
2748
2747
|
function O() {
|
|
2749
2748
|
const x = Number(s.current.value);
|
|
2750
|
-
C({ min: x, max: v.max }), d < x && u(ye(x, v.max, d)),
|
|
2749
|
+
C({ min: x, max: v.max }), d < x && u(ye(x, v.max, d)), m < x && y(ye(x, v.max, m));
|
|
2751
2750
|
}
|
|
2752
2751
|
function w() {
|
|
2753
2752
|
const x = Number(n.current.value);
|
|
2754
|
-
C({ min: v.min, max: x }), d > x && u(ye(v.min, x, d)),
|
|
2753
|
+
C({ min: v.min, max: x }), d > x && u(ye(v.min, x, d)), m > x && y(ye(v.min, x, m));
|
|
2755
2754
|
}
|
|
2756
2755
|
pe(() => {
|
|
2757
|
-
a.current.style.left = `${Zt(v.min, v.max, d) * 100}%`, a.current.style.top = `${(1 - Zt(v.min, v.max,
|
|
2758
|
-
}, [v, d,
|
|
2756
|
+
a.current.style.left = `${Zt(v.min, v.max, d) * 100}%`, a.current.style.top = `${(1 - Zt(v.min, v.max, m)) * 100}%`;
|
|
2757
|
+
}, [v, d, m]);
|
|
2759
2758
|
const D = i.step !== void 0 ? i.step : 0.01;
|
|
2760
2759
|
return /* @__PURE__ */ M("div", { className: "vector2", children: [
|
|
2761
2760
|
/* @__PURE__ */ M("div", { className: "fields", children: [
|
|
@@ -2774,7 +2773,7 @@ function Ir(i) {
|
|
|
2774
2773
|
onChange: (x) => {
|
|
2775
2774
|
if (u(x.target.value), x.target.value.length === 0) return;
|
|
2776
2775
|
const N = Number(x.target.value);
|
|
2777
|
-
isNaN(N) || (i.onChange({ target: { value: { x: N, y:
|
|
2776
|
+
isNaN(N) || (i.onChange({ target: { value: { x: N, y: m } } }), N < v.min && C({ min: N, max: v.max }));
|
|
2778
2777
|
}
|
|
2779
2778
|
}
|
|
2780
2779
|
)
|
|
@@ -2786,7 +2785,7 @@ function Ir(i) {
|
|
|
2786
2785
|
{
|
|
2787
2786
|
ref: t,
|
|
2788
2787
|
type: "number",
|
|
2789
|
-
value:
|
|
2788
|
+
value: m,
|
|
2790
2789
|
min: v.min,
|
|
2791
2790
|
max: v.max,
|
|
2792
2791
|
step: D,
|
|
@@ -2835,7 +2834,7 @@ function Ir(i) {
|
|
|
2835
2834
|
] })
|
|
2836
2835
|
] });
|
|
2837
2836
|
}
|
|
2838
|
-
function
|
|
2837
|
+
function Ti(i) {
|
|
2839
2838
|
const e = i.value.x !== void 0 && i.value.y !== void 0 && i.value.z !== void 0, t = i.value.isEuler !== void 0, s = i.value.elements !== void 0, n = i.step !== void 0 ? i.step : 0.01, r = [];
|
|
2840
2839
|
if (t) {
|
|
2841
2840
|
const a = Ze(() => i.value, []);
|
|
@@ -2847,7 +2846,7 @@ function wi(i) {
|
|
|
2847
2846
|
/* @__PURE__ */ f(
|
|
2848
2847
|
Ce,
|
|
2849
2848
|
{
|
|
2850
|
-
value:
|
|
2849
|
+
value: An(a[c]),
|
|
2851
2850
|
type: "number",
|
|
2852
2851
|
prop: c,
|
|
2853
2852
|
step: 0.1,
|
|
@@ -2910,7 +2909,7 @@ function wi(i) {
|
|
|
2910
2909
|
}
|
|
2911
2910
|
return /* @__PURE__ */ f("div", { className: "grid3", children: r }, Math.random().toString());
|
|
2912
2911
|
}
|
|
2913
|
-
function
|
|
2912
|
+
function kr(i) {
|
|
2914
2913
|
const e = i.value.x !== void 0, t = i.step !== void 0 ? i.step : 0.01, s = [];
|
|
2915
2914
|
if (e) {
|
|
2916
2915
|
const n = Ze(() => i.value, []), r = (o, c) => {
|
|
@@ -2962,10 +2961,10 @@ function Ur(i) {
|
|
|
2962
2961
|
}
|
|
2963
2962
|
return /* @__PURE__ */ f("div", { className: "grid4", children: s });
|
|
2964
2963
|
}
|
|
2965
|
-
function
|
|
2964
|
+
function Nr(i) {
|
|
2966
2965
|
return !(i === "defaultAttributeValues" || i === "forceSinglePass" || i === "linecap" || i === "linejoin" || i === "linewidth" || i === "normalMapType" || i === "precision" || i === "shadowSide" || i === "uniformsGroups" || i === "uniformsNeedUpdate" || i === "userData" || i === "version" || i === "wireframeLinecap" || i === "wireframeLinejoin" || i === "wireframeLinewidth" || i.slice(0, 4) === "clip" || i.slice(0, 7) === "polygon" || i.slice(0, 7) === "stencil" || i.slice(0, 2) === "is");
|
|
2967
2966
|
}
|
|
2968
|
-
function
|
|
2967
|
+
function Fr(i) {
|
|
2969
2968
|
switch (i) {
|
|
2970
2969
|
case "Alpha Map":
|
|
2971
2970
|
return "alphaMap";
|
|
@@ -3217,11 +3216,11 @@ function Ct(i) {
|
|
|
3217
3216
|
}
|
|
3218
3217
|
return i;
|
|
3219
3218
|
}
|
|
3220
|
-
function
|
|
3219
|
+
function ps(i) {
|
|
3221
3220
|
const e = i.toLowerCase();
|
|
3222
3221
|
return e.search("intensity") > -1 || e === "anisotropyrotation" || e === "blendalpha" || e === "bumpscale" || e === "clearcoatroughness" || e === "displacementbias" || e === "displacementscale" || e === "metalness" || e === "opacity" || e === "reflectivity" || e === "refractionratio" || e === "roughness" || e === "sheenroughness";
|
|
3223
3222
|
}
|
|
3224
|
-
function
|
|
3223
|
+
function zr() {
|
|
3225
3224
|
const i = document.createElement("input");
|
|
3226
3225
|
return i.type = "file", new Promise((e, t) => {
|
|
3227
3226
|
i.addEventListener("change", function() {
|
|
@@ -3236,69 +3235,69 @@ function Nr() {
|
|
|
3236
3235
|
}), i.click();
|
|
3237
3236
|
});
|
|
3238
3237
|
}
|
|
3239
|
-
const
|
|
3238
|
+
const Hr = [
|
|
3240
3239
|
{
|
|
3241
3240
|
title: "Front",
|
|
3242
|
-
value:
|
|
3241
|
+
value: Rs
|
|
3243
3242
|
},
|
|
3244
3243
|
{
|
|
3245
3244
|
title: "Back",
|
|
3246
|
-
value:
|
|
3245
|
+
value: Ps
|
|
3247
3246
|
},
|
|
3248
3247
|
{
|
|
3249
3248
|
title: "Double",
|
|
3250
|
-
value:
|
|
3249
|
+
value: qi
|
|
3251
3250
|
}
|
|
3252
|
-
],
|
|
3251
|
+
], Br = [
|
|
3253
3252
|
{
|
|
3254
3253
|
title: "No Blending",
|
|
3255
|
-
value:
|
|
3254
|
+
value: Ns
|
|
3256
3255
|
},
|
|
3257
3256
|
{
|
|
3258
3257
|
title: "Normal",
|
|
3259
|
-
value:
|
|
3258
|
+
value: Yi
|
|
3260
3259
|
},
|
|
3261
3260
|
{
|
|
3262
3261
|
title: "Additive",
|
|
3263
|
-
value:
|
|
3262
|
+
value: Fs
|
|
3264
3263
|
},
|
|
3265
3264
|
{
|
|
3266
3265
|
title: "Subtractive",
|
|
3267
|
-
value:
|
|
3266
|
+
value: zs
|
|
3268
3267
|
},
|
|
3269
3268
|
{
|
|
3270
3269
|
title: "Multiply",
|
|
3271
|
-
value:
|
|
3270
|
+
value: Hs
|
|
3272
3271
|
},
|
|
3273
3272
|
{
|
|
3274
3273
|
title: "Custom",
|
|
3275
3274
|
value: _t
|
|
3276
3275
|
}
|
|
3277
|
-
],
|
|
3276
|
+
], Vr = [
|
|
3278
3277
|
{
|
|
3279
3278
|
title: "Add",
|
|
3280
3279
|
value: Je
|
|
3281
3280
|
},
|
|
3282
3281
|
{
|
|
3283
3282
|
title: "Subtract",
|
|
3284
|
-
value:
|
|
3283
|
+
value: Is
|
|
3285
3284
|
},
|
|
3286
3285
|
{
|
|
3287
3286
|
title: "Reverse Subtract",
|
|
3288
|
-
value:
|
|
3287
|
+
value: Us
|
|
3289
3288
|
},
|
|
3290
3289
|
{
|
|
3291
3290
|
title: "Min",
|
|
3292
|
-
value:
|
|
3291
|
+
value: Ls
|
|
3293
3292
|
},
|
|
3294
3293
|
{
|
|
3295
3294
|
title: "Max",
|
|
3296
|
-
value:
|
|
3295
|
+
value: ks
|
|
3297
3296
|
}
|
|
3298
|
-
],
|
|
3297
|
+
], Gr = [
|
|
3299
3298
|
{
|
|
3300
3299
|
title: "Zero",
|
|
3301
|
-
value:
|
|
3300
|
+
value: ji
|
|
3302
3301
|
},
|
|
3303
3302
|
{
|
|
3304
3303
|
title: "One",
|
|
@@ -3306,11 +3305,11 @@ const Fr = [
|
|
|
3306
3305
|
},
|
|
3307
3306
|
{
|
|
3308
3307
|
title: "Src Color",
|
|
3309
|
-
value:
|
|
3308
|
+
value: Ki
|
|
3310
3309
|
},
|
|
3311
3310
|
{
|
|
3312
3311
|
title: "One Minus Src Color",
|
|
3313
|
-
value:
|
|
3312
|
+
value: Xi
|
|
3314
3313
|
},
|
|
3315
3314
|
{
|
|
3316
3315
|
title: "Src Alpha",
|
|
@@ -3322,11 +3321,11 @@ const Fr = [
|
|
|
3322
3321
|
},
|
|
3323
3322
|
{
|
|
3324
3323
|
title: "Dst Alpha",
|
|
3325
|
-
value:
|
|
3324
|
+
value: Qi
|
|
3326
3325
|
},
|
|
3327
3326
|
{
|
|
3328
3327
|
title: "One Minus Dst Alpha",
|
|
3329
|
-
value:
|
|
3328
|
+
value: Ji
|
|
3330
3329
|
},
|
|
3331
3330
|
{
|
|
3332
3331
|
title: "Dst Color",
|
|
@@ -3338,28 +3337,28 @@ const Fr = [
|
|
|
3338
3337
|
},
|
|
3339
3338
|
{
|
|
3340
3339
|
title: "Src Alpha Saturate",
|
|
3341
|
-
value:
|
|
3340
|
+
value: Ds
|
|
3342
3341
|
},
|
|
3343
3342
|
{
|
|
3344
3343
|
title: "Constant Color",
|
|
3345
|
-
value:
|
|
3344
|
+
value: es
|
|
3346
3345
|
},
|
|
3347
3346
|
{
|
|
3348
3347
|
title: "One Minus Constant Color",
|
|
3349
|
-
value:
|
|
3348
|
+
value: ts
|
|
3350
3349
|
},
|
|
3351
3350
|
{
|
|
3352
3351
|
title: "Constant Alpha",
|
|
3353
|
-
value:
|
|
3352
|
+
value: is
|
|
3354
3353
|
},
|
|
3355
3354
|
{
|
|
3356
3355
|
title: "One Minus Constant Alpha",
|
|
3357
|
-
value:
|
|
3356
|
+
value: ss
|
|
3358
3357
|
}
|
|
3359
|
-
],
|
|
3358
|
+
], $r = [
|
|
3360
3359
|
{
|
|
3361
3360
|
title: "Zero",
|
|
3362
|
-
value:
|
|
3361
|
+
value: ji
|
|
3363
3362
|
},
|
|
3364
3363
|
{
|
|
3365
3364
|
title: "One",
|
|
@@ -3367,11 +3366,11 @@ const Fr = [
|
|
|
3367
3366
|
},
|
|
3368
3367
|
{
|
|
3369
3368
|
title: "Src Color",
|
|
3370
|
-
value:
|
|
3369
|
+
value: Ki
|
|
3371
3370
|
},
|
|
3372
3371
|
{
|
|
3373
3372
|
title: "One Minus Src Color",
|
|
3374
|
-
value:
|
|
3373
|
+
value: Xi
|
|
3375
3374
|
},
|
|
3376
3375
|
{
|
|
3377
3376
|
title: "Src Alpha",
|
|
@@ -3383,11 +3382,11 @@ const Fr = [
|
|
|
3383
3382
|
},
|
|
3384
3383
|
{
|
|
3385
3384
|
title: "Dst Alpha",
|
|
3386
|
-
value:
|
|
3385
|
+
value: Qi
|
|
3387
3386
|
},
|
|
3388
3387
|
{
|
|
3389
3388
|
title: "One Minus Dst Alpha",
|
|
3390
|
-
value:
|
|
3389
|
+
value: Ji
|
|
3391
3390
|
},
|
|
3392
3391
|
{
|
|
3393
3392
|
title: "Dst Color",
|
|
@@ -3399,25 +3398,25 @@ const Fr = [
|
|
|
3399
3398
|
},
|
|
3400
3399
|
{
|
|
3401
3400
|
title: "Constant Color",
|
|
3402
|
-
value:
|
|
3401
|
+
value: es
|
|
3403
3402
|
},
|
|
3404
3403
|
{
|
|
3405
3404
|
title: "One Minus Constant Color",
|
|
3406
|
-
value:
|
|
3405
|
+
value: ts
|
|
3407
3406
|
},
|
|
3408
3407
|
{
|
|
3409
3408
|
title: "Constant Alpha",
|
|
3410
|
-
value:
|
|
3409
|
+
value: is
|
|
3411
3410
|
},
|
|
3412
3411
|
{
|
|
3413
3412
|
title: "One Minus Constant Alpha",
|
|
3414
|
-
value:
|
|
3413
|
+
value: ss
|
|
3415
3414
|
}
|
|
3416
3415
|
];
|
|
3417
3416
|
function Ne(i, e) {
|
|
3418
3417
|
i.needsUpdate = !0, i.type = "option", i.options = e;
|
|
3419
3418
|
}
|
|
3420
|
-
function
|
|
3419
|
+
function Wr(i, e, t, s) {
|
|
3421
3420
|
return {
|
|
3422
3421
|
type: "boolean",
|
|
3423
3422
|
title: Ct(i),
|
|
@@ -3434,7 +3433,7 @@ function Gr(i, e, t, s) {
|
|
|
3434
3433
|
}
|
|
3435
3434
|
};
|
|
3436
3435
|
}
|
|
3437
|
-
function
|
|
3436
|
+
function Yr(i, e, t, s) {
|
|
3438
3437
|
const n = {
|
|
3439
3438
|
type: "number",
|
|
3440
3439
|
title: Ct(i),
|
|
@@ -3455,24 +3454,24 @@ function $r(i, e, t, s) {
|
|
|
3455
3454
|
};
|
|
3456
3455
|
switch (i) {
|
|
3457
3456
|
case "blending":
|
|
3458
|
-
Ne(n,
|
|
3457
|
+
Ne(n, Br);
|
|
3459
3458
|
break;
|
|
3460
3459
|
case "blendDst":
|
|
3461
|
-
Ne(n,
|
|
3460
|
+
Ne(n, $r);
|
|
3462
3461
|
break;
|
|
3463
3462
|
case "blendEquation":
|
|
3464
|
-
Ne(n,
|
|
3463
|
+
Ne(n, Vr);
|
|
3465
3464
|
break;
|
|
3466
3465
|
case "blendSrc":
|
|
3467
|
-
Ne(n,
|
|
3466
|
+
Ne(n, Gr);
|
|
3468
3467
|
break;
|
|
3469
3468
|
case "side":
|
|
3470
|
-
Ne(n,
|
|
3469
|
+
Ne(n, Hr);
|
|
3471
3470
|
break;
|
|
3472
3471
|
}
|
|
3473
|
-
return
|
|
3472
|
+
return ps(i) && (n.value = Number(e), n.type = "range", n.min = Math.min(0, n.value), n.max = Math.max(1, n.value), n.step = 0.01), n;
|
|
3474
3473
|
}
|
|
3475
|
-
function
|
|
3474
|
+
function Zr(i, e, t, s) {
|
|
3476
3475
|
const n = {
|
|
3477
3476
|
type: "string",
|
|
3478
3477
|
title: Ct(i),
|
|
@@ -3508,13 +3507,13 @@ function Wr(i, e, t, s) {
|
|
|
3508
3507
|
}
|
|
3509
3508
|
}), n;
|
|
3510
3509
|
}
|
|
3511
|
-
function
|
|
3510
|
+
function qr(i) {
|
|
3512
3511
|
return i.x !== void 0 && i.y !== void 0 && i.z === void 0;
|
|
3513
3512
|
}
|
|
3514
|
-
function
|
|
3513
|
+
function jr(i) {
|
|
3515
3514
|
return i.x !== void 0 && i.y !== void 0 && i.z !== void 0 && i.w === void 0;
|
|
3516
3515
|
}
|
|
3517
|
-
function
|
|
3516
|
+
function Kr(i) {
|
|
3518
3517
|
return i.x !== void 0 && i.y !== void 0 && i.z !== void 0 && i.w !== void 0;
|
|
3519
3518
|
}
|
|
3520
3519
|
function Kt(i) {
|
|
@@ -3552,12 +3551,12 @@ function Ue(i, e, t, s, n = "", r = !1) {
|
|
|
3552
3551
|
s.updateObject(t.uuid, `material.${o}`, d);
|
|
3553
3552
|
const u = s.getScene(t.uuid);
|
|
3554
3553
|
if (u !== null) {
|
|
3555
|
-
const
|
|
3556
|
-
V(
|
|
3554
|
+
const m = u.getObjectByProperty("uuid", t.uuid);
|
|
3555
|
+
V(m, `material.${o}`, d);
|
|
3557
3556
|
}
|
|
3558
3557
|
}
|
|
3559
3558
|
};
|
|
3560
|
-
return
|
|
3559
|
+
return ps(a) && (l.type = "range", l.min = 0, l.max = 1), l;
|
|
3561
3560
|
} else {
|
|
3562
3561
|
if (e.isColor)
|
|
3563
3562
|
return {
|
|
@@ -3571,8 +3570,8 @@ function Ue(i, e, t, s, n = "", r = !1) {
|
|
|
3571
3570
|
s.updateObject(t.uuid, `material.${o}`, d);
|
|
3572
3571
|
const u = s.getScene(t.uuid);
|
|
3573
3572
|
if (u !== null) {
|
|
3574
|
-
const
|
|
3575
|
-
V(
|
|
3573
|
+
const m = u.getObjectByProperty("uuid", t.uuid);
|
|
3574
|
+
V(m, `material.${o}`, d);
|
|
3576
3575
|
}
|
|
3577
3576
|
}
|
|
3578
3577
|
};
|
|
@@ -3581,11 +3580,11 @@ function Ue(i, e, t, s, n = "", r = !1) {
|
|
|
3581
3580
|
for (const h in e) {
|
|
3582
3581
|
const d = e[h], u = `[${h.toString()}]`;
|
|
3583
3582
|
if (d.value !== void 0) {
|
|
3584
|
-
const
|
|
3585
|
-
|
|
3583
|
+
const m = Ue(`${u}.value`, d.value, t, s, o, r);
|
|
3584
|
+
m !== void 0 && l.push(m);
|
|
3586
3585
|
} else {
|
|
3587
|
-
const
|
|
3588
|
-
|
|
3586
|
+
const m = Ue(u, d, t, s, o, r);
|
|
3587
|
+
m !== void 0 && l.push(m);
|
|
3589
3588
|
}
|
|
3590
3589
|
}
|
|
3591
3590
|
if (l.length > 0)
|
|
@@ -3594,7 +3593,7 @@ function Ue(i, e, t, s, n = "", r = !1) {
|
|
|
3594
3593
|
items: l
|
|
3595
3594
|
};
|
|
3596
3595
|
} else {
|
|
3597
|
-
if (
|
|
3596
|
+
if (qr(e))
|
|
3598
3597
|
return {
|
|
3599
3598
|
title: a,
|
|
3600
3599
|
prop: o,
|
|
@@ -3610,7 +3609,7 @@ function Ue(i, e, t, s, n = "", r = !1) {
|
|
|
3610
3609
|
}
|
|
3611
3610
|
}
|
|
3612
3611
|
};
|
|
3613
|
-
if (
|
|
3612
|
+
if (jr(e))
|
|
3614
3613
|
return {
|
|
3615
3614
|
title: a,
|
|
3616
3615
|
prop: o,
|
|
@@ -3626,7 +3625,7 @@ function Ue(i, e, t, s, n = "", r = !1) {
|
|
|
3626
3625
|
}
|
|
3627
3626
|
}
|
|
3628
3627
|
};
|
|
3629
|
-
if (
|
|
3628
|
+
if (Kr(e))
|
|
3630
3629
|
return {
|
|
3631
3630
|
title: a,
|
|
3632
3631
|
prop: o,
|
|
@@ -3665,11 +3664,11 @@ function Ue(i, e, t, s, n = "", r = !1) {
|
|
|
3665
3664
|
value: e,
|
|
3666
3665
|
disabled: r,
|
|
3667
3666
|
onChange: (l, h) => {
|
|
3668
|
-
const d =
|
|
3667
|
+
const d = Fr(i), u = n.length > 0 ? `${n}.${d}` : d;
|
|
3669
3668
|
s.createTexture(t.uuid, `material.${u}`, h);
|
|
3670
|
-
const
|
|
3671
|
-
if (
|
|
3672
|
-
const y =
|
|
3669
|
+
const m = s.getScene(t.uuid);
|
|
3670
|
+
if (m !== null) {
|
|
3671
|
+
const y = m.getObjectByProperty("uuid", t.uuid);
|
|
3673
3672
|
if (y !== void 0) {
|
|
3674
3673
|
const v = (C) => {
|
|
3675
3674
|
const g = y.material, _ = u.split(".");
|
|
@@ -3692,7 +3691,7 @@ function Ue(i, e, t, s, n = "", r = !1) {
|
|
|
3692
3691
|
}
|
|
3693
3692
|
g.needsUpdate = !0;
|
|
3694
3693
|
};
|
|
3695
|
-
h.src.length > 0 ?
|
|
3694
|
+
h.src.length > 0 ? hs(h.src).then((C) => {
|
|
3696
3695
|
C.offset.set(h.offset[0], h.offset[1]), C.repeat.set(h.repeat[0], h.repeat[1]), v(C);
|
|
3697
3696
|
}) : v(null);
|
|
3698
3697
|
}
|
|
@@ -3722,11 +3721,11 @@ function Ue(i, e, t, s, n = "", r = !1) {
|
|
|
3722
3721
|
const u = e[d];
|
|
3723
3722
|
if (u !== void 0)
|
|
3724
3723
|
if (u.value !== void 0) {
|
|
3725
|
-
const
|
|
3726
|
-
|
|
3724
|
+
const m = Ue(`${d}.value`, u.value, t, s, o, h);
|
|
3725
|
+
m !== void 0 && l.push(m);
|
|
3727
3726
|
} else {
|
|
3728
|
-
const
|
|
3729
|
-
|
|
3727
|
+
const m = Ue(d, u, t, s, o, h);
|
|
3728
|
+
m !== void 0 && l.push(m);
|
|
3730
3729
|
}
|
|
3731
3730
|
}
|
|
3732
3731
|
} catch {
|
|
@@ -3741,18 +3740,18 @@ function Ue(i, e, t, s, n = "", r = !1) {
|
|
|
3741
3740
|
}
|
|
3742
3741
|
}
|
|
3743
3742
|
}
|
|
3744
|
-
function
|
|
3743
|
+
function Mi(i, e, t) {
|
|
3745
3744
|
const s = [];
|
|
3746
3745
|
for (const n in i) {
|
|
3747
|
-
if (!
|
|
3746
|
+
if (!Nr(n) || n.search("Node") > -1 || i[n] instanceof rn)
|
|
3748
3747
|
continue;
|
|
3749
3748
|
const r = typeof i[n], a = i[n];
|
|
3750
3749
|
if (r === "boolean")
|
|
3751
|
-
s.push(
|
|
3750
|
+
s.push(Wr(n, a, e, t));
|
|
3752
3751
|
else if (r === "number")
|
|
3753
|
-
s.push(
|
|
3752
|
+
s.push(Yr(n, a, e, t));
|
|
3754
3753
|
else if (r === "string")
|
|
3755
|
-
s.push(
|
|
3754
|
+
s.push(Zr(n, a, e, t));
|
|
3756
3755
|
else if (r === "object") {
|
|
3757
3756
|
const o = Ue(n, a, e, t);
|
|
3758
3757
|
o !== void 0 && s.push(o);
|
|
@@ -3771,7 +3770,7 @@ function xi(i, e, t) {
|
|
|
3771
3770
|
}
|
|
3772
3771
|
}), s;
|
|
3773
3772
|
}
|
|
3774
|
-
function
|
|
3773
|
+
function Xr(i, e) {
|
|
3775
3774
|
function t() {
|
|
3776
3775
|
return `${e.name}_material`;
|
|
3777
3776
|
}
|
|
@@ -3789,19 +3788,19 @@ function jr(i, e) {
|
|
|
3789
3788
|
{
|
|
3790
3789
|
three: e,
|
|
3791
3790
|
title: `Material ${l}`,
|
|
3792
|
-
items:
|
|
3791
|
+
items: Mi(a[l], i, e)
|
|
3793
3792
|
},
|
|
3794
3793
|
`Material ${l}`
|
|
3795
3794
|
)
|
|
3796
3795
|
);
|
|
3797
|
-
return /* @__PURE__ */ f(
|
|
3796
|
+
return /* @__PURE__ */ f(q, { children: o });
|
|
3798
3797
|
} else
|
|
3799
3798
|
return /* @__PURE__ */ f(
|
|
3800
3799
|
X,
|
|
3801
3800
|
{
|
|
3802
3801
|
three: e,
|
|
3803
3802
|
title: "Material",
|
|
3804
|
-
items:
|
|
3803
|
+
items: Mi(a, i, e),
|
|
3805
3804
|
expanded: n,
|
|
3806
3805
|
onToggle: (o) => {
|
|
3807
3806
|
r(o);
|
|
@@ -3809,9 +3808,9 @@ function jr(i, e) {
|
|
|
3809
3808
|
}
|
|
3810
3809
|
);
|
|
3811
3810
|
}
|
|
3812
|
-
const
|
|
3813
|
-
function
|
|
3814
|
-
const e = i.step !== void 0 ? i.step : 0.01, t = z(null), s = z(null), n = z(null), r = z(null), a = z(null), [o] = L(i.value), [c, l] = L(i.value.offset[0]), [h, d] = L(i.value.offset[1]), [u,
|
|
3811
|
+
const Ai = "data:image/gif;base64,R0lGODlhDgFkAIAAAP///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgOS4xLWMwMDIgNzkuZGJhM2RhM2I1LCAyMDIzLzEyLzE1LTEwOjQyOjM3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjUuNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyMDk3M0NEODAxQjQxMUVGODVGNENDMkUyMUExNDk1NSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoyMDk3M0NEOTAxQjQxMUVGODVGNENDMkUyMUExNDk1NSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkE4ODc3Qzg5MDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkE4ODc3QzhBMDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAAAAAAAsAAAAAA4BZAAAAv+Mj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/JM1/aN5/rO9/4PDAqHxKLxiEwql8ym8wmNSqfUqvWKzWq33K73Cw6Lx+Sy+YxOq9fstvsNj8vn9Lr9js/r9/y+/w8YKDhIWGh4iJiouMjY6PgIGSk5SVlpeYmZqTkJAGDQ+dnpuekmGgAKejpKuiZqmprKqoZKGyrbOlqrejub6xvLGyw8TFzcprurGuvqybxq7ETbrItsCz0l7Zpc+6p9/cS967w9/S2FTF0u/mzehK4Oqz3eTl9vf4+fr7/P3+//DzCgwIEECxo8iDChwoUMGzp8CDGixIkUK1q8iDGjxo0XHDt6/AgypMiRJEuaPIkypcqVLFt+KwAAOw==";
|
|
3812
|
+
function Qr(i) {
|
|
3813
|
+
const e = i.step !== void 0 ? i.step : 0.01, t = z(null), s = z(null), n = z(null), r = z(null), a = z(null), [o] = L(i.value), [c, l] = L(i.value.offset[0]), [h, d] = L(i.value.offset[1]), [u, m] = L(i.value.repeat[0]), [y, v] = L(i.value.repeat[1]);
|
|
3815
3814
|
function C(_, E, S, b, O) {
|
|
3816
3815
|
if (i.onChange !== void 0) {
|
|
3817
3816
|
const w = i.prop !== void 0 ? i.prop : i.title;
|
|
@@ -3832,7 +3831,7 @@ function Kr(i) {
|
|
|
3832
3831
|
d(S), C(E, c, S, u, y);
|
|
3833
3832
|
break;
|
|
3834
3833
|
case r.current:
|
|
3835
|
-
|
|
3834
|
+
m(S), C(E, c, h, S, y);
|
|
3836
3835
|
break;
|
|
3837
3836
|
case a.current:
|
|
3838
3837
|
v(S), C(E, c, h, u, S);
|
|
@@ -3841,10 +3840,10 @@ function Kr(i) {
|
|
|
3841
3840
|
}
|
|
3842
3841
|
return /* @__PURE__ */ M("div", { className: "imageField", children: [
|
|
3843
3842
|
/* @__PURE__ */ f("img", { alt: i.title, ref: t, onClick: () => {
|
|
3844
|
-
|
|
3843
|
+
zr().then((_) => {
|
|
3845
3844
|
t.current.src = _, C(_, c, h, u, y);
|
|
3846
3845
|
});
|
|
3847
|
-
}, src: o.src.length > 0 ? o.src :
|
|
3846
|
+
}, src: o.src.length > 0 ? o.src : Ai }),
|
|
3848
3847
|
/* @__PURE__ */ M("div", { className: "fields", children: [
|
|
3849
3848
|
/* @__PURE__ */ M("div", { children: [
|
|
3850
3849
|
/* @__PURE__ */ f("span", { children: "Offset:" }),
|
|
@@ -3897,7 +3896,7 @@ function Kr(i) {
|
|
|
3897
3896
|
)
|
|
3898
3897
|
] }),
|
|
3899
3898
|
/* @__PURE__ */ f("button", { onClick: () => {
|
|
3900
|
-
C("", c, h, u, y), t.current.src =
|
|
3899
|
+
C("", c, h, u, y), t.current.src = Ai;
|
|
3901
3900
|
}, children: "Clear" })
|
|
3902
3901
|
] })
|
|
3903
3902
|
] });
|
|
@@ -3983,7 +3982,7 @@ function ht(i) {
|
|
|
3983
3982
|
onChange: i.onChange
|
|
3984
3983
|
}
|
|
3985
3984
|
),
|
|
3986
|
-
i.type === "color" && /* @__PURE__ */ M(
|
|
3985
|
+
i.type === "color" && /* @__PURE__ */ M(q, { children: [
|
|
3987
3986
|
/* @__PURE__ */ f("input", { type: "text", value: t.toString(), onChange: r, disabled: i.disabled, className: "color", name: W() }),
|
|
3988
3987
|
/* @__PURE__ */ f("input", { type: "color", value: t, onChange: r, disabled: i.disabled, name: W() })
|
|
3989
3988
|
] }),
|
|
@@ -3997,8 +3996,8 @@ function ht(i) {
|
|
|
3997
3996
|
children: i.title
|
|
3998
3997
|
}
|
|
3999
3998
|
),
|
|
4000
|
-
i.type === "image" && /* @__PURE__ */ f(
|
|
4001
|
-
i.type === "option" && /* @__PURE__ */ f(
|
|
3999
|
+
i.type === "image" && /* @__PURE__ */ f(Qr, { title: i.title, prop: i.prop, value: i.value, onChange: i.onChange }),
|
|
4000
|
+
i.type === "option" && /* @__PURE__ */ f(q, { children: /* @__PURE__ */ f(
|
|
4002
4001
|
"select",
|
|
4003
4002
|
{
|
|
4004
4003
|
onChange: r,
|
|
@@ -4008,13 +4007,13 @@ function ht(i) {
|
|
|
4008
4007
|
children: i.options?.map((l, h) => /* @__PURE__ */ f("option", { value: l.value, children: mt(l.title) }, h))
|
|
4009
4008
|
}
|
|
4010
4009
|
) }),
|
|
4011
|
-
i.type === "vector2" && /* @__PURE__ */ f(
|
|
4012
|
-
i.type === "grid3" && /* @__PURE__ */ f(
|
|
4013
|
-
i.type === "grid4" && /* @__PURE__ */ f(
|
|
4014
|
-
i.type === "euler" && /* @__PURE__ */ f(
|
|
4010
|
+
i.type === "vector2" && /* @__PURE__ */ f(Lr, { step: i.step, value: t, min: 0, max: 1, onChange: r }),
|
|
4011
|
+
i.type === "grid3" && /* @__PURE__ */ f(Ti, { step: i.step, value: t, onChange: r }),
|
|
4012
|
+
i.type === "grid4" && /* @__PURE__ */ f(kr, { step: i.step, value: t, onChange: r }),
|
|
4013
|
+
i.type === "euler" && /* @__PURE__ */ f(Ti, { step: i.step, value: t, onChange: r })
|
|
4015
4014
|
] });
|
|
4016
4015
|
}
|
|
4017
|
-
function
|
|
4016
|
+
function Jr(i) {
|
|
4018
4017
|
return "items" in i;
|
|
4019
4018
|
}
|
|
4020
4019
|
class X extends Qe {
|
|
@@ -4072,7 +4071,7 @@ class X extends Qe {
|
|
|
4072
4071
|
render() {
|
|
4073
4072
|
const e = [];
|
|
4074
4073
|
return this.props.items.forEach((t) => {
|
|
4075
|
-
if (
|
|
4074
|
+
if (Jr(t))
|
|
4076
4075
|
e.push(
|
|
4077
4076
|
/* @__PURE__ */ f(X, { three: this.props.three, title: mt(t.title), items: t.items }, t.title)
|
|
4078
4077
|
);
|
|
@@ -4242,7 +4241,7 @@ class I extends Qe {
|
|
|
4242
4241
|
I.groups = [], I.groupTitles = [], I.groupsRefs = [], I.instance.setState({ lastUpdate: Date.now() });
|
|
4243
4242
|
}
|
|
4244
4243
|
}
|
|
4245
|
-
function
|
|
4244
|
+
function Ri(i) {
|
|
4246
4245
|
switch (i) {
|
|
4247
4246
|
case "fov":
|
|
4248
4247
|
return "FOV";
|
|
@@ -4271,7 +4270,7 @@ function Mi(i) {
|
|
|
4271
4270
|
}
|
|
4272
4271
|
return i;
|
|
4273
4272
|
}
|
|
4274
|
-
function
|
|
4273
|
+
function ea(i, e) {
|
|
4275
4274
|
function t() {
|
|
4276
4275
|
return `${e.name}_camera`;
|
|
4277
4276
|
}
|
|
@@ -4283,7 +4282,7 @@ function Qr(i, e) {
|
|
|
4283
4282
|
if (i.perspectiveCameraInfo !== void 0)
|
|
4284
4283
|
for (const o in i.perspectiveCameraInfo)
|
|
4285
4284
|
a.push({
|
|
4286
|
-
title:
|
|
4285
|
+
title: Ri(o),
|
|
4287
4286
|
prop: o,
|
|
4288
4287
|
type: "number",
|
|
4289
4288
|
step: 0.01,
|
|
@@ -4300,7 +4299,7 @@ function Qr(i, e) {
|
|
|
4300
4299
|
else if (i.orthographicCameraInfo !== void 0)
|
|
4301
4300
|
for (const o in i.orthographicCameraInfo)
|
|
4302
4301
|
a.push({
|
|
4303
|
-
title:
|
|
4302
|
+
title: Ri(o),
|
|
4304
4303
|
prop: o,
|
|
4305
4304
|
type: "number",
|
|
4306
4305
|
step: 0.01,
|
|
@@ -4337,7 +4336,7 @@ const H = {
|
|
|
4337
4336
|
LEFT: 1,
|
|
4338
4337
|
RIGHT: 2,
|
|
4339
4338
|
MIDDLE: 4
|
|
4340
|
-
},
|
|
4339
|
+
}, p = Object.freeze({
|
|
4341
4340
|
NONE: 0,
|
|
4342
4341
|
ROTATE: 1,
|
|
4343
4342
|
TRUCK: 2,
|
|
@@ -4370,17 +4369,17 @@ function ge(i) {
|
|
|
4370
4369
|
function de(i) {
|
|
4371
4370
|
return i.isOrthographicCamera;
|
|
4372
4371
|
}
|
|
4373
|
-
const Pe = Math.PI * 2,
|
|
4372
|
+
const Pe = Math.PI * 2, Pi = Math.PI / 2, ms = 1e-5, Fe = Math.PI / 180;
|
|
4374
4373
|
function J(i, e, t) {
|
|
4375
4374
|
return Math.max(e, Math.min(t, i));
|
|
4376
4375
|
}
|
|
4377
|
-
function F(i, e =
|
|
4376
|
+
function F(i, e = ms) {
|
|
4378
4377
|
return Math.abs(i) < e;
|
|
4379
4378
|
}
|
|
4380
|
-
function k(i, e, t =
|
|
4379
|
+
function k(i, e, t = ms) {
|
|
4381
4380
|
return F(i - e, t);
|
|
4382
4381
|
}
|
|
4383
|
-
function
|
|
4382
|
+
function Di(i, e) {
|
|
4384
4383
|
return Math.round(i / e) * e;
|
|
4385
4384
|
}
|
|
4386
4385
|
function ze(i) {
|
|
@@ -4397,21 +4396,21 @@ function rt(i, e, t, s, n = 1 / 0, r) {
|
|
|
4397
4396
|
l = J(l, -d, d), e = i - l;
|
|
4398
4397
|
const u = (t.value + a * l) * r;
|
|
4399
4398
|
t.value = (t.value - a * u) * c;
|
|
4400
|
-
let
|
|
4401
|
-
return h - i > 0 ==
|
|
4399
|
+
let m = e + (l + u) * c;
|
|
4400
|
+
return h - i > 0 == m > h && (m = h, t.value = (m - h) / r), m;
|
|
4402
4401
|
}
|
|
4403
|
-
function
|
|
4402
|
+
function Ii(i, e, t, s, n = 1 / 0, r, a) {
|
|
4404
4403
|
s = Math.max(1e-4, s);
|
|
4405
4404
|
const o = 2 / s, c = o * r, l = 1 / (1 + c + 0.48 * c * c + 0.235 * c * c * c);
|
|
4406
|
-
let h = e.x, d = e.y, u = e.z,
|
|
4407
|
-
const C = h, g = d, _ = u, E = n * s, S = E * E, b =
|
|
4405
|
+
let h = e.x, d = e.y, u = e.z, m = i.x - h, y = i.y - d, v = i.z - u;
|
|
4406
|
+
const C = h, g = d, _ = u, E = n * s, S = E * E, b = m * m + y * y + v * v;
|
|
4408
4407
|
if (b > S) {
|
|
4409
4408
|
const fe = Math.sqrt(b);
|
|
4410
|
-
|
|
4409
|
+
m = m / fe * E, y = y / fe * E, v = v / fe * E;
|
|
4411
4410
|
}
|
|
4412
|
-
h = i.x -
|
|
4413
|
-
const O = (t.x + o *
|
|
4414
|
-
t.x = (t.x - o * O) * l, t.y = (t.y - o * w) * l, t.z = (t.z - o * D) * l, a.x = h + (
|
|
4411
|
+
h = i.x - m, d = i.y - y, u = i.z - v;
|
|
4412
|
+
const O = (t.x + o * m) * r, w = (t.y + o * y) * r, D = (t.z + o * v) * r;
|
|
4413
|
+
t.x = (t.x - o * O) * l, t.y = (t.y - o * w) * l, t.z = (t.z - o * D) * l, a.x = h + (m + O) * l, a.y = d + (y + w) * l, a.z = u + (v + D) * l;
|
|
4415
4414
|
const x = C - i.x, N = g - i.y, Q = _ - i.z, oe = a.x - C, me = a.y - g, be = a.z - _;
|
|
4416
4415
|
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;
|
|
4417
4416
|
}
|
|
@@ -4423,7 +4422,7 @@ function Dt(i, e) {
|
|
|
4423
4422
|
function It(i, e) {
|
|
4424
4423
|
return de(i) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
|
|
4425
4424
|
}
|
|
4426
|
-
class
|
|
4425
|
+
class ta {
|
|
4427
4426
|
constructor() {
|
|
4428
4427
|
this._listeners = {};
|
|
4429
4428
|
}
|
|
@@ -4488,9 +4487,9 @@ class Jr {
|
|
|
4488
4487
|
}
|
|
4489
4488
|
}
|
|
4490
4489
|
var Ut;
|
|
4491
|
-
const
|
|
4492
|
-
let T,
|
|
4493
|
-
class ae extends
|
|
4490
|
+
const ia = "2.10.1", at = 1 / 8, sa = /Mac/.test((Ut = globalThis?.navigator) === null || Ut === void 0 ? void 0 : Ut.platform);
|
|
4491
|
+
let T, Ui, ot, Lt, Z, A, U, De, Be, se, ne, ve, Li, ki, K, Ve, Ie, Ni, kt, Fi, Nt, Ft, lt;
|
|
4492
|
+
class ae extends ta {
|
|
4494
4493
|
/**
|
|
4495
4494
|
* Injects THREE as the dependency. You can then proceed to use CameraControls.
|
|
4496
4495
|
*
|
|
@@ -4532,14 +4531,14 @@ class ae extends Jr {
|
|
|
4532
4531
|
* @category Statics
|
|
4533
4532
|
*/
|
|
4534
4533
|
static install(e) {
|
|
4535
|
-
T = e.THREE,
|
|
4534
|
+
T = e.THREE, Ui = Object.freeze(new T.Vector3(0, 0, 0)), ot = Object.freeze(new T.Vector3(0, 1, 0)), Lt = Object.freeze(new T.Vector3(0, 0, 1)), Z = 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(), kt = new T.Sphere(), Fi = new T.Quaternion(), Nt = new T.Quaternion(), Ft = new T.Matrix4(), lt = new T.Raycaster();
|
|
4536
4535
|
}
|
|
4537
4536
|
/**
|
|
4538
4537
|
* list all ACTIONs
|
|
4539
4538
|
* @category Statics
|
|
4540
4539
|
*/
|
|
4541
4540
|
static get ACTION() {
|
|
4542
|
-
return
|
|
4541
|
+
return p;
|
|
4543
4542
|
}
|
|
4544
4543
|
/**
|
|
4545
4544
|
* @deprecated Use `cameraControls.mouseButtons.left = CameraControls.ACTION.SCREEN_PAN` instead.
|
|
@@ -4566,7 +4565,7 @@ class ae extends Jr {
|
|
|
4566
4565
|
*/
|
|
4567
4566
|
constructor(e, t) {
|
|
4568
4567
|
super(), this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.minDistance = Number.EPSILON, this.maxDistance = 1 / 0, this.infinityDolly = !1, this.minZoom = 0.01, this.maxZoom = 1 / 0, this.smoothTime = 0.25, this.draggingSmoothTime = 0.125, this.maxSpeed = 1 / 0, this.azimuthRotateSpeed = 1, this.polarRotateSpeed = 1, this.dollySpeed = 1, this.dollyDragInverted = !1, this.truckSpeed = 2, this.dollyToCursor = !1, this.dragToOffset = !1, this.boundaryFriction = 0, this.restThreshold = 0.01, this.colliderMeshes = [], this.cancel = () => {
|
|
4569
|
-
}, this._enabled = !0, this._state =
|
|
4568
|
+
}, this._enabled = !0, this._state = p.NONE, this._viewport = null, this._changedDolly = 0, this._changedZoom = 0, this._hasRested = !0, this._boundaryEnclosesCamera = !1, this._needsUpdate = !0, this._updatedLastTime = !1, this._elementRect = new DOMRect(), this._isDragging = !1, this._dragNeedsUpdate = !0, this._activePointers = [], this._lockedPointer = null, this._interactiveArea = new DOMRect(0, 0, 1, 1), this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._isUserControllingOffset = !1, this._isUserControllingZoom = !1, this._lastDollyDirection = Re.NONE, this._thetaVelocity = { value: 0 }, this._phiVelocity = { value: 0 }, this._radiusVelocity = { value: 0 }, this._targetVelocity = new T.Vector3(), this._focalOffsetVelocity = new T.Vector3(), this._zoomVelocity = { value: 0 }, this._truckInternal = (g, _, E, S) => {
|
|
4570
4569
|
let b, O;
|
|
4571
4570
|
if (ge(this._camera)) {
|
|
4572
4571
|
const w = A.copy(this._camera.position).sub(this._target), D = this._camera.getEffectiveFOV() * Fe, x = w.length() * Math.tan(D * 0.5);
|
|
@@ -4586,20 +4585,20 @@ class ae extends Jr {
|
|
|
4586
4585
|
}, this._zoomInternal = (g, _, E) => {
|
|
4587
4586
|
const S = Math.pow(0.95, g * this.dollySpeed), b = this._zoom, O = this._zoom * S;
|
|
4588
4587
|
this.zoomTo(O, !0), this.dollyToCursor && (this._changedZoom += O - b, this._dollyControlCoord.set(_, E));
|
|
4589
|
-
}, 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, ot), this._yAxisUpSpaceInverse = this._yAxisUpSpace.clone().invert(), this._state =
|
|
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, ot), 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 = [
|
|
4590
4589
|
new T.Vector3(),
|
|
4591
4590
|
new T.Vector3(),
|
|
4592
4591
|
new T.Vector3(),
|
|
4593
4592
|
new T.Vector3()
|
|
4594
4593
|
], this._updateNearPlaneCorners(), this._boundary = new T.Box3(new T.Vector3(-1 / 0, -1 / 0, -1 / 0), new T.Vector3(1 / 0, 1 / 0, 1 / 0)), this._cameraUp0 = this._camera.up.clone(), this._target0 = this._target.clone(), this._position0 = this._camera.position.clone(), this._zoom0 = this._zoom, this._focalOffset0 = this._focalOffset.clone(), this._dollyControlCoord = new T.Vector2(), this.mouseButtons = {
|
|
4595
|
-
left:
|
|
4596
|
-
middle:
|
|
4597
|
-
right:
|
|
4598
|
-
wheel: ge(this._camera) ?
|
|
4594
|
+
left: p.ROTATE,
|
|
4595
|
+
middle: p.DOLLY,
|
|
4596
|
+
right: p.TRUCK,
|
|
4597
|
+
wheel: ge(this._camera) ? p.DOLLY : de(this._camera) ? p.ZOOM : p.NONE
|
|
4599
4598
|
}, this.touches = {
|
|
4600
|
-
one:
|
|
4601
|
-
two: ge(this._camera) ?
|
|
4602
|
-
three:
|
|
4599
|
+
one: p.TOUCH_ROTATE,
|
|
4600
|
+
two: ge(this._camera) ? p.TOUCH_DOLLY_TRUCK : de(this._camera) ? p.TOUCH_ZOOM_TRUCK : p.NONE,
|
|
4601
|
+
three: p.TOUCH_TRUCK
|
|
4603
4602
|
};
|
|
4604
4603
|
const s = new T.Vector2(), n = new T.Vector2(), r = new T.Vector2(), a = (g) => {
|
|
4605
4604
|
if (!this._enabled || !this._domElement)
|
|
@@ -4643,7 +4642,7 @@ class ae extends Jr {
|
|
|
4643
4642
|
}
|
|
4644
4643
|
else
|
|
4645
4644
|
(!this._isDragging && this._lockedPointer || this._isDragging && (g.buttons & H.LEFT) === H.LEFT) && (this._state = this._state | this.mouseButtons.left), this._isDragging && (g.buttons & H.MIDDLE) === H.MIDDLE && (this._state = this._state | this.mouseButtons.middle), this._isDragging && (g.buttons & H.RIGHT) === H.RIGHT && (this._state = this._state | this.mouseButtons.right);
|
|
4646
|
-
|
|
4645
|
+
m();
|
|
4647
4646
|
}
|
|
4648
4647
|
}, c = (g) => {
|
|
4649
4648
|
const _ = this._findPointerById(g.pointerId);
|
|
@@ -4651,7 +4650,7 @@ class ae extends Jr {
|
|
|
4651
4650
|
if (_ && this._disposePointer(_), g.pointerType === "touch")
|
|
4652
4651
|
switch (this._activePointers.length) {
|
|
4653
4652
|
case 0:
|
|
4654
|
-
this._state =
|
|
4653
|
+
this._state = p.NONE;
|
|
4655
4654
|
break;
|
|
4656
4655
|
case 1:
|
|
4657
4656
|
this._state = this.touches.one;
|
|
@@ -4664,46 +4663,46 @@ class ae extends Jr {
|
|
|
4664
4663
|
break;
|
|
4665
4664
|
}
|
|
4666
4665
|
else
|
|
4667
|
-
this._state =
|
|
4666
|
+
this._state = p.NONE;
|
|
4668
4667
|
y();
|
|
4669
4668
|
}
|
|
4670
4669
|
};
|
|
4671
4670
|
let l = -1;
|
|
4672
4671
|
const h = (g) => {
|
|
4673
|
-
if (!this._domElement || !this._enabled || this.mouseButtons.wheel ===
|
|
4672
|
+
if (!this._domElement || !this._enabled || this.mouseButtons.wheel === p.NONE)
|
|
4674
4673
|
return;
|
|
4675
4674
|
if (this._interactiveArea.left !== 0 || this._interactiveArea.top !== 0 || this._interactiveArea.width !== 1 || this._interactiveArea.height !== 1) {
|
|
4676
4675
|
const O = this._domElement.getBoundingClientRect(), w = g.clientX / O.width, D = g.clientY / O.height;
|
|
4677
4676
|
if (w < this._interactiveArea.left || w > this._interactiveArea.right || D < this._interactiveArea.top || D > this._interactiveArea.bottom)
|
|
4678
4677
|
return;
|
|
4679
4678
|
}
|
|
4680
|
-
if (g.preventDefault(), this.dollyToCursor || this.mouseButtons.wheel ===
|
|
4679
|
+
if (g.preventDefault(), this.dollyToCursor || this.mouseButtons.wheel === p.ROTATE || this.mouseButtons.wheel === p.TRUCK) {
|
|
4681
4680
|
const O = performance.now();
|
|
4682
4681
|
l - O < 1e3 && this._getClientRect(this._elementRect), l = O;
|
|
4683
4682
|
}
|
|
4684
|
-
const _ =
|
|
4683
|
+
const _ = sa ? -1 : -3, E = g.deltaMode === 1 || g.ctrlKey ? g.deltaY / _ : g.deltaY / (_ * 10), S = this.dollyToCursor ? (g.clientX - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, b = this.dollyToCursor ? (g.clientY - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
|
|
4685
4684
|
switch (this.mouseButtons.wheel) {
|
|
4686
|
-
case
|
|
4685
|
+
case p.ROTATE: {
|
|
4687
4686
|
this._rotateInternal(g.deltaX, g.deltaY), this._isUserControllingRotate = !0;
|
|
4688
4687
|
break;
|
|
4689
4688
|
}
|
|
4690
|
-
case
|
|
4689
|
+
case p.TRUCK: {
|
|
4691
4690
|
this._truckInternal(g.deltaX, g.deltaY, !1, !1), this._isUserControllingTruck = !0;
|
|
4692
4691
|
break;
|
|
4693
4692
|
}
|
|
4694
|
-
case
|
|
4693
|
+
case p.SCREEN_PAN: {
|
|
4695
4694
|
this._truckInternal(g.deltaX, g.deltaY, !1, !0), this._isUserControllingTruck = !0;
|
|
4696
4695
|
break;
|
|
4697
4696
|
}
|
|
4698
|
-
case
|
|
4697
|
+
case p.OFFSET: {
|
|
4699
4698
|
this._truckInternal(g.deltaX, g.deltaY, !0, !1), this._isUserControllingOffset = !0;
|
|
4700
4699
|
break;
|
|
4701
4700
|
}
|
|
4702
|
-
case
|
|
4701
|
+
case p.DOLLY: {
|
|
4703
4702
|
this._dollyInternal(-E, S, b), this._isUserControllingDolly = !0;
|
|
4704
4703
|
break;
|
|
4705
4704
|
}
|
|
4706
|
-
case
|
|
4705
|
+
case p.ZOOM: {
|
|
4707
4706
|
this._zoomInternal(-E, S, b), this._isUserControllingZoom = !0;
|
|
4708
4707
|
break;
|
|
4709
4708
|
}
|
|
@@ -4721,8 +4720,8 @@ class ae extends Jr {
|
|
|
4721
4720
|
}, u = (g) => {
|
|
4722
4721
|
if (!this._enabled)
|
|
4723
4722
|
return;
|
|
4724
|
-
if (Dt(this._activePointers,
|
|
4725
|
-
const E =
|
|
4723
|
+
if (Dt(this._activePointers, Z), this._getClientRect(this._elementRect), s.copy(Z), n.copy(Z), this._activePointers.length >= 2) {
|
|
4724
|
+
const E = Z.x - this._activePointers[1].clientX, S = Z.y - this._activePointers[1].clientY, b = Math.sqrt(E * E + S * S);
|
|
4726
4725
|
r.set(0, b);
|
|
4727
4726
|
const O = (this._activePointers[0].clientX + this._activePointers[1].clientX) * 0.5, w = (this._activePointers[0].clientY + this._activePointers[1].clientY) * 0.5;
|
|
4728
4727
|
n.set(O, w);
|
|
@@ -4743,25 +4742,25 @@ class ae extends Jr {
|
|
|
4743
4742
|
}
|
|
4744
4743
|
else
|
|
4745
4744
|
!this._lockedPointer && (g.buttons & H.LEFT) === H.LEFT && (this._state = this._state | this.mouseButtons.left), (g.buttons & H.MIDDLE) === H.MIDDLE && (this._state = this._state | this.mouseButtons.middle), (g.buttons & H.RIGHT) === H.RIGHT && (this._state = this._state | this.mouseButtons.right);
|
|
4746
|
-
((this._state &
|
|
4747
|
-
},
|
|
4745
|
+
((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._sphericalEnd.theta = this._spherical.theta, this._sphericalEnd.phi = this._spherical.phi, this._thetaVelocity.value = 0, this._phiVelocity.value = 0), ((this._state & p.TRUCK) === p.TRUCK || (this._state & p.SCREEN_PAN) === p.SCREEN_PAN || (this._state & p.TOUCH_TRUCK) === p.TOUCH_TRUCK || (this._state & p.TOUCH_SCREEN_PAN) === p.TOUCH_SCREEN_PAN || (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_ZOOM_TRUCK) === p.TOUCH_ZOOM_TRUCK || (this._state & p.TOUCH_ZOOM_SCREEN_PAN) === p.TOUCH_DOLLY_SCREEN_PAN) && (this._targetEnd.copy(this._target), this._targetVelocity.set(0, 0, 0)), ((this._state & p.DOLLY) === p.DOLLY || (this._state & p.TOUCH_DOLLY) === p.TOUCH_DOLLY || (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._state & p.TOUCH_DOLLY_ROTATE) === p.TOUCH_DOLLY_ROTATE) && (this._sphericalEnd.radius = this._spherical.radius, this._radiusVelocity.value = 0), ((this._state & p.ZOOM) === p.ZOOM || (this._state & p.TOUCH_ZOOM) === p.TOUCH_ZOOM || (this._state & p.TOUCH_ZOOM_TRUCK) === p.TOUCH_ZOOM_TRUCK || (this._state & p.TOUCH_ZOOM_SCREEN_PAN) === p.TOUCH_ZOOM_SCREEN_PAN || (this._state & p.TOUCH_ZOOM_OFFSET) === p.TOUCH_ZOOM_OFFSET || (this._state & p.TOUCH_ZOOM_ROTATE) === p.TOUCH_ZOOM_ROTATE) && (this._zoomEnd = this._zoom, this._zoomVelocity.value = 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._focalOffsetEnd.copy(this._focalOffset), this._focalOffsetVelocity.set(0, 0, 0)), this.dispatchEvent({ type: "controlstart" });
|
|
4746
|
+
}, m = () => {
|
|
4748
4747
|
if (!this._enabled || !this._dragNeedsUpdate)
|
|
4749
4748
|
return;
|
|
4750
|
-
this._dragNeedsUpdate = !1, Dt(this._activePointers,
|
|
4751
|
-
const _ = this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, E = _ ? -_.deltaX : n.x -
|
|
4752
|
-
if (n.copy(
|
|
4749
|
+
this._dragNeedsUpdate = !1, Dt(this._activePointers, Z);
|
|
4750
|
+
const _ = this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, E = _ ? -_.deltaX : n.x - Z.x, S = _ ? -_.deltaY : n.y - Z.y;
|
|
4751
|
+
if (n.copy(Z), ((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) {
|
|
4753
4752
|
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;
|
|
4754
|
-
(this._state &
|
|
4753
|
+
(this._state & p.DOLLY) === p.DOLLY ? (this._dollyInternal(w * S * at, b, O), this._isUserControllingDolly = !0) : (this._zoomInternal(w * S * at, b, O), this._isUserControllingZoom = !0);
|
|
4755
4754
|
}
|
|
4756
|
-
if ((this._state &
|
|
4757
|
-
const b =
|
|
4755
|
+
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
|
+
const b = Z.x - this._activePointers[1].clientX, O = Z.y - this._activePointers[1].clientY, w = Math.sqrt(b * b + O * O), D = r.y - w;
|
|
4758
4757
|
r.set(0, w);
|
|
4759
4758
|
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;
|
|
4760
|
-
(this._state &
|
|
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 * at, x, N), this._isUserControllingDolly = !0) : (this._zoomInternal(D * at, x, N), this._isUserControllingZoom = !0);
|
|
4761
4760
|
}
|
|
4762
|
-
((this._state &
|
|
4761
|
+
((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" });
|
|
4763
4762
|
}, y = () => {
|
|
4764
|
-
Dt(this._activePointers,
|
|
4763
|
+
Dt(this._activePointers, Z), n.copy(Z), 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" }));
|
|
4765
4764
|
};
|
|
4766
4765
|
this.lockPointer = () => {
|
|
4767
4766
|
!this._enabled || !this._domElement || (this.cancel(), this._lockedPointer = {
|
|
@@ -4786,7 +4785,7 @@ class ae extends Jr {
|
|
|
4786
4785
|
}, this._removeAllEventListeners = () => {
|
|
4787
4786
|
this._domElement && (this._domElement.style.touchAction = "", this._domElement.style.userSelect = "", this._domElement.style.webkitUserSelect = "", this._domElement.removeEventListener("pointerdown", a), this._domElement.removeEventListener("pointercancel", c), this._domElement.removeEventListener("wheel", h, { passive: !1 }), this._domElement.removeEventListener("contextmenu", d), this._domElement.ownerDocument.removeEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", c), this._domElement.ownerDocument.removeEventListener("pointerlockchange", v), this._domElement.ownerDocument.removeEventListener("pointerlockerror", C));
|
|
4788
4787
|
}, this.cancel = () => {
|
|
4789
|
-
this._state !==
|
|
4788
|
+
this._state !== p.NONE && (this._state = p.NONE, this._activePointers.length = 0, y());
|
|
4790
4789
|
}, t && this.connect(t), this.update(0);
|
|
4791
4790
|
}
|
|
4792
4791
|
/**
|
|
@@ -5151,13 +5150,13 @@ class ae extends Jr {
|
|
|
5151
5150
|
fitToBox(e, t, { cover: s = !1, paddingLeft: n = 0, paddingRight: r = 0, paddingBottom: a = 0, paddingTop: o = 0 } = {}) {
|
|
5152
5151
|
const c = [], l = e.isBox3 ? Ie.copy(e) : Ie.setFromObject(e);
|
|
5153
5152
|
l.isEmpty() && (console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"), Promise.resolve());
|
|
5154
|
-
const h =
|
|
5153
|
+
const h = Di(this._sphericalEnd.theta, Pi), d = Di(this._sphericalEnd.phi, Pi);
|
|
5155
5154
|
c.push(this.rotateTo(h, d, t));
|
|
5156
|
-
const u = A.setFromSpherical(this._sphericalEnd).normalize(),
|
|
5157
|
-
y &&
|
|
5158
|
-
const v =
|
|
5159
|
-
U.copy(l.min).applyQuaternion(
|
|
5160
|
-
const C = v.getSize(A), g = v.getCenter(U).applyQuaternion(
|
|
5155
|
+
const u = A.setFromSpherical(this._sphericalEnd).normalize(), m = Fi.setFromUnitVectors(u, Lt), y = k(Math.abs(u.y), 1);
|
|
5156
|
+
y && m.multiply(Nt.setFromAxisAngle(ot, h)), m.multiply(this._yAxisUpSpaceInverse);
|
|
5157
|
+
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(Lt, u), y && m.premultiply(Nt.invert()), m.premultiply(this._yAxisUpSpace);
|
|
5159
|
+
const C = v.getSize(A), g = v.getCenter(U).applyQuaternion(m);
|
|
5161
5160
|
if (ge(this._camera)) {
|
|
5162
5161
|
const _ = this.getDistanceToFitBox(C.x, C.y, C.z, s);
|
|
5163
5162
|
c.push(this.moveTo(g.x, g.y, g.z, t)), c.push(this.dollyTo(_, t)), c.push(this.setFocalOffset(0, 0, 0, t));
|
|
@@ -5220,14 +5219,14 @@ class ae extends Jr {
|
|
|
5220
5219
|
* @param enableTransition
|
|
5221
5220
|
* @category Methods
|
|
5222
5221
|
*/
|
|
5223
|
-
lerpLookAt(e, t, s, n, r, a, o, c, l, h, d, u,
|
|
5222
|
+
lerpLookAt(e, t, s, n, r, a, o, c, l, h, d, u, m, y = !1) {
|
|
5224
5223
|
this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = Re.NONE, this._changedDolly = 0;
|
|
5225
5224
|
const v = A.set(n, r, a), C = U.set(e, t, s);
|
|
5226
5225
|
K.setFromVector3(C.sub(v).applyQuaternion(this._yAxisUpSpace));
|
|
5227
5226
|
const g = De.set(h, d, u), _ = U.set(o, c, l);
|
|
5228
|
-
Ve.setFromVector3(_.sub(g).applyQuaternion(this._yAxisUpSpace)), this._targetEnd.copy(v.lerp(g,
|
|
5227
|
+
Ve.setFromVector3(_.sub(g).applyQuaternion(this._yAxisUpSpace)), this._targetEnd.copy(v.lerp(g, m));
|
|
5229
5228
|
const E = Ve.theta - K.theta, S = Ve.phi - K.phi, b = Ve.radius - K.radius;
|
|
5230
|
-
this._sphericalEnd.set(K.radius + b *
|
|
5229
|
+
this._sphericalEnd.set(K.radius + b * m, K.phi + S * m, K.theta + E * m), this.normalizeRotations(), this._needsUpdate = !0, y || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
|
|
5231
5230
|
const O = !y || k(this._target.x, this._targetEnd.x, this.restThreshold) && k(this._target.y, this._targetEnd.y, this.restThreshold) && k(this._target.z, this._targetEnd.z, this.restThreshold) && k(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && k(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && k(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
|
|
5232
5231
|
return this._createOnRestPromise(O);
|
|
5233
5232
|
}
|
|
@@ -5437,7 +5436,7 @@ class ae extends Jr {
|
|
|
5437
5436
|
* @category Methods
|
|
5438
5437
|
*/
|
|
5439
5438
|
update(e) {
|
|
5440
|
-
const t = this._sphericalEnd.theta - this._spherical.theta, s = this._sphericalEnd.phi - this._spherical.phi, n = this._sphericalEnd.radius - this._spherical.radius, r =
|
|
5439
|
+
const t = this._sphericalEnd.theta - this._spherical.theta, s = this._sphericalEnd.phi - this._spherical.phi, n = this._sphericalEnd.radius - this._spherical.radius, r = Li.subVectors(this._targetEnd, this._target), a = ki.subVectors(this._focalOffsetEnd, this._focalOffset), o = this._zoomEnd - this._zoom;
|
|
5441
5440
|
if (F(t))
|
|
5442
5441
|
this._thetaVelocity.value = 0, this._spherical.theta = this._sphericalEnd.theta;
|
|
5443
5442
|
else {
|
|
@@ -5460,13 +5459,13 @@ class ae extends Jr {
|
|
|
5460
5459
|
this._targetVelocity.set(0, 0, 0), this._target.copy(this._targetEnd);
|
|
5461
5460
|
else {
|
|
5462
5461
|
const d = this._isUserControllingTruck ? this.draggingSmoothTime : this.smoothTime;
|
|
5463
|
-
|
|
5462
|
+
Ii(this._target, this._targetEnd, this._targetVelocity, d, this.maxSpeed, e, this._target), this._needsUpdate = !0;
|
|
5464
5463
|
}
|
|
5465
5464
|
if (F(a.x) && F(a.y) && F(a.z))
|
|
5466
5465
|
this._focalOffsetVelocity.set(0, 0, 0), this._focalOffset.copy(this._focalOffsetEnd);
|
|
5467
5466
|
else {
|
|
5468
5467
|
const d = this._isUserControllingOffset ? this.draggingSmoothTime : this.smoothTime;
|
|
5469
|
-
|
|
5468
|
+
Ii(this._focalOffset, this._focalOffsetEnd, this._focalOffsetVelocity, d, this.maxSpeed, e, this._focalOffset), this._needsUpdate = !0;
|
|
5470
5469
|
}
|
|
5471
5470
|
if (F(o))
|
|
5472
5471
|
this._zoomVelocity.value = 0, this._zoom = this._zoomEnd;
|
|
@@ -5476,19 +5475,19 @@ class ae extends Jr {
|
|
|
5476
5475
|
}
|
|
5477
5476
|
if (this.dollyToCursor) {
|
|
5478
5477
|
if (ge(this._camera) && this._changedDolly !== 0) {
|
|
5479
|
-
const d = this._spherical.radius - this._lastDistance, u = this._camera,
|
|
5478
|
+
const d = this._spherical.radius - this._lastDistance, u = this._camera, m = this._getCameraDirection(Be), y = A.copy(m).cross(u.up).normalize();
|
|
5480
5479
|
y.lengthSq() === 0 && (y.x = 1);
|
|
5481
|
-
const v = U.crossVectors(y,
|
|
5480
|
+
const v = U.crossVectors(y, m), C = this._sphericalEnd.radius * Math.tan(u.getEffectiveFOV() * Fe * 0.5), _ = (this._sphericalEnd.radius - d - this._sphericalEnd.radius) / this._sphericalEnd.radius, E = De.copy(this._targetEnd).add(y.multiplyScalar(this._dollyControlCoord.x * C * u.aspect)).add(v.multiplyScalar(this._dollyControlCoord.y * C)), S = A.copy(this._targetEnd).lerp(E, _), b = this._lastDollyDirection === Re.IN && this._spherical.radius <= this.minDistance, O = this._lastDollyDirection === Re.OUT && this.maxDistance <= this._spherical.radius;
|
|
5482
5481
|
if (this.infinityDolly && (b || O)) {
|
|
5483
5482
|
this._sphericalEnd.radius -= d, this._spherical.radius -= d;
|
|
5484
|
-
const D = U.copy(
|
|
5483
|
+
const D = U.copy(m).multiplyScalar(-d);
|
|
5485
5484
|
S.add(D);
|
|
5486
5485
|
}
|
|
5487
5486
|
this._boundary.clampPoint(S, S);
|
|
5488
5487
|
const w = U.subVectors(S, this._targetEnd);
|
|
5489
5488
|
this._targetEnd.copy(S), this._target.add(w), this._changedDolly -= d, F(this._changedDolly) && (this._changedDolly = 0);
|
|
5490
5489
|
} else if (de(this._camera) && this._changedZoom !== 0) {
|
|
5491
|
-
const d = this._zoom - this._lastZoom, u = this._camera,
|
|
5490
|
+
const d = this._zoom - this._lastZoom, u = this._camera, m = A.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (u.near + u.far) / (u.near - u.far)).unproject(u), y = U.set(0, 0, -1).applyQuaternion(u.quaternion), v = De.copy(m).add(y.multiplyScalar(-m.dot(u.up))), g = -(this._zoom - d - this._zoom) / this._zoom, _ = this._getCameraDirection(Be), E = this._targetEnd.dot(_), S = A.copy(this._targetEnd).lerp(v, g), b = S.dot(_), O = _.multiplyScalar(b - E);
|
|
5492
5491
|
S.sub(O), this._boundary.clampPoint(S, S);
|
|
5493
5492
|
const w = U.subVectors(S, this._targetEnd);
|
|
5494
5493
|
this._targetEnd.copy(S), this._target.add(w), this._changedZoom -= d, F(this._changedZoom) && (this._changedZoom = 0);
|
|
@@ -5549,7 +5548,7 @@ class ae extends Jr {
|
|
|
5549
5548
|
console.warn("camera-controls is already connected.");
|
|
5550
5549
|
return;
|
|
5551
5550
|
}
|
|
5552
|
-
e.setAttribute("data-camera-controls-version",
|
|
5551
|
+
e.setAttribute("data-camera-controls-version", ia), this._addAllEventListeners(e), this._getClientRect(this._elementRect);
|
|
5553
5552
|
}
|
|
5554
5553
|
/**
|
|
5555
5554
|
* Detach all internal event handlers to disable drag control.
|
|
@@ -5612,7 +5611,7 @@ class ae extends Jr {
|
|
|
5612
5611
|
if (!(this.colliderMeshes.length >= 1) || It(this._camera, "_collisionTest"))
|
|
5613
5612
|
return e;
|
|
5614
5613
|
const s = this._getTargetDirection(Be);
|
|
5615
|
-
Ft.lookAt(
|
|
5614
|
+
Ft.lookAt(Ui, s, this._camera.up);
|
|
5616
5615
|
for (let n = 0; n < 4; n++) {
|
|
5617
5616
|
const r = U.copy(this._nearPlaneCorners[n]);
|
|
5618
5617
|
r.applyMatrix4(Ft);
|
|
@@ -5707,7 +5706,7 @@ const ft = (i) => {
|
|
|
5707
5706
|
/* @__PURE__ */ f("div", { className: "dropdown-toggle", onClick: s, children: `${i.title}: ${e}` }),
|
|
5708
5707
|
/* @__PURE__ */ f("ul", { className: "dropdown-menu", style: { height: r }, children: i.options.map((a) => /* @__PURE__ */ f("li", { onClick: () => n(a), children: a }, a)) })
|
|
5709
5708
|
] });
|
|
5710
|
-
}, _e =
|
|
5709
|
+
}, _e = Bi(function(e, t) {
|
|
5711
5710
|
const s = [
|
|
5712
5711
|
"Renderer",
|
|
5713
5712
|
"Depth",
|
|
@@ -5743,8 +5742,8 @@ const ft = (i) => {
|
|
|
5743
5742
|
options: s,
|
|
5744
5743
|
onSelect: (u) => {
|
|
5745
5744
|
if (u === n) return;
|
|
5746
|
-
const
|
|
5747
|
-
e.onSelectRenderMode(
|
|
5745
|
+
const m = u;
|
|
5746
|
+
e.onSelectRenderMode(m), r(m);
|
|
5748
5747
|
},
|
|
5749
5748
|
onToggle: (u) => {
|
|
5750
5749
|
u && h && d(!1), a && o(!1), l(u);
|
|
@@ -5754,7 +5753,7 @@ const ft = (i) => {
|
|
|
5754
5753
|
)
|
|
5755
5754
|
] })
|
|
5756
5755
|
] });
|
|
5757
|
-
}),
|
|
5756
|
+
}), na = `out vec3 worldPosition;
|
|
5758
5757
|
uniform float uDistance;
|
|
5759
5758
|
|
|
5760
5759
|
void main() {
|
|
@@ -5763,7 +5762,7 @@ void main() {
|
|
|
5763
5762
|
worldPosition.xz += cameraPosition.xz;
|
|
5764
5763
|
|
|
5765
5764
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(worldPosition, 1.0);
|
|
5766
|
-
}`,
|
|
5765
|
+
}`, ra = `out vec4 fragColor;
|
|
5767
5766
|
in vec3 worldPosition;
|
|
5768
5767
|
uniform float uDivisions;
|
|
5769
5768
|
uniform float uScale;
|
|
@@ -5832,7 +5831,7 @@ void main() {
|
|
|
5832
5831
|
|
|
5833
5832
|
if (fragColor.a <= minAlpha) discard;
|
|
5834
5833
|
}`;
|
|
5835
|
-
class
|
|
5834
|
+
class aa extends ns {
|
|
5836
5835
|
constructor(e) {
|
|
5837
5836
|
super({
|
|
5838
5837
|
extensions: {
|
|
@@ -5859,12 +5858,12 @@ class na extends is {
|
|
|
5859
5858
|
value: e?.gridOpacity !== void 0 ? e?.gridOpacity : 0.25
|
|
5860
5859
|
}
|
|
5861
5860
|
},
|
|
5862
|
-
glslVersion:
|
|
5863
|
-
side:
|
|
5861
|
+
glslVersion: Bs,
|
|
5862
|
+
side: qi,
|
|
5864
5863
|
transparent: !0,
|
|
5865
5864
|
name: "InfiniteGrid",
|
|
5866
|
-
vertexShader:
|
|
5867
|
-
fragmentShader:
|
|
5865
|
+
vertexShader: na,
|
|
5866
|
+
fragmentShader: ra
|
|
5868
5867
|
});
|
|
5869
5868
|
}
|
|
5870
5869
|
// Getters / Setters
|
|
@@ -5887,11 +5886,11 @@ class na extends is {
|
|
|
5887
5886
|
this.uniforms.uSubgridOpacity.value = e;
|
|
5888
5887
|
}
|
|
5889
5888
|
}
|
|
5890
|
-
class
|
|
5889
|
+
class oa extends $i {
|
|
5891
5890
|
gridMaterial;
|
|
5892
5891
|
constructor(e) {
|
|
5893
|
-
const t = new
|
|
5894
|
-
super(new
|
|
5892
|
+
const t = new aa(e);
|
|
5893
|
+
super(new Vs(), t), this.gridMaterial = t, this.frustumCulled = !1, this.name = "InfiniteGridHelper";
|
|
5895
5894
|
}
|
|
5896
5895
|
// Getters / Setters
|
|
5897
5896
|
get color() {
|
|
@@ -5913,7 +5912,7 @@ class ra extends Vi {
|
|
|
5913
5912
|
this.gridMaterial.subgridOpacity = e;
|
|
5914
5913
|
}
|
|
5915
5914
|
}
|
|
5916
|
-
class
|
|
5915
|
+
class la extends an {
|
|
5917
5916
|
uScale;
|
|
5918
5917
|
uDivisions;
|
|
5919
5918
|
uColor;
|
|
@@ -5921,34 +5920,34 @@ class aa extends nn {
|
|
|
5921
5920
|
uSubgridOpacity;
|
|
5922
5921
|
uGridOpacity;
|
|
5923
5922
|
constructor(e) {
|
|
5924
|
-
super(), this.name = "InfiniteGrid", this.side =
|
|
5925
|
-
const { uScale: t, uDivisions: s, uColor: n, uDistance: r, uSubgridOpacity: a, uGridOpacity: o } = this, c =
|
|
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 dt(16777215)), this.uDistance = we(e?.distance ?? 1e4), this.uSubgridOpacity = we(e?.subgridOpacity ?? 0.15), this.uGridOpacity = we(e?.gridOpacity ?? 0.25);
|
|
5924
|
+
const { uScale: t, uDivisions: s, uColor: n, uDistance: r, uSubgridOpacity: a, uGridOpacity: o } = this, c = Dn("vec3", "vWorldPosition");
|
|
5926
5925
|
this.positionNode = wt(() => {
|
|
5927
|
-
const h =
|
|
5928
|
-
|
|
5926
|
+
const h = In.xzy.mul(r).add(
|
|
5927
|
+
Un(it.x, Y(0), it.z)
|
|
5929
5928
|
);
|
|
5930
5929
|
return c.assign(h), h;
|
|
5931
5930
|
})();
|
|
5932
5931
|
const l = wt(([h]) => {
|
|
5933
|
-
const d = c.xz.div(h), u =
|
|
5934
|
-
return
|
|
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 = xt(m.x, m.y);
|
|
5933
|
+
return Y(1).sub(xt(y, Y(1)));
|
|
5935
5934
|
});
|
|
5936
5935
|
this.outputNode = wt(() => {
|
|
5937
|
-
const h = c, d = fi(
|
|
5938
|
-
S.sub(
|
|
5939
|
-
|
|
5936
|
+
const h = c, d = fi(Y(200), mi(it.y.sub(h.y))), u = Y(Nn(it, 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 = Y(0.3), O = fi(
|
|
5937
|
+
S.sub(Y(1)).add(b),
|
|
5938
|
+
Y(0)
|
|
5940
5939
|
).div(b), w = g.mul(
|
|
5941
|
-
vi(
|
|
5942
|
-
), D =
|
|
5940
|
+
vi(Y(1).sub(xt(u.div(r), Y(1))), Y(3))
|
|
5941
|
+
), D = Y(0.5), x = w.sub(O).mul(a), N = _i(
|
|
5943
5942
|
x,
|
|
5944
5943
|
w.mul(o).sub(
|
|
5945
5944
|
O.mul(o.sub(a)).mul(D)
|
|
5946
5945
|
),
|
|
5947
5946
|
_
|
|
5948
|
-
), Q =
|
|
5949
|
-
return
|
|
5950
|
-
|
|
5951
|
-
}),
|
|
5947
|
+
), Q = Y(_i(N, w.mul(o), E));
|
|
5948
|
+
return zn(Hn(Q, Y(1 / 127)), () => {
|
|
5949
|
+
Bn();
|
|
5950
|
+
}), Vn(n, Q);
|
|
5952
5951
|
})();
|
|
5953
5952
|
}
|
|
5954
5953
|
// Getters / Setters
|
|
@@ -5971,11 +5970,11 @@ class aa extends nn {
|
|
|
5971
5970
|
this.uSubgridOpacity.value = e;
|
|
5972
5971
|
}
|
|
5973
5972
|
}
|
|
5974
|
-
class
|
|
5973
|
+
class ca extends ut {
|
|
5975
5974
|
gridMaterial;
|
|
5976
5975
|
constructor(e) {
|
|
5977
|
-
const t = new
|
|
5978
|
-
super(new
|
|
5976
|
+
const t = new la(e);
|
|
5977
|
+
super(new ln(), t), this.gridMaterial = t, this.frustumCulled = !1, this.name = "InfiniteGridHelper";
|
|
5979
5978
|
}
|
|
5980
5979
|
// Getters / Setters
|
|
5981
5980
|
get color() {
|
|
@@ -6017,19 +6016,19 @@ function zt(i) {
|
|
|
6017
6016
|
i.name
|
|
6018
6017
|
);
|
|
6019
6018
|
}
|
|
6020
|
-
class
|
|
6019
|
+
class ha extends rs {
|
|
6021
6020
|
constructor() {
|
|
6022
6021
|
super();
|
|
6023
|
-
const e =
|
|
6024
|
-
this.colorNode =
|
|
6022
|
+
const e = Gn($n(), 0.1, 0.5, 0, 1).oneMinus();
|
|
6023
|
+
this.colorNode = as(e, e, e, 1);
|
|
6025
6024
|
}
|
|
6026
6025
|
}
|
|
6027
|
-
class
|
|
6026
|
+
class da extends rs {
|
|
6028
6027
|
constructor() {
|
|
6029
|
-
super(), this.colorNode =
|
|
6028
|
+
super(), this.colorNode = as(Wn(), 0, 1);
|
|
6030
6029
|
}
|
|
6031
6030
|
}
|
|
6032
|
-
class $ extends
|
|
6031
|
+
class $ extends Zi {
|
|
6033
6032
|
static DRAG_START = "Transform::dragStart";
|
|
6034
6033
|
static DRAG_END = "Transform::dragEnd";
|
|
6035
6034
|
static _instance;
|
|
@@ -6052,7 +6051,7 @@ class $ extends Wi {
|
|
|
6052
6051
|
let t = this.controls.get(e);
|
|
6053
6052
|
if (t === void 0) {
|
|
6054
6053
|
const s = document.querySelector(".clickable");
|
|
6055
|
-
t = new
|
|
6054
|
+
t = new Yn(this.activeCamera, s), t.getHelper().name = e, t.setSize(0.5), t.setSpace("local"), this.controls.set(e, t), this.visibility.set(e, !0), t.addEventListener("mouseDown", () => {
|
|
6056
6055
|
this.dispatchEvent({ type: $.DRAG_START });
|
|
6057
6056
|
}), t.addEventListener("mouseUp", () => {
|
|
6058
6057
|
this.dispatchEvent({ type: $.DRAG_END });
|
|
@@ -6098,7 +6097,7 @@ class $ extends Wi {
|
|
|
6098
6097
|
return $._instance || ($._instance = new $()), $._instance;
|
|
6099
6098
|
}
|
|
6100
6099
|
}
|
|
6101
|
-
const
|
|
6100
|
+
const ua = new cn(), Ht = new $e();
|
|
6102
6101
|
class Bt extends ci {
|
|
6103
6102
|
curve = new hi();
|
|
6104
6103
|
line;
|
|
@@ -6121,7 +6120,7 @@ class Bt extends ci {
|
|
|
6121
6120
|
group;
|
|
6122
6121
|
constructor(e, t) {
|
|
6123
6122
|
const s = new dt(Ot(0.5, 1, Math.random()), Ot(0.5, 1, Math.random()), Ot(0.5, 1, Math.random()));
|
|
6124
|
-
super(), this.name = e, this.lineMaterial = 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 ut(new un(1.5), new $t({ color: s })), this.curvePos.name = "curvePos", this.curvePos.scale.setScalar(this._draggableScale), this.curvePos.visible = !1, this.add(this.curvePos), this.raycaster = new Wt(), this.raycaster.params.Line.threshold = 3, this.enable();
|
|
6125
6124
|
}
|
|
6126
6125
|
enable() {
|
|
6127
6126
|
document.addEventListener("pointerdown", this.onMouseClick);
|
|
@@ -6143,7 +6142,7 @@ class Bt extends ci {
|
|
|
6143
6142
|
te(t.position.y, 3),
|
|
6144
6143
|
te(t.position.z, 3)
|
|
6145
6144
|
]);
|
|
6146
|
-
}),
|
|
6145
|
+
}), Zn({
|
|
6147
6146
|
name: this.name,
|
|
6148
6147
|
points: e,
|
|
6149
6148
|
tension: this.tension,
|
|
@@ -6165,7 +6164,7 @@ class Bt extends ci {
|
|
|
6165
6164
|
}
|
|
6166
6165
|
};
|
|
6167
6166
|
addPoint = (e, t = !0) => {
|
|
6168
|
-
const s = this.draggable.children.length, n = new ut(
|
|
6167
|
+
const s = this.draggable.children.length, n = new ut(ua, this.draggedMat);
|
|
6169
6168
|
n.name = `point_${s}`, n.position.copy(e), n.scale.setScalar(this._draggableScale), this.draggable.add(n), this._transform?.attach(n);
|
|
6170
6169
|
const r = this.points.length > 1;
|
|
6171
6170
|
return r && t && this.updateSpline(), this.line.visible = r, this.updateCurrentPoint(), n;
|
|
@@ -6437,7 +6436,7 @@ class Bt extends ci {
|
|
|
6437
6436
|
};
|
|
6438
6437
|
}
|
|
6439
6438
|
let ct = 0;
|
|
6440
|
-
class
|
|
6439
|
+
class pa extends Gs {
|
|
6441
6440
|
defaultScale = 10;
|
|
6442
6441
|
currentSpline = null;
|
|
6443
6442
|
_camera;
|
|
@@ -6573,8 +6572,8 @@ class da extends Bs {
|
|
|
6573
6572
|
}
|
|
6574
6573
|
const s = e.target.getBoundingClientRect(), n = (e.clientX - s.left) / s.width * 2 - 1, r = -((e.clientY - s.top) / s.height) * 2 + 1;
|
|
6575
6574
|
if (G.instance) {
|
|
6576
|
-
const o = new
|
|
6577
|
-
o.setFromCamera(new
|
|
6575
|
+
const o = new $s();
|
|
6576
|
+
o.setFromCamera(new Ws(n, r), this._camera);
|
|
6578
6577
|
const c = o.intersectObjects(G.instance.helpersContainer.children, !0);
|
|
6579
6578
|
for (let l = 0; l < c.length; l++) {
|
|
6580
6579
|
const h = c[l];
|
|
@@ -6595,9 +6594,9 @@ class da extends Bs {
|
|
|
6595
6594
|
this.isMouseDown = !1;
|
|
6596
6595
|
};
|
|
6597
6596
|
mouseToSplinePos(e, t, s, n) {
|
|
6598
|
-
const r = new Le(), a = Math.PI / 2, o = this._camera, c = o.zoom, l = o.rotation.x === -6123233995736766e-32 && o.rotation.y === 0 && o.rotation.z === 0, h = o.rotation.x === -Math.PI && o.rotation.y === 12246467991473532e-32 && o.rotation.z === Math.PI, d = o.rotation.x === -6162975822039155e-48 && o.rotation.y === -a && o.rotation.z === 0, u = o.rotation.x === -6162975822039155e-48 && o.rotation.y === a && o.rotation.z === 0,
|
|
6597
|
+
const r = new Le(), a = Math.PI / 2, o = this._camera, c = o.zoom, l = o.rotation.x === -6123233995736766e-32 && o.rotation.y === 0 && o.rotation.z === 0, h = o.rotation.x === -Math.PI && o.rotation.y === 12246467991473532e-32 && o.rotation.z === Math.PI, d = o.rotation.x === -6162975822039155e-48 && o.rotation.y === -a && o.rotation.z === 0, u = o.rotation.x === -6162975822039155e-48 && o.rotation.y === a && o.rotation.z === 0, m = o.rotation.x === -1.5707953264174506 && o.rotation.y === 0 && o.rotation.z === 0, y = o.rotation.x === 1.5707953264174506 && o.rotation.y === 0 && o.rotation.z === 0;
|
|
6599
6598
|
let v = e, C = t;
|
|
6600
|
-
h || u ? v *= -1 :
|
|
6599
|
+
h || u ? v *= -1 : m && (C *= -1);
|
|
6601
6600
|
const g = s / 2 / c, _ = n / 2 / c;
|
|
6602
6601
|
if (this.currentSpline === null && (this.currentSpline = this.createSpline()), l || h) {
|
|
6603
6602
|
const E = v * g + o.position.x, S = C * _ + o.position.y;
|
|
@@ -6605,7 +6604,7 @@ class da extends Bs {
|
|
|
6605
6604
|
} else if (d || u) {
|
|
6606
6605
|
const E = v * g + o.position.z, S = C * _ + o.position.y;
|
|
6607
6606
|
r.set(0, S, E);
|
|
6608
|
-
} else if (
|
|
6607
|
+
} else if (m || y) {
|
|
6609
6608
|
const E = v * g + o.position.x, S = C * _ + o.position.z;
|
|
6610
6609
|
r.set(E, 0, S);
|
|
6611
6610
|
}
|
|
@@ -6621,12 +6620,12 @@ class da extends Bs {
|
|
|
6621
6620
|
});
|
|
6622
6621
|
}
|
|
6623
6622
|
}
|
|
6624
|
-
const
|
|
6623
|
+
const zi = [
|
|
6625
6624
|
"Single",
|
|
6626
6625
|
"Side by Side",
|
|
6627
6626
|
"Stacked",
|
|
6628
6627
|
"Quad"
|
|
6629
|
-
],
|
|
6628
|
+
], 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==";
|
|
6630
6629
|
class G extends Qe {
|
|
6631
6630
|
static instance = null;
|
|
6632
6631
|
scene;
|
|
@@ -6638,11 +6637,11 @@ class G extends Qe {
|
|
|
6638
6637
|
currentCamera;
|
|
6639
6638
|
currentWindow;
|
|
6640
6639
|
// RefObject to one of the "windows"
|
|
6641
|
-
helpersContainer = new
|
|
6640
|
+
helpersContainer = new pn();
|
|
6642
6641
|
grid;
|
|
6643
6642
|
cameraHelpers = /* @__PURE__ */ new Map();
|
|
6644
6643
|
lightHelpers = /* @__PURE__ */ new Map();
|
|
6645
|
-
interactionHelper = new
|
|
6644
|
+
interactionHelper = new mn(25);
|
|
6646
6645
|
currentTransform;
|
|
6647
6646
|
// Tools
|
|
6648
6647
|
splineEditor;
|
|
@@ -6701,7 +6700,7 @@ class G extends Qe {
|
|
|
6701
6700
|
"Debug"
|
|
6702
6701
|
];
|
|
6703
6702
|
constructor(e) {
|
|
6704
|
-
super(e), this.props.three.addEventListener(R.ADD_RENDERER, this.setupRenderer), this.scene = new
|
|
6703
|
+
super(e), this.props.three.addEventListener(R.ADD_RENDERER, this.setupRenderer), this.scene = new fn(), this.scene.name = this.scene.uuid = "", this.canvasRef = ue(), this.containerRef = ue(), this.tlWindow = ue(), this.trWindow = ue(), this.blWindow = ue(), this.brWindow = ue();
|
|
6705
6704
|
const t = e.three.name, s = localStorage, n = s.getItem(`${t}_mode`);
|
|
6706
6705
|
this.state = {
|
|
6707
6706
|
mode: n !== null ? n : "Single",
|
|
@@ -6714,12 +6713,12 @@ class G extends Qe {
|
|
|
6714
6713
|
const r = {
|
|
6715
6714
|
Vector2: $e,
|
|
6716
6715
|
Vector3: ee,
|
|
6717
|
-
Vector4:
|
|
6718
|
-
Quaternion:
|
|
6719
|
-
Matrix4:
|
|
6720
|
-
Spherical:
|
|
6721
|
-
Box3:
|
|
6722
|
-
Sphere:
|
|
6716
|
+
Vector4: bn,
|
|
6717
|
+
Quaternion: Cn,
|
|
6718
|
+
Matrix4: yn,
|
|
6719
|
+
Spherical: _n,
|
|
6720
|
+
Box3: vn,
|
|
6721
|
+
Sphere: gn,
|
|
6723
6722
|
Raycaster: Wt
|
|
6724
6723
|
};
|
|
6725
6724
|
ae.install({ THREE: r }), this.setupScene(), this.setupTools();
|
|
@@ -6746,7 +6745,7 @@ class G extends Qe {
|
|
|
6746
6745
|
}), /* @__PURE__ */ M("div", { className: "multiview", children: [
|
|
6747
6746
|
/* @__PURE__ */ f("canvas", { ref: this.canvasRef }),
|
|
6748
6747
|
/* @__PURE__ */ M("div", { className: `cameras ${this.state.mode === "Single" || this.state.mode === "Stacked" ? "single" : ""}`, ref: this.containerRef, children: [
|
|
6749
|
-
this.state.mode === "Single" && /* @__PURE__ */ f(
|
|
6748
|
+
this.state.mode === "Single" && /* @__PURE__ */ f(q, { children: /* @__PURE__ */ f(
|
|
6750
6749
|
_e,
|
|
6751
6750
|
{
|
|
6752
6751
|
name: "tl",
|
|
@@ -6763,7 +6762,7 @@ class G extends Qe {
|
|
|
6763
6762
|
}
|
|
6764
6763
|
}
|
|
6765
6764
|
) }),
|
|
6766
|
-
(this.state.mode === "Side by Side" || this.state.mode === "Stacked") && /* @__PURE__ */ M(
|
|
6765
|
+
(this.state.mode === "Side by Side" || this.state.mode === "Stacked") && /* @__PURE__ */ M(q, { children: [
|
|
6767
6766
|
/* @__PURE__ */ f(
|
|
6768
6767
|
_e,
|
|
6769
6768
|
{
|
|
@@ -6799,7 +6798,7 @@ class G extends Qe {
|
|
|
6799
6798
|
}
|
|
6800
6799
|
)
|
|
6801
6800
|
] }),
|
|
6802
|
-
this.state.mode === "Quad" && /* @__PURE__ */ M(
|
|
6801
|
+
this.state.mode === "Quad" && /* @__PURE__ */ M(q, { children: [
|
|
6803
6802
|
/* @__PURE__ */ f(
|
|
6804
6803
|
_e,
|
|
6805
6804
|
{
|
|
@@ -6875,8 +6874,8 @@ class G extends Qe {
|
|
|
6875
6874
|
ft,
|
|
6876
6875
|
{
|
|
6877
6876
|
title: "View",
|
|
6878
|
-
index:
|
|
6879
|
-
options:
|
|
6877
|
+
index: zi.indexOf(this.state.mode),
|
|
6878
|
+
options: zi,
|
|
6880
6879
|
onSelect: (t) => {
|
|
6881
6880
|
t !== this.state.mode && (this.killControls(), this.setState({ mode: t }), localStorage.setItem(`${this.appID}_mode`, t));
|
|
6882
6881
|
},
|
|
@@ -6916,7 +6915,7 @@ class G extends Qe {
|
|
|
6916
6915
|
zt,
|
|
6917
6916
|
{
|
|
6918
6917
|
name: "cameraHelper",
|
|
6919
|
-
icon:
|
|
6918
|
+
icon: ma,
|
|
6920
6919
|
selected: this.cameraVisibility,
|
|
6921
6920
|
height: 24,
|
|
6922
6921
|
top: 2,
|
|
@@ -6934,7 +6933,7 @@ class G extends Qe {
|
|
|
6934
6933
|
zt,
|
|
6935
6934
|
{
|
|
6936
6935
|
name: "lightHelper",
|
|
6937
|
-
icon:
|
|
6936
|
+
icon: fa,
|
|
6938
6937
|
selected: this.lightVisibility,
|
|
6939
6938
|
height: 24,
|
|
6940
6939
|
top: 4,
|
|
@@ -6952,7 +6951,7 @@ class G extends Qe {
|
|
|
6952
6951
|
zt,
|
|
6953
6952
|
{
|
|
6954
6953
|
name: "gridHelper",
|
|
6955
|
-
icon:
|
|
6954
|
+
icon: ga,
|
|
6956
6955
|
selected: this.gridVisibility,
|
|
6957
6956
|
height: 21,
|
|
6958
6957
|
width: 21,
|
|
@@ -6976,10 +6975,10 @@ class G extends Qe {
|
|
|
6976
6975
|
this.props.three.canvas = s, t.type === "WebGLRenderer" ? (this.renderer = new qe({
|
|
6977
6976
|
canvas: s,
|
|
6978
6977
|
stencil: !1
|
|
6979
|
-
}), this.grid && (this.scene.remove(this.grid), ie(this.grid)), this.grid = new
|
|
6978
|
+
}), 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({
|
|
6980
6979
|
canvas: s,
|
|
6981
6980
|
stencil: !1
|
|
6982
|
-
}), this.grid && (this.scene.remove(this.grid), ie(this.grid)), this.grid = new
|
|
6981
|
+
}), this.grid && (this.scene.remove(this.grid), ie(this.grid)), this.grid = new ca(), this.scene.add(this.grid)), this.renderer && (this.renderer.autoClear = !1, this.renderer.shadowMap.enabled = !0, this.renderer.setClearColor(0), this.renderer.setPixelRatio(devicePixelRatio), this.renderer.setScissorTest(!0), this.resize(), this.props.three.renderer = this.renderer, this.depthMaterial?.dispose(), this.normalsMaterial?.dispose(), this.uvMaterial?.dispose(), this.depthMaterial = new ha(), this.normalsMaterial = new En(), this.uvMaterial = new da(), t.type === "WebGPURenderer" ? this.renderer.init().then(() => {
|
|
6983
6982
|
this.rendererReady = !0, this.props.three.requestScene();
|
|
6984
6983
|
}) : this.props.three.requestScene());
|
|
6985
6984
|
};
|
|
@@ -7096,7 +7095,7 @@ class G extends Qe {
|
|
|
7096
7095
|
});
|
|
7097
7096
|
}
|
|
7098
7097
|
setupTools() {
|
|
7099
|
-
this.splineEditor = new
|
|
7098
|
+
this.splineEditor = new pa(this.currentCamera, this.three), this.splineEditor.initDebug(), this.helpersContainer.add(this.splineEditor);
|
|
7100
7099
|
}
|
|
7101
7100
|
// Public
|
|
7102
7101
|
play() {
|
|
@@ -7208,7 +7207,7 @@ class G extends Qe {
|
|
|
7208
7207
|
if (n !== void 0) {
|
|
7209
7208
|
const r = n;
|
|
7210
7209
|
this.cameras.set(s, r);
|
|
7211
|
-
const a = new
|
|
7210
|
+
const a = new Sn(r), o = this.currentScene !== void 0 && this.currentScene.getObjectByProperty("uuid", s) !== void 0;
|
|
7212
7211
|
a.visible = this.cameraVisibility && o, this.cameraHelpers.set(s, a), this.helpersContainer.add(a), this.setState({ lastUpdate: Date.now() });
|
|
7213
7212
|
}
|
|
7214
7213
|
};
|
|
@@ -7254,7 +7253,7 @@ class G extends Qe {
|
|
|
7254
7253
|
if (e.ctrlKey) {
|
|
7255
7254
|
if (this.currentCamera.name === "UI") return;
|
|
7256
7255
|
const t = this.controls.get(this.currentCamera.name);
|
|
7257
|
-
e.key === "0" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ae(this.currentCamera, this.currentWindow.current), this.selectedItem instanceof ut || this.selectedItem instanceof
|
|
7256
|
+
e.key === "0" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ae(this.currentCamera, this.currentWindow.current), this.selectedItem instanceof ut || 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(Yt(45), Yt(45), !0), this.updateCameraControls(t));
|
|
7258
7257
|
} else if (this.currentTransform !== void 0)
|
|
7259
7258
|
switch (e.key) {
|
|
7260
7259
|
case "r":
|
|
@@ -7314,19 +7313,19 @@ class G extends Qe {
|
|
|
7314
7313
|
let s;
|
|
7315
7314
|
switch (t.type) {
|
|
7316
7315
|
case "DirectionalLight":
|
|
7317
|
-
s = new
|
|
7316
|
+
s = new Mn(t, 100), s.name = `${t.name}Helper`, s.visible = this.lightVisibility, this.lightHelpers.set(t.name, s), this.helpersContainer.add(s);
|
|
7318
7317
|
break;
|
|
7319
7318
|
case "HemisphereLight":
|
|
7320
|
-
s = new
|
|
7319
|
+
s = new Tn(t, 250), s.name = `${t.name}Helper`, s.visible = this.lightVisibility, this.lightHelpers.set(t.name, s), this.helpersContainer.add(s);
|
|
7321
7320
|
break;
|
|
7322
7321
|
case "RectAreaLight":
|
|
7323
|
-
s = new
|
|
7322
|
+
s = new Rn(t), s.name = `${t.name}Helper`, s.visible = this.lightVisibility, this.lightHelpers.set(t.name, s), this.helpersContainer.add(s);
|
|
7324
7323
|
break;
|
|
7325
7324
|
case "PointLight":
|
|
7326
|
-
s = new
|
|
7325
|
+
s = new xn(t, 100), s.name = `${t.name}Helper`, s.visible = this.lightVisibility, this.lightHelpers.set(t.name, s), this.helpersContainer.add(s);
|
|
7327
7326
|
break;
|
|
7328
7327
|
case "SpotLight":
|
|
7329
|
-
s = new
|
|
7328
|
+
s = new wn(t), s.name = `${t.name}Helper`, s.visible = this.lightVisibility, this.lightHelpers.set(t.name, s), this.helpersContainer.add(s);
|
|
7330
7329
|
break;
|
|
7331
7330
|
}
|
|
7332
7331
|
}
|
|
@@ -7335,7 +7334,7 @@ class G extends Qe {
|
|
|
7335
7334
|
createControls(e, t) {
|
|
7336
7335
|
const s = this.controls.get(e.name);
|
|
7337
7336
|
if (s !== void 0 && s.dispose(), this.controls.delete(e.name), e.name === "UI") return;
|
|
7338
|
-
const n = new
|
|
7337
|
+
const n = new Pn(e, t);
|
|
7339
7338
|
switch (n.enableDamping = !0, n.dampingFactor = 0.1, e.name) {
|
|
7340
7339
|
case "Top":
|
|
7341
7340
|
case "Bottom":
|
|
@@ -7484,9 +7483,9 @@ class G extends Qe {
|
|
|
7484
7483
|
}
|
|
7485
7484
|
class bt extends Qe {
|
|
7486
7485
|
static instance;
|
|
7487
|
-
matrix = new
|
|
7486
|
+
matrix = new Wi();
|
|
7488
7487
|
position = new Le();
|
|
7489
|
-
rotation = new
|
|
7488
|
+
rotation = new Ys();
|
|
7490
7489
|
scale = new Le();
|
|
7491
7490
|
open = !1;
|
|
7492
7491
|
constructor(e) {
|
|
@@ -7565,7 +7564,7 @@ class bt extends Qe {
|
|
|
7565
7564
|
return `${this.props.three.name}_transform`;
|
|
7566
7565
|
}
|
|
7567
7566
|
}
|
|
7568
|
-
function
|
|
7567
|
+
function Hi(i) {
|
|
7569
7568
|
switch (i) {
|
|
7570
7569
|
case "color":
|
|
7571
7570
|
return "Color";
|
|
@@ -7588,7 +7587,7 @@ function Fi(i) {
|
|
|
7588
7587
|
}
|
|
7589
7588
|
return i;
|
|
7590
7589
|
}
|
|
7591
|
-
function
|
|
7590
|
+
function va(i, e) {
|
|
7592
7591
|
function t() {
|
|
7593
7592
|
return `${e.name}_light`;
|
|
7594
7593
|
}
|
|
@@ -7601,7 +7600,7 @@ function fa(i, e) {
|
|
|
7601
7600
|
for (const o in i.lightInfo) {
|
|
7602
7601
|
const c = i.lightInfo[o];
|
|
7603
7602
|
c !== void 0 && (c.isColor !== void 0 ? a.push({
|
|
7604
|
-
title:
|
|
7603
|
+
title: Hi(o),
|
|
7605
7604
|
prop: o,
|
|
7606
7605
|
type: "color",
|
|
7607
7606
|
value: c,
|
|
@@ -7610,12 +7609,12 @@ function fa(i, e) {
|
|
|
7610
7609
|
e.updateObject(i.uuid, l, d);
|
|
7611
7610
|
const u = e.getScene(i.uuid);
|
|
7612
7611
|
if (u !== null) {
|
|
7613
|
-
const
|
|
7614
|
-
V(
|
|
7612
|
+
const m = u.getObjectByProperty("uuid", i.uuid);
|
|
7613
|
+
V(m, l, d);
|
|
7615
7614
|
}
|
|
7616
7615
|
}
|
|
7617
7616
|
}) : a.push({
|
|
7618
|
-
title:
|
|
7617
|
+
title: Hi(o),
|
|
7619
7618
|
prop: o,
|
|
7620
7619
|
type: typeof c,
|
|
7621
7620
|
value: c,
|
|
@@ -7643,7 +7642,7 @@ function fa(i, e) {
|
|
|
7643
7642
|
}
|
|
7644
7643
|
);
|
|
7645
7644
|
}
|
|
7646
|
-
function
|
|
7645
|
+
function _a(i) {
|
|
7647
7646
|
const e = i.object, t = i.three;
|
|
7648
7647
|
function s() {
|
|
7649
7648
|
return `${t.name}_animation`;
|
|
@@ -7690,18 +7689,18 @@ function ga(i) {
|
|
|
7690
7689
|
if (d !== null) {
|
|
7691
7690
|
const u = d.getObjectByProperty("uuid", e.uuid);
|
|
7692
7691
|
if (u !== void 0) {
|
|
7693
|
-
const
|
|
7694
|
-
if (
|
|
7692
|
+
const m = u.mixer;
|
|
7693
|
+
if (m !== void 0) {
|
|
7695
7694
|
const v = [
|
|
7696
7695
|
{
|
|
7697
7696
|
title: "Time Scale",
|
|
7698
7697
|
type: "range",
|
|
7699
|
-
value:
|
|
7698
|
+
value: m.timeScale,
|
|
7700
7699
|
step: 0.01,
|
|
7701
7700
|
min: -1,
|
|
7702
7701
|
max: 2,
|
|
7703
7702
|
onChange: (C, g) => {
|
|
7704
|
-
|
|
7703
|
+
m.timeScale = g, t.updateObject(e.uuid, "mixer.timeScale", g);
|
|
7705
7704
|
}
|
|
7706
7705
|
}
|
|
7707
7706
|
];
|
|
@@ -7709,12 +7708,12 @@ function ga(i) {
|
|
|
7709
7708
|
title: "Stop All",
|
|
7710
7709
|
type: "button",
|
|
7711
7710
|
onChange: () => {
|
|
7712
|
-
|
|
7711
|
+
m.stopAllAction(), t.requestMethod(e.uuid, "stopAllAction", void 0, "mixer");
|
|
7713
7712
|
}
|
|
7714
7713
|
}), o.push({
|
|
7715
7714
|
title: "Mixer",
|
|
7716
7715
|
items: v
|
|
7717
|
-
}), h = new
|
|
7716
|
+
}), h = new Zs(u), G.instance?.scene.add(h);
|
|
7718
7717
|
}
|
|
7719
7718
|
}
|
|
7720
7719
|
}
|
|
@@ -7746,7 +7745,7 @@ const Vt = {
|
|
|
7746
7745
|
lightInfo: void 0,
|
|
7747
7746
|
children: []
|
|
7748
7747
|
};
|
|
7749
|
-
function
|
|
7748
|
+
function ya(i) {
|
|
7750
7749
|
const [e, t] = L(Vt);
|
|
7751
7750
|
pe(() => {
|
|
7752
7751
|
function a(c) {
|
|
@@ -7768,8 +7767,8 @@ function va(i) {
|
|
|
7768
7767
|
button: e.uuid.length > 0 ? /* @__PURE__ */ f("button", { className: "remove", onClick: () => {
|
|
7769
7768
|
$.instance.remove(e.name), t(Vt);
|
|
7770
7769
|
} }) : void 0,
|
|
7771
|
-
children: /* @__PURE__ */ f("div", { id: "Inspector", className: i.class, children: e.uuid.length > 0 && /* @__PURE__ */ M(
|
|
7772
|
-
/* @__PURE__ */ M(
|
|
7770
|
+
children: /* @__PURE__ */ f("div", { id: "Inspector", className: i.class, children: e.uuid.length > 0 && /* @__PURE__ */ M(q, { children: [
|
|
7771
|
+
/* @__PURE__ */ M(q, { children: [
|
|
7773
7772
|
/* @__PURE__ */ f(
|
|
7774
7773
|
ht,
|
|
7775
7774
|
{
|
|
@@ -7801,19 +7800,19 @@ function va(i) {
|
|
|
7801
7800
|
}
|
|
7802
7801
|
)
|
|
7803
7802
|
] }),
|
|
7804
|
-
/* @__PURE__ */ M(
|
|
7803
|
+
/* @__PURE__ */ M(q, { children: [
|
|
7805
7804
|
/* @__PURE__ */ f(bt, { object: e, three: i.three }),
|
|
7806
|
-
n ? /* @__PURE__ */ f(
|
|
7807
|
-
s.search("camera") > -1 ?
|
|
7808
|
-
s.search("light") > -1 ?
|
|
7809
|
-
r ?
|
|
7805
|
+
n ? /* @__PURE__ */ f(_a, { object: e, three: i.three }) : null,
|
|
7806
|
+
s.search("camera") > -1 ? ea(e, i.three) : null,
|
|
7807
|
+
s.search("light") > -1 ? va(e, i.three) : null,
|
|
7808
|
+
r ? Xr(e, i.three) : null
|
|
7810
7809
|
] })
|
|
7811
7810
|
] }) })
|
|
7812
7811
|
},
|
|
7813
7812
|
"Inspector"
|
|
7814
7813
|
);
|
|
7815
7814
|
}
|
|
7816
|
-
class
|
|
7815
|
+
class Ca extends Qe {
|
|
7817
7816
|
// Renderer
|
|
7818
7817
|
autoClear = !0;
|
|
7819
7818
|
autoClearColor = !0;
|
|
@@ -7949,7 +7948,7 @@ class _a extends Qe {
|
|
|
7949
7948
|
options: [
|
|
7950
7949
|
{
|
|
7951
7950
|
title: "No Color Space",
|
|
7952
|
-
value:
|
|
7951
|
+
value: qs
|
|
7953
7952
|
},
|
|
7954
7953
|
{
|
|
7955
7954
|
title: "SRB Color Space",
|
|
@@ -7975,31 +7974,31 @@ class _a extends Qe {
|
|
|
7975
7974
|
},
|
|
7976
7975
|
{
|
|
7977
7976
|
title: "Linear ",
|
|
7978
|
-
value:
|
|
7977
|
+
value: js
|
|
7979
7978
|
},
|
|
7980
7979
|
{
|
|
7981
7980
|
title: "Reinhard",
|
|
7982
|
-
value:
|
|
7981
|
+
value: Ks
|
|
7983
7982
|
},
|
|
7984
7983
|
{
|
|
7985
7984
|
title: "Cineon ",
|
|
7986
|
-
value:
|
|
7985
|
+
value: Xs
|
|
7987
7986
|
},
|
|
7988
7987
|
{
|
|
7989
7988
|
title: "ACES Filmic",
|
|
7990
|
-
value:
|
|
7989
|
+
value: Qs
|
|
7991
7990
|
},
|
|
7992
7991
|
{
|
|
7993
7992
|
title: "AgX",
|
|
7994
|
-
value:
|
|
7993
|
+
value: Js
|
|
7995
7994
|
},
|
|
7996
7995
|
{
|
|
7997
7996
|
title: "Neutral",
|
|
7998
|
-
value:
|
|
7997
|
+
value: en
|
|
7999
7998
|
},
|
|
8000
7999
|
{
|
|
8001
8000
|
title: "Custom",
|
|
8002
|
-
value:
|
|
8001
|
+
value: tn
|
|
8003
8002
|
}
|
|
8004
8003
|
],
|
|
8005
8004
|
onChange: (t, s) => {
|
|
@@ -8045,7 +8044,7 @@ class _a extends Qe {
|
|
|
8045
8044
|
return `${this.props.three.name}_renderer`;
|
|
8046
8045
|
}
|
|
8047
8046
|
}
|
|
8048
|
-
function
|
|
8047
|
+
function ba(i) {
|
|
8049
8048
|
const [e] = L([]), [t] = L([]), [s, n] = L(0), r = (l) => {
|
|
8050
8049
|
const h = l.value;
|
|
8051
8050
|
for (let d = 0; d < e.length; d++)
|
|
@@ -8098,15 +8097,15 @@ function ya(i) {
|
|
|
8098
8097
|
}, c = (l) => {
|
|
8099
8098
|
const h = l.value.name;
|
|
8100
8099
|
for (let d = 0; d < e.length; d++) {
|
|
8101
|
-
const u = e[d],
|
|
8100
|
+
const u = e[d], m = u.name === h;
|
|
8102
8101
|
t[d] = /* @__PURE__ */ f(
|
|
8103
8102
|
je,
|
|
8104
8103
|
{
|
|
8105
8104
|
three: i.three,
|
|
8106
8105
|
label: `Scene: ${u.name}`,
|
|
8107
8106
|
scene: u,
|
|
8108
|
-
open:
|
|
8109
|
-
visible:
|
|
8107
|
+
open: m,
|
|
8108
|
+
visible: m,
|
|
8110
8109
|
onRefresh: () => {
|
|
8111
8110
|
i.three.refreshScene(u.name);
|
|
8112
8111
|
},
|
|
@@ -8121,19 +8120,19 @@ function ya(i) {
|
|
|
8121
8120
|
i.three.removeEventListener(R.ADD_SCENE, r), i.three.removeEventListener(R.SET_SCENE, c), i.three.removeEventListener(R.REFRESH_SCENE, a), i.three.removeEventListener(R.REMOVE_SCENE, o);
|
|
8122
8121
|
}), []), /* @__PURE__ */ M("div", { id: "SidePanel", children: [
|
|
8123
8122
|
/* @__PURE__ */ f("div", { className: "scenes", children: t }, s),
|
|
8124
|
-
/* @__PURE__ */ f(
|
|
8125
|
-
/* @__PURE__ */ f(
|
|
8123
|
+
/* @__PURE__ */ f(ya, { three: i.three }),
|
|
8124
|
+
/* @__PURE__ */ f(Ca, { three: i.three }),
|
|
8126
8125
|
/* @__PURE__ */ f(I, { three: i.three })
|
|
8127
8126
|
] });
|
|
8128
8127
|
}
|
|
8129
|
-
const
|
|
8128
|
+
const fs = Bi((i, e) => /* @__PURE__ */ M("div", { className: "editor", ref: e, style: i.style, children: [
|
|
8130
8129
|
i.header && /* @__PURE__ */ f("div", { className: "header", children: i.header }),
|
|
8131
8130
|
i.children,
|
|
8132
8131
|
i.footer && /* @__PURE__ */ f("div", { className: "footer", children: i.footer })
|
|
8133
8132
|
] }));
|
|
8134
|
-
|
|
8135
|
-
function
|
|
8136
|
-
return /* @__PURE__ */
|
|
8133
|
+
fs.displayName = "Editor";
|
|
8134
|
+
function Ea(i) {
|
|
8135
|
+
return /* @__PURE__ */ M(fs, { children: [
|
|
8137
8136
|
/* @__PURE__ */ f(
|
|
8138
8137
|
G,
|
|
8139
8138
|
{
|
|
@@ -8144,41 +8143,38 @@ function Ca(i) {
|
|
|
8144
8143
|
onSceneUpdate: i.onSceneUpdate
|
|
8145
8144
|
}
|
|
8146
8145
|
),
|
|
8147
|
-
/* @__PURE__ */ f(
|
|
8148
|
-
] })
|
|
8146
|
+
/* @__PURE__ */ f(ba, { three: i.three })
|
|
8147
|
+
] });
|
|
8149
8148
|
}
|
|
8150
|
-
function
|
|
8149
|
+
function _o(i) {
|
|
8151
8150
|
const {
|
|
8152
8151
|
app: e,
|
|
8153
|
-
scenes: t
|
|
8152
|
+
scenes: t,
|
|
8154
8153
|
onSceneAdd: s,
|
|
8155
8154
|
onSceneUpdate: n,
|
|
8156
8155
|
onSceneResize: r,
|
|
8157
|
-
|
|
8158
|
-
|
|
8159
|
-
|
|
8160
|
-
|
|
8161
|
-
} = i, [h, d] = L(!1);
|
|
8156
|
+
onLoad: a,
|
|
8157
|
+
renderLoading: o = null,
|
|
8158
|
+
children: c
|
|
8159
|
+
} = i, [l, h] = L(!1);
|
|
8162
8160
|
if (pe(() => {
|
|
8163
8161
|
e.detectSettings().then(() => {
|
|
8164
|
-
|
|
8162
|
+
a ? a(e).then(() => h(!0)) : h(!0);
|
|
8165
8163
|
});
|
|
8166
|
-
}, []), !
|
|
8167
|
-
const
|
|
8168
|
-
return e.editor ?
|
|
8169
|
-
|
|
8164
|
+
}, []), !l) return /* @__PURE__ */ f(q, { children: o });
|
|
8165
|
+
const d = e.components.get("three");
|
|
8166
|
+
return e.editor ? /* @__PURE__ */ f(
|
|
8167
|
+
Ea,
|
|
8170
8168
|
{
|
|
8171
|
-
three:
|
|
8169
|
+
three: d,
|
|
8172
8170
|
scenes: t,
|
|
8173
|
-
onSceneAdd:
|
|
8174
|
-
s && s(p, e, G.instance?.renderer);
|
|
8175
|
-
},
|
|
8171
|
+
onSceneAdd: s,
|
|
8176
8172
|
onSceneUpdate: n,
|
|
8177
8173
|
onSceneResize: r
|
|
8178
8174
|
}
|
|
8179
|
-
) : /* @__PURE__ */ f(
|
|
8175
|
+
) : /* @__PURE__ */ f(q, { children: c?.(e) });
|
|
8180
8176
|
}
|
|
8181
|
-
const
|
|
8177
|
+
const Sa = `#include <common>
|
|
8182
8178
|
#include <batching_pars_vertex>
|
|
8183
8179
|
#include <uv_pars_vertex>
|
|
8184
8180
|
#include <color_pars_vertex>
|
|
@@ -8208,7 +8204,7 @@ void main() {
|
|
|
8208
8204
|
#include <logdepthbuf_vertex>
|
|
8209
8205
|
#include <clipping_planes_vertex>
|
|
8210
8206
|
#include <worldpos_vertex>
|
|
8211
|
-
}`,
|
|
8207
|
+
}`, Oa = `
|
|
8212
8208
|
uniform float opacity;
|
|
8213
8209
|
#include <common>
|
|
8214
8210
|
#include <uv_pars_fragment>
|
|
@@ -8219,7 +8215,7 @@ void main() {
|
|
|
8219
8215
|
if (opacity < 0.015) discard;
|
|
8220
8216
|
gl_FragColor = vec4(vec3(vUv, 0.0), opacity);
|
|
8221
8217
|
}`;
|
|
8222
|
-
class
|
|
8218
|
+
class yo extends ns {
|
|
8223
8219
|
constructor() {
|
|
8224
8220
|
super({
|
|
8225
8221
|
defines: {
|
|
@@ -8228,96 +8224,96 @@ class vo extends is {
|
|
|
8228
8224
|
uniforms: {
|
|
8229
8225
|
opacity: { value: 1 }
|
|
8230
8226
|
},
|
|
8231
|
-
vertexShader:
|
|
8232
|
-
fragmentShader:
|
|
8227
|
+
vertexShader: Sa,
|
|
8228
|
+
fragmentShader: Oa,
|
|
8233
8229
|
transparent: !0
|
|
8234
8230
|
});
|
|
8235
8231
|
}
|
|
8236
8232
|
}
|
|
8237
8233
|
export {
|
|
8238
8234
|
je as Accordion,
|
|
8239
|
-
|
|
8240
|
-
|
|
8241
|
-
|
|
8235
|
+
fo as Application,
|
|
8236
|
+
cs as BaseRemote,
|
|
8237
|
+
us as ChildObject,
|
|
8242
8238
|
Pt as ContainerObject,
|
|
8243
|
-
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
|
|
8247
|
-
|
|
8248
|
-
|
|
8249
|
-
|
|
8250
|
-
|
|
8239
|
+
ha as DepthNodeMaterial,
|
|
8240
|
+
Dr as Draggable,
|
|
8241
|
+
Pr as DraggableItem,
|
|
8242
|
+
Ir as Dropdown,
|
|
8243
|
+
Ur as DropdownItem,
|
|
8244
|
+
fs as Editor,
|
|
8245
|
+
po as ElementProxy,
|
|
8246
|
+
br as ElementProxyReceiver,
|
|
8251
8247
|
ce as ExportTexture,
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
|
|
8248
|
+
_o as HermesApp,
|
|
8249
|
+
Fa as ImageSequenceCapturer,
|
|
8250
|
+
oa as InfiniteGridHelper,
|
|
8251
|
+
ca as InfiniteGridHelperGPU,
|
|
8252
|
+
aa as InfiniteGridMaterial,
|
|
8253
|
+
la as InfiniteGridNodeMaterial,
|
|
8254
|
+
ya as Inspector,
|
|
8259
8255
|
G as MultiView,
|
|
8260
|
-
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
|
|
8264
|
-
|
|
8256
|
+
ds as NavButton,
|
|
8257
|
+
mo as ProxyManager,
|
|
8258
|
+
go as RemoteTheatre,
|
|
8259
|
+
vo as RemoteThree,
|
|
8260
|
+
ba as SidePanel,
|
|
8265
8261
|
Bt as Spline,
|
|
8266
|
-
|
|
8267
|
-
|
|
8262
|
+
pa as SplineEditor,
|
|
8263
|
+
Ea as ThreeEditor,
|
|
8268
8264
|
$ as Transform,
|
|
8269
|
-
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
|
|
8275
|
-
|
|
8276
|
-
|
|
8265
|
+
yo as UVMaterial,
|
|
8266
|
+
da as UVNodeMaterial,
|
|
8267
|
+
uo as WebworkerEventHandlers,
|
|
8268
|
+
dr as anchorGeometry,
|
|
8269
|
+
Qa as anchorGeometryTL,
|
|
8270
|
+
qa as animateObjectMaterial,
|
|
8271
|
+
Za as animateObjectTransform,
|
|
8272
|
+
hr as applyObjectMaterial,
|
|
8277
8273
|
mt as capitalize,
|
|
8278
8274
|
ye as clamp,
|
|
8279
|
-
|
|
8275
|
+
co as clearComposerGroups,
|
|
8280
8276
|
yi as colorToHex,
|
|
8281
|
-
|
|
8282
|
-
|
|
8283
|
-
|
|
8284
|
-
|
|
8285
|
-
|
|
8286
|
-
|
|
8287
|
-
|
|
8288
|
-
|
|
8277
|
+
Zn as copyToClipboard,
|
|
8278
|
+
io as createMask,
|
|
8279
|
+
Ga as cubicBezier,
|
|
8280
|
+
Ya as customizeTheatreElements,
|
|
8281
|
+
Ba as damp,
|
|
8282
|
+
Na as defaultTheatreCallback,
|
|
8283
|
+
er as detectMaxFrameRate,
|
|
8284
|
+
tr as detectSettings,
|
|
8289
8285
|
ie as dispose,
|
|
8290
|
-
|
|
8286
|
+
ls as disposeMaterial,
|
|
8291
8287
|
Oi as disposeTexture,
|
|
8292
|
-
|
|
8293
|
-
|
|
8294
|
-
|
|
8295
|
-
|
|
8296
|
-
|
|
8288
|
+
Ha as distance,
|
|
8289
|
+
ho as generateCubemap,
|
|
8290
|
+
Va as getAngle,
|
|
8291
|
+
cr as getObjectMaterialObject,
|
|
8292
|
+
lr as getObjectMaterialProps,
|
|
8297
8293
|
We as hierarchyUUID,
|
|
8298
|
-
|
|
8299
|
-
|
|
8300
|
-
|
|
8301
|
-
|
|
8294
|
+
lo as inspectComposer,
|
|
8295
|
+
ur as inspectComposerPass,
|
|
8296
|
+
qn as isColor,
|
|
8297
|
+
za as map,
|
|
8302
8298
|
Xe as mix,
|
|
8303
8299
|
pt as noop,
|
|
8304
8300
|
Zt as normalize,
|
|
8305
|
-
|
|
8306
|
-
|
|
8301
|
+
ja as orthoCamera,
|
|
8302
|
+
Ka as parseModelLite,
|
|
8307
8303
|
W as randomID,
|
|
8308
|
-
|
|
8304
|
+
Xa as renderToTexture,
|
|
8309
8305
|
nt as resetThreeObjects,
|
|
8310
|
-
|
|
8306
|
+
$a as rgbaToHex,
|
|
8311
8307
|
te as roundTo,
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8308
|
+
ro as setMaterialBlendAdd,
|
|
8309
|
+
ao as setMaterialBlendMultiply,
|
|
8310
|
+
no as setMaterialBlendNormal,
|
|
8311
|
+
oo as setMaterialBlendScreen,
|
|
8312
|
+
to as supportsOffscreenCanvas,
|
|
8317
8313
|
qt as totalThreeObjects,
|
|
8318
8314
|
Jt as triangle,
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
|
|
8322
|
-
|
|
8315
|
+
Ja as updateCameraOrtho,
|
|
8316
|
+
eo as updateCameraOrtho16x9,
|
|
8317
|
+
so as useMask,
|
|
8318
|
+
Wa as useStudio
|
|
8323
8319
|
};
|