@tresjs/cientos 5.0.0 → 5.0.1
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/trescientos.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @tresjs/cientos
|
|
3
|
-
* version: v5.0.
|
|
3
|
+
* version: v5.0.1
|
|
4
4
|
* (c) 2025
|
|
5
5
|
* description: Collection of useful helpers and fully functional, ready-made abstractions for Tres
|
|
6
6
|
* author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)
|
|
7
7
|
*/
|
|
8
8
|
import * as Ki from "three";
|
|
9
|
-
import { TextureLoader as ao, DoubleSide as tn, WebGLCubeRenderTarget as T1, HalfFloatType as ci, CubeCamera as b1, Group as di, Quaternion as xt, Euler as Fs, AudioListener as w1, Audio as gT, AudioLoader as S1, MathUtils as vt, ShaderMaterial as ei, UniformsUtils as eo, Vector2 as Pe, Color as Be, Texture as On, FrontSide as ba, Mesh as Ae, MeshBasicMaterial as Ii, Vector3 as
|
|
9
|
+
import { TextureLoader as ao, DoubleSide as tn, WebGLCubeRenderTarget as T1, HalfFloatType as ci, CubeCamera as b1, Group as di, Quaternion as xt, Euler as Fs, AudioListener as w1, Audio as gT, AudioLoader as S1, MathUtils as vt, ShaderMaterial as ei, UniformsUtils as eo, Vector2 as Pe, Color as Be, Texture as On, FrontSide as ba, Mesh as Ae, MeshBasicMaterial as Ii, Vector3 as V, FramebufferTexture as sg, RawShaderMaterial as Gh, AdditiveBlending as Np, Box2 as M1, Vector4 as ls, UnsignedByteType as Hf, BufferGeometry as ps, InterleavedBuffer as Pp, InterleavedBufferAttribute as Mn, REVISION as Ip, BufferAttribute as Qt, TrianglesDrawMode as yT, TriangleFanDrawMode as $f, TriangleStripDrawMode as A1, CompressedTexture as Vh, RGBAFormat as E1, PropertyBinding as Un, InterpolateDiscrete as R1, Matrix4 as Qe, Scene as Ml, PlaneGeometry as qi, Uniform as $e, PerspectiveCamera as fi, WebGLRenderer as Al, InterpolateLinear as Bp, NearestFilter as vu, NearestMipmapNearestFilter as C1, NearestMipmapLinearFilter as N1, LinearFilter as Xs, LinearMipmapNearestFilter as P1, LinearMipmapLinearFilter as Fp, ClampToEdgeWrapping as ua, RepeatWrapping as to, MirroredRepeatWrapping as I1, Plane as kl, WebGLRenderTarget as ui, NoToneMapping as xT, UniformsLib as _u, DynamicDrawUsage as ic, Sphere as wa, BackSide as fh, BoxGeometry as ji, Triangle as vT, Object3D as Js, Raycaster as Dp, LineBasicMaterial as El, CylinderGeometry as xi, Float32BufferAttribute as Is, Line as at, OctahedronGeometry as Ar, SphereGeometry as _T, TorusGeometry as nc, MOUSE as Ai, TOUCH as Xi, Spherical as Tu, OrthographicCamera as hr, Ray as TT, Loader as zl, LoaderUtils as Qo, FileLoader as so, MeshPhysicalMaterial as on, SpotLight as B1, PointLight as Wf, DirectionalLight as Lp, InstancedMesh as F1, InstancedBufferAttribute as bT, ImageBitmapLoader as wT, PointsMaterial as D1, Material as Hh, MeshStandardMaterial as Gl, SkinnedMesh as Op, LineSegments as ST, LineLoop as MT, Points as L1, Skeleton as O1, AnimationClip as U1, Bone as jf, VectorKeyframeTrack as qf, NumberKeyframeTrack as Xf, QuaternionKeyframeTrack as Yf, Interpolant as AT, Box3 as Bs, ExtrudeGeometry as ET, Curve as RT, MeshPhongMaterial as $h, MeshLambertMaterial as k1, EquirectangularReflectionMapping as cu, AmbientLight as CT, Uint16BufferAttribute as NT, Matrix3 as kr, ShapePath as er, DataTextureLoader as PT, FloatType as uu, DataUtils as rc, ShapeUtils as IT, Shape as BT, Path as Wh, InstancedBufferGeometry as FT, InstancedInterleavedBuffer as Kf, WireframeGeometry as DT, Line3 as LT, AlwaysStencilFunc as OT, ReplaceStencilOp as jh, AnimationMixer as UT, KeepStencilOp as qh, NotEqualStencilFunc as ig, EqualStencilFunc as ng, DepthTexture as z1, EdgesGeometry as kT, CubeTextureLoader as zT, CubeReflectionMapping as GT, ShapeGeometry as VT, DefaultLoadingManager as oc, VideoTexture as HT, Clock as $T, NoBlending as WT, Camera as jT, TangentSpaceNormalMap as qT, LOD as XT, CatmullRomCurve3 as YT, QuadraticBezierCurve3 as G1, CubicBezierCurve3 as KT, MeshDepthMaterial as rg, ShaderChunk as Xh, DataTexture as V1, UVMapping as ZT, IcosahedronGeometry as QT } from "three";
|
|
10
10
|
import { defineComponent as _e, watch as re, ref as Fe, shallowRef as de, withAsyncContext as Up, onUnmounted as kt, createElementBlock as ve, openBlock as me, renderSlot as Ze, createElementVNode as Ee, unref as k, getCurrentScope as JT, onScopeDispose as eb, onMounted as an, nextTick as kp, getCurrentInstance as zp, isRef as bu, hasInjectionContext as H1, inject as Gp, toValue as Le, computed as Ce, reactive as ha, watchEffect as Pt, isReactive as Rl, createVNode as An, mergeProps as ft, provide as tb, toRefs as rt, shallowReactive as $1, onBeforeUnmount as ph, useSlots as Vp, createCommentVNode as ms, createBlock as En, Fragment as W1, renderList as j1, useAttrs as sb, render as ib, triggerRef as nb, withCtx as ac, Suspense as rb, normalizeProps as ob, toRaw as og } from "vue";
|
|
11
11
|
import { logError as sn, useTres as ke, useLoop as ot, normalizeVectorFlexibleParam as Jo, useTresContext as si, extend as Vl, useLoader as Sa, normalizeColor as bn, logWarning as Hr, buildGraph as wu } from "@tresjs/core";
|
|
12
12
|
function ab(a) {
|
|
@@ -682,15 +682,15 @@ function Y1(a, e = {}) {
|
|
|
682
682
|
var E, C, B, D;
|
|
683
683
|
if (!u)
|
|
684
684
|
return;
|
|
685
|
-
const
|
|
686
|
-
if (!
|
|
685
|
+
const G = Le(a);
|
|
686
|
+
if (!G)
|
|
687
687
|
return;
|
|
688
|
-
(B =
|
|
688
|
+
(B = G instanceof Document ? u.document.body : G) == null || B.scrollTo({
|
|
689
689
|
top: (E = Le(S)) != null ? E : g.value,
|
|
690
690
|
left: (C = Le(T)) != null ? C : m.value,
|
|
691
691
|
behavior: Le(c)
|
|
692
692
|
});
|
|
693
|
-
const O = ((D =
|
|
693
|
+
const O = ((D = G?.document) == null ? void 0 : D.documentElement) || G?.documentElement || G;
|
|
694
694
|
m != null && (d.value = O.scrollLeft), g != null && (p.value = O.scrollTop);
|
|
695
695
|
}
|
|
696
696
|
const x = de(!1), v = ha({
|
|
@@ -709,14 +709,14 @@ function Y1(a, e = {}) {
|
|
|
709
709
|
var S;
|
|
710
710
|
if (!u)
|
|
711
711
|
return;
|
|
712
|
-
const E = ((S = T?.document) == null ? void 0 : S.documentElement) || T?.documentElement || Rn(T), { display: C, flexDirection: B, direction: D } = getComputedStyle(E),
|
|
712
|
+
const E = ((S = T?.document) == null ? void 0 : S.documentElement) || T?.documentElement || Rn(T), { display: C, flexDirection: B, direction: D } = getComputedStyle(E), G = D === "rtl" ? -1 : 1, O = E.scrollLeft;
|
|
713
713
|
w.left = O < d.value, w.right = O > d.value;
|
|
714
|
-
const ce = Math.abs(O *
|
|
714
|
+
const ce = Math.abs(O * G) <= (r.left || 0), te = Math.abs(O * G) + E.clientWidth >= E.scrollWidth - (r.right || 0) - ug;
|
|
715
715
|
C === "flex" && B === "row-reverse" ? (v.left = te, v.right = ce) : (v.left = ce, v.right = te), d.value = O;
|
|
716
|
-
let
|
|
717
|
-
T === u.document && !
|
|
718
|
-
const ie = Math.abs(
|
|
719
|
-
C === "flex" && B === "column-reverse" ? (v.top = ue, v.bottom = ie) : (v.top = ie, v.bottom = ue), p.value =
|
|
716
|
+
let H = E.scrollTop;
|
|
717
|
+
T === u.document && !H && (H = u.document.body.scrollTop), w.top = H < p.value, w.bottom = H > p.value;
|
|
718
|
+
const ie = Math.abs(H) <= (r.top || 0), ue = Math.abs(H) + E.clientHeight >= E.scrollHeight - (r.bottom || 0) - ug;
|
|
719
|
+
C === "flex" && B === "column-reverse" ? (v.top = ue, v.bottom = ie) : (v.top = ie, v.bottom = ue), p.value = H;
|
|
720
720
|
}, _ = (T) => {
|
|
721
721
|
var S;
|
|
722
722
|
if (!u)
|
|
@@ -1225,10 +1225,10 @@ const sw = ["scale"], iw = ["args"], mk = /* @__PURE__ */ _e({
|
|
|
1225
1225
|
scale: r.value,
|
|
1226
1226
|
imageBounds: o.value,
|
|
1227
1227
|
resolution: l.value,
|
|
1228
|
-
radius:
|
|
1229
|
-
toneMapped:
|
|
1230
|
-
transparent:
|
|
1231
|
-
side:
|
|
1228
|
+
radius: a.radius,
|
|
1229
|
+
toneMapped: a.toneMapped,
|
|
1230
|
+
transparent: a.transparent,
|
|
1231
|
+
side: a.side
|
|
1232
1232
|
}, null, 8, ["color", "map", "zoom", "grayscale", "opacity", "scale", "imageBounds", "resolution", "radius", "toneMapped", "transparent", "side"])
|
|
1233
1233
|
], 8, sw));
|
|
1234
1234
|
}
|
|
@@ -1243,7 +1243,7 @@ class Cl extends Ae {
|
|
|
1243
1243
|
}
|
|
1244
1244
|
constructor() {
|
|
1245
1245
|
super(Cl.Geometry, new Ii({ opacity: 0, transparent: !0 })), this.frustumCulled = !1, this.renderOrder = 1 / 0;
|
|
1246
|
-
const e = new
|
|
1246
|
+
const e = new V(), t = new V(), s = new sg(16, 16), i = new sg(16, 16);
|
|
1247
1247
|
let n = Hf;
|
|
1248
1248
|
const r = Cl.Geometry, o = new Gh({
|
|
1249
1249
|
uniforms: {
|
|
@@ -1336,7 +1336,7 @@ class Cl extends Ae {
|
|
|
1336
1336
|
occlusionMap: { value: i },
|
|
1337
1337
|
color: { value: new Be(16777215) },
|
|
1338
1338
|
scale: { value: new Pe() },
|
|
1339
|
-
screenPosition: { value: new
|
|
1339
|
+
screenPosition: { value: new V() }
|
|
1340
1340
|
},
|
|
1341
1341
|
vertexShader: h.vertexShader,
|
|
1342
1342
|
fragmentShader: h.fragmentShader,
|
|
@@ -1359,7 +1359,7 @@ class Cl extends Ae {
|
|
|
1359
1359
|
let E = o.uniforms;
|
|
1360
1360
|
E.scale.value = p, E.screenPosition.value = e, x.renderBufferDirect(w, null, r, o, c, null), x.copyFramebufferToTexture(i, m), E = l.uniforms, E.scale.value = p, E.screenPosition.value = e, x.renderBufferDirect(w, null, r, l, c, null);
|
|
1361
1361
|
const C = -e.x * 2, B = -e.y * 2;
|
|
1362
|
-
for (let D = 0,
|
|
1362
|
+
for (let D = 0, G = u.length; D < G; D++) {
|
|
1363
1363
|
const O = u[D], ce = f.uniforms;
|
|
1364
1364
|
ce.color.value.copy(O.color), ce.map.value = O.texture, ce.screenPosition.value.x = e.x + C * O.distance, ce.screenPosition.value.y = e.y + B * O.distance, S = O.size / y.w;
|
|
1365
1365
|
const te = y.w / y.z;
|
|
@@ -1455,7 +1455,7 @@ Z1.Shader = {
|
|
|
1455
1455
|
}`
|
|
1456
1456
|
)
|
|
1457
1457
|
};
|
|
1458
|
-
Cl.Geometry = function() {
|
|
1458
|
+
Cl.Geometry = (function() {
|
|
1459
1459
|
const a = new ps(), e = new Float32Array([
|
|
1460
1460
|
-1,
|
|
1461
1461
|
-1,
|
|
@@ -1479,7 +1479,7 @@ Cl.Geometry = function() {
|
|
|
1479
1479
|
1
|
|
1480
1480
|
]), t = new Pp(e, 5);
|
|
1481
1481
|
return a.setIndex([0, 1, 2, 0, 2, 3]), a.setAttribute("position", new Mn(t, 3, 0, !1)), a.setAttribute("uv", new Mn(t, 2, 3, !1)), a;
|
|
1482
|
-
}();
|
|
1482
|
+
})();
|
|
1483
1483
|
function nw(a) {
|
|
1484
1484
|
return a;
|
|
1485
1485
|
}
|
|
@@ -1801,7 +1801,7 @@ const gk = /* @__PURE__ */ _e({
|
|
|
1801
1801
|
color: {}
|
|
1802
1802
|
},
|
|
1803
1803
|
setup(a, { expose: e }) {
|
|
1804
|
-
const t = a, { parent: s } = Gp(Yp), i = de(), n = new
|
|
1804
|
+
const t = a, { parent: s } = Gp(Yp), i = de(), n = new V(), r = Ce(() => new Be(t.color));
|
|
1805
1805
|
return ot().onBeforeRender(() => {
|
|
1806
1806
|
!s.value || !i.value || (i.value.getWorldPosition(n), s.value.addBall(0.5 + n.x * 0.5, 0.5 + n.y * 0.5, 0.5 + n.z * 0.5, t.strength, t.subtract, r.value));
|
|
1807
1807
|
}), e({ instance: i }), (o, l) => (me(), ve("TresGroup", {
|
|
@@ -1841,7 +1841,7 @@ function gg(a, e) {
|
|
|
1841
1841
|
return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", e), a;
|
|
1842
1842
|
}
|
|
1843
1843
|
function bw(a, e = Math.PI / 3) {
|
|
1844
|
-
const t = Math.cos(e), s = (1 + 1e-10) * 100, i = [new
|
|
1844
|
+
const t = Math.cos(e), s = (1 + 1e-10) * 100, i = [new V(), new V(), new V()], n = new V(), r = new V(), o = new V(), l = new V();
|
|
1845
1845
|
function c(m) {
|
|
1846
1846
|
const g = ~~(m.x * s), y = ~~(m.y * s), x = ~~(m.z * s);
|
|
1847
1847
|
return `${g},${y},${x}`;
|
|
@@ -1850,7 +1850,7 @@ function bw(a, e = Math.PI / 3) {
|
|
|
1850
1850
|
for (let m = 0, g = h.count / 3; m < g; m++) {
|
|
1851
1851
|
const y = 3 * m, x = i[0].fromBufferAttribute(h, y + 0), v = i[1].fromBufferAttribute(h, y + 1), w = i[2].fromBufferAttribute(h, y + 2);
|
|
1852
1852
|
n.subVectors(w, v), r.subVectors(x, v);
|
|
1853
|
-
const A = new
|
|
1853
|
+
const A = new V().crossVectors(n, r).normalize();
|
|
1854
1854
|
for (let b = 0; b < 3; b++) {
|
|
1855
1855
|
const M = i[b], _ = c(M);
|
|
1856
1856
|
_ in f || (f[_] = []), f[_].push(A);
|
|
@@ -2238,7 +2238,7 @@ class Fw {
|
|
|
2238
2238
|
isNormalizedNormalAttribute(e) {
|
|
2239
2239
|
if (this.cache.attributesNormalized.has(e))
|
|
2240
2240
|
return !1;
|
|
2241
|
-
const s = new
|
|
2241
|
+
const s = new V();
|
|
2242
2242
|
for (let i = 0, n = e.count; i < n; i++)
|
|
2243
2243
|
if (Math.abs(s.fromBufferAttribute(e, i).length() - 1) > 5e-4)
|
|
2244
2244
|
return !1;
|
|
@@ -2255,7 +2255,7 @@ class Fw {
|
|
|
2255
2255
|
const t = this.cache;
|
|
2256
2256
|
if (t.attributesNormalized.has(e))
|
|
2257
2257
|
return t.attributesNormalized.get(e);
|
|
2258
|
-
const s = e.clone(), i = new
|
|
2258
|
+
const s = e.clone(), i = new V();
|
|
2259
2259
|
for (let n = 0, r = s.count; n < r; n++)
|
|
2260
2260
|
i.fromBufferAttribute(s, n), i.x === 0 && i.y === 0 && i.z === 0 ? i.setX(1) : i.normalize(), s.setXYZ(n, i.x, i.y, i.z);
|
|
2261
2261
|
return t.attributesNormalized.set(e, s), s;
|
|
@@ -2635,7 +2635,7 @@ class Fw {
|
|
|
2635
2635
|
}
|
|
2636
2636
|
const B = S.clone();
|
|
2637
2637
|
if (!r.morphTargetsRelative)
|
|
2638
|
-
for (let D = 0,
|
|
2638
|
+
for (let D = 0, G = S.count; D < G; D++)
|
|
2639
2639
|
for (let O = 0; O < S.itemSize; O++)
|
|
2640
2640
|
O === 0 && B.setX(D, S.getX(D) - C.getX(D)), O === 1 && B.setY(D, S.getY(D) - C.getY(D)), O === 2 && B.setZ(D, S.getZ(D) - C.getZ(D)), O === 3 && B.setW(D, S.getW(D) - C.getW(D));
|
|
2641
2641
|
M[E] = this.processAccessor(B, r), t.attributes.set(this.getUID(C, !0), M[E]);
|
|
@@ -3162,7 +3162,7 @@ for (var Ft = 0; Ft < 32768; ++Ft) {
|
|
|
3162
3162
|
var Wn = (Ft & 43690) >>> 1 | (Ft & 21845) << 1;
|
|
3163
3163
|
Wn = (Wn & 52428) >>> 2 | (Wn & 13107) << 2, Wn = (Wn & 61680) >>> 4 | (Wn & 3855) << 4, Jf[Ft] = ((Wn & 65280) >>> 8 | (Wn & 255) << 8) >>> 1;
|
|
3164
3164
|
}
|
|
3165
|
-
var dl = function(a, e, t) {
|
|
3165
|
+
var dl = (function(a, e, t) {
|
|
3166
3166
|
for (var s = a.length, i = 0, n = new lr(e); i < s; ++i)
|
|
3167
3167
|
++n[a[i] - 1];
|
|
3168
3168
|
var r = new lr(e);
|
|
@@ -3180,7 +3180,7 @@ var dl = function(a, e, t) {
|
|
|
3180
3180
|
for (o = new lr(s), i = 0; i < s; ++i)
|
|
3181
3181
|
a[i] && (o[i] = Jf[r[a[i] - 1]++] >>> 15 - a[i]);
|
|
3182
3182
|
return o;
|
|
3183
|
-
}, Hl = new li(288);
|
|
3183
|
+
}), Hl = new li(288);
|
|
3184
3184
|
for (var Ft = 0; Ft < 144; ++Ft)
|
|
3185
3185
|
Hl[Ft] = 8;
|
|
3186
3186
|
for (var Ft = 144; Ft < 256; ++Ft)
|
|
@@ -3246,8 +3246,8 @@ var Kw = /* @__PURE__ */ dl(Hl, 9, 1), Zw = /* @__PURE__ */ dl(cx, 5, 1), ed = f
|
|
|
3246
3246
|
b[_++] = B;
|
|
3247
3247
|
}
|
|
3248
3248
|
}
|
|
3249
|
-
var
|
|
3250
|
-
f = ed(
|
|
3249
|
+
var G = b.subarray(0, v), O = b.subarray(v);
|
|
3250
|
+
f = ed(G), d = ed(O), u = dl(G, f, 1), h = dl(O, d, 1);
|
|
3251
3251
|
} else
|
|
3252
3252
|
throw "invalid block type";
|
|
3253
3253
|
else {
|
|
@@ -3267,7 +3267,7 @@ var Kw = /* @__PURE__ */ dl(Hl, 9, 1), Zw = /* @__PURE__ */ dl(cx, 5, 1), ed = f
|
|
|
3267
3267
|
}
|
|
3268
3268
|
}
|
|
3269
3269
|
i && r(c + 131072);
|
|
3270
|
-
for (var ce = (1 << f) - 1, te = (1 << d) - 1,
|
|
3270
|
+
for (var ce = (1 << f) - 1, te = (1 << d) - 1, H = l; ; H = l) {
|
|
3271
3271
|
var B = u[td(a, l) & ce], ie = B >>> 4;
|
|
3272
3272
|
if (l += B & 15, l > p) {
|
|
3273
3273
|
if (n)
|
|
@@ -3279,7 +3279,7 @@ var Kw = /* @__PURE__ */ dl(Hl, 9, 1), Zw = /* @__PURE__ */ dl(cx, 5, 1), ed = f
|
|
|
3279
3279
|
if (ie < 256)
|
|
3280
3280
|
e[c++] = ie;
|
|
3281
3281
|
else if (ie == 256) {
|
|
3282
|
-
|
|
3282
|
+
H = l, u = null;
|
|
3283
3283
|
break;
|
|
3284
3284
|
} else {
|
|
3285
3285
|
var ue = ie - 254;
|
|
@@ -3307,7 +3307,7 @@ var Kw = /* @__PURE__ */ dl(Hl, 9, 1), Zw = /* @__PURE__ */ dl(cx, 5, 1), ed = f
|
|
|
3307
3307
|
c = $;
|
|
3308
3308
|
}
|
|
3309
3309
|
}
|
|
3310
|
-
t.l = u, t.p =
|
|
3310
|
+
t.l = u, t.p = H, t.b = c, u && (o = 1, t.m = f, t.d = h, t.n = d);
|
|
3311
3311
|
} while (!o);
|
|
3312
3312
|
return c == e.length ? e : Jw(e, 0, c);
|
|
3313
3313
|
}, tS = /* @__PURE__ */ new li(0), sS = function(a) {
|
|
@@ -3329,7 +3329,7 @@ const Sg = /* @__PURE__ */ (() => {
|
|
|
3329
3329
|
const a = class extends Ae {
|
|
3330
3330
|
constructor(t, s = {}) {
|
|
3331
3331
|
super(t), this.isReflector = !0, this.type = "Reflector", this.camera = new fi();
|
|
3332
|
-
const i = this, n = s.color !== void 0 ? new Be(s.color) : new Be(8355711), r = s.textureWidth || 512, o = s.textureHeight || 512, l = s.clipBias || 0, c = s.shader || a.ReflectorShader, u = s.multisample !== void 0 ? s.multisample : 4, h = new kl(), f = new
|
|
3332
|
+
const i = this, n = s.color !== void 0 ? new Be(s.color) : new Be(8355711), r = s.textureWidth || 512, o = s.textureHeight || 512, l = s.clipBias || 0, c = s.shader || a.ReflectorShader, u = s.multisample !== void 0 ? s.multisample : 4, h = new kl(), f = new V(), d = new V(), p = new V(), m = new Qe(), g = new V(0, 0, -1), y = new ls(), x = new V(), v = new V(), w = new ls(), A = new Qe(), b = this.camera, M = new ui(r, o, {
|
|
3333
3333
|
samples: u,
|
|
3334
3334
|
type: ci
|
|
3335
3335
|
}), _ = new ei({
|
|
@@ -3348,9 +3348,9 @@ const Sg = /* @__PURE__ */ (() => {
|
|
|
3348
3348
|
);
|
|
3349
3349
|
const C = b.projectionMatrix;
|
|
3350
3350
|
w.x = (Math.sign(y.x) + C.elements[8]) / C.elements[0], w.y = (Math.sign(y.y) + C.elements[9]) / C.elements[5], w.z = -1, w.w = (1 + C.elements[10]) / C.elements[14], y.multiplyScalar(2 / y.dot(w)), C.elements[2] = y.x, C.elements[6] = y.y, C.elements[10] = y.z + 1 - l, C.elements[14] = y.w, i.visible = !1;
|
|
3351
|
-
const B = T.getRenderTarget(), D = T.xr.enabled,
|
|
3351
|
+
const B = T.getRenderTarget(), D = T.xr.enabled, G = T.shadowMap.autoUpdate, O = T.toneMapping;
|
|
3352
3352
|
let ce = !1;
|
|
3353
|
-
"outputColorSpace" in T ? ce = T.outputColorSpace === "srgb" : ce = T.outputEncoding === 3001, T.xr.enabled = !1, T.shadowMap.autoUpdate = !1, "outputColorSpace" in T ? T.outputColorSpace = "srgb-linear" : T.outputEncoding = 3e3, T.toneMapping = xT, T.setRenderTarget(M), T.state.buffers.depth.setMask(!0), T.autoClear === !1 && T.clear(), T.render(S, b), T.xr.enabled = D, T.shadowMap.autoUpdate =
|
|
3353
|
+
"outputColorSpace" in T ? ce = T.outputColorSpace === "srgb" : ce = T.outputEncoding === 3001, T.xr.enabled = !1, T.shadowMap.autoUpdate = !1, "outputColorSpace" in T ? T.outputColorSpace = "srgb-linear" : T.outputEncoding = 3e3, T.toneMapping = xT, T.setRenderTarget(M), T.state.buffers.depth.setMask(!0), T.autoClear === !1 && T.clear(), T.render(S, b), T.xr.enabled = D, T.shadowMap.autoUpdate = G, T.toneMapping = O, "outputColorSpace" in T ? T.outputColorSpace = ce ? "srgb" : "srgb-linear" : T.outputEncoding = ce ? 3001 : 3e3, T.setRenderTarget(B);
|
|
3354
3354
|
const te = E.viewport;
|
|
3355
3355
|
te !== void 0 && T.state.viewport(te), i.visible = !0;
|
|
3356
3356
|
}, this.getRenderTarget = function() {
|
|
@@ -3430,7 +3430,7 @@ const Sg = /* @__PURE__ */ (() => {
|
|
|
3430
3430
|
class cS extends Ae {
|
|
3431
3431
|
constructor(e, t = {}) {
|
|
3432
3432
|
super(e), this.isWater = !0;
|
|
3433
|
-
const s = this, i = t.textureWidth !== void 0 ? t.textureWidth : 512, n = t.textureHeight !== void 0 ? t.textureHeight : 512, r = t.clipBias !== void 0 ? t.clipBias : 0, o = t.alpha !== void 0 ? t.alpha : 1, l = t.time !== void 0 ? t.time : 0, c = t.waterNormals !== void 0 ? t.waterNormals : null, u = t.sunDirection !== void 0 ? t.sunDirection : new
|
|
3433
|
+
const s = this, i = t.textureWidth !== void 0 ? t.textureWidth : 512, n = t.textureHeight !== void 0 ? t.textureHeight : 512, r = t.clipBias !== void 0 ? t.clipBias : 0, o = t.alpha !== void 0 ? t.alpha : 1, l = t.time !== void 0 ? t.time : 0, c = t.waterNormals !== void 0 ? t.waterNormals : null, u = t.sunDirection !== void 0 ? t.sunDirection : new V(0.70707, 0.70707, 0), h = new Be(t.sunColor !== void 0 ? t.sunColor : 16777215), f = new Be(t.waterColor !== void 0 ? t.waterColor : 8355711), d = t.eye !== void 0 ? t.eye : new V(0, 0, 0), p = t.distortionScale !== void 0 ? t.distortionScale : 20, m = t.side !== void 0 ? t.side : ba, g = t.fog !== void 0 ? t.fog : !1, y = new kl(), x = new V(), v = new V(), w = new V(), A = new Qe(), b = new V(0, 0, -1), M = new ls(), _ = new V(), T = new V(), S = new ls(), E = new Qe(), C = new fi(), B = new ui(i, n), D = {
|
|
3434
3434
|
uniforms: eo.merge([
|
|
3435
3435
|
_u.fog,
|
|
3436
3436
|
_u.lights,
|
|
@@ -3443,8 +3443,8 @@ class cS extends Ae {
|
|
|
3443
3443
|
distortionScale: { value: 20 },
|
|
3444
3444
|
textureMatrix: { value: new Qe() },
|
|
3445
3445
|
sunColor: { value: new Be(8355711) },
|
|
3446
|
-
sunDirection: { value: new
|
|
3447
|
-
eye: { value: new
|
|
3446
|
+
sunDirection: { value: new V(0.70707, 0.70707, 0) },
|
|
3447
|
+
eye: { value: new V() },
|
|
3448
3448
|
waterColor: { value: new Be(5592405) }
|
|
3449
3449
|
}
|
|
3450
3450
|
]),
|
|
@@ -3552,7 +3552,7 @@ class cS extends Ae {
|
|
|
3552
3552
|
#include <fog_fragment>
|
|
3553
3553
|
}`
|
|
3554
3554
|
)
|
|
3555
|
-
},
|
|
3555
|
+
}, G = new ei({
|
|
3556
3556
|
fragmentShader: D.fragmentShader,
|
|
3557
3557
|
vertexShader: D.vertexShader,
|
|
3558
3558
|
uniforms: eo.clone(D.uniforms),
|
|
@@ -3560,12 +3560,12 @@ class cS extends Ae {
|
|
|
3560
3560
|
side: m,
|
|
3561
3561
|
fog: g
|
|
3562
3562
|
});
|
|
3563
|
-
|
|
3563
|
+
G.uniforms.mirrorSampler.value = B.texture, G.uniforms.textureMatrix.value = E, G.uniforms.alpha.value = o, G.uniforms.time.value = l, G.uniforms.normalSampler.value = c, G.uniforms.sunColor.value = h, G.uniforms.waterColor.value = f, G.uniforms.sunDirection.value = u, G.uniforms.distortionScale.value = p, G.uniforms.eye.value = d, s.material = G, s.onBeforeRender = function(O, ce, te) {
|
|
3564
3564
|
if (v.setFromMatrixPosition(s.matrixWorld), w.setFromMatrixPosition(te.matrixWorld), A.extractRotation(s.matrixWorld), x.set(0, 0, 1), x.applyMatrix4(A), _.subVectors(v, w), _.dot(x) > 0)
|
|
3565
3565
|
return;
|
|
3566
3566
|
_.reflect(x).negate(), _.add(v), A.extractRotation(te.matrixWorld), b.set(0, 0, -1), b.applyMatrix4(A), b.add(w), T.subVectors(v, b), T.reflect(x).negate(), T.add(v), C.position.copy(_), C.up.set(0, 1, 0), C.up.applyMatrix4(A), C.up.reflect(x), C.lookAt(T), C.far = te.far, C.updateMatrixWorld(), C.projectionMatrix.copy(te.projectionMatrix), E.set(0.5, 0, 0, 0.5, 0, 0.5, 0, 0.5, 0, 0, 0.5, 0.5, 0, 0, 0, 1), E.multiply(C.projectionMatrix), E.multiply(C.matrixWorldInverse), y.setFromNormalAndCoplanarPoint(x, v), y.applyMatrix4(C.matrixWorldInverse), M.set(y.normal.x, y.normal.y, y.normal.z, y.constant);
|
|
3567
|
-
const
|
|
3568
|
-
S.x = (Math.sign(M.x) +
|
|
3567
|
+
const H = C.projectionMatrix;
|
|
3568
|
+
S.x = (Math.sign(M.x) + H.elements[8]) / H.elements[0], S.y = (Math.sign(M.y) + H.elements[9]) / H.elements[5], S.z = -1, S.w = (1 + H.elements[10]) / H.elements[14], M.multiplyScalar(2 / M.dot(S)), H.elements[2] = M.x, H.elements[6] = M.y, H.elements[10] = M.z + 1 - r, H.elements[14] = M.w, d.setFromMatrixPosition(te.matrixWorld);
|
|
3569
3569
|
const ie = O.getRenderTarget(), ue = O.xr.enabled, ge = O.shadowMap.autoUpdate;
|
|
3570
3570
|
s.visible = !1, O.xr.enabled = !1, O.shadowMap.autoUpdate = !1, O.setRenderTarget(B), O.state.buffers.depth.setMask(!0), O.autoClear === !1 && O.clear(), O.render(ce, C), s.visible = !0, O.xr.enabled = ue, O.shadowMap.autoUpdate = ge, O.setRenderTarget(ie);
|
|
3571
3571
|
const we = te.viewport;
|
|
@@ -3577,7 +3577,7 @@ class uS extends Ae {
|
|
|
3577
3577
|
constructor(e, t, s = !1, i = !1, n = 1e4) {
|
|
3578
3578
|
const r = new ps();
|
|
3579
3579
|
super(r, t), this.isMarchingCubes = !0;
|
|
3580
|
-
const o = this, l = new Float32Array(
|
|
3580
|
+
const o = this, l = new Float32Array(36), c = new Float32Array(36), u = new Float32Array(36);
|
|
3581
3581
|
this.enableUvs = s, this.enableColors = i, this.init = function(x) {
|
|
3582
3582
|
this.resolution = x, this.isolation = 80, this.size = x, this.size2 = this.size * this.size, this.size3 = this.size2 * this.size, this.halfsize = this.size / 2, this.delta = 2 / this.size, this.yd = this.size, this.zd = this.size2, this.field = new Float32Array(this.size3), this.normal_cache = new Float32Array(this.size3 * 3), this.palette = new Float32Array(this.size3 * 3), this.count = 0;
|
|
3583
3583
|
const v = n * 3;
|
|
@@ -3595,7 +3595,7 @@ class uS extends Ae {
|
|
|
3595
3595
|
const b = new Qt(this.colorArray, 3);
|
|
3596
3596
|
b.setUsage(ic), r.setAttribute("color", b);
|
|
3597
3597
|
}
|
|
3598
|
-
r.boundingSphere = new wa(new
|
|
3598
|
+
r.boundingSphere = new wa(new V(), 1);
|
|
3599
3599
|
};
|
|
3600
3600
|
function h(x, v, w) {
|
|
3601
3601
|
return x + (v - x) * w;
|
|
@@ -3623,13 +3623,13 @@ class uS extends Ae {
|
|
|
3623
3623
|
function g(x, v, w, A, b) {
|
|
3624
3624
|
const M = A + 1, _ = A + o.yd, T = A + o.zd, S = M + o.yd, E = M + o.zd, C = A + o.yd + o.zd, B = M + o.yd + o.zd;
|
|
3625
3625
|
let D = 0;
|
|
3626
|
-
const
|
|
3627
|
-
|
|
3626
|
+
const G = o.field[A], O = o.field[M], ce = o.field[_], te = o.field[S], H = o.field[T], ie = o.field[E], ue = o.field[C], ge = o.field[B];
|
|
3627
|
+
G < b && (D |= 1), O < b && (D |= 2), ce < b && (D |= 8), te < b && (D |= 4), H < b && (D |= 16), ie < b && (D |= 32), ue < b && (D |= 128), ge < b && (D |= 64);
|
|
3628
3628
|
const we = hS[D];
|
|
3629
3629
|
if (we === 0)
|
|
3630
3630
|
return 0;
|
|
3631
3631
|
const W = o.delta, $ = x + W, z = v + W, F = w + W;
|
|
3632
|
-
we & 1 && (m(A), m(M), f(A * 3, 0, b, x, v, w,
|
|
3632
|
+
we & 1 && (m(A), m(M), f(A * 3, 0, b, x, v, w, G, O, A, M)), we & 2 && (m(M), m(S), d(M * 3, 3, b, $, v, w, O, te, M, S)), we & 4 && (m(_), m(S), f(_ * 3, 6, b, x, z, w, ce, te, _, S)), we & 8 && (m(A), m(_), d(A * 3, 9, b, x, v, w, G, ce, A, _)), we & 16 && (m(T), m(E), f(T * 3, 12, b, x, v, F, H, ie, T, E)), we & 32 && (m(E), m(B), d(E * 3, 15, b, $, v, F, ie, ge, E, B)), we & 64 && (m(C), m(B), f(C * 3, 18, b, x, z, F, ue, ge, C, B)), we & 128 && (m(T), m(C), d(T * 3, 21, b, x, v, F, H, ue, T, C)), we & 256 && (m(A), m(T), p(A * 3, 24, b, x, v, w, G, H, A, T)), we & 512 && (m(M), m(E), p(M * 3, 27, b, $, v, w, O, ie, M, E)), we & 1024 && (m(S), m(B), p(S * 3, 30, b, $, z, w, te, ge, S, B)), we & 2048 && (m(_), m(C), p(_ * 3, 33, b, x, z, w, ce, ue, _, C)), D <<= 4;
|
|
3633
3633
|
let N, R, P, I = 0, j = 0;
|
|
3634
3634
|
for (; hc[D + j] != -1; )
|
|
3635
3635
|
N = D + j, R = N + 1, P = N + 2, y(l, c, u, 3 * hc[N], 3 * hc[R], 3 * hc[P]), j += 3, I++;
|
|
@@ -3664,22 +3664,22 @@ class uS extends Ae {
|
|
|
3664
3664
|
S = new Be(x, v, w);
|
|
3665
3665
|
}
|
|
3666
3666
|
const E = this.size * Math.sqrt(A / b), C = w * this.size, B = v * this.size, D = x * this.size;
|
|
3667
|
-
let
|
|
3668
|
-
|
|
3667
|
+
let G = Math.floor(C - E);
|
|
3668
|
+
G < 1 && (G = 1);
|
|
3669
3669
|
let O = Math.floor(C + E);
|
|
3670
3670
|
O > this.size - 1 && (O = this.size - 1);
|
|
3671
3671
|
let ce = Math.floor(B - E);
|
|
3672
3672
|
ce < 1 && (ce = 1);
|
|
3673
3673
|
let te = Math.floor(B + E);
|
|
3674
3674
|
te > this.size - 1 && (te = this.size - 1);
|
|
3675
|
-
let
|
|
3676
|
-
|
|
3675
|
+
let H = Math.floor(D - E);
|
|
3676
|
+
H < 1 && (H = 1);
|
|
3677
3677
|
let ie = Math.floor(D + E);
|
|
3678
3678
|
ie > this.size - 1 && (ie = this.size - 1);
|
|
3679
3679
|
let ue, ge, we, W, $, z, F, N, R, P, I;
|
|
3680
|
-
for (we =
|
|
3680
|
+
for (we = G; we < O; we++)
|
|
3681
3681
|
for ($ = this.size2 * we, N = we / this.size - w, R = N * N, ge = ce; ge < te; ge++)
|
|
3682
|
-
for (W = $ + this.size * ge, F = ge / this.size - v, P = F * F, ue =
|
|
3682
|
+
for (W = $ + this.size * ge, F = ge / this.size - v, P = F * F, ue = H; ue < ie; ue++)
|
|
3683
3683
|
if (z = ue / this.size - x, I = A / (1e-6 + z * z + P + R) - b, I > 0) {
|
|
3684
3684
|
this.field[W + ue] += I * _;
|
|
3685
3685
|
const j = Math.sqrt((ue - D) * (ue - D) + (ge - B) * (ge - B) + (we - C) * (we - C)) / E, K = 1 - j * j * j * (j * (j * 6 - 15) + 10);
|
|
@@ -3687,28 +3687,28 @@ class uS extends Ae {
|
|
|
3687
3687
|
}
|
|
3688
3688
|
}, this.addPlaneX = function(x, v) {
|
|
3689
3689
|
const w = this.size, A = this.yd, b = this.zd, M = this.field;
|
|
3690
|
-
let _, T, S, E, C, B, D,
|
|
3691
|
-
for (
|
|
3690
|
+
let _, T, S, E, C, B, D, G = w * Math.sqrt(x / v);
|
|
3691
|
+
for (G > w && (G = w), _ = 0; _ < G; _++)
|
|
3692
3692
|
if (B = _ / w, E = B * B, C = x / (1e-4 + E) - v, C > 0)
|
|
3693
3693
|
for (T = 0; T < w; T++)
|
|
3694
3694
|
for (D = _ + T * A, S = 0; S < w; S++)
|
|
3695
3695
|
M[b * S + D] += C;
|
|
3696
3696
|
}, this.addPlaneY = function(x, v) {
|
|
3697
3697
|
const w = this.size, A = this.yd, b = this.zd, M = this.field;
|
|
3698
|
-
let _, T, S, E, C, B, D,
|
|
3698
|
+
let _, T, S, E, C, B, D, G, O = w * Math.sqrt(x / v);
|
|
3699
3699
|
for (O > w && (O = w), T = 0; T < O; T++)
|
|
3700
3700
|
if (B = T / w, E = B * B, C = x / (1e-4 + E) - v, C > 0)
|
|
3701
3701
|
for (D = T * A, _ = 0; _ < w; _++)
|
|
3702
|
-
for (
|
|
3703
|
-
M[b * S +
|
|
3702
|
+
for (G = D + _, S = 0; S < w; S++)
|
|
3703
|
+
M[b * S + G] += C;
|
|
3704
3704
|
}, this.addPlaneZ = function(x, v) {
|
|
3705
3705
|
const w = this.size, A = this.yd, b = this.zd, M = this.field;
|
|
3706
|
-
let _, T, S, E, C, B, D,
|
|
3706
|
+
let _, T, S, E, C, B, D, G, O = w * Math.sqrt(x / v);
|
|
3707
3707
|
for (O > w && (O = w), S = 0; S < O; S++)
|
|
3708
3708
|
if (B = S / w, E = B * B, C = x / (1e-4 + E) - v, C > 0)
|
|
3709
3709
|
for (D = b * S, T = 0; T < w; T++)
|
|
3710
|
-
for (
|
|
3711
|
-
M[
|
|
3710
|
+
for (G = D + T * A, _ = 0; _ < w; _++)
|
|
3711
|
+
M[G + _] += C;
|
|
3712
3712
|
}, this.setCell = function(x, v, w, A) {
|
|
3713
3713
|
const b = this.size2 * w + this.size * v + x;
|
|
3714
3714
|
this.field[b] = A;
|
|
@@ -3725,14 +3725,14 @@ class uS extends Ae {
|
|
|
3725
3725
|
for (let B = -1; B <= 1; B += 2) {
|
|
3726
3726
|
const D = B + M;
|
|
3727
3727
|
if (!(D < 0 || D >= A))
|
|
3728
|
-
for (let
|
|
3729
|
-
const O =
|
|
3728
|
+
for (let G = -1; G <= 1; G += 2) {
|
|
3729
|
+
const O = G + _;
|
|
3730
3730
|
if (!(O < 0 || O >= A))
|
|
3731
3731
|
for (let ce = -1; ce <= 1; ce += 2) {
|
|
3732
3732
|
const te = ce + T;
|
|
3733
3733
|
if (te < 0 || te >= A)
|
|
3734
3734
|
continue;
|
|
3735
|
-
const
|
|
3735
|
+
const H = b * te + A * O + D, ie = w[H];
|
|
3736
3736
|
C++, E += x * (ie - E) / C;
|
|
3737
3737
|
}
|
|
3738
3738
|
}
|
|
@@ -8124,8 +8124,8 @@ const pS = /* @__PURE__ */ (() => {
|
|
|
8124
8124
|
rayleigh: { value: 1 },
|
|
8125
8125
|
mieCoefficient: { value: 5e-3 },
|
|
8126
8126
|
mieDirectionalG: { value: 0.8 },
|
|
8127
|
-
sunPosition: { value: new
|
|
8128
|
-
up: { value: new
|
|
8127
|
+
sunPosition: { value: new V() },
|
|
8128
|
+
up: { value: new V(0, 1, 0) }
|
|
8129
8129
|
},
|
|
8130
8130
|
vertexShader: (
|
|
8131
8131
|
/* glsl */
|
|
@@ -8306,7 +8306,7 @@ const pS = /* @__PURE__ */ (() => {
|
|
|
8306
8306
|
}
|
|
8307
8307
|
}
|
|
8308
8308
|
return Mg(t, "SkyShader", a), Mg(t, "material", e), t;
|
|
8309
|
-
})(), is = /* @__PURE__ */ new vT(), dc = /* @__PURE__ */ new
|
|
8309
|
+
})(), is = /* @__PURE__ */ new vT(), dc = /* @__PURE__ */ new V();
|
|
8310
8310
|
class mS {
|
|
8311
8311
|
constructor(e) {
|
|
8312
8312
|
let t = e.geometry;
|
|
@@ -8415,11 +8415,11 @@ let ux = class {
|
|
|
8415
8415
|
var vS = Object.defineProperty, _S = (a, e, t) => e in a ? vS(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t, oe = (a, e, t) => (_S(a, typeof e != "symbol" ? e + "" : e, t), t);
|
|
8416
8416
|
class TS extends Js {
|
|
8417
8417
|
constructor(e, t) {
|
|
8418
|
-
super(), oe(this, "isTransformControls", !0), oe(this, "visible", !1), oe(this, "domElement"), oe(this, "raycaster", new Dp()), oe(this, "gizmo"), oe(this, "plane"), oe(this, "tempVector", new
|
|
8419
|
-
X: new
|
|
8420
|
-
Y: new
|
|
8421
|
-
Z: new
|
|
8422
|
-
}), oe(this, "pointStart", new
|
|
8418
|
+
super(), oe(this, "isTransformControls", !0), oe(this, "visible", !1), oe(this, "domElement"), oe(this, "raycaster", new Dp()), oe(this, "gizmo"), oe(this, "plane"), oe(this, "tempVector", new V()), oe(this, "tempVector2", new V()), oe(this, "tempQuaternion", new xt()), oe(this, "unit", {
|
|
8419
|
+
X: new V(1, 0, 0),
|
|
8420
|
+
Y: new V(0, 1, 0),
|
|
8421
|
+
Z: new V(0, 0, 1)
|
|
8422
|
+
}), oe(this, "pointStart", new V()), oe(this, "pointEnd", new V()), oe(this, "offset", new V()), oe(this, "rotationAxis", new V()), oe(this, "startNorm", new V()), oe(this, "endNorm", new V()), oe(this, "rotationAngle", 0), oe(this, "cameraPosition", new V()), oe(this, "cameraQuaternion", new xt()), oe(this, "cameraScale", new V()), oe(this, "parentPosition", new V()), oe(this, "parentQuaternion", new xt()), oe(this, "parentQuaternionInv", new xt()), oe(this, "parentScale", new V()), oe(this, "worldPositionStart", new V()), oe(this, "worldQuaternionStart", new xt()), oe(this, "worldScaleStart", new V()), oe(this, "worldPosition", new V()), oe(this, "worldQuaternion", new xt()), oe(this, "worldQuaternionInv", new xt()), oe(this, "worldScale", new V()), oe(this, "eye", new V()), oe(this, "positionStart", new V()), oe(this, "quaternionStart", new xt()), oe(this, "scaleStart", new V()), oe(this, "camera"), oe(this, "object"), oe(this, "enabled", !0), oe(this, "axis", null), oe(this, "mode", "translate"), oe(this, "translationSnap", null), oe(this, "rotationSnap", null), oe(this, "scaleSnap", null), oe(this, "space", "world"), oe(this, "size", 1), oe(this, "dragging", !1), oe(this, "showX", !0), oe(this, "showY", !0), oe(this, "showZ", !0), oe(this, "changeEvent", { type: "change" }), oe(this, "mouseDownEvent", { type: "mouseDown", mode: this.mode }), oe(this, "mouseUpEvent", { type: "mouseUp", mode: this.mode }), oe(this, "objectChangeEvent", { type: "objectChange" }), oe(this, "intersectObjectWithRay", (i, n, r) => {
|
|
8423
8423
|
const o = n.intersectObject(i, !0);
|
|
8424
8424
|
for (let l = 0; l < o.length; l++)
|
|
8425
8425
|
if (o[l].object.visible || r)
|
|
@@ -8546,7 +8546,7 @@ class TS extends Js {
|
|
|
8546
8546
|
}
|
|
8547
8547
|
class bS extends Js {
|
|
8548
8548
|
constructor() {
|
|
8549
|
-
super(), oe(this, "isTransformControlsGizmo", !0), oe(this, "type", "TransformControlsGizmo"), oe(this, "tempVector", new
|
|
8549
|
+
super(), oe(this, "isTransformControlsGizmo", !0), oe(this, "type", "TransformControlsGizmo"), oe(this, "tempVector", new V(0, 0, 0)), oe(this, "tempEuler", new Fs()), oe(this, "alignVector", new V(0, 1, 0)), oe(this, "zeroVector", new V(0, 0, 0)), oe(this, "lookAtMatrix", new Qe()), oe(this, "tempQuaternion", new xt()), oe(this, "tempQuaternion2", new xt()), oe(this, "identityQuaternion", new xt()), oe(this, "unitX", new V(1, 0, 0)), oe(this, "unitY", new V(0, 1, 0)), oe(this, "unitZ", new V(0, 0, 1)), oe(this, "gizmo"), oe(this, "picker"), oe(this, "helper"), oe(this, "rotationAxis", new V()), oe(this, "cameraPosition", new V()), oe(this, "worldPositionStart", new V()), oe(this, "worldQuaternionStart", new xt()), oe(this, "worldPosition", new V()), oe(this, "worldQuaternion", new xt()), oe(this, "eye", new V()), oe(this, "camera", null), oe(this, "enabled", !0), oe(this, "axis", null), oe(this, "mode", "translate"), oe(this, "space", "world"), oe(this, "size", 1), oe(this, "dragging", !1), oe(this, "showX", !0), oe(this, "showY", !0), oe(this, "showZ", !0), oe(this, "updateMatrixWorld", () => {
|
|
8550
8550
|
let ie = this.space;
|
|
8551
8551
|
this.mode === "scale" && (ie = "local");
|
|
8552
8552
|
const ue = ie === "local" ? this.worldQuaternion : this.identityQuaternion;
|
|
@@ -8721,7 +8721,7 @@ class bS extends Js {
|
|
|
8721
8721
|
XYZE: [[new at(_(1, 1), v), null, [0, Math.PI / 2, 0]]]
|
|
8722
8722
|
}, D = {
|
|
8723
8723
|
AXIS: [[new at(M, i.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]]
|
|
8724
|
-
},
|
|
8724
|
+
}, G = {
|
|
8725
8725
|
X: [[new Ae(new nc(1, 0.1, 4, 24), s), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]],
|
|
8726
8726
|
Y: [[new Ae(new nc(1, 0.1, 4, 24), s), [0, 0, 0], [Math.PI / 2, 0, 0]]],
|
|
8727
8727
|
Z: [[new Ae(new nc(1, 0.1, 4, 24), s), [0, 0, 0], [0, 0, -Math.PI / 2]]],
|
|
@@ -8772,7 +8772,7 @@ class bS extends Js {
|
|
|
8772
8772
|
X: [[new at(M, i.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]],
|
|
8773
8773
|
Y: [[new at(M, i.clone()), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]],
|
|
8774
8774
|
Z: [[new at(M, i.clone()), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]]
|
|
8775
|
-
},
|
|
8775
|
+
}, H = (ie) => {
|
|
8776
8776
|
const ue = new Js();
|
|
8777
8777
|
for (let ge in ie)
|
|
8778
8778
|
for (let we = ie[ge].length; we--; ) {
|
|
@@ -8783,7 +8783,7 @@ class bS extends Js {
|
|
|
8783
8783
|
}
|
|
8784
8784
|
return ue;
|
|
8785
8785
|
};
|
|
8786
|
-
this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate =
|
|
8786
|
+
this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = H(S)), this.add(this.gizmo.rotate = H(B)), this.add(this.gizmo.scale = H(O)), this.add(this.picker.translate = H(E)), this.add(this.picker.rotate = H(G)), this.add(this.picker.scale = H(ce)), this.add(this.helper.translate = H(C)), this.add(this.helper.rotate = H(D)), this.add(this.helper.scale = H(te)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
|
|
8787
8787
|
}
|
|
8788
8788
|
}
|
|
8789
8789
|
class wS extends Ae {
|
|
@@ -8798,7 +8798,7 @@ class wS extends Ae {
|
|
|
8798
8798
|
opacity: 0.1,
|
|
8799
8799
|
toneMapped: !1
|
|
8800
8800
|
})
|
|
8801
|
-
), oe(this, "isTransformControlsPlane", !0), oe(this, "type", "TransformControlsPlane"), oe(this, "unitX", new
|
|
8801
|
+
), oe(this, "isTransformControlsPlane", !0), oe(this, "type", "TransformControlsPlane"), oe(this, "unitX", new V(1, 0, 0)), oe(this, "unitY", new V(0, 1, 0)), oe(this, "unitZ", new V(0, 0, 1)), oe(this, "tempVector", new V()), oe(this, "dirVector", new V()), oe(this, "alignVector", new V()), oe(this, "tempMatrix", new Qe()), oe(this, "identityQuaternion", new xt()), oe(this, "cameraQuaternion", new xt()), oe(this, "worldPosition", new V()), oe(this, "worldQuaternion", new xt()), oe(this, "eye", new V()), oe(this, "axis", null), oe(this, "mode", "translate"), oe(this, "space", "world"), oe(this, "updateMatrixWorld", () => {
|
|
8802
8802
|
let e = this.space;
|
|
8803
8803
|
switch (this.position.copy(this.worldPosition), this.mode === "scale" && (e = "local"), this.unitX.set(1, 0, 0).applyQuaternion(e === "local" ? this.worldQuaternion : this.identityQuaternion), this.unitY.set(0, 1, 0).applyQuaternion(e === "local" ? this.worldQuaternion : this.identityQuaternion), this.unitZ.set(0, 0, 1).applyQuaternion(e === "local" ? this.worldQuaternion : this.identityQuaternion), this.alignVector.copy(this.unitY), this.mode) {
|
|
8804
8804
|
case "translate":
|
|
@@ -8837,7 +8837,7 @@ class wS extends Ae {
|
|
|
8837
8837
|
}
|
|
8838
8838
|
}
|
|
8839
8839
|
var SS = Object.defineProperty, MS = (a, e, t) => e in a ? SS(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t, Kt = (a, e, t) => (MS(a, typeof e != "symbol" ? e + "" : e, t), t);
|
|
8840
|
-
const yo = /* @__PURE__ */ new Fs(0, 0, 0, "YXZ"), xo = /* @__PURE__ */ new
|
|
8840
|
+
const yo = /* @__PURE__ */ new Fs(0, 0, 0, "YXZ"), xo = /* @__PURE__ */ new V(), AS = { type: "change" }, ES = { type: "lock" }, RS = { type: "unlock" }, Ag = 2e-3, Eg = Math.PI / 2;
|
|
8841
8841
|
class hx extends ux {
|
|
8842
8842
|
constructor(e, t) {
|
|
8843
8843
|
super(), Kt(this, "camera"), Kt(this, "domElement"), Kt(this, "isLocked"), Kt(this, "minPolarAngle"), Kt(this, "maxPolarAngle"), Kt(this, "pointerSpeed"), Kt(this, "onMouseMove", (s) => {
|
|
@@ -8852,7 +8852,7 @@ class hx extends ux {
|
|
|
8852
8852
|
this.domElement && (this.domElement.ownerDocument.removeEventListener("mousemove", this.onMouseMove), this.domElement.ownerDocument.removeEventListener("pointerlockchange", this.onPointerlockChange), this.domElement.ownerDocument.removeEventListener("pointerlockerror", this.onPointerlockError));
|
|
8853
8853
|
}), Kt(this, "dispose", () => {
|
|
8854
8854
|
this.disconnect();
|
|
8855
|
-
}), Kt(this, "getObject", () => this.camera), Kt(this, "direction", new
|
|
8855
|
+
}), Kt(this, "getObject", () => this.camera), Kt(this, "direction", new V(0, 0, -1)), Kt(this, "getDirection", (s) => s.copy(this.direction).applyQuaternion(this.camera.quaternion)), Kt(this, "moveForward", (s) => {
|
|
8856
8856
|
xo.setFromMatrixColumn(this.camera.matrix, 0), xo.crossVectors(this.camera.up, xo), this.camera.position.addScaledVector(xo, s);
|
|
8857
8857
|
}), Kt(this, "moveRight", (s) => {
|
|
8858
8858
|
xo.setFromMatrixColumn(this.camera.matrix, 0), this.camera.position.addScaledVector(xo, s);
|
|
@@ -8867,7 +8867,7 @@ var CS = Object.defineProperty, NS = (a, e, t) => e in a ? CS(a, e, { enumerable
|
|
|
8867
8867
|
const fc = /* @__PURE__ */ new TT(), Rg = /* @__PURE__ */ new kl(), PS = Math.cos(70 * (Math.PI / 180)), Cg = (a, e) => (a % e + e) % e;
|
|
8868
8868
|
class dx extends ux {
|
|
8869
8869
|
constructor(e, t) {
|
|
8870
|
-
super(), Oe(this, "object"), Oe(this, "domElement"), Oe(this, "enabled", !0), Oe(this, "target", new
|
|
8870
|
+
super(), Oe(this, "object"), Oe(this, "domElement"), Oe(this, "enabled", !0), Oe(this, "target", new V()), Oe(this, "minDistance", 0), Oe(this, "maxDistance", 1 / 0), Oe(this, "minZoom", 0), Oe(this, "maxZoom", 1 / 0), Oe(this, "minPolarAngle", 0), Oe(this, "maxPolarAngle", Math.PI), Oe(this, "minAzimuthAngle", -1 / 0), Oe(this, "maxAzimuthAngle", 1 / 0), Oe(this, "enableDamping", !1), Oe(this, "dampingFactor", 0.05), Oe(this, "enableZoom", !0), Oe(this, "zoomSpeed", 1), Oe(this, "enableRotate", !0), Oe(this, "rotateSpeed", 1), Oe(this, "enablePan", !0), Oe(this, "panSpeed", 1), Oe(this, "screenSpacePanning", !0), Oe(this, "keyPanSpeed", 7), Oe(this, "zoomToCursor", !1), Oe(this, "autoRotate", !1), Oe(this, "autoRotateSpeed", 2), Oe(this, "reverseOrbit", !1), Oe(this, "reverseHorizontalOrbit", !1), Oe(this, "reverseVerticalOrbit", !1), Oe(this, "keys", { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }), Oe(this, "mouseButtons", {
|
|
8871
8871
|
LEFT: Ai.ROTATE,
|
|
8872
8872
|
MIDDLE: Ai.DOLLY,
|
|
8873
8873
|
RIGHT: Ai.PAN
|
|
@@ -8890,7 +8890,7 @@ class dx extends ux {
|
|
|
8890
8890
|
}, this.reset = () => {
|
|
8891
8891
|
s.target.copy(s.target0), s.object.position.copy(s.position0), s.object.zoom = s.zoom0, s.object.updateProjectionMatrix(), s.dispatchEvent(i), s.update(), l = o.NONE;
|
|
8892
8892
|
}, this.update = (() => {
|
|
8893
|
-
const Z = new
|
|
8893
|
+
const Z = new V(), Me = new V(0, 1, 0), Ve = new xt().setFromUnitVectors(e.up, Me), mt = Ve.clone().invert(), ts = new V(), hn = new xt(), $n = 2 * Math.PI;
|
|
8894
8894
|
return function() {
|
|
8895
8895
|
const tg = s.object.position;
|
|
8896
8896
|
Ve.setFromUnitVectors(e.up, Me), mt.copy(Ve).invert(), Z.copy(tg).sub(s.target), Z.applyQuaternion(Ve), u.setFromVector3(Z), s.autoRotate && l === o.NONE && D(C()), s.enableDamping ? (u.theta += h.theta * s.dampingFactor, u.phi += h.phi * s.dampingFactor) : (u.theta += h.theta, u.phi += h.phi);
|
|
@@ -8905,9 +8905,9 @@ class dx extends ux {
|
|
|
8905
8905
|
const sc = Fa - Ba;
|
|
8906
8906
|
s.object.position.addScaledVector(M, sc), s.object.updateMatrixWorld();
|
|
8907
8907
|
} else if (s.object.isOrthographicCamera) {
|
|
8908
|
-
const Fa = new
|
|
8908
|
+
const Fa = new V(_.x, _.y, 0);
|
|
8909
8909
|
Fa.unproject(s.object), s.object.zoom = Math.max(s.minZoom, Math.min(s.maxZoom, s.object.zoom / f)), s.object.updateProjectionMatrix(), Ia = !0;
|
|
8910
|
-
const sc = new
|
|
8910
|
+
const sc = new V(_.x, _.y, 0);
|
|
8911
8911
|
sc.unproject(s.object), s.object.position.sub(sc).add(Fa), s.object.updateMatrixWorld(), Ba = Z.length();
|
|
8912
8912
|
} else
|
|
8913
8913
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), s.zoomToCursor = !1;
|
|
@@ -8934,7 +8934,7 @@ class dx extends ux {
|
|
|
8934
8934
|
let l = o.NONE;
|
|
8935
8935
|
const c = 1e-6, u = new Tu(), h = new Tu();
|
|
8936
8936
|
let f = 1;
|
|
8937
|
-
const d = new
|
|
8937
|
+
const d = new V(), p = new Pe(), m = new Pe(), g = new Pe(), y = new Pe(), x = new Pe(), v = new Pe(), w = new Pe(), A = new Pe(), b = new Pe(), M = new V(), _ = new Pe();
|
|
8938
8938
|
let T = !1;
|
|
8939
8939
|
const S = [], E = {};
|
|
8940
8940
|
function C() {
|
|
@@ -8946,21 +8946,21 @@ class dx extends ux {
|
|
|
8946
8946
|
function D(Z) {
|
|
8947
8947
|
s.reverseOrbit || s.reverseHorizontalOrbit ? h.theta += Z : h.theta -= Z;
|
|
8948
8948
|
}
|
|
8949
|
-
function
|
|
8949
|
+
function G(Z) {
|
|
8950
8950
|
s.reverseOrbit || s.reverseVerticalOrbit ? h.phi += Z : h.phi -= Z;
|
|
8951
8951
|
}
|
|
8952
8952
|
const O = (() => {
|
|
8953
|
-
const Z = new
|
|
8953
|
+
const Z = new V();
|
|
8954
8954
|
return function(Ve, mt) {
|
|
8955
8955
|
Z.setFromMatrixColumn(mt, 0), Z.multiplyScalar(-Ve), d.add(Z);
|
|
8956
8956
|
};
|
|
8957
8957
|
})(), ce = (() => {
|
|
8958
|
-
const Z = new
|
|
8958
|
+
const Z = new V();
|
|
8959
8959
|
return function(Ve, mt) {
|
|
8960
8960
|
s.screenSpacePanning === !0 ? Z.setFromMatrixColumn(mt, 1) : (Z.setFromMatrixColumn(mt, 0), Z.crossVectors(s.object.up, Z)), Z.multiplyScalar(Ve), d.add(Z);
|
|
8961
8961
|
};
|
|
8962
8962
|
})(), te = (() => {
|
|
8963
|
-
const Z = new
|
|
8963
|
+
const Z = new V();
|
|
8964
8964
|
return function(Ve, mt) {
|
|
8965
8965
|
const ts = s.domElement;
|
|
8966
8966
|
if (ts && s.object instanceof fi && s.object.isPerspectiveCamera) {
|
|
@@ -8977,14 +8977,14 @@ class dx extends ux {
|
|
|
8977
8977
|
)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), s.enablePan = !1);
|
|
8978
8978
|
};
|
|
8979
8979
|
})();
|
|
8980
|
-
function
|
|
8980
|
+
function H(Z) {
|
|
8981
8981
|
s.object instanceof fi && s.object.isPerspectiveCamera || s.object instanceof hr && s.object.isOrthographicCamera ? f = Z : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), s.enableZoom = !1);
|
|
8982
8982
|
}
|
|
8983
8983
|
function ie(Z) {
|
|
8984
|
-
|
|
8984
|
+
H(f / Z);
|
|
8985
8985
|
}
|
|
8986
8986
|
function ue(Z) {
|
|
8987
|
-
|
|
8987
|
+
H(f * Z);
|
|
8988
8988
|
}
|
|
8989
8989
|
function ge(Z) {
|
|
8990
8990
|
if (!s.zoomToCursor || !s.domElement)
|
|
@@ -9008,7 +9008,7 @@ class dx extends ux {
|
|
|
9008
9008
|
function F(Z) {
|
|
9009
9009
|
m.set(Z.clientX, Z.clientY), g.subVectors(m, p).multiplyScalar(s.rotateSpeed);
|
|
9010
9010
|
const Me = s.domElement;
|
|
9011
|
-
Me && (D(2 * Math.PI * g.x / Me.clientHeight),
|
|
9011
|
+
Me && (D(2 * Math.PI * g.x / Me.clientHeight), G(2 * Math.PI * g.y / Me.clientHeight)), p.copy(m), s.update();
|
|
9012
9012
|
}
|
|
9013
9013
|
function N(Z) {
|
|
9014
9014
|
A.set(Z.clientX, Z.clientY), b.subVectors(A, w), b.y > 0 ? ie(B()) : b.y < 0 && ue(B()), w.copy(A), s.update();
|
|
@@ -9072,7 +9072,7 @@ class dx extends ux {
|
|
|
9072
9072
|
}
|
|
9073
9073
|
g.subVectors(m, p).multiplyScalar(s.rotateSpeed);
|
|
9074
9074
|
const Me = s.domElement;
|
|
9075
|
-
Me && (D(2 * Math.PI * g.x / Me.clientHeight),
|
|
9075
|
+
Me && (D(2 * Math.PI * g.x / Me.clientHeight), G(2 * Math.PI * g.y / Me.clientHeight)), p.copy(m);
|
|
9076
9076
|
}
|
|
9077
9077
|
function ye(Z) {
|
|
9078
9078
|
if (S.length == 1)
|
|
@@ -9270,7 +9270,7 @@ class dx extends ux {
|
|
|
9270
9270
|
}, this.dollyOut = (Z = B()) => {
|
|
9271
9271
|
ie(Z), s.update();
|
|
9272
9272
|
}, this.getScale = () => f, this.setScale = (Z) => {
|
|
9273
|
-
|
|
9273
|
+
H(Z), s.update();
|
|
9274
9274
|
}, this.getZoomScale = () => B(), t !== void 0 && this.connect(t), this.update();
|
|
9275
9275
|
}
|
|
9276
9276
|
}
|
|
@@ -9882,7 +9882,7 @@ class QS {
|
|
|
9882
9882
|
return o.length < 1 ? null : (o.push(this.parser.createNodeMesh(e)), Promise.all(o).then((c) => {
|
|
9883
9883
|
const u = c.pop(), h = u.isGroup ? u.children : [u], f = c[0].count, d = [];
|
|
9884
9884
|
for (const p of h) {
|
|
9885
|
-
const m = new Qe(), g = new
|
|
9885
|
+
const m = new Qe(), g = new V(), y = new xt(), x = new V(1, 1, 1), v = new F1(p.geometry, p.material, f);
|
|
9886
9886
|
for (let w = 0; w < f; w++)
|
|
9887
9887
|
l.TRANSLATION && g.fromBufferAttribute(l.TRANSLATION, w), l.ROTATION && y.fromBufferAttribute(l.ROTATION, w), l.SCALE && x.fromBufferAttribute(l.SCALE, w), v.setMatrixAt(w, m.compose(g, y, x));
|
|
9888
9888
|
for (const w in l)
|
|
@@ -10900,7 +10900,7 @@ function fM(a, e, t) {
|
|
|
10900
10900
|
if (s.POSITION !== void 0) {
|
|
10901
10901
|
const o = t.json.accessors[s.POSITION], l = o.min, c = o.max;
|
|
10902
10902
|
if (l !== void 0 && c !== void 0) {
|
|
10903
|
-
if (i.set(new
|
|
10903
|
+
if (i.set(new V(l[0], l[1], l[2]), new V(c[0], c[1], c[2])), o.normalized) {
|
|
10904
10904
|
const u = tp(ea[o.componentType]);
|
|
10905
10905
|
i.min.multiplyScalar(u), i.max.multiplyScalar(u);
|
|
10906
10906
|
}
|
|
@@ -10912,7 +10912,7 @@ function fM(a, e, t) {
|
|
|
10912
10912
|
return;
|
|
10913
10913
|
const n = e.targets;
|
|
10914
10914
|
if (n !== void 0) {
|
|
10915
|
-
const o = new
|
|
10915
|
+
const o = new V(), l = new V();
|
|
10916
10916
|
for (let c = 0, u = n.length; c < u; c++) {
|
|
10917
10917
|
const h = n[c];
|
|
10918
10918
|
if (h.POSITION !== void 0) {
|
|
@@ -10954,7 +10954,7 @@ function Dg(a, e, t) {
|
|
|
10954
10954
|
return e.targets !== void 0 ? aM(a, e.targets, t) : a;
|
|
10955
10955
|
});
|
|
10956
10956
|
}
|
|
10957
|
-
const La = /* @__PURE__ */ new
|
|
10957
|
+
const La = /* @__PURE__ */ new V();
|
|
10958
10958
|
function ii(a, e, t, s, i, n) {
|
|
10959
10959
|
const r = 2 * Math.PI * i / 4, o = Math.max(n - 2 * i, 0), l = Math.PI / 4;
|
|
10960
10960
|
La.copy(e), La[s] = 0, La.normalize();
|
|
@@ -10967,7 +10967,7 @@ class pM extends ji {
|
|
|
10967
10967
|
return;
|
|
10968
10968
|
const r = this.toNonIndexed();
|
|
10969
10969
|
this.index = null, this.attributes.position = r.attributes.position, this.attributes.normal = r.attributes.normal, this.attributes.uv = r.attributes.uv;
|
|
10970
|
-
const o = new
|
|
10970
|
+
const o = new V(), l = new V(), c = new V(e, t, s).divideScalar(2).subScalar(n), u = this.attributes.position.array, h = this.attributes.normal.array, f = this.attributes.uv.array, d = u.length / 6, p = new V(), m = 0.5 / i;
|
|
10971
10971
|
for (let g = 0, y = 0; g < u.length; g += 3, y += 2)
|
|
10972
10972
|
switch (o.fromArray(u, g), l.copy(o), l.x -= Math.sign(l.x) * m, l.y -= Math.sign(l.y) * m, l.z -= Math.sign(l.z) * m, l.normalize(), u[g + 0] = c.x * Math.sign(o.x) + l.x * n, u[g + 1] = c.y * Math.sign(o.y) + l.y * n, u[g + 2] = c.z * Math.sign(o.z) + l.z * n, h[g + 0] = l.x, h[g + 1] = l.y, h[g + 2] = l.z, Math.floor(g / d)) {
|
|
10973
10973
|
case 0:
|
|
@@ -11220,7 +11220,7 @@ function bM(a) {
|
|
|
11220
11220
|
const e = a.length, t = [], s = [];
|
|
11221
11221
|
for (let n = 0; n < e; ++n) {
|
|
11222
11222
|
const r = a[n];
|
|
11223
|
-
t[n] = new
|
|
11223
|
+
t[n] = new V(r.x, r.y, r.z), s[n] = r.w;
|
|
11224
11224
|
}
|
|
11225
11225
|
const i = [];
|
|
11226
11226
|
for (let n = 0; n < e; ++n) {
|
|
@@ -11244,11 +11244,11 @@ class Og extends RT {
|
|
|
11244
11244
|
}
|
|
11245
11245
|
}
|
|
11246
11246
|
getPoint(e, t) {
|
|
11247
|
-
const s = t || new
|
|
11247
|
+
const s = t || new V(), i = this.knots[this.startKnot] + e * (this.knots[this.endKnot] - this.knots[this.startKnot]), n = xM(this.degree, this.knots, this.controlPoints, i);
|
|
11248
11248
|
return n.w != 1 && n.divideScalar(n.w), s.set(n.x, n.y, n.z);
|
|
11249
11249
|
}
|
|
11250
11250
|
getTangent(e, t) {
|
|
11251
|
-
const s = t || new
|
|
11251
|
+
const s = t || new V(), i = this.knots[0] + e * (this.knots[this.knots.length - 1] - this.knots[0]), n = wM(this.degree, this.knots, this.controlPoints, i, 1);
|
|
11252
11252
|
return s.copy(n[1]).normalize(), s;
|
|
11253
11253
|
}
|
|
11254
11254
|
}
|
|
@@ -11744,7 +11744,7 @@ class MM {
|
|
|
11744
11744
|
const n = it.Objects.Model[i.ID];
|
|
11745
11745
|
if ("Lcl_Translation" in n) {
|
|
11746
11746
|
const r = n.Lcl_Translation.value;
|
|
11747
|
-
e.target !== void 0 ? (e.target.position.fromArray(r), Ps.add(e.target)) : e.lookAt(new
|
|
11747
|
+
e.target !== void 0 ? (e.target.position.fromArray(r), Ps.add(e.target)) : e.lookAt(new V().fromArray(r));
|
|
11748
11748
|
}
|
|
11749
11749
|
}
|
|
11750
11750
|
});
|
|
@@ -12183,7 +12183,7 @@ class EM {
|
|
|
12183
12183
|
}
|
|
12184
12184
|
generateTracks(e) {
|
|
12185
12185
|
const t = [];
|
|
12186
|
-
let s = new
|
|
12186
|
+
let s = new V(), i = new xt(), n = new V();
|
|
12187
12187
|
if (e.transform && e.transform.decompose(s, i, n), s = s.toArray(), i = new Fs().setFromQuaternion(i, e.eulerOrder).toArray(), n = n.toArray(), e.T !== void 0 && Object.keys(e.T.curves).length > 0) {
|
|
12188
12188
|
const r = this.generateVectorTrack(
|
|
12189
12189
|
e.modelName,
|
|
@@ -12682,7 +12682,7 @@ function pc(a, e, t, s) {
|
|
|
12682
12682
|
const n = i * s.dataSize, r = n + s.dataSize;
|
|
12683
12683
|
return DM(BM, s.buffer, n, r);
|
|
12684
12684
|
}
|
|
12685
|
-
const rd = /* @__PURE__ */ new Fs(), vo = /* @__PURE__ */ new
|
|
12685
|
+
const rd = /* @__PURE__ */ new Fs(), vo = /* @__PURE__ */ new V();
|
|
12686
12686
|
function yx(a) {
|
|
12687
12687
|
const e = new Qe(), t = new Qe(), s = new Qe(), i = new Qe(), n = new Qe(), r = new Qe(), o = new Qe(), l = new Qe(), c = new Qe(), u = new Qe(), h = new Qe(), f = new Qe(), d = a.inheritType ? a.inheritType : 0;
|
|
12688
12688
|
if (a.translation && e.setPosition(vo.fromArray(a.translation)), a.preRotation) {
|
|
@@ -12708,7 +12708,7 @@ function yx(a) {
|
|
|
12708
12708
|
else if (d === 1)
|
|
12709
12709
|
w.copy(m).multiply(x).multiply(p).multiply(v);
|
|
12710
12710
|
else {
|
|
12711
|
-
const E = new Qe().scale(new
|
|
12711
|
+
const E = new Qe().scale(new V().setFromMatrixScale(h)).clone().invert(), C = x.clone().multiply(E);
|
|
12712
12712
|
w.copy(m).multiply(p).multiply(C).multiply(v);
|
|
12713
12713
|
}
|
|
12714
12714
|
const A = c.clone().invert(), b = r.clone().invert();
|
|
@@ -12853,13 +12853,13 @@ class VM extends PT {
|
|
|
12853
12853
|
case 4:
|
|
12854
12854
|
throw new Error("THREE.RGBELoader: Memory Error: " + (T || ""));
|
|
12855
12855
|
}
|
|
12856
|
-
},
|
|
12857
|
-
`, h = function(_, T, S) {
|
|
12856
|
+
}, h = function(_, T, S) {
|
|
12858
12857
|
T = T || 1024;
|
|
12859
|
-
let C = _.pos, B = -1, D = 0,
|
|
12860
|
-
for (; 0 > (B = O.indexOf(
|
|
12861
|
-
|
|
12862
|
-
|
|
12858
|
+
let C = _.pos, B = -1, D = 0, G = "", O = String.fromCharCode.apply(null, new Uint16Array(_.subarray(C, C + 128)));
|
|
12859
|
+
for (; 0 > (B = O.indexOf(`
|
|
12860
|
+
`)) && D < T && C < _.byteLength; )
|
|
12861
|
+
G += O, D += O.length, C += 128, O += String.fromCharCode.apply(null, new Uint16Array(_.subarray(C, C + 128)));
|
|
12862
|
+
return -1 < B ? (_.pos += D + B + 1, G + O.slice(0, B)) : !1;
|
|
12863
12863
|
}, f = function(_) {
|
|
12864
12864
|
const T = /^#\?(\S+)/, S = /^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/, E = /^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/, C = /^\s*FORMAT=(\S+)\s*$/, B = /^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/, D = {
|
|
12865
12865
|
valid: 0,
|
|
@@ -12872,16 +12872,16 @@ class VM extends PT {
|
|
|
12872
12872
|
width: 0,
|
|
12873
12873
|
height: 0
|
|
12874
12874
|
};
|
|
12875
|
-
let
|
|
12876
|
-
for ((_.pos >= _.byteLength || !(
|
|
12877
|
-
`;
|
|
12878
|
-
if (D.string +=
|
|
12879
|
-
`,
|
|
12880
|
-
D.comments +=
|
|
12875
|
+
let G, O;
|
|
12876
|
+
for ((_.pos >= _.byteLength || !(G = h(_))) && r(1, "no header found"), (O = G.match(T)) || r(3, "bad initial token"), D.valid |= 1, D.programtype = O[1], D.string += G + `
|
|
12877
|
+
`; G = h(_), G !== !1; ) {
|
|
12878
|
+
if (D.string += G + `
|
|
12879
|
+
`, G.charAt(0) === "#") {
|
|
12880
|
+
D.comments += G + `
|
|
12881
12881
|
`;
|
|
12882
12882
|
continue;
|
|
12883
12883
|
}
|
|
12884
|
-
if ((O =
|
|
12884
|
+
if ((O = G.match(S)) && (D.gamma = parseFloat(O[1])), (O = G.match(E)) && (D.exposure = parseFloat(O[1])), (O = G.match(C)) && (D.valid |= 2, D.format = O[1]), (O = G.match(B)) && (D.valid |= 4, D.height = parseInt(O[1], 10), D.width = parseInt(O[2], 10)), D.valid & 2 && D.valid & 4)
|
|
12885
12885
|
break;
|
|
12886
12886
|
}
|
|
12887
12887
|
return D.valid & 2 || r(3, "missing format specifier"), D.valid & 4 || r(3, "missing image size specifier"), D;
|
|
@@ -12897,20 +12897,20 @@ class VM extends PT {
|
|
|
12897
12897
|
const C = new Uint8Array(4 * T * S);
|
|
12898
12898
|
C.length || r(4, "unable to allocate buffer space");
|
|
12899
12899
|
let B = 0, D = 0;
|
|
12900
|
-
const
|
|
12900
|
+
const G = 4 * E, O = new Uint8Array(4), ce = new Uint8Array(G);
|
|
12901
12901
|
let te = S;
|
|
12902
12902
|
for (; te > 0 && D < _.byteLength; ) {
|
|
12903
12903
|
D + 4 > _.byteLength && r(1), O[0] = _[D++], O[1] = _[D++], O[2] = _[D++], O[3] = _[D++], (O[0] != 2 || O[1] != 2 || (O[2] << 8 | O[3]) != E) && r(3, "bad rgbe scanline format");
|
|
12904
|
-
let
|
|
12905
|
-
for (;
|
|
12904
|
+
let H = 0, ie;
|
|
12905
|
+
for (; H < G && D < _.byteLength; ) {
|
|
12906
12906
|
ie = _[D++];
|
|
12907
12907
|
const ge = ie > 128;
|
|
12908
|
-
if (ge && (ie -= 128), (ie === 0 ||
|
|
12908
|
+
if (ge && (ie -= 128), (ie === 0 || H + ie > G) && r(3, "bad scanline data"), ge) {
|
|
12909
12909
|
const we = _[D++];
|
|
12910
12910
|
for (let W = 0; W < ie; W++)
|
|
12911
|
-
ce[
|
|
12911
|
+
ce[H++] = we;
|
|
12912
12912
|
} else
|
|
12913
|
-
ce.set(_.subarray(D, D + ie),
|
|
12913
|
+
ce.set(_.subarray(D, D + ie), H), H += ie, D += ie;
|
|
12914
12914
|
}
|
|
12915
12915
|
const ue = E;
|
|
12916
12916
|
for (let ge = 0; ge < ue; ge++) {
|
|
@@ -13047,7 +13047,7 @@ const HM = "srgb", ld = /* @__PURE__ */ (() => {
|
|
|
13047
13047
|
const j = P[I];
|
|
13048
13048
|
N && j.nodeName !== "style" && j.nodeName !== "defs" || i(j, z);
|
|
13049
13049
|
}
|
|
13050
|
-
F && (
|
|
13050
|
+
F && (G.pop(), G.length > 0 ? ge.copy(G[G.length - 1]) : ge.identity());
|
|
13051
13051
|
}
|
|
13052
13052
|
function n($) {
|
|
13053
13053
|
const z = new er(), F = new Pe(), N = new Pe(), R = new Pe();
|
|
@@ -13471,7 +13471,7 @@ const HM = "srgb", ld = /* @__PURE__ */ (() => {
|
|
|
13471
13471
|
if (!($.hasAttribute("transform") || $.nodeName === "use" && ($.hasAttribute("x") || $.hasAttribute("y"))))
|
|
13472
13472
|
return null;
|
|
13473
13473
|
const z = b($);
|
|
13474
|
-
return
|
|
13474
|
+
return G.length > 0 && z.premultiply(G[G.length - 1]), ge.copy(z), G.push(z), z;
|
|
13475
13475
|
}
|
|
13476
13476
|
function b($) {
|
|
13477
13477
|
const z = new kr(), F = O;
|
|
@@ -13499,7 +13499,7 @@ const HM = "srgb", ld = /* @__PURE__ */ (() => {
|
|
|
13499
13499
|
case "rotate":
|
|
13500
13500
|
if (ee.length >= 1) {
|
|
13501
13501
|
let J = 0, fe = 0, Se = 0;
|
|
13502
|
-
J = ee[0] * Math.PI / 180, ee.length >= 3 && (fe = ee[1], Se = ee[2]), ce.makeTranslation(-fe, -Se), te.makeRotation(J),
|
|
13502
|
+
J = ee[0] * Math.PI / 180, ee.length >= 3 && (fe = ee[1], Se = ee[2]), ce.makeTranslation(-fe, -Se), te.makeRotation(J), H.multiplyMatrices(te, ce), ce.makeTranslation(fe, Se), F.multiplyMatrices(ce, H);
|
|
13503
13503
|
}
|
|
13504
13504
|
break;
|
|
13505
13505
|
case "scale":
|
|
@@ -13530,10 +13530,10 @@ const HM = "srgb", ld = /* @__PURE__ */ (() => {
|
|
|
13530
13530
|
ue.set(I.x, I.y, 1).applyMatrix3(z), I.set(ue.x, ue.y);
|
|
13531
13531
|
}
|
|
13532
13532
|
function N(I) {
|
|
13533
|
-
const j = I.xRadius, K = I.yRadius, ee = Math.cos(I.aRotation), J = Math.sin(I.aRotation), fe = new
|
|
13533
|
+
const j = I.xRadius, K = I.yRadius, ee = Math.cos(I.aRotation), J = Math.sin(I.aRotation), fe = new V(j * ee, j * J, 0), Se = new V(-K * J, K * ee, 0), ye = fe.applyMatrix3(z), q = Se.applyMatrix3(z), L = O.set(ye.x, q.x, 0, ye.y, q.y, 0, 0, 0, 1), xe = ce.copy(L).invert(), Xt = te.copy(xe).transpose().multiply(xe).elements, Yt = C(Xt[0], Xt[1], Xt[4]), Fi = Math.sqrt(Yt.rt1), Sr = Math.sqrt(Yt.rt2);
|
|
13534
13534
|
if (I.xRadius = 1 / Fi, I.yRadius = 1 / Sr, I.aRotation = Math.atan2(Yt.sn, Yt.cs), !((I.aEndAngle - I.aStartAngle) % (2 * Math.PI) < Number.EPSILON)) {
|
|
13535
13535
|
const mo = ce.set(Fi, 0, 0, 0, Sr, 0, 0, 0, 1), Na = te.set(Yt.cs, Yt.sn, 0, -Yt.sn, Yt.cs, 0, 0, 0, 1), Mr = mo.multiply(Na).multiply(L), Jl = (ec) => {
|
|
13536
|
-
const { x: tc, y: Pa } = new
|
|
13536
|
+
const { x: tc, y: Pa } = new V(Math.cos(ec), Math.sin(ec), 0).applyMatrix3(Mr);
|
|
13537
13537
|
return Math.atan2(Pa, tc);
|
|
13538
13538
|
};
|
|
13539
13539
|
I.aStartAngle = Jl(I.aStartAngle), I.aEndAngle = Jl(I.aEndAngle), _(z) && (I.aClockwise = !I.aClockwise);
|
|
@@ -13578,7 +13578,7 @@ const HM = "srgb", ld = /* @__PURE__ */ (() => {
|
|
|
13578
13578
|
const K = $ + F, ee = $ - F, J = Math.sqrt(ee * ee + 4 * z * z);
|
|
13579
13579
|
return K > 0 ? (N = 0.5 * (K + J), j = 1 / N, R = $ * j * F - z * j * z) : K < 0 ? R = 0.5 * (K - J) : (N = 0.5 * J, R = -0.5 * J), ee > 0 ? P = ee + J : P = ee - J, Math.abs(P) > 2 * Math.abs(z) ? (j = -2 * z / P, I = 1 / Math.sqrt(1 + j * j), P = j * I) : Math.abs(z) === 0 ? (P = 1, I = 0) : (j = -0.5 * P / z, P = 1 / Math.sqrt(1 + j * j), I = j * P), ee > 0 && (j = P, P = -I, I = j), { rt1: N, rt2: R, cs: P, sn: I };
|
|
13580
13580
|
}
|
|
13581
|
-
const B = [], D = {},
|
|
13581
|
+
const B = [], D = {}, G = [], O = new kr(), ce = new kr(), te = new kr(), H = new kr(), ie = new Pe(), ue = new V(), ge = new kr(), we = new DOMParser().parseFromString(t, "image/svg+xml");
|
|
13582
13582
|
return i(we.documentElement, {
|
|
13583
13583
|
fill: "#000",
|
|
13584
13584
|
fillOpacity: 1,
|
|
@@ -13603,8 +13603,8 @@ const HM = "srgb", ld = /* @__PURE__ */ (() => {
|
|
|
13603
13603
|
t: 0
|
|
13604
13604
|
};
|
|
13605
13605
|
function r(g, y, x, v) {
|
|
13606
|
-
const w = g.x, A = y.x, b = x.x, M = v.x, _ = g.y, T = y.y, S = x.y, E = v.y, C = (M - b) * (_ - S) - (E - S) * (w - b), B = (A - w) * (_ - S) - (T - _) * (w - b), D = (E - S) * (A - w) - (M - b) * (T - _),
|
|
13607
|
-
if (D === 0 && C !== 0 ||
|
|
13606
|
+
const w = g.x, A = y.x, b = x.x, M = v.x, _ = g.y, T = y.y, S = x.y, E = v.y, C = (M - b) * (_ - S) - (E - S) * (w - b), B = (A - w) * (_ - S) - (T - _) * (w - b), D = (E - S) * (A - w) - (M - b) * (T - _), G = C / D, O = B / D;
|
|
13607
|
+
if (D === 0 && C !== 0 || G <= 0 || G >= 1 || O < 0 || O > 1)
|
|
13608
13608
|
return null;
|
|
13609
13609
|
if (C === 0 && D === 0) {
|
|
13610
13610
|
for (let ce = 0; ce < 2; ce++)
|
|
@@ -13612,18 +13612,18 @@ const HM = "srgb", ld = /* @__PURE__ */ (() => {
|
|
|
13612
13612
|
const te = ce === 0 ? x : v;
|
|
13613
13613
|
return { x: te.x, y: te.y, t: n.t };
|
|
13614
13614
|
} else if (n.loc == i.BETWEEN) {
|
|
13615
|
-
const te = +(w + n.t * (A - w)).toPrecision(10),
|
|
13616
|
-
return { x: te, y:
|
|
13615
|
+
const te = +(w + n.t * (A - w)).toPrecision(10), H = +(_ + n.t * (T - _)).toPrecision(10);
|
|
13616
|
+
return { x: te, y: H, t: n.t };
|
|
13617
13617
|
}
|
|
13618
13618
|
return null;
|
|
13619
13619
|
} else {
|
|
13620
|
-
for (let
|
|
13621
|
-
if (o(
|
|
13622
|
-
const ie =
|
|
13620
|
+
for (let H = 0; H < 2; H++)
|
|
13621
|
+
if (o(H === 0 ? x : v, g, y), n.loc == i.ORIGIN) {
|
|
13622
|
+
const ie = H === 0 ? x : v;
|
|
13623
13623
|
return { x: ie.x, y: ie.y, t: n.t };
|
|
13624
13624
|
}
|
|
13625
|
-
const ce = +(w +
|
|
13626
|
-
return { x: ce, y: te, t:
|
|
13625
|
+
const ce = +(w + G * (A - w)).toPrecision(10), te = +(_ + G * (T - _)).toPrecision(10);
|
|
13626
|
+
return { x: ce, y: te, t: G };
|
|
13627
13627
|
}
|
|
13628
13628
|
}
|
|
13629
13629
|
function o(g, y, x) {
|
|
@@ -13699,10 +13699,10 @@ const HM = "srgb", ld = /* @__PURE__ */ (() => {
|
|
|
13699
13699
|
const B = E.length % 2 === 0, D = E[E.length - 2];
|
|
13700
13700
|
return { identifier: g.identifier, isHole: B, for: D };
|
|
13701
13701
|
} else if (w === "nonzero") {
|
|
13702
|
-
let B = !0, D = null,
|
|
13702
|
+
let B = !0, D = null, G = null;
|
|
13703
13703
|
for (let O = 0; O < E.length; O++) {
|
|
13704
13704
|
const ce = E[O];
|
|
13705
|
-
B ? (
|
|
13705
|
+
B ? (G = y[ce].isCW, B = !1, D = ce) : G !== y[ce].isCW && (G = y[ce].isCW, B = !0);
|
|
13706
13706
|
}
|
|
13707
13707
|
return { identifier: g.identifier, isHole: B, for: D };
|
|
13708
13708
|
} else
|
|
@@ -13768,28 +13768,28 @@ const HM = "srgb", ld = /* @__PURE__ */ (() => {
|
|
|
13768
13768
|
if (E < 2)
|
|
13769
13769
|
return 0;
|
|
13770
13770
|
const C = t[0].equals(t[E - 1]);
|
|
13771
|
-
let B, D = t[0],
|
|
13771
|
+
let B, D = t[0], G;
|
|
13772
13772
|
const O = s.strokeWidth / 2, ce = 1 / (E - 1);
|
|
13773
|
-
let te = 0,
|
|
13773
|
+
let te = 0, H, ie, ue, ge, we = !1, W = 0, $ = c * 3, z = c * 2;
|
|
13774
13774
|
F(t[0], t[1], u).multiplyScalar(O), y.copy(t[0]).sub(u), x.copy(t[0]).add(u), v.copy(y), w.copy(x);
|
|
13775
13775
|
for (let J = 1; J < E; J++) {
|
|
13776
|
-
B = t[J], J === E - 1 ? C ?
|
|
13776
|
+
B = t[J], J === E - 1 ? C ? G = t[1] : G = void 0 : G = t[J + 1];
|
|
13777
13777
|
const fe = u;
|
|
13778
|
-
if (F(D, B, fe), f.copy(fe).multiplyScalar(O), A.copy(B).sub(f), b.copy(B).add(f),
|
|
13779
|
-
F(B,
|
|
13778
|
+
if (F(D, B, fe), f.copy(fe).multiplyScalar(O), A.copy(B).sub(f), b.copy(B).add(f), H = te + ce, ie = !1, G !== void 0) {
|
|
13779
|
+
F(B, G, h), f.copy(h).multiplyScalar(O), M.copy(B).sub(f), _.copy(B).add(f), ue = !0, f.subVectors(G, D), fe.dot(f) < 0 && (ue = !1), J === 1 && (we = ue), f.subVectors(G, B), f.normalize();
|
|
13780
13780
|
const Se = Math.abs(fe.dot(f));
|
|
13781
13781
|
if (Se > Number.EPSILON) {
|
|
13782
13782
|
const ye = O / Se;
|
|
13783
13783
|
f.multiplyScalar(-ye), d.subVectors(B, D), p.copy(d).setLength(ye).add(f), T.copy(p).negate();
|
|
13784
13784
|
const q = p.length(), L = d.length();
|
|
13785
|
-
d.divideScalar(L), m.subVectors(
|
|
13785
|
+
d.divideScalar(L), m.subVectors(G, B);
|
|
13786
13786
|
const xe = m.length();
|
|
13787
13787
|
switch (m.divideScalar(xe), d.dot(T) < L && m.dot(T) < xe && (ie = !0), S.copy(p).add(B), T.add(B), ge = !1, ie ? ue ? (_.copy(T), b.copy(T)) : (M.copy(T), A.copy(T)) : P(), s.strokeLineJoin) {
|
|
13788
13788
|
case "bevel":
|
|
13789
|
-
I(ue, ie,
|
|
13789
|
+
I(ue, ie, H);
|
|
13790
13790
|
break;
|
|
13791
13791
|
case "round":
|
|
13792
|
-
j(ue, ie), ue ? R(B, A, M,
|
|
13792
|
+
j(ue, ie), ue ? R(B, A, M, H, 0) : R(B, _, b, H, 1);
|
|
13793
13793
|
break;
|
|
13794
13794
|
case "miter":
|
|
13795
13795
|
case "miter-clip":
|
|
@@ -13797,25 +13797,25 @@ const HM = "srgb", ld = /* @__PURE__ */ (() => {
|
|
|
13797
13797
|
const Ne = O * s.strokeMiterLimit / q;
|
|
13798
13798
|
if (Ne < 1)
|
|
13799
13799
|
if (s.strokeLineJoin !== "miter-clip") {
|
|
13800
|
-
I(ue, ie,
|
|
13800
|
+
I(ue, ie, H);
|
|
13801
13801
|
break;
|
|
13802
13802
|
} else
|
|
13803
|
-
j(ue, ie), ue ? (m.subVectors(S, A).multiplyScalar(Ne).add(A), g.subVectors(S, M).multiplyScalar(Ne).add(M), N(A,
|
|
13803
|
+
j(ue, ie), ue ? (m.subVectors(S, A).multiplyScalar(Ne).add(A), g.subVectors(S, M).multiplyScalar(Ne).add(M), N(A, H, 0), N(m, H, 0), N(B, H, 0.5), N(B, H, 0.5), N(m, H, 0), N(g, H, 0), N(B, H, 0.5), N(g, H, 0), N(M, H, 0)) : (m.subVectors(S, b).multiplyScalar(Ne).add(b), g.subVectors(S, _).multiplyScalar(Ne).add(_), N(b, H, 1), N(m, H, 1), N(B, H, 0.5), N(B, H, 0.5), N(m, H, 1), N(g, H, 1), N(B, H, 0.5), N(g, H, 1), N(_, H, 1));
|
|
13804
13804
|
else
|
|
13805
|
-
ie ? (ue ? (N(x, te, 1), N(y, te, 0), N(S,
|
|
13805
|
+
ie ? (ue ? (N(x, te, 1), N(y, te, 0), N(S, H, 0), N(x, te, 1), N(S, H, 0), N(T, H, 1)) : (N(x, te, 1), N(y, te, 0), N(S, H, 1), N(y, te, 0), N(T, H, 0), N(S, H, 1)), ue ? M.copy(S) : _.copy(S)) : ue ? (N(A, H, 0), N(S, H, 0), N(B, H, 0.5), N(B, H, 0.5), N(S, H, 0), N(M, H, 0)) : (N(b, H, 1), N(S, H, 1), N(B, H, 0.5), N(B, H, 0.5), N(S, H, 1), N(_, H, 1)), ge = !0;
|
|
13806
13806
|
break;
|
|
13807
13807
|
}
|
|
13808
13808
|
} else
|
|
13809
13809
|
P();
|
|
13810
13810
|
} else
|
|
13811
13811
|
P();
|
|
13812
|
-
!C && J === E - 1 && K(t[0], v, w, ue, !0, te), te =
|
|
13812
|
+
!C && J === E - 1 && K(t[0], v, w, ue, !0, te), te = H, D = B, y.copy(M), x.copy(_);
|
|
13813
13813
|
}
|
|
13814
13814
|
if (!C)
|
|
13815
|
-
K(B, A, b, ue, !1,
|
|
13815
|
+
K(B, A, b, ue, !1, H);
|
|
13816
13816
|
else if (ie && r) {
|
|
13817
13817
|
let J = S, fe = T;
|
|
13818
|
-
we !== ue && (J = T, fe = S), ue ? (ge || we) && (fe.toArray(r, 0
|
|
13818
|
+
we !== ue && (J = T, fe = S), ue ? (ge || we) && (fe.toArray(r, 0), fe.toArray(r, 9), ge && J.toArray(r, 3)) : (ge || !we) && (fe.toArray(r, 3), fe.toArray(r, 9), ge && J.toArray(r, 0));
|
|
13819
13819
|
}
|
|
13820
13820
|
return W;
|
|
13821
13821
|
function F(J, fe, Se) {
|
|
@@ -13834,13 +13834,13 @@ const HM = "srgb", ld = /* @__PURE__ */ (() => {
|
|
|
13834
13834
|
N(d, ye, q), N(Se, ye, q), N(J, ye, 0.5);
|
|
13835
13835
|
}
|
|
13836
13836
|
function P() {
|
|
13837
|
-
N(x, te, 1), N(y, te, 0), N(A,
|
|
13837
|
+
N(x, te, 1), N(y, te, 0), N(A, H, 0), N(x, te, 1), N(A, H, 0), N(b, H, 1);
|
|
13838
13838
|
}
|
|
13839
13839
|
function I(J, fe, Se) {
|
|
13840
|
-
fe ? J ? (N(x, te, 1), N(y, te, 0), N(A,
|
|
13840
|
+
fe ? J ? (N(x, te, 1), N(y, te, 0), N(A, H, 0), N(x, te, 1), N(A, H, 0), N(T, H, 1), N(A, Se, 0), N(M, Se, 0), N(T, Se, 0.5)) : (N(x, te, 1), N(y, te, 0), N(b, H, 1), N(y, te, 0), N(T, H, 0), N(b, H, 1), N(b, Se, 1), N(T, Se, 0), N(_, Se, 1)) : J ? (N(A, Se, 0), N(M, Se, 0), N(B, Se, 0.5)) : (N(b, Se, 1), N(_, Se, 0), N(B, Se, 0.5));
|
|
13841
13841
|
}
|
|
13842
13842
|
function j(J, fe) {
|
|
13843
|
-
fe && (J ? (N(x, te, 1), N(y, te, 0), N(A,
|
|
13843
|
+
fe && (J ? (N(x, te, 1), N(y, te, 0), N(A, H, 0), N(x, te, 1), N(A, H, 0), N(T, H, 1), N(A, te, 0), N(B, H, 0.5), N(T, H, 1), N(B, H, 0.5), N(M, te, 0), N(T, H, 1)) : (N(x, te, 1), N(y, te, 0), N(b, H, 1), N(y, te, 0), N(T, H, 0), N(b, H, 1), N(b, te, 1), N(T, H, 0), N(B, H, 0.5), N(B, H, 0.5), N(T, H, 0), N(_, te, 1)));
|
|
13844
13844
|
}
|
|
13845
13845
|
function K(J, fe, Se, ye, q, L) {
|
|
13846
13846
|
switch (s.strokeLineCap) {
|
|
@@ -13849,11 +13849,11 @@ const HM = "srgb", ld = /* @__PURE__ */ (() => {
|
|
|
13849
13849
|
break;
|
|
13850
13850
|
case "square":
|
|
13851
13851
|
if (q)
|
|
13852
|
-
u.subVectors(fe, J), h.set(u.y, -u.x), f.addVectors(u, h).add(J), d.subVectors(h, u).add(J), ye ? (f.toArray(r,
|
|
13852
|
+
u.subVectors(fe, J), h.set(u.y, -u.x), f.addVectors(u, h).add(J), d.subVectors(h, u).add(J), ye ? (f.toArray(r, 3), d.toArray(r, 0), d.toArray(r, 9)) : (f.toArray(r, 3), l[7] === 1 ? d.toArray(r, 9) : f.toArray(r, 9), d.toArray(r, 0));
|
|
13853
13853
|
else {
|
|
13854
13854
|
u.subVectors(Se, J), h.set(u.y, -u.x), f.addVectors(u, h).add(J), d.subVectors(h, u).add(J);
|
|
13855
13855
|
const xe = r.length;
|
|
13856
|
-
ye ? (f.toArray(r, xe -
|
|
13856
|
+
ye ? (f.toArray(r, xe - 3), d.toArray(r, xe - 6), d.toArray(r, xe - 12)) : (d.toArray(r, xe - 6), f.toArray(r, xe - 3), d.toArray(r, xe - 12));
|
|
13857
13857
|
}
|
|
13858
13858
|
break;
|
|
13859
13859
|
}
|
|
@@ -14118,7 +14118,7 @@ function WM() {
|
|
|
14118
14118
|
}
|
|
14119
14119
|
}
|
|
14120
14120
|
}
|
|
14121
|
-
const Gg = /* @__PURE__ */ new Bs(), mc = /* @__PURE__ */ new
|
|
14121
|
+
const Gg = /* @__PURE__ */ new Bs(), mc = /* @__PURE__ */ new V();
|
|
14122
14122
|
class _x extends FT {
|
|
14123
14123
|
constructor() {
|
|
14124
14124
|
super(), this.isLineSegmentsGeometry = !0, this.type = "LineSegmentsGeometry";
|
|
@@ -14748,7 +14748,7 @@ class Zp extends ei {
|
|
|
14748
14748
|
}), this.setValues(e);
|
|
14749
14749
|
}
|
|
14750
14750
|
}
|
|
14751
|
-
const ud = /* @__PURE__ */ new ls(), Vg = /* @__PURE__ */ new
|
|
14751
|
+
const ud = /* @__PURE__ */ new ls(), Vg = /* @__PURE__ */ new V(), Hg = /* @__PURE__ */ new V(), ns = /* @__PURE__ */ new ls(), rs = /* @__PURE__ */ new ls(), Di = /* @__PURE__ */ new ls(), hd = /* @__PURE__ */ new V(), dd = /* @__PURE__ */ new Qe(), as = /* @__PURE__ */ new LT(), $g = /* @__PURE__ */ new V(), gc = /* @__PURE__ */ new Bs(), yc = /* @__PURE__ */ new wa(), Li = /* @__PURE__ */ new ls();
|
|
14752
14752
|
let Yi, Zr;
|
|
14753
14753
|
function Wg(a, e, t) {
|
|
14754
14754
|
return Li.set(0, 0, -e, 1).applyMatrix4(a.projectionMatrix), Li.multiplyScalar(1 / Li.w), Li.x = Zr / t.width, Li.y = Zr / t.height, Li.applyMatrix4(a.projectionMatrixInverse), Li.multiplyScalar(1 / Li.w), Math.abs(Math.max(Li.x, Li.y));
|
|
@@ -14757,7 +14757,7 @@ function jM(a, e) {
|
|
|
14757
14757
|
const t = a.matrixWorld, s = a.geometry, i = s.attributes.instanceStart, n = s.attributes.instanceEnd, r = Math.min(s.instanceCount, i.count);
|
|
14758
14758
|
for (let o = 0, l = r; o < l; o++) {
|
|
14759
14759
|
as.start.fromBufferAttribute(i, o), as.end.fromBufferAttribute(n, o), as.applyMatrix4(t);
|
|
14760
|
-
const c = new
|
|
14760
|
+
const c = new V(), u = new V();
|
|
14761
14761
|
Yi.distanceSqToSegment(as.start, as.end, u, c), u.distanceTo(c) < Zr * 0.5 && e.push({
|
|
14762
14762
|
point: u,
|
|
14763
14763
|
pointOnLine: c,
|
|
@@ -14789,7 +14789,7 @@ function qM(a, e, t) {
|
|
|
14789
14789
|
const g = vt.lerp(ns.z, rs.z, m), y = g >= -1 && g <= 1, x = hd.distanceTo($g) < Zr * 0.5;
|
|
14790
14790
|
if (y && x) {
|
|
14791
14791
|
as.start.fromBufferAttribute(l, f), as.end.fromBufferAttribute(c, f), as.start.applyMatrix4(r), as.end.applyMatrix4(r);
|
|
14792
|
-
const v = new
|
|
14792
|
+
const v = new V(), w = new V();
|
|
14793
14793
|
Yi.distanceSqToSegment(as.start, as.end, w, v), t.push({
|
|
14794
14794
|
point: w,
|
|
14795
14795
|
pointOnLine: v,
|
|
@@ -15158,7 +15158,13 @@ const ZM = ["object"], Nk = /* @__PURE__ */ _e({
|
|
|
15158
15158
|
}), (f, d) => (me(), ve("TresReflector", {
|
|
15159
15159
|
ref_key: "reflectorRef",
|
|
15160
15160
|
ref: n,
|
|
15161
|
-
args: [void 0, {
|
|
15161
|
+
args: [void 0, {
|
|
15162
|
+
textureWidth: k(o),
|
|
15163
|
+
textureHeight: k(l),
|
|
15164
|
+
clipBias: k(c),
|
|
15165
|
+
multisample: k(u),
|
|
15166
|
+
shader: k(h)
|
|
15167
|
+
}],
|
|
15162
15168
|
"material-uniforms-color-value": k(r)
|
|
15163
15169
|
}, [
|
|
15164
15170
|
Ze(f.$slots, "default", {}, () => [
|
|
@@ -15180,7 +15186,7 @@ const ZM = ["object"], Nk = /* @__PURE__ */ _e({
|
|
|
15180
15186
|
ref: t
|
|
15181
15187
|
}, [
|
|
15182
15188
|
Ee("TresGroup", {
|
|
15183
|
-
"position-z": -
|
|
15189
|
+
"position-z": -a.depth
|
|
15184
15190
|
}, [
|
|
15185
15191
|
Ze(s.$slots, "default")
|
|
15186
15192
|
], 8, sA)
|
|
@@ -15336,7 +15342,7 @@ const Gk = /* @__PURE__ */ _e({
|
|
|
15336
15342
|
return;
|
|
15337
15343
|
const l = new mS(a);
|
|
15338
15344
|
s && l.setWeightAttribute(s), l.build();
|
|
15339
|
-
const c = new
|
|
15345
|
+
const c = new V(), u = new V(), h = new Be(), f = new Js();
|
|
15340
15346
|
a.updateMatrixWorld(!0);
|
|
15341
15347
|
for (let d = 0; d < e; d++)
|
|
15342
15348
|
l.sample(c, u, h), typeof i == "function" ? i(
|
|
@@ -15394,7 +15400,7 @@ const Gk = /* @__PURE__ */ _e({
|
|
|
15394
15400
|
}, Hk = /* @__PURE__ */ _e({
|
|
15395
15401
|
__name: "ScreenSizer",
|
|
15396
15402
|
setup(a, { expose: e }) {
|
|
15397
|
-
const t = new
|
|
15403
|
+
const t = new V(), s = de(), i = de(), n = ke().sizes, r = Ce(() => ({ width: n.width.value, height: n.height.value }));
|
|
15398
15404
|
return ot().onBeforeRender(({ camera: o }) => {
|
|
15399
15405
|
const l = i.value;
|
|
15400
15406
|
if (!l || !o.value)
|
|
@@ -15458,7 +15464,7 @@ const Gk = /* @__PURE__ */ _e({
|
|
|
15458
15464
|
shangai: "city/shanghai_bund_1k.hdr"
|
|
15459
15465
|
}, fA = "https://raw.githubusercontent.com/Tresjs/assets/main/textures/hdr/";
|
|
15460
15466
|
function fd(a) {
|
|
15461
|
-
return a instanceof Fs ? a : Array.isArray(a) ? new Fs(a[0], a[1], a[2]) : typeof a == "number" ? new Fs(a, a, a) : a instanceof
|
|
15467
|
+
return a instanceof Fs ? a : Array.isArray(a) ? new Fs(a[0], a[1], a[2]) : typeof a == "number" ? new Fs(a, a, a) : a instanceof V ? new Fs(a.x, a.y, a.z) : typeof a == "object" && "x" in a && "y" in a && "z" in a ? new Fs(a.x, a.y, a.z) : null;
|
|
15462
15468
|
}
|
|
15463
15469
|
function jg(a) {
|
|
15464
15470
|
a.traverse((e) => {
|
|
@@ -15660,8 +15666,8 @@ function Yg(a, e, t, s, i = 1 / 0, n, r) {
|
|
|
15660
15666
|
let u = e.x, h = e.y, f = e.z, d = a.x - u, p = a.y - h, m = a.z - f;
|
|
15661
15667
|
const g = u, y = h, x = f, v = i * s, w = v * v, A = d * d + p * p + m * m;
|
|
15662
15668
|
if (A > w) {
|
|
15663
|
-
const
|
|
15664
|
-
d = d /
|
|
15669
|
+
const G = Math.sqrt(A);
|
|
15670
|
+
d = d / G * v, p = p / G * v, m = m / G * v;
|
|
15665
15671
|
}
|
|
15666
15672
|
u = a.x - d, h = a.y - p, f = a.z - m;
|
|
15667
15673
|
const b = (t.x + o * d) * n, M = (t.y + o * p) * n, _ = (t.z + o * m) * n;
|
|
@@ -17034,19 +17040,19 @@ const wx = (a) => !!(a && a.isPerspectiveCamera), Sx = (a) => !!(a && a.isOrthog
|
|
|
17034
17040
|
Sphere: wa,
|
|
17035
17041
|
Spherical: Tu,
|
|
17036
17042
|
Vector2: Pe,
|
|
17037
|
-
Vector3:
|
|
17043
|
+
Vector3: V,
|
|
17038
17044
|
Vector4: ls
|
|
17039
17045
|
};
|
|
17040
17046
|
hs.install({ THREE: D });
|
|
17041
|
-
const { camera:
|
|
17047
|
+
const { camera: G, renderer: O, extend: ce, controls: te, invalidate: H } = ke();
|
|
17042
17048
|
re(s, () => {
|
|
17043
|
-
|
|
17049
|
+
H();
|
|
17044
17050
|
});
|
|
17045
17051
|
const ie = Ce(() => ty(
|
|
17046
|
-
s.camera ||
|
|
17052
|
+
s.camera || G.value,
|
|
17047
17053
|
s.mouseButtons
|
|
17048
17054
|
)), ue = Ce(() => sy(
|
|
17049
|
-
s.camera ||
|
|
17055
|
+
s.camera || G.value,
|
|
17050
17056
|
s.touches
|
|
17051
17057
|
)), ge = de(null);
|
|
17052
17058
|
ce({ CameraControls: hs }), Pt(() => {
|
|
@@ -17054,7 +17060,7 @@ const wx = (a) => !!(a && a.isPerspectiveCamera), Sx = (a) => !!(a && a.isOrthog
|
|
|
17054
17060
|
});
|
|
17055
17061
|
function we() {
|
|
17056
17062
|
Et(ge.value, "update", () => {
|
|
17057
|
-
i("change", ge.value),
|
|
17063
|
+
i("change", ge.value), H();
|
|
17058
17064
|
}), Et(ge.value, "controlend", () => i("end", ge.value)), Et(ge.value, "controlstart", () => i("start", ge.value));
|
|
17059
17065
|
}
|
|
17060
17066
|
const { onBeforeRender: W } = ot();
|
|
@@ -17067,7 +17073,7 @@ const wx = (a) => !!(a && a.isPerspectiveCamera), Sx = (a) => !!(a && a.isOrthog
|
|
|
17067
17073
|
ge.value && ge.value.disconnect();
|
|
17068
17074
|
}), e({
|
|
17069
17075
|
instance: ge
|
|
17070
|
-
}), ($, z) => (
|
|
17076
|
+
}), ($, z) => (a.camera || k(G)) && (a.domElement || k(O).domElement) ? (me(), ve("TresCameraControls", {
|
|
17071
17077
|
key: 0,
|
|
17072
17078
|
ref_key: "controlsRef",
|
|
17073
17079
|
ref: ge,
|
|
@@ -17095,7 +17101,7 @@ const wx = (a) => !!(a && a.isPerspectiveCamera), Sx = (a) => !!(a && a.isOrthog
|
|
|
17095
17101
|
"boundary-friction": k(E),
|
|
17096
17102
|
"rest-threshold": k(C),
|
|
17097
17103
|
"collider-meshes": k(B),
|
|
17098
|
-
args: [
|
|
17104
|
+
args: [a.camera || k(G), a.domElement || k(O).domElement],
|
|
17099
17105
|
"mouse-buttons": ie.value,
|
|
17100
17106
|
touches: ue.value
|
|
17101
17107
|
}, null, 8, xA)) : ms("", !0);
|
|
@@ -17148,7 +17154,7 @@ const qk = /* @__PURE__ */ _e({
|
|
|
17148
17154
|
}), e({
|
|
17149
17155
|
instance: o
|
|
17150
17156
|
});
|
|
17151
|
-
const w = (E) => i("isLock", E), A = (E) => i("change", E), b = new
|
|
17157
|
+
const w = (E) => i("isLock", E), A = (E) => i("change", E), b = new V(), M = new V(), _ = new xt(), T = (E, C) => {
|
|
17152
17158
|
if (!r.value?.position && !b)
|
|
17153
17159
|
return;
|
|
17154
17160
|
const B = r.value, D = E * 1e-3;
|
|
@@ -17161,10 +17167,10 @@ const qk = /* @__PURE__ */ _e({
|
|
|
17161
17167
|
o.value instanceof hx && o.value?.isLocked && (T(E, h.value), o.value.moveRight(u.value));
|
|
17162
17168
|
}), (E, C) => k(l) ? (me(), En(k(wA), {
|
|
17163
17169
|
key: 0,
|
|
17164
|
-
selector:
|
|
17165
|
-
"make-default":
|
|
17166
|
-
camera:
|
|
17167
|
-
"dom-element":
|
|
17170
|
+
selector: a.selector,
|
|
17171
|
+
"make-default": a.makeDefault,
|
|
17172
|
+
camera: a.camera || k(r),
|
|
17173
|
+
"dom-element": a.domElement || k(l).domElement,
|
|
17168
17174
|
onIsLock: w,
|
|
17169
17175
|
onChange: A
|
|
17170
17176
|
}, null, 8, ["selector", "make-default", "camera", "dom-element"])) : ms("", !0);
|
|
@@ -17233,18 +17239,18 @@ const qk = /* @__PURE__ */ _e({
|
|
|
17233
17239
|
E.value && E.value.dispose();
|
|
17234
17240
|
}), e({
|
|
17235
17241
|
instance: E
|
|
17236
|
-
}), (B, D) => (
|
|
17242
|
+
}), (B, D) => (a.camera || k(b)) && (a.domElement || k(M).domElement) ? (me(), ve("TresMapControls", {
|
|
17237
17243
|
key: 0,
|
|
17238
17244
|
ref_key: "controlsRef",
|
|
17239
17245
|
ref: E,
|
|
17240
|
-
args: [
|
|
17246
|
+
args: [a.camera || k(b), a.domElement || k(M).domElement],
|
|
17241
17247
|
"auto-rotate": k(i),
|
|
17242
17248
|
"auto-rotate-speed": k(n),
|
|
17243
17249
|
"enable-damping": k(r),
|
|
17244
17250
|
"damping-factor": k(o),
|
|
17245
17251
|
"enable-pan": k(l),
|
|
17246
17252
|
"key-pan-speed": k(c),
|
|
17247
|
-
keys:
|
|
17253
|
+
keys: a.keys,
|
|
17248
17254
|
"max-azimuth-angle": k(u),
|
|
17249
17255
|
"min-azimuth-angle": k(h),
|
|
17250
17256
|
"max-polar-angle": k(f),
|
|
@@ -17313,13 +17319,13 @@ const qk = /* @__PURE__ */ _e({
|
|
|
17313
17319
|
rotateSpeed: _,
|
|
17314
17320
|
target: T,
|
|
17315
17321
|
mouseButtons: S
|
|
17316
|
-
} = rt(s), { camera: E, renderer: C, extend: B, controls: D, invalidate:
|
|
17317
|
-
B({ OrbitControls: dx }), re(O, (
|
|
17318
|
-
ce(),
|
|
17322
|
+
} = rt(s), { camera: E, renderer: C, extend: B, controls: D, invalidate: G } = ke(), O = de(null);
|
|
17323
|
+
B({ OrbitControls: dx }), re(O, (H) => {
|
|
17324
|
+
ce(), H && n.value ? D.value = H : D.value = null;
|
|
17319
17325
|
});
|
|
17320
17326
|
function ce() {
|
|
17321
17327
|
Et(O.value, "change", () => {
|
|
17322
|
-
i("change", O.value),
|
|
17328
|
+
i("change", O.value), G();
|
|
17323
17329
|
}), Et(O.value, "start", () => i("start", O.value)), Et(O.value, "end", () => i("end", O.value));
|
|
17324
17330
|
}
|
|
17325
17331
|
const { onBeforeRender: te } = ot();
|
|
@@ -17327,10 +17333,10 @@ const qk = /* @__PURE__ */ _e({
|
|
|
17327
17333
|
O.value && (l.value || r.value) && (O.value.update(), r.value);
|
|
17328
17334
|
}), kt(() => {
|
|
17329
17335
|
O.value && O.value.dispose();
|
|
17330
|
-
}), e({ instance: O }), (
|
|
17336
|
+
}), e({ instance: O }), (H, ie) => (a.camera || k(E)) && (a.domElement || k(C).domElement) ? (me(), ve("TresOrbitControls", {
|
|
17331
17337
|
ref_key: "controlsRef",
|
|
17332
17338
|
ref: O,
|
|
17333
|
-
key: (
|
|
17339
|
+
key: (a.camera || k(E))?.uuid,
|
|
17334
17340
|
target: k(T),
|
|
17335
17341
|
"auto-rotate": k(r),
|
|
17336
17342
|
"auto-rotate-speed": k(o),
|
|
@@ -17338,7 +17344,7 @@ const qk = /* @__PURE__ */ _e({
|
|
|
17338
17344
|
"damping-factor": k(c),
|
|
17339
17345
|
"enable-pan": k(u),
|
|
17340
17346
|
"key-pan-speed": k(h),
|
|
17341
|
-
keys:
|
|
17347
|
+
keys: a.keys,
|
|
17342
17348
|
"max-azimuth-angle": k(f),
|
|
17343
17349
|
"min-azimuth-angle": k(d),
|
|
17344
17350
|
"max-polar-angle": k(p),
|
|
@@ -17353,7 +17359,7 @@ const qk = /* @__PURE__ */ _e({
|
|
|
17353
17359
|
"enable-rotate": k(b),
|
|
17354
17360
|
"rotate-speed": k(_),
|
|
17355
17361
|
"mouse-buttons": k(S),
|
|
17356
|
-
args: [
|
|
17362
|
+
args: [a.camera || k(E), a.domElement || k(C).domElement]
|
|
17357
17363
|
}, null, 8, TA)) : ms("", !0);
|
|
17358
17364
|
}
|
|
17359
17365
|
}), bA = ["args"], wA = /* @__PURE__ */ _e({
|
|
@@ -17385,11 +17391,11 @@ const qk = /* @__PURE__ */ _e({
|
|
|
17385
17391
|
d && (d.removeEventListener("lock", () => f(!0)), d.removeEventListener("unlock", () => f(!1)), d.dispose());
|
|
17386
17392
|
}), e({
|
|
17387
17393
|
instance: l
|
|
17388
|
-
}), (d, p) => (
|
|
17394
|
+
}), (d, p) => (a.camera || k(n)) && (a.domElement || k(r).domElement) ? (me(), ve("TresPointerLockControls", {
|
|
17389
17395
|
key: 0,
|
|
17390
17396
|
ref_key: "controlsRef",
|
|
17391
17397
|
ref: u,
|
|
17392
|
-
args: [
|
|
17398
|
+
args: [a.camera || k(n), a.domElement || k(r).domElement]
|
|
17393
17399
|
}, null, 8, bA)) : ms("", !0);
|
|
17394
17400
|
}
|
|
17395
17401
|
}), Zk = /* @__PURE__ */ _e({
|
|
@@ -17511,12 +17517,12 @@ const qk = /* @__PURE__ */ _e({
|
|
|
17511
17517
|
y.value && y.value.dispose();
|
|
17512
17518
|
}), e({
|
|
17513
17519
|
instance: y
|
|
17514
|
-
}), (B, D) => (
|
|
17520
|
+
}), (B, D) => (a.camera || k(v)) && k(w).domElement ? (me(), ve("TresTransformControls", {
|
|
17515
17521
|
ref_key: "controlsRef",
|
|
17516
17522
|
ref: y,
|
|
17517
|
-
key: (
|
|
17523
|
+
key: (a.camera || k(v))?.uuid,
|
|
17518
17524
|
object: k(n),
|
|
17519
|
-
args: [
|
|
17525
|
+
args: [a.camera || k(v), k(w).domElement],
|
|
17520
17526
|
mode: k(r),
|
|
17521
17527
|
enabled: k(o),
|
|
17522
17528
|
axis: k(l),
|
|
@@ -17813,11 +17819,11 @@ function wc(a) {
|
|
|
17813
17819
|
}
|
|
17814
17820
|
var bd = { exports: {} }, iy;
|
|
17815
17821
|
function IA() {
|
|
17816
|
-
return iy || (iy = 1, function(a, e) {
|
|
17822
|
+
return iy || (iy = 1, (function(a, e) {
|
|
17817
17823
|
(function(t) {
|
|
17818
17824
|
a.exports = t();
|
|
17819
17825
|
})(function() {
|
|
17820
|
-
return function t(s, i, n) {
|
|
17826
|
+
return (function t(s, i, n) {
|
|
17821
17827
|
function r(c, u) {
|
|
17822
17828
|
if (!i[c]) {
|
|
17823
17829
|
if (!s[c]) {
|
|
@@ -17835,7 +17841,7 @@ function IA() {
|
|
|
17835
17841
|
}
|
|
17836
17842
|
for (var o = typeof wc == "function" && wc, l = 0; l < n.length; l++) r(n[l]);
|
|
17837
17843
|
return r;
|
|
17838
|
-
}({ 1: [function(t, s, i) {
|
|
17844
|
+
})({ 1: [function(t, s, i) {
|
|
17839
17845
|
(function(n, r, o, l, c, u, h, f, d) {
|
|
17840
17846
|
var p = t("crypto");
|
|
17841
17847
|
function m(b, M) {
|
|
@@ -17888,12 +17894,12 @@ function IA() {
|
|
|
17888
17894
|
}, _array: function(S, D) {
|
|
17889
17895
|
D = D !== void 0 ? D : b.unorderedArrays !== !1;
|
|
17890
17896
|
var C = this;
|
|
17891
|
-
if (T("array:" + S.length + ":"), !D || S.length <= 1) return S.forEach(function(
|
|
17892
|
-
return C.dispatch(
|
|
17897
|
+
if (T("array:" + S.length + ":"), !D || S.length <= 1) return S.forEach(function(G) {
|
|
17898
|
+
return C.dispatch(G);
|
|
17893
17899
|
});
|
|
17894
|
-
var B = [], D = S.map(function(
|
|
17900
|
+
var B = [], D = S.map(function(G) {
|
|
17895
17901
|
var O = new A(), ce = _.slice();
|
|
17896
|
-
return w(b, O, ce).dispatch(
|
|
17902
|
+
return w(b, O, ce).dispatch(G), B = B.concat(ce.slice(_.length)), O.read().toString();
|
|
17897
17903
|
});
|
|
17898
17904
|
return _ = _.concat(B), D.sort(), this._array(D, !1);
|
|
17899
17905
|
}, _date: function(S) {
|
|
@@ -18016,23 +18022,23 @@ Use "options.replacer" or "options.ignoreUnknown"
|
|
|
18016
18022
|
var T, S;
|
|
18017
18023
|
if (0 < _.length % 4) throw new Error("Invalid string. Length must be a multiple of 4");
|
|
18018
18024
|
var E = _.length, E = _.charAt(E - 2) === "=" ? 2 : _.charAt(E - 1) === "=" ? 1 : 0, C = new m(3 * _.length / 4 - E), B = 0 < E ? _.length - 4 : _.length, D = 0;
|
|
18019
|
-
function
|
|
18025
|
+
function G(O) {
|
|
18020
18026
|
C[D++] = O;
|
|
18021
18027
|
}
|
|
18022
|
-
for (T = 0; T < B; T += 4, 0)
|
|
18023
|
-
return E == 2 ?
|
|
18028
|
+
for (T = 0; T < B; T += 4, 0) G((16711680 & (S = M(_.charAt(T)) << 18 | M(_.charAt(T + 1)) << 12 | M(_.charAt(T + 2)) << 6 | M(_.charAt(T + 3)))) >> 16), G((65280 & S) >> 8), G(255 & S);
|
|
18029
|
+
return E == 2 ? G(255 & (S = M(_.charAt(T)) << 2 | M(_.charAt(T + 1)) >> 4)) : E == 1 && (G((S = M(_.charAt(T)) << 10 | M(_.charAt(T + 1)) << 4 | M(_.charAt(T + 2)) >> 2) >> 8 & 255), G(255 & S)), C;
|
|
18024
18030
|
}, p.fromByteArray = function(_) {
|
|
18025
18031
|
var T, S, E, C, B = _.length % 3, D = "";
|
|
18026
|
-
function
|
|
18032
|
+
function G(O) {
|
|
18027
18033
|
return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O);
|
|
18028
18034
|
}
|
|
18029
|
-
for (T = 0, E = _.length - B; T < E; T += 3) S = (_[T] << 16) + (_[T + 1] << 8) + _[T + 2], D +=
|
|
18035
|
+
for (T = 0, E = _.length - B; T < E; T += 3) S = (_[T] << 16) + (_[T + 1] << 8) + _[T + 2], D += G((C = S) >> 18 & 63) + G(C >> 12 & 63) + G(C >> 6 & 63) + G(63 & C);
|
|
18030
18036
|
switch (B) {
|
|
18031
18037
|
case 1:
|
|
18032
|
-
D = (D +=
|
|
18038
|
+
D = (D += G((S = _[_.length - 1]) >> 2)) + G(S << 4 & 63) + "==";
|
|
18033
18039
|
break;
|
|
18034
18040
|
case 2:
|
|
18035
|
-
D = (D = (D +=
|
|
18041
|
+
D = (D = (D += G((S = (_[_.length - 2] << 8) + _[_.length - 1]) >> 10)) + G(S >> 4 & 63)) + G(S << 2 & 63) + "=";
|
|
18036
18042
|
}
|
|
18037
18043
|
return D;
|
|
18038
18044
|
};
|
|
@@ -18052,22 +18058,22 @@ Use "options.replacer" or "options.ignoreUnknown"
|
|
|
18052
18058
|
j = te(R.length);
|
|
18053
18059
|
}
|
|
18054
18060
|
if (g._useTypedArrays ? K = g._augment(new Uint8Array(j)) : ((K = this).length = j, K._isBuffer = !0), g._useTypedArrays && typeof R.byteLength == "number") K._set(R);
|
|
18055
|
-
else if (
|
|
18061
|
+
else if (H(J = R) || g.isBuffer(J) || J && typeof J == "object" && typeof J.length == "number") for (ee = 0; ee < j; ee++) g.isBuffer(R) ? K[ee] = R.readUInt8(ee) : K[ee] = R[ee];
|
|
18056
18062
|
else if (fe == "string") K.write(R, 0, P);
|
|
18057
18063
|
else if (fe == "number" && !g._useTypedArrays && !I) for (ee = 0; ee < j; ee++) K[ee] = 0;
|
|
18058
18064
|
return K;
|
|
18059
18065
|
}
|
|
18060
18066
|
function y(R, P, I, j) {
|
|
18061
|
-
return g._charsWritten = we(function(K) {
|
|
18067
|
+
return g._charsWritten = we((function(K) {
|
|
18062
18068
|
for (var ee = [], J = 0; J < K.length; J++) ee.push(255 & K.charCodeAt(J));
|
|
18063
18069
|
return ee;
|
|
18064
|
-
}(P), R, I, j);
|
|
18070
|
+
})(P), R, I, j);
|
|
18065
18071
|
}
|
|
18066
18072
|
function x(R, P, I, j) {
|
|
18067
|
-
return g._charsWritten = we(function(K) {
|
|
18073
|
+
return g._charsWritten = we((function(K) {
|
|
18068
18074
|
for (var ee, J, fe = [], Se = 0; Se < K.length; Se++) J = K.charCodeAt(Se), ee = J >> 8, J = J % 256, fe.push(J), fe.push(ee);
|
|
18069
18075
|
return fe;
|
|
18070
|
-
}(P), R, I, j);
|
|
18076
|
+
})(P), R, I, j);
|
|
18071
18077
|
}
|
|
18072
18078
|
function v(R, P, I) {
|
|
18073
18079
|
var j = "";
|
|
@@ -18112,10 +18118,10 @@ Use "options.replacer" or "options.ignoreUnknown"
|
|
|
18112
18118
|
function D(R, P, I, j, K) {
|
|
18113
18119
|
K || (N(P != null, "missing value"), N(typeof j == "boolean", "missing or invalid endian"), N(I != null, "missing offset"), N(I + 3 < R.length, "Trying to write beyond buffer length"), F(P, 34028234663852886e22, -34028234663852886e22)), R.length <= I || m.write(R, P, I, j, 23, 4);
|
|
18114
18120
|
}
|
|
18115
|
-
function
|
|
18121
|
+
function G(R, P, I, j, K) {
|
|
18116
18122
|
K || (N(P != null, "missing value"), N(typeof j == "boolean", "missing or invalid endian"), N(I != null, "missing offset"), N(I + 7 < R.length, "Trying to write beyond buffer length"), F(P, 17976931348623157e292, -17976931348623157e292)), R.length <= I || m.write(R, P, I, j, 52, 8);
|
|
18117
18123
|
}
|
|
18118
|
-
i.Buffer = g, i.SlowBuffer = g, i.INSPECT_MAX_BYTES = 50, g.poolSize = 8192, g._useTypedArrays = function() {
|
|
18124
|
+
i.Buffer = g, i.SlowBuffer = g, i.INSPECT_MAX_BYTES = 50, g.poolSize = 8192, g._useTypedArrays = (function() {
|
|
18119
18125
|
try {
|
|
18120
18126
|
var R = new ArrayBuffer(0), P = new Uint8Array(R);
|
|
18121
18127
|
return P.foo = function() {
|
|
@@ -18124,7 +18130,7 @@ Use "options.replacer" or "options.ignoreUnknown"
|
|
|
18124
18130
|
} catch {
|
|
18125
18131
|
return !1;
|
|
18126
18132
|
}
|
|
18127
|
-
}(), g.isEncoding = function(R) {
|
|
18133
|
+
})(), g.isEncoding = function(R) {
|
|
18128
18134
|
switch (String(R).toLowerCase()) {
|
|
18129
18135
|
case "hex":
|
|
18130
18136
|
case "utf8":
|
|
@@ -18172,7 +18178,7 @@ Use "options.replacer" or "options.ignoreUnknown"
|
|
|
18172
18178
|
}
|
|
18173
18179
|
return I;
|
|
18174
18180
|
}, g.concat = function(R, P) {
|
|
18175
|
-
if (N(
|
|
18181
|
+
if (N(H(R), `Usage: Buffer.concat(list, [totalLength])
|
|
18176
18182
|
list should be an Array.`), R.length === 0) return new g(0);
|
|
18177
18183
|
if (R.length === 1) return R[0];
|
|
18178
18184
|
if (typeof P != "number") for (K = P = 0; K < R.length; K++) P += R[K].length;
|
|
@@ -18186,7 +18192,7 @@ list should be an Array.`), R.length === 0) return new g(0);
|
|
|
18186
18192
|
var K, ee, J, fe, Se = this.length - P;
|
|
18187
18193
|
switch ((!I || Se < (I = Number(I))) && (I = Se), j = String(j || "utf8").toLowerCase()) {
|
|
18188
18194
|
case "hex":
|
|
18189
|
-
K = function(ye, q, L, xe) {
|
|
18195
|
+
K = (function(ye, q, L, xe) {
|
|
18190
18196
|
L = Number(L) || 0;
|
|
18191
18197
|
var Ne = ye.length - L;
|
|
18192
18198
|
(!xe || Ne < (xe = Number(xe))) && (xe = Ne), N((Ne = q.length) % 2 == 0, "Invalid hex string"), Ne / 2 < xe && (xe = Ne / 2);
|
|
@@ -18195,7 +18201,7 @@ list should be an Array.`), R.length === 0) return new g(0);
|
|
|
18195
18201
|
N(!isNaN(Xt), "Invalid hex string"), ye[L + Lt] = Xt;
|
|
18196
18202
|
}
|
|
18197
18203
|
return g._charsWritten = 2 * Lt, Lt;
|
|
18198
|
-
}(this, R, P, I);
|
|
18204
|
+
})(this, R, P, I);
|
|
18199
18205
|
break;
|
|
18200
18206
|
case "utf8":
|
|
18201
18207
|
case "utf-8":
|
|
@@ -18223,21 +18229,21 @@ list should be an Array.`), R.length === 0) return new g(0);
|
|
|
18223
18229
|
if (R = String(R || "utf8").toLowerCase(), P = Number(P) || 0, (I = I !== void 0 ? Number(I) : fe.length) === P) return "";
|
|
18224
18230
|
switch (R) {
|
|
18225
18231
|
case "hex":
|
|
18226
|
-
j = function(Se, ye, q) {
|
|
18232
|
+
j = (function(Se, ye, q) {
|
|
18227
18233
|
var L = Se.length;
|
|
18228
18234
|
(!ye || ye < 0) && (ye = 0), (!q || q < 0 || L < q) && (q = L);
|
|
18229
18235
|
for (var xe = "", Ne = ye; Ne < q; Ne++) xe += ie(Se[Ne]);
|
|
18230
18236
|
return xe;
|
|
18231
|
-
}(fe, P, I);
|
|
18237
|
+
})(fe, P, I);
|
|
18232
18238
|
break;
|
|
18233
18239
|
case "utf8":
|
|
18234
18240
|
case "utf-8":
|
|
18235
|
-
j = function(Se, ye, q) {
|
|
18241
|
+
j = (function(Se, ye, q) {
|
|
18236
18242
|
var L = "", xe = "";
|
|
18237
18243
|
q = Math.min(Se.length, q);
|
|
18238
18244
|
for (var Ne = ye; Ne < q; Ne++) Se[Ne] <= 127 ? (L += W(xe) + String.fromCharCode(Se[Ne]), xe = "") : xe += "%" + Se[Ne].toString(16);
|
|
18239
18245
|
return L + W(xe);
|
|
18240
|
-
}(fe, P, I);
|
|
18246
|
+
})(fe, P, I);
|
|
18241
18247
|
break;
|
|
18242
18248
|
case "ascii":
|
|
18243
18249
|
case "binary":
|
|
@@ -18250,10 +18256,10 @@ list should be an Array.`), R.length === 0) return new g(0);
|
|
|
18250
18256
|
case "ucs-2":
|
|
18251
18257
|
case "utf16le":
|
|
18252
18258
|
case "utf-16le":
|
|
18253
|
-
j = function(Se, ye, q) {
|
|
18259
|
+
j = (function(Se, ye, q) {
|
|
18254
18260
|
for (var L = Se.slice(ye, q), xe = "", Ne = 0; Ne < L.length; Ne += 2) xe += String.fromCharCode(L[Ne] + 256 * L[Ne + 1]);
|
|
18255
18261
|
return xe;
|
|
18256
|
-
}(fe, P, I);
|
|
18262
|
+
})(fe, P, I);
|
|
18257
18263
|
break;
|
|
18258
18264
|
default:
|
|
18259
18265
|
throw new Error("Unknown encoding");
|
|
@@ -18330,9 +18336,9 @@ list should be an Array.`), R.length === 0) return new g(0);
|
|
|
18330
18336
|
}, g.prototype.writeFloatBE = function(R, P, I) {
|
|
18331
18337
|
D(this, R, P, !1, I);
|
|
18332
18338
|
}, g.prototype.writeDoubleLE = function(R, P, I) {
|
|
18333
|
-
|
|
18339
|
+
G(this, R, P, !0, I);
|
|
18334
18340
|
}, g.prototype.writeDoubleBE = function(R, P, I) {
|
|
18335
|
-
|
|
18341
|
+
G(this, R, P, !1, I);
|
|
18336
18342
|
}, g.prototype.fill = function(R, P, I) {
|
|
18337
18343
|
if (P = P || 0, I = I || this.length, N(typeof (R = typeof (R = R || 0) == "string" ? R.charCodeAt(0) : R) == "number" && !isNaN(R), "value is not a number"), N(P <= I, "end < start"), I !== P && this.length !== 0) {
|
|
18338
18344
|
N(0 <= P && P < this.length, "start out of bounds"), N(0 <= I && I <= this.length, "end out of bounds");
|
|
@@ -18357,7 +18363,7 @@ list should be an Array.`), R.length === 0) return new g(0);
|
|
|
18357
18363
|
function te(R) {
|
|
18358
18364
|
return (R = ~~Math.ceil(+R)) < 0 ? 0 : R;
|
|
18359
18365
|
}
|
|
18360
|
-
function
|
|
18366
|
+
function H(R) {
|
|
18361
18367
|
return (Array.isArray || function(P) {
|
|
18362
18368
|
return Object.prototype.toString.call(P) === "[object Array]";
|
|
18363
18369
|
})(R);
|
|
@@ -18407,11 +18413,11 @@ list should be an Array.`), R.length === 0) return new g(0);
|
|
|
18407
18413
|
(function(n, r, p, l, c, u, h, f, d) {
|
|
18408
18414
|
var p = t("buffer").Buffer, m = 4, g = new p(m);
|
|
18409
18415
|
g.fill(0), s.exports = { hash: function(y, x, v, w) {
|
|
18410
|
-
for (var A = x(function(S, E) {
|
|
18416
|
+
for (var A = x((function(S, E) {
|
|
18411
18417
|
S.length % m != 0 && (C = S.length + (m - S.length % m), S = p.concat([S, g], C));
|
|
18412
|
-
for (var C, B = [], D = E ? S.readInt32BE : S.readInt32LE,
|
|
18418
|
+
for (var C, B = [], D = E ? S.readInt32BE : S.readInt32LE, G = 0; G < S.length; G += m) B.push(D.call(S, G));
|
|
18413
18419
|
return B;
|
|
18414
|
-
}(y = p.isBuffer(y) ? y : new p(y), w), 8 * y.length), x = w, b = new p(v), M = x ? b.writeInt32BE : b.writeInt32LE, _ = 0; _ < A.length; _++) M.call(b, A[_], 4 * _, !0);
|
|
18420
|
+
})(y = p.isBuffer(y) ? y : new p(y), w), 8 * y.length), x = w, b = new p(v), M = x ? b.writeInt32BE : b.writeInt32LE, _ = 0; _ < A.length; _++) M.call(b, A[_], 4 * _, !0);
|
|
18415
18421
|
return b;
|
|
18416
18422
|
} };
|
|
18417
18423
|
}).call(this, t("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, t("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
|
|
@@ -18423,12 +18429,12 @@ list should be an Array.`), R.length === 0) return new g(0);
|
|
|
18423
18429
|
return C || b("algorithm:", S, "is not yet supported"), { update: function(D) {
|
|
18424
18430
|
return p.isBuffer(D) || (D = new p(D)), B.push(D), D.length, this;
|
|
18425
18431
|
}, digest: function(D) {
|
|
18426
|
-
var
|
|
18432
|
+
var G = p.concat(B), G = E ? (function(O, ce, te) {
|
|
18427
18433
|
p.isBuffer(ce) || (ce = new p(ce)), p.isBuffer(te) || (te = new p(te)), ce.length > v ? ce = O(ce) : ce.length < v && (ce = p.concat([ce, w], v));
|
|
18428
|
-
for (var
|
|
18429
|
-
return te = O(p.concat([
|
|
18430
|
-
}(C, E,
|
|
18431
|
-
return B = null, D ?
|
|
18434
|
+
for (var H = new p(v), ie = new p(v), ue = 0; ue < v; ue++) H[ue] = 54 ^ ce[ue], ie[ue] = 92 ^ ce[ue];
|
|
18435
|
+
return te = O(p.concat([H, te])), O(p.concat([ie, te]));
|
|
18436
|
+
})(C, E, G) : C(G);
|
|
18437
|
+
return B = null, D ? G.toString(D) : G;
|
|
18432
18438
|
} };
|
|
18433
18439
|
}
|
|
18434
18440
|
function b() {
|
|
@@ -18459,8 +18465,8 @@ list should be an Array.`), R.length === 0) return new g(0);
|
|
|
18459
18465
|
function m(b, M) {
|
|
18460
18466
|
b[M >> 5] |= 128 << M % 32, b[14 + (M + 64 >>> 9 << 4)] = M;
|
|
18461
18467
|
for (var _ = 1732584193, T = -271733879, S = -1732584194, E = 271733878, C = 0; C < b.length; C += 16) {
|
|
18462
|
-
var B = _, D = T,
|
|
18463
|
-
_ = y(_, T, S, E, b[C + 4], 7, -176418897), E = y(E, _, T, S, b[C + 5], 12, 1200080426), S = y(S, E, _, T, b[C + 6], 17, -1473231341), T = y(T, S, E, _, b[C + 7], 22, -45705983), _ = y(_, T, S, E, b[C + 8], 7, 1770035416), E = y(E, _, T, S, b[C + 9], 12, -1958414417), S = y(S, E, _, T, b[C + 10], 17, -42063), T = y(T, S, E, _, b[C + 11], 22, -1990404162), _ = y(_, T, S, E, b[C + 12], 7, 1804603682), E = y(E, _, T, S, b[C + 13], 12, -40341101), S = y(S, E, _, T, b[C + 14], 17, -1502002290), _ = x(_, T = y(T, S, E, _, b[C + 15], 22, 1236535329), S, E, b[C + 1], 5, -165796510), E = x(E, _, T, S, b[C + 6], 9, -1069501632), S = x(S, E, _, T, b[C + 11], 14, 643717713), T = x(T, S, E, _, b[C + 0], 20, -373897302), _ = x(_, T, S, E, b[C + 5], 5, -701558691), E = x(E, _, T, S, b[C + 10], 9, 38016083), S = x(S, E, _, T, b[C + 15], 14, -660478335), T = x(T, S, E, _, b[C + 4], 20, -405537848), _ = x(_, T, S, E, b[C + 9], 5, 568446438), E = x(E, _, T, S, b[C + 14], 9, -1019803690), S = x(S, E, _, T, b[C + 3], 14, -187363961), T = x(T, S, E, _, b[C + 8], 20, 1163531501), _ = x(_, T, S, E, b[C + 13], 5, -1444681467), E = x(E, _, T, S, b[C + 2], 9, -51403784), S = x(S, E, _, T, b[C + 7], 14, 1735328473), _ = v(_, T = x(T, S, E, _, b[C + 12], 20, -1926607734), S, E, b[C + 5], 4, -378558), E = v(E, _, T, S, b[C + 8], 11, -2022574463), S = v(S, E, _, T, b[C + 11], 16, 1839030562), T = v(T, S, E, _, b[C + 14], 23, -35309556), _ = v(_, T, S, E, b[C + 1], 4, -1530992060), E = v(E, _, T, S, b[C + 4], 11, 1272893353), S = v(S, E, _, T, b[C + 7], 16, -155497632), T = v(T, S, E, _, b[C + 10], 23, -1094730640), _ = v(_, T, S, E, b[C + 13], 4, 681279174), E = v(E, _, T, S, b[C + 0], 11, -358537222), S = v(S, E, _, T, b[C + 3], 16, -722521979), T = v(T, S, E, _, b[C + 6], 23, 76029189), _ = v(_, T, S, E, b[C + 9], 4, -640364487), E = v(E, _, T, S, b[C + 12], 11, -421815835), S = v(S, E, _, T, b[C + 15], 16, 530742520), _ = w(_, T = v(T, S, E, _, b[C + 2], 23, -995338651), S, E, b[C + 0], 6, -198630844), E = w(E, _, T, S, b[C + 7], 10, 1126891415), S = w(S, E, _, T, b[C + 14], 15, -1416354905), T = w(T, S, E, _, b[C + 5], 21, -57434055), _ = w(_, T, S, E, b[C + 12], 6, 1700485571), E = w(E, _, T, S, b[C + 3], 10, -1894986606), S = w(S, E, _, T, b[C + 10], 15, -1051523), T = w(T, S, E, _, b[C + 1], 21, -2054922799), _ = w(_, T, S, E, b[C + 8], 6, 1873313359), E = w(E, _, T, S, b[C + 15], 10, -30611744), S = w(S, E, _, T, b[C + 6], 15, -1560198380), T = w(T, S, E, _, b[C + 13], 21, 1309151649), _ = w(_, T, S, E, b[C + 4], 6, -145523070), E = w(E, _, T, S, b[C + 11], 10, -1120210379), S = w(S, E, _, T, b[C + 2], 15, 718787259), T = w(T, S, E, _, b[C + 9], 21, -343485551), _ = A(_, B), T = A(T, D), S = A(S,
|
|
18468
|
+
var B = _, D = T, G = S, O = E, _ = y(_, T, S, E, b[C + 0], 7, -680876936), E = y(E, _, T, S, b[C + 1], 12, -389564586), S = y(S, E, _, T, b[C + 2], 17, 606105819), T = y(T, S, E, _, b[C + 3], 22, -1044525330);
|
|
18469
|
+
_ = y(_, T, S, E, b[C + 4], 7, -176418897), E = y(E, _, T, S, b[C + 5], 12, 1200080426), S = y(S, E, _, T, b[C + 6], 17, -1473231341), T = y(T, S, E, _, b[C + 7], 22, -45705983), _ = y(_, T, S, E, b[C + 8], 7, 1770035416), E = y(E, _, T, S, b[C + 9], 12, -1958414417), S = y(S, E, _, T, b[C + 10], 17, -42063), T = y(T, S, E, _, b[C + 11], 22, -1990404162), _ = y(_, T, S, E, b[C + 12], 7, 1804603682), E = y(E, _, T, S, b[C + 13], 12, -40341101), S = y(S, E, _, T, b[C + 14], 17, -1502002290), _ = x(_, T = y(T, S, E, _, b[C + 15], 22, 1236535329), S, E, b[C + 1], 5, -165796510), E = x(E, _, T, S, b[C + 6], 9, -1069501632), S = x(S, E, _, T, b[C + 11], 14, 643717713), T = x(T, S, E, _, b[C + 0], 20, -373897302), _ = x(_, T, S, E, b[C + 5], 5, -701558691), E = x(E, _, T, S, b[C + 10], 9, 38016083), S = x(S, E, _, T, b[C + 15], 14, -660478335), T = x(T, S, E, _, b[C + 4], 20, -405537848), _ = x(_, T, S, E, b[C + 9], 5, 568446438), E = x(E, _, T, S, b[C + 14], 9, -1019803690), S = x(S, E, _, T, b[C + 3], 14, -187363961), T = x(T, S, E, _, b[C + 8], 20, 1163531501), _ = x(_, T, S, E, b[C + 13], 5, -1444681467), E = x(E, _, T, S, b[C + 2], 9, -51403784), S = x(S, E, _, T, b[C + 7], 14, 1735328473), _ = v(_, T = x(T, S, E, _, b[C + 12], 20, -1926607734), S, E, b[C + 5], 4, -378558), E = v(E, _, T, S, b[C + 8], 11, -2022574463), S = v(S, E, _, T, b[C + 11], 16, 1839030562), T = v(T, S, E, _, b[C + 14], 23, -35309556), _ = v(_, T, S, E, b[C + 1], 4, -1530992060), E = v(E, _, T, S, b[C + 4], 11, 1272893353), S = v(S, E, _, T, b[C + 7], 16, -155497632), T = v(T, S, E, _, b[C + 10], 23, -1094730640), _ = v(_, T, S, E, b[C + 13], 4, 681279174), E = v(E, _, T, S, b[C + 0], 11, -358537222), S = v(S, E, _, T, b[C + 3], 16, -722521979), T = v(T, S, E, _, b[C + 6], 23, 76029189), _ = v(_, T, S, E, b[C + 9], 4, -640364487), E = v(E, _, T, S, b[C + 12], 11, -421815835), S = v(S, E, _, T, b[C + 15], 16, 530742520), _ = w(_, T = v(T, S, E, _, b[C + 2], 23, -995338651), S, E, b[C + 0], 6, -198630844), E = w(E, _, T, S, b[C + 7], 10, 1126891415), S = w(S, E, _, T, b[C + 14], 15, -1416354905), T = w(T, S, E, _, b[C + 5], 21, -57434055), _ = w(_, T, S, E, b[C + 12], 6, 1700485571), E = w(E, _, T, S, b[C + 3], 10, -1894986606), S = w(S, E, _, T, b[C + 10], 15, -1051523), T = w(T, S, E, _, b[C + 1], 21, -2054922799), _ = w(_, T, S, E, b[C + 8], 6, 1873313359), E = w(E, _, T, S, b[C + 15], 10, -30611744), S = w(S, E, _, T, b[C + 6], 15, -1560198380), T = w(T, S, E, _, b[C + 13], 21, 1309151649), _ = w(_, T, S, E, b[C + 4], 6, -145523070), E = w(E, _, T, S, b[C + 11], 10, -1120210379), S = w(S, E, _, T, b[C + 2], 15, 718787259), T = w(T, S, E, _, b[C + 9], 21, -343485551), _ = A(_, B), T = A(T, D), S = A(S, G), E = A(E, O);
|
|
18464
18470
|
}
|
|
18465
18471
|
return Array(_, T, S, E);
|
|
18466
18472
|
}
|
|
@@ -18500,11 +18506,11 @@ list should be an Array.`), R.length === 0) return new g(0);
|
|
|
18500
18506
|
function m(x, v) {
|
|
18501
18507
|
x[v >> 5] |= 128 << 24 - v % 32, x[15 + (v + 64 >> 9 << 4)] = v;
|
|
18502
18508
|
for (var w, A, b, M = Array(80), _ = 1732584193, T = -271733879, S = -1732584194, E = 271733878, C = -1009589776, B = 0; B < x.length; B += 16) {
|
|
18503
|
-
for (var D = _,
|
|
18504
|
-
M[
|
|
18505
|
-
var ie = g(g(y(_, 5), (ie = T, A = S, b = E, (w =
|
|
18509
|
+
for (var D = _, G = T, O = S, ce = E, te = C, H = 0; H < 80; H++) {
|
|
18510
|
+
M[H] = H < 16 ? x[B + H] : y(M[H - 3] ^ M[H - 8] ^ M[H - 14] ^ M[H - 16], 1);
|
|
18511
|
+
var ie = g(g(y(_, 5), (ie = T, A = S, b = E, (w = H) < 20 ? ie & A | ~ie & b : !(w < 40) && w < 60 ? ie & A | ie & b | A & b : ie ^ A ^ b)), g(g(C, M[H]), (w = H) < 20 ? 1518500249 : w < 40 ? 1859775393 : w < 60 ? -1894007588 : -899497514)), C = E, E = S, S = y(T, 30), T = _, _ = ie;
|
|
18506
18512
|
}
|
|
18507
|
-
_ = g(_, D), T = g(T,
|
|
18513
|
+
_ = g(_, D), T = g(T, G), S = g(S, O), E = g(E, ce), C = g(C, te);
|
|
18508
18514
|
}
|
|
18509
18515
|
return Array(_, T, S, E, C);
|
|
18510
18516
|
}
|
|
@@ -18529,8 +18535,8 @@ list should be an Array.`), R.length === 0) return new g(0);
|
|
|
18529
18535
|
var A, b = new Array(1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298), M = new Array(1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225), _ = new Array(64);
|
|
18530
18536
|
v[w >> 5] |= 128 << 24 - w % 32, v[15 + (w + 64 >> 9 << 4)] = w;
|
|
18531
18537
|
for (var T, S, E = 0; E < v.length; E += 16) {
|
|
18532
|
-
for (var C = M[0], B = M[1], D = M[2],
|
|
18533
|
-
M[0] = p(C, M[0]), M[1] = p(B, M[1]), M[2] = p(D, M[2]), M[3] = p(
|
|
18538
|
+
for (var C = M[0], B = M[1], D = M[2], G = M[3], O = M[4], ce = M[5], te = M[6], H = M[7], ie = 0; ie < 64; ie++) _[ie] = ie < 16 ? v[ie + E] : p(p(p((S = _[ie - 2], y(S, 17) ^ y(S, 19) ^ x(S, 10)), _[ie - 7]), (S = _[ie - 15], y(S, 7) ^ y(S, 18) ^ x(S, 3))), _[ie - 16]), A = p(p(p(p(H, y(S = O, 6) ^ y(S, 11) ^ y(S, 25)), O & ce ^ ~O & te), b[ie]), _[ie]), T = p(y(T = C, 2) ^ y(T, 13) ^ y(T, 22), C & B ^ C & D ^ B & D), H = te, te = ce, ce = O, O = p(G, A), G = D, D = B, B = C, C = p(A, T);
|
|
18539
|
+
M[0] = p(C, M[0]), M[1] = p(B, M[1]), M[2] = p(D, M[2]), M[3] = p(G, M[3]), M[4] = p(O, M[4]), M[5] = p(ce, M[5]), M[6] = p(te, M[6]), M[7] = p(H, M[7]);
|
|
18534
18540
|
}
|
|
18535
18541
|
return M;
|
|
18536
18542
|
}
|
|
@@ -18586,7 +18592,7 @@ list should be an Array.`), R.length === 0) return new g(0);
|
|
|
18586
18592
|
}).call(this, t("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, t("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/process/browser.js", "/node_modules/gulp-browserify/node_modules/process");
|
|
18587
18593
|
}, { buffer: 3, lYpoI2: 11 }] }, {}, [1])(1);
|
|
18588
18594
|
});
|
|
18589
|
-
}(bd)), bd.exports;
|
|
18595
|
+
})(bd)), bd.exports;
|
|
18590
18596
|
}
|
|
18591
18597
|
var BA = IA();
|
|
18592
18598
|
const FA = /* @__PURE__ */ $l(BA);
|
|
@@ -19064,7 +19070,7 @@ function UA() {
|
|
|
19064
19070
|
"integer"
|
|
19065
19071
|
];
|
|
19066
19072
|
function w(A) {
|
|
19067
|
-
var b = 0, M = 0, _ = n, T, S, E = [], C = [], B = 1, D = 0,
|
|
19073
|
+
var b = 0, M = 0, _ = n, T, S, E = [], C = [], B = 1, D = 0, G = 0, O = !1, ce = !1, te = "", H;
|
|
19068
19074
|
A = A || {};
|
|
19069
19075
|
var ie = t, ue = a;
|
|
19070
19076
|
A.version === "300 es" && (ie = i, ue = s);
|
|
@@ -19079,15 +19085,15 @@ function UA() {
|
|
|
19079
19085
|
ye.length && C.push({
|
|
19080
19086
|
type: v[_],
|
|
19081
19087
|
data: ye,
|
|
19082
|
-
position:
|
|
19088
|
+
position: G,
|
|
19083
19089
|
line: B,
|
|
19084
19090
|
column: D
|
|
19085
19091
|
});
|
|
19086
19092
|
}
|
|
19087
19093
|
function $(ye) {
|
|
19088
19094
|
b = 0, ye.toString && (ye = ye.toString()), te += ye.replace(/\r\n/g, `
|
|
19089
|
-
`),
|
|
19090
|
-
for (var q; T = te[b], b <
|
|
19095
|
+
`), H = te.length;
|
|
19096
|
+
for (var q; T = te[b], b < H; ) {
|
|
19091
19097
|
switch (q = b, _) {
|
|
19092
19098
|
case o:
|
|
19093
19099
|
b = I();
|
|
@@ -19137,7 +19143,7 @@ function UA() {
|
|
|
19137
19143
|
return E.length && W(E.join("")), _ = y, W("(eof)"), C;
|
|
19138
19144
|
}
|
|
19139
19145
|
function F() {
|
|
19140
|
-
return E = E.length ? [] : E, S === "/" && T === "*" ? (
|
|
19146
|
+
return E = E.length ? [] : E, S === "/" && T === "*" ? (G = M + b - 1, _ = o, S = T, b + 1) : S === "/" && T === "/" ? (G = M + b - 1, _ = l, S = T, b + 1) : T === "#" ? (_ = c, G = M + b, b) : /\s/.test(T) ? (_ = g, G = M + b, b) : (O = /\d/.test(T), ce = /[^\w_]/.test(T), G = M + b, _ = O ? h : ce ? u : r, b);
|
|
19141
19147
|
}
|
|
19142
19148
|
function N() {
|
|
19143
19149
|
return /[^\s]/g.test(T) ? (W(E.join("")), _ = n, b) : (E.push(T), S = T, b + 1);
|
|
@@ -19181,7 +19187,7 @@ function UA() {
|
|
|
19181
19187
|
if (q-- + ye.length > 0) continue;
|
|
19182
19188
|
xe = ye.slice(0, 1).join("");
|
|
19183
19189
|
}
|
|
19184
|
-
return W(xe),
|
|
19190
|
+
return W(xe), G += xe.length, E = E.slice(xe.length), E.length;
|
|
19185
19191
|
} while (!0);
|
|
19186
19192
|
}
|
|
19187
19193
|
function ee() {
|
|
@@ -19657,7 +19663,7 @@ function xE(a, e, t) {
|
|
|
19657
19663
|
var s = a.lastIndexOf(e);
|
|
19658
19664
|
return s === -1 ? a : a.substring(0, s) + t + a.substring(s + e.length);
|
|
19659
19665
|
}
|
|
19660
|
-
var vE = /* @__PURE__ */ function(a) {
|
|
19666
|
+
var vE = /* @__PURE__ */ (function(a) {
|
|
19661
19667
|
JA(t, a);
|
|
19662
19668
|
var e = sE(t);
|
|
19663
19669
|
function t(s) {
|
|
@@ -19885,7 +19891,7 @@ var vE = /* @__PURE__ */ function(a) {
|
|
|
19885
19891
|
return dy(i.slice(n[0], n[1]));
|
|
19886
19892
|
}
|
|
19887
19893
|
}]), t;
|
|
19888
|
-
}(Ki.Material);
|
|
19894
|
+
})(Ki.Material);
|
|
19889
19895
|
const _E = ["args"], oz = /* @__PURE__ */ _e({
|
|
19890
19896
|
__name: "index",
|
|
19891
19897
|
props: {
|
|
@@ -25505,8 +25511,8 @@ class Rt {
|
|
|
25505
25511
|
* @return {Matrix4} A reference to this matrix.
|
|
25506
25512
|
*/
|
|
25507
25513
|
multiplyMatrices(e, t) {
|
|
25508
|
-
const s = e.elements, i = t.elements, n = this.elements, r = s[0], o = s[4], l = s[8], c = s[12], u = s[1], h = s[5], f = s[9], d = s[13], p = s[2], m = s[6], g = s[10], y = s[14], x = s[3], v = s[7], w = s[11], A = s[15], b = i[0], M = i[4], _ = i[8], T = i[12], S = i[1], E = i[5], C = i[9], B = i[13], D = i[2],
|
|
25509
|
-
return n[0] = r * b + o * S + l * D + c * te, n[4] = r * M + o * E + l *
|
|
25514
|
+
const s = e.elements, i = t.elements, n = this.elements, r = s[0], o = s[4], l = s[8], c = s[12], u = s[1], h = s[5], f = s[9], d = s[13], p = s[2], m = s[6], g = s[10], y = s[14], x = s[3], v = s[7], w = s[11], A = s[15], b = i[0], M = i[4], _ = i[8], T = i[12], S = i[1], E = i[5], C = i[9], B = i[13], D = i[2], G = i[6], O = i[10], ce = i[14], te = i[3], H = i[7], ie = i[11], ue = i[15];
|
|
25515
|
+
return n[0] = r * b + o * S + l * D + c * te, n[4] = r * M + o * E + l * G + c * H, n[8] = r * _ + o * C + l * O + c * ie, n[12] = r * T + o * B + l * ce + c * ue, n[1] = u * b + h * S + f * D + d * te, n[5] = u * M + h * E + f * G + d * H, n[9] = u * _ + h * C + f * O + d * ie, n[13] = u * T + h * B + f * ce + d * ue, n[2] = p * b + m * S + g * D + y * te, n[6] = p * M + m * E + g * G + y * H, n[10] = p * _ + m * C + g * O + y * ie, n[14] = p * T + m * B + g * ce + y * ue, n[3] = x * b + v * S + w * D + A * te, n[7] = x * M + v * E + w * G + A * H, n[11] = x * _ + v * C + w * O + A * ie, n[15] = x * T + v * B + w * ce + A * ue, this;
|
|
25510
25516
|
}
|
|
25511
25517
|
/**
|
|
25512
25518
|
* Multiplies every component of the matrix by the given scalar.
|
|
@@ -29090,19 +29096,19 @@ class jl extends Vn {
|
|
|
29090
29096
|
let f = 0, d = 0;
|
|
29091
29097
|
p("z", "y", "x", -1, -1, s, t, e, r, n, 0), p("z", "y", "x", 1, -1, s, t, -e, r, n, 1), p("x", "z", "y", 1, 1, e, s, t, i, r, 2), p("x", "z", "y", 1, -1, e, s, -t, i, r, 3), p("x", "y", "z", 1, -1, e, t, s, i, n, 4), p("x", "y", "z", -1, -1, e, t, -s, i, n, 5), this.setIndex(l), this.setAttribute("position", new As(c, 3)), this.setAttribute("normal", new As(u, 3)), this.setAttribute("uv", new As(h, 2));
|
|
29092
29098
|
function p(m, g, y, x, v, w, A, b, M, _, T) {
|
|
29093
|
-
const S = w / M, E = A / _, C = w / 2, B = A / 2, D = b / 2,
|
|
29099
|
+
const S = w / M, E = A / _, C = w / 2, B = A / 2, D = b / 2, G = M + 1, O = _ + 1;
|
|
29094
29100
|
let ce = 0, te = 0;
|
|
29095
|
-
const
|
|
29101
|
+
const H = new Y();
|
|
29096
29102
|
for (let ie = 0; ie < O; ie++) {
|
|
29097
29103
|
const ue = ie * E - B;
|
|
29098
|
-
for (let ge = 0; ge <
|
|
29104
|
+
for (let ge = 0; ge < G; ge++) {
|
|
29099
29105
|
const we = ge * S - C;
|
|
29100
|
-
|
|
29106
|
+
H[m] = we * x, H[g] = ue * v, H[y] = D, c.push(H.x, H.y, H.z), H[m] = 0, H[g] = 0, H[y] = b > 0 ? 1 : -1, u.push(H.x, H.y, H.z), h.push(ge / M), h.push(1 - ie / _), ce += 1;
|
|
29101
29107
|
}
|
|
29102
29108
|
}
|
|
29103
29109
|
for (let ie = 0; ie < _; ie++)
|
|
29104
29110
|
for (let ue = 0; ue < M; ue++) {
|
|
29105
|
-
const ge = f + ue +
|
|
29111
|
+
const ge = f + ue + G * ie, we = f + ue + G * (ie + 1), W = f + (ue + 1) + G * (ie + 1), $ = f + (ue + 1) + G * ie;
|
|
29106
29112
|
l.push(ge, we, $), l.push(we, W, $), te += 6;
|
|
29107
29113
|
}
|
|
29108
29114
|
o.addGroup(d, te, T), d += te, f += ce;
|
|
@@ -30791,8 +30797,8 @@ class hm extends Vn {
|
|
|
30791
30797
|
for (let _ = 0; _ <= n; _++) {
|
|
30792
30798
|
const T = [], S = _ / n, E = S * (t - e) + e;
|
|
30793
30799
|
for (let C = 0; C <= i; C++) {
|
|
30794
|
-
const B = C / i, D = B * l + o,
|
|
30795
|
-
A.x = E *
|
|
30800
|
+
const B = C / i, D = B * l + o, G = Math.sin(D), O = Math.cos(D);
|
|
30801
|
+
A.x = E * G, A.y = -S * s + g, A.z = E * O, h.push(A.x, A.y, A.z), w.set(G, M, O).normalize(), f.push(w.x, w.y, w.z), d.push(B, 1 - S), T.push(p++);
|
|
30796
30802
|
}
|
|
30797
30803
|
m.push(T);
|
|
30798
30804
|
}
|
|
@@ -30811,8 +30817,8 @@ class hm extends Vn {
|
|
|
30811
30817
|
h.push(0, g * S, 0), f.push(0, S, 0), d.push(0.5, 0.5), p++;
|
|
30812
30818
|
const E = p;
|
|
30813
30819
|
for (let C = 0; C <= i; C++) {
|
|
30814
|
-
const D = C / i * l + o,
|
|
30815
|
-
M.x = T * O, M.y = g * S, M.z = T *
|
|
30820
|
+
const D = C / i * l + o, G = Math.cos(D), O = Math.sin(D);
|
|
30821
|
+
M.x = T * O, M.y = g * S, M.z = T * G, h.push(M.x, M.y, M.z), f.push(0, S, 0), b.x = G * 0.5 + 0.5, b.y = O * 0.5 * S + 0.5, d.push(b.x, b.y), p++;
|
|
30816
30822
|
}
|
|
30817
30823
|
for (let C = 0; C < i; C++) {
|
|
30818
30824
|
const B = A + C, D = E + C;
|
|
@@ -39143,7 +39149,7 @@ function P0(a) {
|
|
|
39143
39149
|
const I0 = /* @__PURE__ */ new WeakMap();
|
|
39144
39150
|
function ZB(a) {
|
|
39145
39151
|
const e = Math.log2(a) - 2, t = 1 / a;
|
|
39146
|
-
return { texelWidth: 1 / (3 * Math.max(Math.pow(2, e),
|
|
39152
|
+
return { texelWidth: 1 / (3 * Math.max(Math.pow(2, e), 112)), texelHeight: t, maxMip: e };
|
|
39147
39153
|
}
|
|
39148
39154
|
function QB(a, e, t) {
|
|
39149
39155
|
const s = JB(e);
|
|
@@ -50509,8 +50515,8 @@ class f3 {
|
|
|
50509
50515
|
o.pixelStorei(o.UNPACK_ROW_LENGTH, M.width), o.pixelStorei(o.UNPACK_IMAGE_HEIGHT, M.height), o.pixelStorei(o.UNPACK_SKIP_PIXELS, y), o.pixelStorei(o.UNPACK_SKIP_ROWS, x), o.pixelStorei(o.UNPACK_SKIP_IMAGES, v);
|
|
50510
50516
|
const B = t.isDataArrayTexture || t.isData3DTexture || t.isArrayTexture;
|
|
50511
50517
|
if (e.isRenderTargetTexture || e.isDepthTexture) {
|
|
50512
|
-
const D = l.get(e),
|
|
50513
|
-
c.bindFramebuffer(o.READ_FRAMEBUFFER, te), c.bindFramebuffer(o.DRAW_FRAMEBUFFER,
|
|
50518
|
+
const D = l.get(e), G = l.get(t), O = l.get(D.renderTarget), ce = l.get(G.renderTarget), te = O.framebuffers[D.cacheKey], H = ce.framebuffers[G.cacheKey];
|
|
50519
|
+
c.bindFramebuffer(o.READ_FRAMEBUFFER, te), c.bindFramebuffer(o.DRAW_FRAMEBUFFER, H);
|
|
50514
50520
|
let ie = o.COLOR_BUFFER_BIT;
|
|
50515
50521
|
e.isDepthTexture && (ie = o.DEPTH_BUFFER_BIT), o.blitFramebuffer(y, x, p, m, w, A, p, m, ie, o.NEAREST), c.bindFramebuffer(o.READ_FRAMEBUFFER, null), c.bindFramebuffer(o.DRAW_FRAMEBUFFER, null);
|
|
50516
50522
|
} else
|
|
@@ -51289,30 +51295,30 @@ class a1 extends aT {
|
|
|
51289
51295
|
const _ = this.get(e.camera), T = e.camera.cameras, S = e.getBindingGroup("cameraIndex").bindings[0];
|
|
51290
51296
|
if (_.indexesGPU === void 0 || _.indexesGPU.length !== T.length) {
|
|
51291
51297
|
const O = new Uint32Array([0, 0, 0, 0]), ce = [];
|
|
51292
|
-
for (let te = 0,
|
|
51298
|
+
for (let te = 0, H = T.length; te < H; te++) {
|
|
51293
51299
|
const ie = l.createBuffer();
|
|
51294
51300
|
O[0] = te, l.bindBuffer(l.UNIFORM_BUFFER, ie), l.bufferData(l.UNIFORM_BUFFER, O, l.STATIC_DRAW), ce.push(ie);
|
|
51295
51301
|
}
|
|
51296
51302
|
_.indexesGPU = ce;
|
|
51297
51303
|
}
|
|
51298
|
-
const E = this.get(S), C = this.renderer.getPixelRatio(), B = this._currentContext.renderTarget, D = this._isRenderCameraDepthArray(this._currentContext),
|
|
51304
|
+
const E = this.get(S), C = this.renderer.getPixelRatio(), B = this._currentContext.renderTarget, D = this._isRenderCameraDepthArray(this._currentContext), G = this._currentContext.activeCubeFace;
|
|
51299
51305
|
if (D) {
|
|
51300
51306
|
const O = this.get(B.depthTexture);
|
|
51301
51307
|
if (O.clearedRenderId !== this.renderer._nodes.nodeFrame.renderId) {
|
|
51302
51308
|
O.clearedRenderId = this.renderer._nodes.nodeFrame.renderId;
|
|
51303
51309
|
const { stencilBuffer: ce } = B;
|
|
51304
|
-
for (let te = 0,
|
|
51310
|
+
for (let te = 0, H = T.length; te < H; te++)
|
|
51305
51311
|
this.renderer._activeCubeFace = te, this._currentContext.activeCubeFace = te, this._setFramebuffer(this._currentContext), this.clear(!1, !0, ce, this._currentContext, !1, !1);
|
|
51306
|
-
this.renderer._activeCubeFace =
|
|
51312
|
+
this.renderer._activeCubeFace = G, this._currentContext.activeCubeFace = G;
|
|
51307
51313
|
}
|
|
51308
51314
|
}
|
|
51309
51315
|
for (let O = 0, ce = T.length; O < ce; O++) {
|
|
51310
51316
|
const te = T[O];
|
|
51311
51317
|
if (t.layers.test(te.layers)) {
|
|
51312
51318
|
D && (this.renderer._activeCubeFace = O, this._currentContext.activeCubeFace = O, this._setFramebuffer(this._currentContext));
|
|
51313
|
-
const
|
|
51314
|
-
if (
|
|
51315
|
-
const ie =
|
|
51319
|
+
const H = te.viewport;
|
|
51320
|
+
if (H !== void 0) {
|
|
51321
|
+
const ie = H.x * C, ue = H.y * C, ge = H.width * C, we = H.height * C;
|
|
51316
51322
|
c.viewport(
|
|
51317
51323
|
Math.floor(ie),
|
|
51318
51324
|
Math.floor(e.context.height - we - ue),
|
|
@@ -51322,7 +51328,7 @@ class a1 extends aT {
|
|
|
51322
51328
|
}
|
|
51323
51329
|
c.bindBufferBase(l.UNIFORM_BUFFER, E.index, _.indexesGPU[O]), M();
|
|
51324
51330
|
}
|
|
51325
|
-
this._currentContext.activeCubeFace =
|
|
51331
|
+
this._currentContext.activeCubeFace = G, this.renderer._activeCubeFace = G;
|
|
51326
51332
|
}
|
|
51327
51333
|
} else
|
|
51328
51334
|
M();
|
|
@@ -55153,9 +55159,9 @@ class V3 {
|
|
|
55153
55159
|
if (e.context.textures !== null) {
|
|
55154
55160
|
const B = e.context.textures;
|
|
55155
55161
|
for (let D = 0; D < B.length; D++) {
|
|
55156
|
-
const
|
|
55162
|
+
const G = h.getTextureFormatGPU(B[D]);
|
|
55157
55163
|
x.push({
|
|
55158
|
-
format:
|
|
55164
|
+
format: G,
|
|
55159
55165
|
blend: m,
|
|
55160
55166
|
writeMask: y
|
|
55161
55167
|
});
|
|
@@ -55185,8 +55191,8 @@ class V3 {
|
|
|
55185
55191
|
f.pipeline = u.createRenderPipeline(T);
|
|
55186
55192
|
else {
|
|
55187
55193
|
const B = new Promise((D) => {
|
|
55188
|
-
u.createRenderPipelineAsync(T).then((
|
|
55189
|
-
f.pipeline =
|
|
55194
|
+
u.createRenderPipelineAsync(T).then((G) => {
|
|
55195
|
+
f.pipeline = G, D();
|
|
55190
55196
|
});
|
|
55191
55197
|
});
|
|
55192
55198
|
t.push(B);
|
|
@@ -56840,14 +56846,14 @@ const Y3 = ["texture-matrix", "t-sharp", "t-depth", "t-blur", "defines-USE_BLUR"
|
|
|
56840
56846
|
let f;
|
|
56841
56847
|
const d = {
|
|
56842
56848
|
reflectorPlane: new kl(),
|
|
56843
|
-
normal: new
|
|
56844
|
-
reflectorWorldPosition: new
|
|
56845
|
-
cameraWorldPosition: new
|
|
56849
|
+
normal: new V(),
|
|
56850
|
+
reflectorWorldPosition: new V(),
|
|
56851
|
+
cameraWorldPosition: new V(),
|
|
56846
56852
|
rotationMatrix: new Qe(),
|
|
56847
|
-
lookAtPosition: new
|
|
56853
|
+
lookAtPosition: new V(0, 0, -1),
|
|
56848
56854
|
clipPlane: new ls(),
|
|
56849
|
-
view: new
|
|
56850
|
-
target: new
|
|
56855
|
+
view: new V(),
|
|
56856
|
+
target: new V(),
|
|
56851
56857
|
q: new ls(),
|
|
56852
56858
|
virtualCamera: new fi(),
|
|
56853
56859
|
textureMatrix: new Qe()
|
|
@@ -57008,7 +57014,7 @@ const Z3 = ["factor"], dz = /* @__PURE__ */ _e({
|
|
|
57008
57014
|
}), e({ instance: s }), (o, l) => (me(), ve("TresMeshWobbleMaterial", ft({
|
|
57009
57015
|
ref_key: "materialRef",
|
|
57010
57016
|
ref: s,
|
|
57011
|
-
factor:
|
|
57017
|
+
factor: a.factor
|
|
57012
57018
|
}, o.$attrs), null, 16, Z3));
|
|
57013
57019
|
}
|
|
57014
57020
|
}), Of = "opaque_fragment";
|
|
@@ -57113,7 +57119,7 @@ void main() {
|
|
|
57113
57119
|
|
|
57114
57120
|
gl_Position = projectionMatrix * mvPosition;
|
|
57115
57121
|
}`;
|
|
57116
|
-
const Ql = new
|
|
57122
|
+
const Ql = new V(0, 0, 0), Zm = new V(0, 0, 0), tO = new V(0, 0, 0);
|
|
57117
57123
|
function y1(a, e, t) {
|
|
57118
57124
|
const s = Ql.setFromMatrixPosition(a.matrixWorld);
|
|
57119
57125
|
s.project(e);
|
|
@@ -57195,7 +57201,7 @@ const oO = /* @__PURE__ */ ((a) => (e) => hT(e, a))([1, -1, 1, 1, 1, -1, 1, 1, 1
|
|
|
57195
57201
|
sprite: w,
|
|
57196
57202
|
occlude: A,
|
|
57197
57203
|
zIndexRange: b
|
|
57198
|
-
} = rt(s), { renderer: M, scene: _, camera: T, sizes: S } = si(), E = Ce(() => document.createElement(h.value)), C = Fe([0, 0, 0]), B = Fe(0), D = Fe(),
|
|
57204
|
+
} = rt(s), { renderer: M, scene: _, camera: T, sizes: S } = si(), E = Ce(() => document.createElement(h.value)), C = Fe([0, 0, 0]), B = Fe(0), D = Fe(), G = Fe(new Dp()), O = Ce(() => f.value ? {
|
|
57199
57205
|
position: "absolute",
|
|
57200
57206
|
top: 0,
|
|
57201
57207
|
left: 0,
|
|
@@ -57218,7 +57224,7 @@ const oO = /* @__PURE__ */ ((a) => (e) => hT(e, a))([1, -1, 1, 1, 1, -1, 1, 1, 1
|
|
|
57218
57224
|
}), ce = Ce(() => ({
|
|
57219
57225
|
position: "absolute",
|
|
57220
57226
|
pointerEvents: v.value
|
|
57221
|
-
})), te = Fe(null),
|
|
57227
|
+
})), te = Fe(null), H = Fe(!1), ie = Ce(
|
|
57222
57228
|
() => A?.value && A?.value !== "blending" || Array.isArray(A?.value) && A?.value.length && bu(A.value[0])
|
|
57223
57229
|
);
|
|
57224
57230
|
re(
|
|
@@ -57276,7 +57282,7 @@ const oO = /* @__PURE__ */ ((a) => (e) => hT(e, a))([1, -1, 1, 1, 1, -1, 1, 1, 1
|
|
|
57276
57282
|
const I = iO(
|
|
57277
57283
|
o.value,
|
|
57278
57284
|
T.activeCamera.value,
|
|
57279
|
-
|
|
57285
|
+
G.value,
|
|
57280
57286
|
F
|
|
57281
57287
|
);
|
|
57282
57288
|
ue.value = I && !z;
|
|
@@ -57305,26 +57311,26 @@ const oO = /* @__PURE__ */ ((a) => (e) => hT(e, a))([1, -1, 1, 1, 1, -1, 1, 1, 1
|
|
|
57305
57311
|
}
|
|
57306
57312
|
C.value = $, B.value = T.activeCamera.value.zoom;
|
|
57307
57313
|
}
|
|
57308
|
-
if (!ie.value && l.value && !
|
|
57314
|
+
if (!ie.value && l.value && !H.value)
|
|
57309
57315
|
if (f.value) {
|
|
57310
57316
|
if (D.value?.el && D.value?.children) {
|
|
57311
57317
|
const $ = (D.value?.children)[0];
|
|
57312
57318
|
if ($?.clientWidth && $?.clientHeight) {
|
|
57313
57319
|
const { isOrthographicCamera: z } = T.activeCamera.value;
|
|
57314
57320
|
if (z || c)
|
|
57315
|
-
r.scale && (Array.isArray(r.scale) ? r.scale instanceof
|
|
57321
|
+
r.scale && (Array.isArray(r.scale) ? r.scale instanceof V ? l.value.scale.copy(r.scale.clone().divideScalar(1)) : l.value.scale.set(1 / r.scale[0], 1 / r.scale[1], 1 / r.scale[2]) : l.value.scale.setScalar(1 / r.scale));
|
|
57316
57322
|
else {
|
|
57317
57323
|
const F = (g?.value || 10) / 400, N = $.clientWidth * F, R = $.clientHeight * F;
|
|
57318
57324
|
l.value.scale.set(N, R, 1);
|
|
57319
57325
|
}
|
|
57320
|
-
|
|
57326
|
+
H.value = !0;
|
|
57321
57327
|
}
|
|
57322
57328
|
}
|
|
57323
57329
|
} else {
|
|
57324
57330
|
const $ = E.value.children[0];
|
|
57325
57331
|
if ($?.clientWidth && $?.clientHeight) {
|
|
57326
57332
|
const F = $.clientWidth * 1, N = $.clientHeight * 1;
|
|
57327
|
-
l.value.scale.set(F, N, 1),
|
|
57333
|
+
l.value.scale.set(F, N, 1), H.value = !0;
|
|
57328
57334
|
}
|
|
57329
57335
|
te.value.lookAt(T.activeCamera.value?.position);
|
|
57330
57336
|
}
|
|
@@ -57358,7 +57364,7 @@ const oO = /* @__PURE__ */ ((a) => (e) => hT(e, a))([1, -1, 1, 1, 1, -1, 1, 1, 1
|
|
|
57358
57364
|
});
|
|
57359
57365
|
var xu = { exports: {} }, cO = xu.exports, x1;
|
|
57360
57366
|
function uO() {
|
|
57361
|
-
return x1 || (x1 = 1, function(a, e) {
|
|
57367
|
+
return x1 || (x1 = 1, (function(a, e) {
|
|
57362
57368
|
(function(t, s) {
|
|
57363
57369
|
a.exports = s();
|
|
57364
57370
|
})(cO, function() {
|
|
@@ -57399,7 +57405,7 @@ function uO() {
|
|
|
57399
57405
|
} };
|
|
57400
57406
|
}, t;
|
|
57401
57407
|
});
|
|
57402
|
-
}(xu)), xu.exports;
|
|
57408
|
+
})(xu)), xu.exports;
|
|
57403
57409
|
}
|
|
57404
57410
|
var hO = uO();
|
|
57405
57411
|
const dO = /* @__PURE__ */ $l(hO), yz = _e({
|
|
@@ -57785,7 +57791,7 @@ const xO = ["args"], vO = ["color"], Tz = /* @__PURE__ */ _e({
|
|
|
57785
57791
|
d.color = bn(p.color), d.linewidth = p.lineWidth, d.alphaToCoverage = p.alphaToCoverage, d.worldUnits = p.worldUnits, d.vertexColors = Array.isArray(p.vertexColors), d.dashed = p.dashed, d.dashScale = p.dashScale, d.dashSize = p.dashSize, d.dashOffset = p.dashOffset, d.gapSize = p.gapSize, d.needsUpdate = !0;
|
|
57786
57792
|
}
|
|
57787
57793
|
function h(d, p, m) {
|
|
57788
|
-
const g = p.map((x) => x instanceof
|
|
57794
|
+
const g = p.map((x) => x instanceof V ? [x.x, x.y, x.z] : x instanceof Pe ? [x.x, x.y, 0] : Array.isArray(x) && x.length === 2 ? [x[0], x[1], 0] : x).flat();
|
|
57789
57795
|
d.setPositions(g.flat());
|
|
57790
57796
|
const y = s(m, p.length).map((x) => x.toArray()).flat();
|
|
57791
57797
|
d.setColors(y), r.computeLineDistances();
|
|
@@ -57838,7 +57844,7 @@ const xO = ["args"], vO = ["color"], Tz = /* @__PURE__ */ _e({
|
|
|
57838
57844
|
const t = a;
|
|
57839
57845
|
function s(l, c, u, h) {
|
|
57840
57846
|
const f = l.map(
|
|
57841
|
-
(d) => d instanceof
|
|
57847
|
+
(d) => d instanceof V ? d : new V(...d)
|
|
57842
57848
|
);
|
|
57843
57849
|
return new YT(f, c, u, h);
|
|
57844
57850
|
}
|
|
@@ -57919,7 +57925,7 @@ const xO = ["args"], vO = ["color"], Tz = /* @__PURE__ */ _e({
|
|
|
57919
57925
|
},
|
|
57920
57926
|
setup(a, { expose: e }) {
|
|
57921
57927
|
const t = a, s = Ce(() => {
|
|
57922
|
-
const n = t.start instanceof
|
|
57928
|
+
const n = t.start instanceof V ? t.start : new V(...t.start), r = t.end instanceof V ? t.end : new V(...t.end), o = t.mid instanceof V ? t.mid : Array.isArray(t.mid) ? new V(...t.mid) : new V(r.x, n.y, r.z);
|
|
57923
57929
|
return new G1(n, o, r).getPoints(t.segments);
|
|
57924
57930
|
}), i = de();
|
|
57925
57931
|
return e({ instance: i }), (n, r) => (me(), En(Qm, {
|
|
@@ -57939,7 +57945,7 @@ const xO = ["args"], vO = ["color"], Tz = /* @__PURE__ */ _e({
|
|
|
57939
57945
|
},
|
|
57940
57946
|
setup(a, { expose: e }) {
|
|
57941
57947
|
const t = a, s = Ce(() => {
|
|
57942
|
-
const n = t.start instanceof
|
|
57948
|
+
const n = t.start instanceof V ? t.start : new V(...t.start), r = t.end instanceof V ? t.end : new V(...t.end), o = t.midA instanceof V ? t.midA : new V(...t.midA), l = t.midB instanceof V ? t.midB : new V(...t.midB);
|
|
57943
57949
|
return new KT(n, o, l, r).getPoints(t.segments);
|
|
57944
57950
|
}), i = de();
|
|
57945
57951
|
return e({ instance: i }), (n, r) => (me(), En(Qm, {
|
|
@@ -58184,19 +58190,19 @@ const xO = ["args"], vO = ["color"], Tz = /* @__PURE__ */ _e({
|
|
|
58184
58190
|
}
|
|
58185
58191
|
function h(d, p, m, g, y, x, v, w, A, b, M) {
|
|
58186
58192
|
const _ = 2 * Math.PI / b, T = -Math.PI, S = Math.PI / (M - 1), E = -0.5 * Math.PI, C = d.getAttribute("position");
|
|
58187
|
-
let B = 0, D = 0,
|
|
58193
|
+
let B = 0, D = 0, G = E;
|
|
58188
58194
|
for (let O = 0; O < M; O++) {
|
|
58189
58195
|
D = T;
|
|
58190
58196
|
for (let ce = 0; ce < b; ce++) {
|
|
58191
|
-
const te = u(D, p, m, g, y),
|
|
58197
|
+
const te = u(D, p, m, g, y), H = u(G, x, v, w, A);
|
|
58192
58198
|
C.setXYZ(
|
|
58193
58199
|
B,
|
|
58194
|
-
te * i(D) *
|
|
58195
|
-
|
|
58196
|
-
te * n(D) *
|
|
58200
|
+
te * i(D) * H * i(G),
|
|
58201
|
+
H * n(G),
|
|
58202
|
+
te * n(D) * H * i(G)
|
|
58197
58203
|
), B++, D += _;
|
|
58198
58204
|
}
|
|
58199
|
-
|
|
58205
|
+
G += S;
|
|
58200
58206
|
}
|
|
58201
58207
|
C.needsUpdate = !0, d.computeVertexNormals();
|
|
58202
58208
|
}
|
|
@@ -58305,7 +58311,7 @@ const xO = ["args"], vO = ["color"], Tz = /* @__PURE__ */ _e({
|
|
|
58305
58311
|
__name: "Tube",
|
|
58306
58312
|
props: {
|
|
58307
58313
|
args: { default: () => [
|
|
58308
|
-
new G1(new
|
|
58314
|
+
new G1(new V(-1, 0, 0), new V(0, 1, 0), new V(1, 0, 0)),
|
|
58309
58315
|
20,
|
|
58310
58316
|
0.2,
|
|
58311
58317
|
8,
|
|
@@ -58334,7 +58340,7 @@ const xO = ["args"], vO = ["color"], Tz = /* @__PURE__ */ _e({
|
|
|
58334
58340
|
});
|
|
58335
58341
|
class eU extends di {
|
|
58336
58342
|
/** Light position */
|
|
58337
|
-
position = new
|
|
58343
|
+
position = new V(0, 0, 0);
|
|
58338
58344
|
/** Radius of the jiggle, higher values make softer light */
|
|
58339
58345
|
radius = 1;
|
|
58340
58346
|
/** Light intensity */
|
|
@@ -58431,16 +58437,16 @@ const tU = ["count", "radius", "intensity", "ambient", "cast-shadow", "bias", "m
|
|
|
58431
58437
|
return e({ instance: s }), (n, r) => (me(), ve("TresRandomizedLights", {
|
|
58432
58438
|
ref_key: "lightsRef",
|
|
58433
58439
|
ref: s,
|
|
58434
|
-
count:
|
|
58435
|
-
radius:
|
|
58436
|
-
intensity:
|
|
58437
|
-
ambient:
|
|
58438
|
-
"cast-shadow":
|
|
58439
|
-
bias:
|
|
58440
|
-
"map-size":
|
|
58441
|
-
size:
|
|
58442
|
-
near:
|
|
58443
|
-
far:
|
|
58440
|
+
count: a.count,
|
|
58441
|
+
radius: a.radius,
|
|
58442
|
+
intensity: a.intensity,
|
|
58443
|
+
ambient: a.ambient,
|
|
58444
|
+
"cast-shadow": a.castShadow,
|
|
58445
|
+
bias: a.bias,
|
|
58446
|
+
"map-size": a.mapSize,
|
|
58447
|
+
size: a.size,
|
|
58448
|
+
near: a.near,
|
|
58449
|
+
far: a.far,
|
|
58444
58450
|
position: i.value
|
|
58445
58451
|
}, null, 8, tU));
|
|
58446
58452
|
}
|
|
@@ -58614,18 +58620,18 @@ const rU = /* @__PURE__ */ gh(
|
|
|
58614
58620
|
ref_key: "gPlane",
|
|
58615
58621
|
ref: l,
|
|
58616
58622
|
"receive-shadow": !0,
|
|
58617
|
-
scale:
|
|
58623
|
+
scale: a.scale,
|
|
58618
58624
|
rotation: [-Math.PI / 2, 0, 0]
|
|
58619
58625
|
}, [
|
|
58620
58626
|
y[0] || (y[0] = Ee("TresPlaneGeometry", null, null, -1)),
|
|
58621
58627
|
Ee("TresSoftShadowMaterial", {
|
|
58622
|
-
"alpha-test":
|
|
58623
|
-
blend:
|
|
58624
|
-
color:
|
|
58628
|
+
"alpha-test": a.alphaTest,
|
|
58629
|
+
blend: a.colorBlend,
|
|
58630
|
+
color: a.color,
|
|
58625
58631
|
"depth-write": !1,
|
|
58626
58632
|
map: h.value,
|
|
58627
|
-
opacity:
|
|
58628
|
-
"tone-mapped":
|
|
58633
|
+
opacity: a.opacity,
|
|
58634
|
+
"tone-mapped": a.toneMapped,
|
|
58629
58635
|
transparent: !0
|
|
58630
58636
|
}, null, 8, aU)
|
|
58631
58637
|
], 8, oU)
|
|
@@ -58649,7 +58655,7 @@ const rU = /* @__PURE__ */ gh(
|
|
|
58649
58655
|
},
|
|
58650
58656
|
emits: ["update", "change"],
|
|
58651
58657
|
setup(a, { expose: e, emit: t }) {
|
|
58652
|
-
const s = a, i = t, n = de(), r = de(), o = de(), l = new Bs(), c = new
|
|
58658
|
+
const s = a, i = t, n = de(), r = de(), o = de(), l = new Bs(), c = new V(), u = new wa(), h = { width: 0, height: 0, depth: 0, position: new V() };
|
|
58653
58659
|
function f() {
|
|
58654
58660
|
if (!r.value || !o.value || !n.value)
|
|
58655
58661
|
return;
|
|
@@ -58757,7 +58763,7 @@ class pU extends Js {
|
|
|
58757
58763
|
duration = 1;
|
|
58758
58764
|
clip = !0;
|
|
58759
58765
|
_start = {
|
|
58760
|
-
position: new
|
|
58766
|
+
position: new V(),
|
|
58761
58767
|
quaternion: new xt(),
|
|
58762
58768
|
zoom: 1
|
|
58763
58769
|
};
|
|
@@ -58800,7 +58806,7 @@ class pU extends Js {
|
|
|
58800
58806
|
this._controls = e;
|
|
58801
58807
|
const t = () => {
|
|
58802
58808
|
if (e && this._goal.lookAt && this._animationState !== 0) {
|
|
58803
|
-
const s = new
|
|
58809
|
+
const s = new V().setFromMatrixColumn(this.camera.matrix, 2), i = this._start.position.distanceTo(e.target), n = (this._goal.position || this._start.position).distanceTo(this._goal.lookAt), r = (1 - this._t) * i + this._t * n;
|
|
58804
58810
|
e.target.copy(this.camera.position).addScaledVector(s, -r), e.update(), this._stop();
|
|
58805
58811
|
}
|
|
58806
58812
|
this._animationState = 0;
|
|
@@ -58814,18 +58820,18 @@ class pU extends Js {
|
|
|
58814
58820
|
lookAt(e, t, s) {
|
|
58815
58821
|
const i = arguments.length;
|
|
58816
58822
|
let n = this._cachedFitArgs;
|
|
58817
|
-
const r = t ? new
|
|
58823
|
+
const r = t ? new V().fromArray(Jo(t)) : new V(), o = s ? new V().fromArray(Jo(s)) : new V();
|
|
58818
58824
|
if (i === 0)
|
|
58819
58825
|
n = this._cachedFitArgs;
|
|
58820
58826
|
else if (!e && e !== 0)
|
|
58821
58827
|
i === 1 ? n = [null] : i === 2 ? n = [null, r] : i === 3 && (n = [null, r, o]);
|
|
58822
58828
|
else if (typeof e == "number" || e.isVector3 || Array.isArray(e)) {
|
|
58823
|
-
const l = new
|
|
58829
|
+
const l = new V().fromArray(Jo(e));
|
|
58824
58830
|
i === 1 ? n = [l] : i === 2 ? n = [l, r] : i === 3 && (n = [l, r, o]);
|
|
58825
58831
|
} else e.isBox3 ? i === 1 ? n = [e] : n = [e, t] : e.isObject3D && (i === 1 ? n = [e] : n = [e, t]);
|
|
58826
58832
|
if (this._cachedFitArgs = n, this._stop(), zf(this._goal), n.length > 0 && (n[0] === null || n[0] === void 0 || n[0].isVector3)) {
|
|
58827
58833
|
const [l, c, u] = n;
|
|
58828
|
-
this._start.position.copy(this.camera.position), this._start.quaternion.copy(this.camera.quaternion), Xr(this.camera) && (this._start.zoom = this.camera.zoom), c ? this._goal.position = Array.isArray(c) ? new
|
|
58834
|
+
this._start.position.copy(this.camera.position), this._start.quaternion.copy(this.camera.quaternion), Xr(this.camera) && (this._start.zoom = this.camera.zoom), c ? this._goal.position = Array.isArray(c) ? new V(...c) : c.clone() : this._goal.position = this.camera.position, l ? this._goal.lookAt = Array.isArray(l) ? new V(...l) : l.clone() : this._goal.lookAt = new V(0, 0, 1).applyQuaternion(this.camera.quaternion), u && (this._goal.up = Array.isArray(u) ? new V(...u) : u.clone());
|
|
58829
58835
|
const h = new Qe().lookAt(
|
|
58830
58836
|
this._goal.position || this.camera.position,
|
|
58831
58837
|
this._goal.lookAt,
|
|
@@ -58841,14 +58847,14 @@ class pU extends Js {
|
|
|
58841
58847
|
if (this._goal.quaternion = new xt().setFromRotationMatrix(d), Xr(this.camera)) {
|
|
58842
58848
|
let p = 0, m = 0;
|
|
58843
58849
|
const g = [
|
|
58844
|
-
new
|
|
58845
|
-
new
|
|
58846
|
-
new
|
|
58847
|
-
new
|
|
58848
|
-
new
|
|
58849
|
-
new
|
|
58850
|
-
new
|
|
58851
|
-
new
|
|
58850
|
+
new V(h.min.x, h.min.y, h.min.z),
|
|
58851
|
+
new V(h.min.x, h.max.y, h.min.z),
|
|
58852
|
+
new V(h.min.x, h.min.y, h.max.z),
|
|
58853
|
+
new V(h.min.x, h.max.y, h.max.z),
|
|
58854
|
+
new V(h.max.x, h.max.y, h.max.z),
|
|
58855
|
+
new V(h.max.x, h.max.y, h.min.z),
|
|
58856
|
+
new V(h.max.x, h.min.y, h.max.z),
|
|
58857
|
+
new V(h.max.x, h.min.y, h.min.z)
|
|
58852
58858
|
], y = this._goal, x = y.position || this.camera.position, v = y.lookAt || this._controls?.target, w = y.up || this.camera.up, A = v ? new Qe().lookAt(x, v, w).setPosition(x).invert() : this.camera.matrixWorldInverse;
|
|
58853
58859
|
for (const _ of g)
|
|
58854
58860
|
_.applyMatrix4(A), p = Math.max(p, Math.abs(_.y)), m = Math.max(m, Math.abs(_.x));
|
|
@@ -58877,9 +58883,9 @@ function mU(a, e, t = 0) {
|
|
|
58877
58883
|
const s = new Bs();
|
|
58878
58884
|
if (dU(a) ? s.copy(a) : (a.updateWorldMatrix(!0, !0), s.setFromObject(a)), s.isEmpty()) {
|
|
58879
58885
|
const u = e.position.length() || 10;
|
|
58880
|
-
s.setFromCenterAndSize(new
|
|
58886
|
+
s.setFromCenterAndSize(new V(), new V(u, u, u));
|
|
58881
58887
|
}
|
|
58882
|
-
const i = s.getSize(new
|
|
58888
|
+
const i = s.getSize(new V()), n = s.getCenter(new V()), r = Math.max(i.x, i.y, i.z), o = Xr(e) ? r * 4 : r / (2 * Math.atan(Math.PI * e.fov / 360)), l = Xr(e) ? r * 4 : o / e.aspect, c = (1 + t) * Math.max(o, l);
|
|
58883
58889
|
return { box: s, size: i, center: n, distance: c };
|
|
58884
58890
|
}
|
|
58885
58891
|
function zf(a) {
|
|
@@ -58920,8 +58926,8 @@ const gU = ["object", "duration", "offset"], yU = /* @__PURE__ */ _e({
|
|
|
58920
58926
|
s.useMounted && d();
|
|
58921
58927
|
}), kt(() => u.dispose()), e({ instance: u }), (p, m) => (me(), ve("primitive", {
|
|
58922
58928
|
object: k(u),
|
|
58923
|
-
duration:
|
|
58924
|
-
offset:
|
|
58929
|
+
duration: a.duration,
|
|
58930
|
+
offset: a.offset
|
|
58925
58931
|
}, [
|
|
58926
58932
|
Ze(p.$slots, "default")
|
|
58927
58933
|
], 8, gU));
|
|
@@ -59036,7 +59042,7 @@ const gU = ["object", "duration", "offset"], yU = /* @__PURE__ */ _e({
|
|
|
59036
59042
|
}), Vz = /* @__PURE__ */ _e({
|
|
59037
59043
|
__name: "Fit",
|
|
59038
59044
|
props: {
|
|
59039
|
-
into: { default: () => new Bs(new
|
|
59045
|
+
into: { default: () => new Bs(new V(-0.5, -0.5, -0.5), new V(0.5, 0.5, 0.5)) },
|
|
59040
59046
|
precise: { type: Boolean, default: !1 }
|
|
59041
59047
|
},
|
|
59042
59048
|
setup(a, { expose: e }) {
|
|
@@ -59046,23 +59052,23 @@ const gU = ["object", "duration", "offset"], yU = /* @__PURE__ */ _e({
|
|
|
59046
59052
|
return;
|
|
59047
59053
|
const { box3: h, use: f } = o(c, u), d = new Bs();
|
|
59048
59054
|
n.value.children.forEach((x) => d.expandByObject(x, u));
|
|
59049
|
-
const p = d.getSize(new
|
|
59055
|
+
const p = d.getSize(new V()), m = h.getSize(new V()), g = Math.min(
|
|
59050
59056
|
m.x / p.x,
|
|
59051
59057
|
m.y / p.y,
|
|
59052
59058
|
m.z / p.z
|
|
59053
59059
|
);
|
|
59054
59060
|
n.value.scale.setScalar(g === Number.POSITIVE_INFINITY ? 1 : g), n.value.updateMatrixWorld();
|
|
59055
|
-
const y = i.value.worldToLocal(d.getCenter(new
|
|
59061
|
+
const y = i.value.worldToLocal(d.getCenter(new V()));
|
|
59056
59062
|
if (f.position) {
|
|
59057
|
-
const x = i.value.worldToLocal(h.getCenter(new
|
|
59063
|
+
const x = i.value.worldToLocal(h.getCenter(new V()));
|
|
59058
59064
|
i.value.position.copy(x.sub(y.multiplyScalar(g)));
|
|
59059
59065
|
} else
|
|
59060
59066
|
i.value.position.copy(y.sub(y.multiplyScalar(g)));
|
|
59061
59067
|
s();
|
|
59062
59068
|
}
|
|
59063
59069
|
function o(c, u) {
|
|
59064
|
-
return typeof c == "number" ? c = new
|
|
59065
|
-
box3: new Bs(new
|
|
59070
|
+
return typeof c == "number" ? c = new V(c, c, c) : Array.isArray(c) && (c = new V(...c)), c && "isVector3" in c && c.isVector3 ? { box3: new Bs(new V(0, 0, 0), c), use: { position: !1 } } : c && "isBox3" in c && c.isBox3 ? { box3: c, use: { position: !0 } } : c && "isObject3D" in c && c.isObject3D ? { box3: new Bs().setFromObject(c, u ?? !1), use: { position: !0 } } : {
|
|
59071
|
+
box3: new Bs(new V(-0.5, -0.5, -0.5), new V(0.5, 0.5, 0.5)),
|
|
59066
59072
|
use: { position: !0 }
|
|
59067
59073
|
};
|
|
59068
59074
|
}
|
|
@@ -59074,7 +59080,7 @@ const gU = ["object", "duration", "offset"], yU = /* @__PURE__ */ _e({
|
|
|
59074
59080
|
const l = de();
|
|
59075
59081
|
return e({
|
|
59076
59082
|
instance: l,
|
|
59077
|
-
fit: (c = new Bs(new
|
|
59083
|
+
fit: (c = new Bs(new V(-0.5, -0.5, -0.5), new V(0.5, 0.5, 0.5)), u = !1) => {
|
|
59078
59084
|
r(c, u);
|
|
59079
59085
|
},
|
|
59080
59086
|
update: () => r(t.into, t.precise)
|
|
@@ -59126,8 +59132,8 @@ const gU = ["object", "duration", "offset"], yU = /* @__PURE__ */ _e({
|
|
|
59126
59132
|
sectionColor: new Be(),
|
|
59127
59133
|
infiniteGrid: !1,
|
|
59128
59134
|
followCamera: !1,
|
|
59129
|
-
worldCamProjPosition: new
|
|
59130
|
-
worldPlanePosition: new
|
|
59135
|
+
worldCamProjPosition: new V(),
|
|
59136
|
+
worldPlanePosition: new V()
|
|
59131
59137
|
},
|
|
59132
59138
|
/* glsl */
|
|
59133
59139
|
`
|
|
@@ -59195,7 +59201,7 @@ const gU = ["object", "duration", "offset"], yU = /* @__PURE__ */ _e({
|
|
|
59195
59201
|
`
|
|
59196
59202
|
);
|
|
59197
59203
|
Vl({ GridMaterial: t });
|
|
59198
|
-
const s = de(new Ae()), i = new kl(), n = new
|
|
59204
|
+
const s = de(new Ae()), i = new kl(), n = new V(0, 1, 0), r = new V(0, 0, 0), { onBeforeRender: o } = ot();
|
|
59199
59205
|
return o((l) => {
|
|
59200
59206
|
if (!l.camera)
|
|
59201
59207
|
return;
|
|
@@ -59234,7 +59240,7 @@ const gU = ["object", "duration", "offset"], yU = /* @__PURE__ */ _e({
|
|
|
59234
59240
|
textureWidth: { default: 512 },
|
|
59235
59241
|
textureHeight: { default: 512 },
|
|
59236
59242
|
waterNormals: { default: "https://raw.githubusercontent.com/Tresjs/assets/main/textures/water-normals/Water_1_M_Normal.jpg" },
|
|
59237
|
-
sunDirection: { default: () => new
|
|
59243
|
+
sunDirection: { default: () => new V() },
|
|
59238
59244
|
sunColor: { default: 16777215 },
|
|
59239
59245
|
waterColor: { default: 7695 },
|
|
59240
59246
|
distortionScale: { default: 3.7 },
|
|
@@ -59334,7 +59340,7 @@ const gU = ["object", "duration", "offset"], yU = /* @__PURE__ */ _e({
|
|
|
59334
59340
|
for (let T = 0; T < d.value * 2; T += 2)
|
|
59335
59341
|
x[T] = (Math.random() - 0.5) / 5 * p.value * m.value, x[T + 1] = Math.random() / 5 * p.value;
|
|
59336
59342
|
};
|
|
59337
|
-
w(), v(),
|
|
59343
|
+
w(), v(), re(p, () => {
|
|
59338
59344
|
w();
|
|
59339
59345
|
}), Pt(() => {
|
|
59340
59346
|
p.value || v();
|
|
@@ -59423,7 +59429,7 @@ const gU = ["object", "duration", "offset"], yU = /* @__PURE__ */ _e({
|
|
|
59423
59429
|
transparent: "",
|
|
59424
59430
|
opacity: t.opacity,
|
|
59425
59431
|
fog: t.fog,
|
|
59426
|
-
"depth-write":
|
|
59432
|
+
"depth-write": a.depthWrite,
|
|
59427
59433
|
side: k(tn),
|
|
59428
59434
|
map: k(n)
|
|
59429
59435
|
}, null, 8, AU)
|
|
@@ -59450,7 +59456,7 @@ const gU = ["object", "duration", "offset"], yU = /* @__PURE__ */ _e({
|
|
|
59450
59456
|
);
|
|
59451
59457
|
function r(o, l) {
|
|
59452
59458
|
const c = vt.degToRad(90 - l), u = vt.degToRad(o);
|
|
59453
|
-
return new
|
|
59459
|
+
return new V().setFromSphericalCoords(1, c, u);
|
|
59454
59460
|
}
|
|
59455
59461
|
return e({
|
|
59456
59462
|
instance: i,
|
|
@@ -60076,7 +60082,7 @@ const qU = ["object"], Kz = /* @__PURE__ */ _e({
|
|
|
60076
60082
|
} else
|
|
60077
60083
|
c.uniforms.uMap.value = i.map.value;
|
|
60078
60084
|
});
|
|
60079
|
-
const p = new xt(), m = new
|
|
60085
|
+
const p = new xt(), m = new V();
|
|
60080
60086
|
ot().onBeforeRender(({
|
|
60081
60087
|
elapsed: x
|
|
60082
60088
|
/* invalidate */
|
|
@@ -60147,26 +60153,26 @@ const qU = ["object"], Kz = /* @__PURE__ */ _e({
|
|
|
60147
60153
|
}, [
|
|
60148
60154
|
t.lighting ? (me(), ve("TresGroup", XU, [
|
|
60149
60155
|
Ee("TresAmbientLight", {
|
|
60150
|
-
intensity:
|
|
60156
|
+
intensity: a.intensity / 3
|
|
60151
60157
|
}, null, 8, YU),
|
|
60152
60158
|
Ee("TresSpotLight", {
|
|
60153
60159
|
penumbra: 1,
|
|
60154
60160
|
position: f.value,
|
|
60155
|
-
intensity:
|
|
60156
|
-
castShadow: !!
|
|
60157
|
-
"shadow-bias":
|
|
60158
|
-
"shadow-normalBias":
|
|
60159
|
-
"shadow-mapSize":
|
|
60161
|
+
intensity: a.intensity * 2,
|
|
60162
|
+
castShadow: !!a.shadows,
|
|
60163
|
+
"shadow-bias": a.shadows?.bias ?? 0,
|
|
60164
|
+
"shadow-normalBias": a.shadows?.normalBias ?? 0,
|
|
60165
|
+
"shadow-mapSize": a.shadows?.size ?? 1024
|
|
60160
60166
|
}, null, 8, KU),
|
|
60161
60167
|
Ee("TresPointLight", {
|
|
60162
60168
|
position: d.value,
|
|
60163
|
-
intensity:
|
|
60169
|
+
intensity: a.intensity
|
|
60164
60170
|
}, null, 8, ZU)
|
|
60165
60171
|
])) : ms("", !0),
|
|
60166
60172
|
An(k(yU), ft({
|
|
60167
60173
|
ref_key: "boundsRef",
|
|
60168
60174
|
ref: o,
|
|
60169
|
-
clip: !!
|
|
60175
|
+
clip: !!a.adjustCamera,
|
|
60170
60176
|
offset: typeof t.adjustCamera == "boolean" ? 0.3 : t.adjustCamera,
|
|
60171
60177
|
"use-mounted": "",
|
|
60172
60178
|
"use-resize": ""
|
|
@@ -60175,7 +60181,7 @@ const qU = ["object"], Kz = /* @__PURE__ */ _e({
|
|
|
60175
60181
|
An(k(cU), ft({
|
|
60176
60182
|
ref_key: "alignRef",
|
|
60177
60183
|
ref: l
|
|
60178
|
-
},
|
|
60184
|
+
}, a.align, { onChange: y }), {
|
|
60179
60185
|
default: ac(() => [
|
|
60180
60186
|
Ze(x.$slots, "default")
|
|
60181
60187
|
]),
|
|
@@ -60185,7 +60191,7 @@ const qU = ["object"], Kz = /* @__PURE__ */ _e({
|
|
|
60185
60191
|
_: 3
|
|
60186
60192
|
}, 16, ["clip", "offset"]),
|
|
60187
60193
|
Ee("TresGroup", {
|
|
60188
|
-
position: [0, -n.value / 2 - (
|
|
60194
|
+
position: [0, -n.value / 2 - (a.shadows?.offset ?? 0) / 2, 0]
|
|
60189
60195
|
}, [
|
|
60190
60196
|
p.value ? (me(), En(k(vU), ft({
|
|
60191
60197
|
key: 0,
|
|
@@ -60247,7 +60253,7 @@ const qU = ["object"], Kz = /* @__PURE__ */ _e({
|
|
|
60247
60253
|
const y = Ce(() => r.value / o.value), x = [], v = Array.from(
|
|
60248
60254
|
{ length: o.value },
|
|
60249
60255
|
() => (0.5 + 0.5 * Math.random()) * 4
|
|
60250
|
-
), w = (A) => new
|
|
60256
|
+
), w = (A) => new V().setFromSpherical(new Tu(A, Math.acos(1 - Math.random() * 2), Math.random() * 2 * Math.PI)).toArray();
|
|
60251
60257
|
for (let A = 0; A < o.value; A++)
|
|
60252
60258
|
g -= y.value * Math.random(), x.push(...w(g));
|
|
60253
60259
|
s.value = new Float32Array(x), i.value = new Float32Array(v);
|
|
@@ -60386,17 +60392,17 @@ const tk = /* @__PURE__ */ _e({
|
|
|
60386
60392
|
ref_key: "mesh",
|
|
60387
60393
|
ref: i
|
|
60388
60394
|
}, [
|
|
60389
|
-
|
|
60395
|
+
a.form === "circle" ? (me(), ve("TresRingGeometry", sk)) : a.form === "ring" ? (me(), ve("TresRingGeometry", ik)) : a.form === "rect" ? (me(), ve("TresPlaneGeometry", nk)) : (me(), En(t.form, {
|
|
60390
60396
|
key: 3,
|
|
60391
|
-
args:
|
|
60397
|
+
args: a.args
|
|
60392
60398
|
}, null, 8, ["args"])),
|
|
60393
60399
|
Ee("TresMeshBasicMaterial", {
|
|
60394
60400
|
ref_key: "material",
|
|
60395
60401
|
ref: s,
|
|
60396
|
-
"tone-mapped":
|
|
60397
|
-
map:
|
|
60402
|
+
"tone-mapped": a.toneMapped,
|
|
60403
|
+
map: a.map,
|
|
60398
60404
|
side: k(tn),
|
|
60399
|
-
color:
|
|
60405
|
+
color: a.color
|
|
60400
60406
|
}, null, 8, rk)
|
|
60401
60407
|
], 512));
|
|
60402
60408
|
}
|
|
@@ -60413,7 +60419,7 @@ function t4(a, e) {
|
|
|
60413
60419
|
}
|
|
60414
60420
|
function s4(a) {
|
|
60415
60421
|
let e = a.value;
|
|
60416
|
-
return a.value && a.value?.value?.isMesh && (e = a.value.value.position), Array.isArray(a.value) && (e = new
|
|
60422
|
+
return a.value && a.value?.value?.isMesh && (e = a.value.value.position), Array.isArray(a.value) && (e = new V(...e)), e;
|
|
60417
60423
|
}
|
|
60418
60424
|
export {
|
|
60419
60425
|
lU as AccumulativeShadows,
|