@tresjs/cientos 4.1.0 → 4.2.0
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,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @tresjs/cientos
|
|
3
|
-
* version: v4.
|
|
3
|
+
* version: v4.2.0
|
|
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/)
|
|
@@ -9,9 +9,9 @@ var bl = Object.defineProperty;
|
|
|
9
9
|
var El = (a, e, t) => e in a ? bl(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
|
|
10
10
|
var de = (a, e, t) => El(a, typeof e != "symbol" ? e + "" : e, t);
|
|
11
11
|
import * as Jn from "three";
|
|
12
|
-
import { TextureLoader as ai, DoubleSide as
|
|
13
|
-
import { defineComponent as ue, watch as J, ref as ge, shallowRef as re, withAsyncContext as Tn, onUnmounted as tt, openBlock as ae, createElementBlock as ce, createElementVNode as ye, unref as F, renderSlot as Ne, getCurrentScope as hc, onScopeDispose as fc, onMounted as bn, nextTick as Po, isRef as ii, getCurrentInstance as Ma, computed as Pe, reactive as ts, watchEffect as et, toValue as ze, isReactive as fo, createVNode as ms, mergeProps as $e, toRefs as Le, shallowReactive as Sa, onBeforeUnmount as Ro, useSlots as Co, createCommentVNode as
|
|
14
|
-
import { useLogger as _t, useLoader as Nn, useTresContext as xe, useLoop as Ve, normalizeVectorFlexibleParam as Ra, useTres as xn, extend as Ca, useTexture as Bn, normalizeColor as
|
|
12
|
+
import { TextureLoader as ai, DoubleSide as on, WebGLCubeRenderTarget as oa, HalfFloatType as Dt, CubeCamera as ra, Group as $t, Quaternion as je, Euler as tn, AudioListener as aa, Audio as Ml, AudioLoader as la, MathUtils as Ye, ShaderMaterial as Tt, UniformsUtils as Dn, Color as be, Vector2 as ve, FrontSide as ss, REVISION as Ts, Vector3 as $, BufferAttribute as ut, TrianglesDrawMode as Sl, TriangleFanDrawMode as io, TriangleStripDrawMode as ca, CompressedTexture as mi, Texture as es, RGBAFormat as ei, PropertyBinding as rn, InterpolateDiscrete as ua, Matrix4 as Ie, Scene as xs, PlaneGeometry as Ht, Uniform as Se, Mesh as pe, PerspectiveCamera as Lt, WebGLRenderer as Al, InterpolateLinear as bo, NearestFilter as Kn, NearestMipmapNearestFilter as ha, NearestMipmapLinearFilter as fa, LinearFilter as xt, LinearMipmapNearestFilter as da, LinearMipmapLinearFilter as Eo, ClampToEdgeWrapping as Yt, RepeatWrapping as Ln, MirroredRepeatWrapping as pa, Plane as bs, Vector4 as at, WebGLRenderTarget as Wt, NoToneMapping as Pl, BufferGeometry as ht, InterleavedBuffer as Mo, InterleavedBufferAttribute as nn, MeshBasicMaterial as Xt, DataTexture as ti, RawShaderMaterial as gi, AdditiveBlending as So, Box2 as ma, UniformsLib as ni, BackSide as li, BoxGeometry as Gt, Triangle as Rl, Object3D as Pt, Raycaster as ga, LineBasicMaterial as ws, CylinderGeometry as Rt, Float32BufferAttribute as gt, Line as ke, OctahedronGeometry as Mn, TorusGeometry as Ds, SphereGeometry as Cl, EventDispatcher as va, Ray as Il, MOUSE as Ot, TOUCH as jt, OrthographicCamera as _n, Spherical as si, Loader as Un, LoaderUtils as qn, FileLoader as kn, SpotLight as ya, PointLight as oo, DirectionalLight as _a, MeshPhysicalMaterial as Zt, InstancedMesh as xa, InstancedBufferAttribute as Ol, ImageBitmapLoader as Dl, PointsMaterial as Ll, Material as vi, MeshStandardMaterial as Es, SkinnedMesh as Ao, LineSegments as kl, LineLoop as Nl, Points as wa, Skeleton as Ta, AnimationClip as ba, Bone as ro, VectorKeyframeTrack as ao, NumberKeyframeTrack as lo, QuaternionKeyframeTrack as co, Box3 as yt, Sphere as Ms, Interpolant as Bl, ExtrudeGeometry as Ul, Curve as Fl, MeshPhongMaterial as yi, MeshLambertMaterial as zl, EquirectangularReflectionMapping as uo, AmbientLight as Gl, Uint16BufferAttribute as Hl, Matrix3 as Cn, ShapePath as pn, DataTextureLoader as jl, FloatType as qs, DataUtils as Ls, ShapeUtils as Vl, Shape as Yl, Path as _i, InstancedBufferGeometry as Wl, InstancedInterleavedBuffer as ho, WireframeGeometry as Xl, Line3 as $l, AlwaysStencilFunc as Zl, ReplaceStencilOp as xi, AnimationMixer as Kl, NotEqualStencilFunc as Xo, EqualStencilFunc as $o, KeepStencilOp as wi, DepthTexture as Ea, EdgesGeometry as ql, CubeTextureLoader as Ql, CubeReflectionMapping as Jl, ShapeGeometry as ec, DefaultLoadingManager as ks, VideoTexture as tc, Clock as nc, NoBlending as sc, Camera as ic, TangentSpaceNormalMap as oc, CatmullRomCurve3 as rc, QuadraticBezierCurve3 as ac, MeshDepthMaterial as Zo, ShaderChunk as Ti, UnsignedByteType as lc, UVMapping as cc, IcosahedronGeometry as uc } from "three";
|
|
13
|
+
import { defineComponent as ue, watch as J, ref as ge, shallowRef as re, withAsyncContext as Tn, onUnmounted as tt, openBlock as ae, createElementBlock as ce, createElementVNode as ye, unref as F, renderSlot as Ne, getCurrentScope as hc, onScopeDispose as fc, onMounted as bn, nextTick as Po, isRef as ii, getCurrentInstance as Ma, computed as Pe, reactive as ts, watchEffect as et, toValue as ze, isReactive as fo, createVNode as ms, mergeProps as $e, toRefs as Le, shallowReactive as Sa, onBeforeUnmount as Ro, useSlots as Co, createCommentVNode as an, createBlock as Io, Fragment as Aa, renderList as Pa, useAttrs as dc, render as pc, triggerRef as mc, toRaw as Ko } from "vue";
|
|
14
|
+
import { useLogger as _t, useLoader as Nn, useTresContext as xe, useLoop as Ve, normalizeVectorFlexibleParam as Ra, useTres as xn, extend as Ca, useTexture as Bn, normalizeColor as en } from "@tresjs/core";
|
|
15
15
|
function gc(a) {
|
|
16
16
|
const e = vc(a), t = [];
|
|
17
17
|
for (const { startFrame: n, endFrame: s, duration: i } of e)
|
|
@@ -324,7 +324,7 @@ const Oc = ["scale", "position"], Dc = ["map", "alphaTest"], Lc = ["scale", "pos
|
|
|
324
324
|
y[0] || (y[0] = ye("TresPlaneGeometry", { args: [1, 1] }, null, -1)),
|
|
325
325
|
ye("TresMeshBasicMaterial", {
|
|
326
326
|
toneMapped: !1,
|
|
327
|
-
side: F(
|
|
327
|
+
side: F(on),
|
|
328
328
|
map: F(h),
|
|
329
329
|
transparent: !0,
|
|
330
330
|
alphaTest: i.alphaTest,
|
|
@@ -434,7 +434,7 @@ function Yc(a, e, t = {}) {
|
|
|
434
434
|
}
|
|
435
435
|
);
|
|
436
436
|
}
|
|
437
|
-
const
|
|
437
|
+
const ln = Nc ? window : void 0;
|
|
438
438
|
function gn(a) {
|
|
439
439
|
var e;
|
|
440
440
|
const t = ct(a);
|
|
@@ -442,7 +442,7 @@ function gn(a) {
|
|
|
442
442
|
}
|
|
443
443
|
function Xe(...a) {
|
|
444
444
|
let e, t, n, s;
|
|
445
|
-
if (typeof a[0] == "string" || Array.isArray(a[0]) ? ([t, n, s] = a, e =
|
|
445
|
+
if (typeof a[0] == "string" || Array.isArray(a[0]) ? ([t, n, s] = a, e = ln) : [e, t, n, s] = a, !e)
|
|
446
446
|
return wn;
|
|
447
447
|
Array.isArray(t) || (t = [t]), Array.isArray(n) || (n = [n]);
|
|
448
448
|
const i = [], o = () => {
|
|
@@ -474,7 +474,7 @@ function Da(a) {
|
|
|
474
474
|
return Pe(() => (e.value, !!a()));
|
|
475
475
|
}
|
|
476
476
|
function Xc(a, e = {}) {
|
|
477
|
-
const { window: t =
|
|
477
|
+
const { window: t = ln } = e, n = Da(() => t && "matchMedia" in t && typeof t.matchMedia == "function");
|
|
478
478
|
let s;
|
|
479
479
|
const i = ge(!1), o = (c) => {
|
|
480
480
|
i.value = c.matches;
|
|
@@ -488,7 +488,7 @@ function Xc(a, e = {}) {
|
|
|
488
488
|
}), i;
|
|
489
489
|
}
|
|
490
490
|
function $c(a, e, t = {}) {
|
|
491
|
-
const { window: n =
|
|
491
|
+
const { window: n = ln, ...s } = t;
|
|
492
492
|
let i;
|
|
493
493
|
const o = Da(() => n && "ResizeObserver" in n), r = () => {
|
|
494
494
|
i && (i.disconnect(), i = void 0);
|
|
@@ -514,7 +514,7 @@ function $c(a, e, t = {}) {
|
|
|
514
514
|
};
|
|
515
515
|
}
|
|
516
516
|
function Zc(a, e = { width: 0, height: 0 }, t = {}) {
|
|
517
|
-
const { window: n =
|
|
517
|
+
const { window: n = ln, box: s = "content-box" } = t, i = Pe(() => {
|
|
518
518
|
var u, d;
|
|
519
519
|
return (d = (u = gn(a)) == null ? void 0 : u.namespaceURI) == null ? void 0 : d.includes("svg");
|
|
520
520
|
}), o = ge(e.width), r = ge(e.height), { stop: l } = $c(
|
|
@@ -572,7 +572,7 @@ function Kc(a, e = {}) {
|
|
|
572
572
|
passive: !0
|
|
573
573
|
},
|
|
574
574
|
behavior: l = "auto",
|
|
575
|
-
window: c =
|
|
575
|
+
window: c = ln,
|
|
576
576
|
onError: f = (E) => {
|
|
577
577
|
console.error(E);
|
|
578
578
|
}
|
|
@@ -626,10 +626,10 @@ function Kc(a, e = {}) {
|
|
|
626
626
|
b.left = C < u.value, b.right = C > u.value;
|
|
627
627
|
const N = Math.abs(C) <= (o.left || 0), U = Math.abs(C) + T.clientWidth >= T.scrollWidth - (o.right || 0) - Qo;
|
|
628
628
|
y === "flex" && A === "row-reverse" ? (g.left = U, g.right = N) : (g.left = N, g.right = U), u.value = C;
|
|
629
|
-
let
|
|
630
|
-
E === c.document && !
|
|
631
|
-
const
|
|
632
|
-
y === "flex" && A === "column-reverse" ? (g.top =
|
|
629
|
+
let Y = T.scrollTop;
|
|
630
|
+
E === c.document && !Y && (Y = c.document.body.scrollTop), b.top = Y < d.value, b.bottom = Y > d.value;
|
|
631
|
+
const V = Math.abs(Y) <= (o.top || 0), ne = Math.abs(Y) + T.clientHeight >= T.scrollHeight - (o.bottom || 0) - Qo;
|
|
632
|
+
y === "flex" && A === "column-reverse" ? (g.top = ne, g.bottom = V) : (g.top = V, g.bottom = ne), d.value = Y;
|
|
633
633
|
}, w = (E) => {
|
|
634
634
|
var _;
|
|
635
635
|
if (!c)
|
|
@@ -681,7 +681,7 @@ const qc = {
|
|
|
681
681
|
function Qc(a = {}) {
|
|
682
682
|
const {
|
|
683
683
|
reactive: e = !1,
|
|
684
|
-
target: t =
|
|
684
|
+
target: t = ln,
|
|
685
685
|
aliasMap: n = qc,
|
|
686
686
|
passive: s = !0,
|
|
687
687
|
onEventFired: i = wn
|
|
@@ -741,7 +741,7 @@ function eu(a = {}) {
|
|
|
741
741
|
touch: t = !0,
|
|
742
742
|
resetOnTouchEnds: n = !1,
|
|
743
743
|
initialValue: s = { x: 0, y: 0 },
|
|
744
|
-
window: i =
|
|
744
|
+
window: i = ln,
|
|
745
745
|
target: o = i,
|
|
746
746
|
scroll: r = !0,
|
|
747
747
|
eventFilter: l
|
|
@@ -774,7 +774,7 @@ function eu(a = {}) {
|
|
|
774
774
|
};
|
|
775
775
|
}
|
|
776
776
|
function tu(a = {}) {
|
|
777
|
-
const { window: e =
|
|
777
|
+
const { window: e = ln, behavior: t = "auto" } = a;
|
|
778
778
|
if (!e)
|
|
779
779
|
return {
|
|
780
780
|
x: ge(0),
|
|
@@ -809,7 +809,7 @@ function tu(a = {}) {
|
|
|
809
809
|
}
|
|
810
810
|
function La(a = {}) {
|
|
811
811
|
const {
|
|
812
|
-
window: e =
|
|
812
|
+
window: e = ln,
|
|
813
813
|
initialWidth: t = Number.POSITIVE_INFINITY,
|
|
814
814
|
initialHeight: n = Number.POSITIVE_INFINITY,
|
|
815
815
|
listenOrientation: s = !0,
|
|
@@ -879,7 +879,7 @@ const su = ["object"], Sg = /* @__PURE__ */ ue({
|
|
|
879
879
|
lockZ: { type: Boolean, default: !1 }
|
|
880
880
|
},
|
|
881
881
|
setup(a, { expose: e }) {
|
|
882
|
-
const t = a, n = re(new
|
|
882
|
+
const t = a, n = re(new $t()), s = re(new $t()), i = new je(), o = new tn();
|
|
883
883
|
function r(l) {
|
|
884
884
|
n.value && (!l && (l = xn().camera.value, !l) || (s.value.rotation.copy(o), n.value.updateMatrix(), n.value.updateWorldMatrix(!1, !1), n.value.getWorldQuaternion(i), l.getWorldQuaternion(s.value.quaternion).premultiply(i.invert()), t.lockX && (s.value.rotation.x = o.x), t.lockY && (s.value.rotation.y = o.y), t.lockZ && (s.value.rotation.z = o.z)));
|
|
885
885
|
}
|
|
@@ -1206,7 +1206,7 @@ async function er(a) {
|
|
|
1206
1206
|
}
|
|
1207
1207
|
let Bs, bi, Fn, Us;
|
|
1208
1208
|
function Ei(a, e = 1 / 0, t = null) {
|
|
1209
|
-
bi || (bi = new
|
|
1209
|
+
bi || (bi = new Ht(2, 2, 1, 1)), Fn || (Fn = new Tt({
|
|
1210
1210
|
uniforms: { blitTexture: new Se(a) },
|
|
1211
1211
|
vertexShader: (
|
|
1212
1212
|
/* glsl */
|
|
@@ -1340,7 +1340,7 @@ fu(Bo, "Utils", {
|
|
|
1340
1340
|
const t = [], n = {}, s = a.tracks;
|
|
1341
1341
|
for (let i = 0; i < s.length; ++i) {
|
|
1342
1342
|
let o = s[i];
|
|
1343
|
-
const r =
|
|
1343
|
+
const r = rn.parseTrackName(o.name), l = rn.findNode(e, r.nodeName);
|
|
1344
1344
|
if (r.propertyName !== "morphTargetInfluences" || r.propertyIndex === void 0) {
|
|
1345
1345
|
t.push(o);
|
|
1346
1346
|
continue;
|
|
@@ -1407,7 +1407,7 @@ wt[fa] = De.NEAREST_MIPMAP_LINEAR;
|
|
|
1407
1407
|
wt[xt] = De.LINEAR;
|
|
1408
1408
|
wt[da] = De.LINEAR_MIPMAP_NEAREST;
|
|
1409
1409
|
wt[Eo] = De.LINEAR_MIPMAP_LINEAR;
|
|
1410
|
-
wt[
|
|
1410
|
+
wt[Yt] = De.CLAMP_TO_EDGE;
|
|
1411
1411
|
wt[Ln] = De.REPEAT;
|
|
1412
1412
|
wt[pa] = De.MIRRORED_REPEAT;
|
|
1413
1413
|
const nr = {
|
|
@@ -1884,7 +1884,7 @@ class wu {
|
|
|
1884
1884
|
};
|
|
1885
1885
|
e.aoMapIntensity !== 1 && (r.strength = e.aoMapIntensity), this.applyTextureTransform(r, e.aoMap), s.occlusionTexture = r;
|
|
1886
1886
|
}
|
|
1887
|
-
e.transparent ? s.alphaMode = "BLEND" : e.alphaTest > 0 && (s.alphaMode = "MASK", s.alphaCutoff = e.alphaTest), e.side ===
|
|
1887
|
+
e.transparent ? s.alphaMode = "BLEND" : e.alphaTest > 0 && (s.alphaMode = "MASK", s.alphaCutoff = e.alphaTest), e.side === on && (s.doubleSided = !0), e.name !== "" && (s.name = e.name), this.serializeUserData(e, s), this._invokeAll(function(r) {
|
|
1888
1888
|
r.writeMaterial && r.writeMaterial(e, s);
|
|
1889
1889
|
});
|
|
1890
1890
|
const o = n.materials.push(s) - 1;
|
|
@@ -1960,9 +1960,9 @@ class wu {
|
|
|
1960
1960
|
}
|
|
1961
1961
|
const N = y.clone();
|
|
1962
1962
|
if (!o.morphTargetsRelative)
|
|
1963
|
-
for (let U = 0,
|
|
1964
|
-
for (let
|
|
1965
|
-
|
|
1963
|
+
for (let U = 0, Y = y.count; U < Y; U++)
|
|
1964
|
+
for (let V = 0; V < y.itemSize; V++)
|
|
1965
|
+
V === 0 && N.setX(U, y.getX(U) - C.getX(U)), V === 1 && N.setY(U, y.getY(U) - C.getY(U)), V === 2 && N.setZ(U, y.getZ(U) - C.getZ(U)), V === 3 && N.setW(U, y.getW(U) - C.getW(U));
|
|
1966
1966
|
E[A] = this.processAccessor(N, o), t.attributes.set(this.getUID(C, !0), E[A]);
|
|
1967
1967
|
}
|
|
1968
1968
|
u.push(E), x.push(e.morphTargetInfluences[w]), e.morphTargetDictionary !== void 0 && M.push(R[w]);
|
|
@@ -2064,8 +2064,8 @@ class wu {
|
|
|
2064
2064
|
n.animations || (n.animations = []), e = Bo.Utils.mergeMorphTargetTracks(e.clone(), t);
|
|
2065
2065
|
const i = e.tracks, o = [], r = [];
|
|
2066
2066
|
for (let l = 0; l < i.length; ++l) {
|
|
2067
|
-
const c = i[l], f =
|
|
2068
|
-
let u =
|
|
2067
|
+
const c = i[l], f = rn.parseTrackName(c.name);
|
|
2068
|
+
let u = rn.findNode(t, f.nodeName);
|
|
2069
2069
|
const d = nr[f.propertyName];
|
|
2070
2070
|
if (f.objectName === "bones" && (u.isSkinnedMesh === !0 ? u = u.skeleton.getBoneByName(f.objectIndex) : u = void 0), !u || !d)
|
|
2071
2071
|
return console.warn('THREE.GLTFExporter: Could not export animation track "%s".', c.name), null;
|
|
@@ -2484,8 +2484,8 @@ var At = Uint8Array, vn = Uint16Array, po = Uint32Array, Na = new At([
|
|
|
2484
2484
|
za[28] = 258, Lu[258] = 28;
|
|
2485
2485
|
var ku = Ua(Ba, 0), Nu = ku[0], mo = new vn(32768);
|
|
2486
2486
|
for (var Ze = 0; Ze < 32768; ++Ze) {
|
|
2487
|
-
var
|
|
2488
|
-
|
|
2487
|
+
var fn = (Ze & 43690) >>> 1 | (Ze & 21845) << 1;
|
|
2488
|
+
fn = (fn & 52428) >>> 2 | (fn & 13107) << 2, fn = (fn & 61680) >>> 4 | (fn & 3855) << 4, mo[Ze] = ((fn & 65280) >>> 8 | (fn & 255) << 8) >>> 1;
|
|
2489
2489
|
}
|
|
2490
2490
|
var ys = function(a, e, t) {
|
|
2491
2491
|
for (var n = a.length, s = 0, i = new vn(e); s < n; ++s)
|
|
@@ -2521,7 +2521,7 @@ var Bu = /* @__PURE__ */ ys(As, 9, 1), Uu = /* @__PURE__ */ ys(Ga, 5, 1), Ai = f
|
|
|
2521
2521
|
for (var e = a[0], t = 1; t < a.length; ++t)
|
|
2522
2522
|
a[t] > e && (e = a[t]);
|
|
2523
2523
|
return e;
|
|
2524
|
-
},
|
|
2524
|
+
}, Ct = function(a, e, t) {
|
|
2525
2525
|
var n = e / 8 | 0;
|
|
2526
2526
|
return (a[n] | a[n + 1] << 8) >> (e & 7) & t;
|
|
2527
2527
|
}, Pi = function(a, e) {
|
|
@@ -2548,31 +2548,31 @@ var Bu = /* @__PURE__ */ ys(As, 9, 1), Uu = /* @__PURE__ */ ys(Ga, 5, 1), Ai = f
|
|
|
2548
2548
|
}, r = t.f || 0, l = t.p || 0, c = t.b || 0, f = t.l, u = t.d, d = t.m, h = t.n, p = n * 8;
|
|
2549
2549
|
do {
|
|
2550
2550
|
if (!f) {
|
|
2551
|
-
t.f = r =
|
|
2552
|
-
var m =
|
|
2551
|
+
t.f = r = Ct(a, l, 1);
|
|
2552
|
+
var m = Ct(a, l + 1, 3);
|
|
2553
2553
|
if (l += 3, m)
|
|
2554
2554
|
if (m == 1)
|
|
2555
2555
|
f = Bu, u = Uu, d = 9, h = 5;
|
|
2556
2556
|
else if (m == 2) {
|
|
2557
|
-
var x =
|
|
2557
|
+
var x = Ct(a, l, 31) + 257, M = Ct(a, l + 10, 15) + 4, R = x + Ct(a, l + 5, 31) + 1;
|
|
2558
2558
|
l += 14;
|
|
2559
2559
|
for (var w = new At(R), E = new At(19), _ = 0; _ < M; ++_)
|
|
2560
|
-
E[Du[_]] =
|
|
2560
|
+
E[Du[_]] = Ct(a, l + _ * 3, 7);
|
|
2561
2561
|
l += M * 3;
|
|
2562
2562
|
for (var T = Ai(E), y = (1 << T) - 1, A = ys(E, T, 1), _ = 0; _ < R; ) {
|
|
2563
|
-
var C = A[
|
|
2563
|
+
var C = A[Ct(a, l, y)];
|
|
2564
2564
|
l += C & 15;
|
|
2565
2565
|
var v = C >>> 4;
|
|
2566
2566
|
if (v < 16)
|
|
2567
2567
|
w[_++] = v;
|
|
2568
2568
|
else {
|
|
2569
2569
|
var N = 0, U = 0;
|
|
2570
|
-
for (v == 16 ? (U = 3 +
|
|
2570
|
+
for (v == 16 ? (U = 3 + Ct(a, l, 3), l += 2, N = w[_ - 1]) : v == 17 ? (U = 3 + Ct(a, l, 7), l += 3) : v == 18 && (U = 11 + Ct(a, l, 127), l += 7); U--; )
|
|
2571
2571
|
w[_++] = N;
|
|
2572
2572
|
}
|
|
2573
2573
|
}
|
|
2574
|
-
var
|
|
2575
|
-
d = Ai(
|
|
2574
|
+
var Y = w.subarray(0, x), V = w.subarray(x);
|
|
2575
|
+
d = Ai(Y), h = Ai(V), f = ys(Y, d, 1), u = ys(V, h, 1);
|
|
2576
2576
|
} else
|
|
2577
2577
|
throw "invalid block type";
|
|
2578
2578
|
else {
|
|
@@ -2592,8 +2592,8 @@ var Bu = /* @__PURE__ */ ys(As, 9, 1), Uu = /* @__PURE__ */ ys(Ga, 5, 1), Ai = f
|
|
|
2592
2592
|
}
|
|
2593
2593
|
}
|
|
2594
2594
|
s && o(c + 131072);
|
|
2595
|
-
for (var
|
|
2596
|
-
var N = f[Pi(a, l) &
|
|
2595
|
+
for (var ne = (1 << d) - 1, Z = (1 << h) - 1, ee = l; ; ee = l) {
|
|
2596
|
+
var N = f[Pi(a, l) & ne], te = N >>> 4;
|
|
2597
2597
|
if (l += N & 15, l > p) {
|
|
2598
2598
|
if (i)
|
|
2599
2599
|
throw "unexpected EOF";
|
|
@@ -2604,22 +2604,22 @@ var Bu = /* @__PURE__ */ ys(As, 9, 1), Uu = /* @__PURE__ */ ys(Ga, 5, 1), Ai = f
|
|
|
2604
2604
|
if (te < 256)
|
|
2605
2605
|
e[c++] = te;
|
|
2606
2606
|
else if (te == 256) {
|
|
2607
|
-
|
|
2607
|
+
ee = l, f = null;
|
|
2608
2608
|
break;
|
|
2609
2609
|
} else {
|
|
2610
2610
|
var fe = te - 254;
|
|
2611
2611
|
if (te > 264) {
|
|
2612
2612
|
var _ = te - 257, he = Na[_];
|
|
2613
|
-
fe =
|
|
2613
|
+
fe = Ct(a, l, (1 << he) - 1) + za[_], l += he;
|
|
2614
2614
|
}
|
|
2615
2615
|
var we = u[Pi(a, l) & Z], I = we >>> 4;
|
|
2616
2616
|
if (!we)
|
|
2617
2617
|
throw "invalid distance";
|
|
2618
2618
|
l += we & 15;
|
|
2619
|
-
var
|
|
2619
|
+
var V = Nu[I];
|
|
2620
2620
|
if (I > 3) {
|
|
2621
2621
|
var he = Ba[I];
|
|
2622
|
-
|
|
2622
|
+
V += Pi(a, l) & (1 << he) - 1, l += he;
|
|
2623
2623
|
}
|
|
2624
2624
|
if (l > p) {
|
|
2625
2625
|
if (i)
|
|
@@ -2628,11 +2628,11 @@ var Bu = /* @__PURE__ */ ys(As, 9, 1), Uu = /* @__PURE__ */ ys(Ga, 5, 1), Ai = f
|
|
|
2628
2628
|
}
|
|
2629
2629
|
s && o(c + 131072);
|
|
2630
2630
|
for (var B = c + fe; c < B; c += 4)
|
|
2631
|
-
e[c] = e[c -
|
|
2631
|
+
e[c] = e[c - V], e[c + 1] = e[c + 1 - V], e[c + 2] = e[c + 2 - V], e[c + 3] = e[c + 3 - V];
|
|
2632
2632
|
c = B;
|
|
2633
2633
|
}
|
|
2634
2634
|
}
|
|
2635
|
-
t.l = f, t.p =
|
|
2635
|
+
t.l = f, t.p = ee, t.b = c, f && (r = 1, t.m = d, t.d = u, t.n = h);
|
|
2636
2636
|
} while (!r);
|
|
2637
2637
|
return c == e.length ? e : zu(e, 0, c);
|
|
2638
2638
|
}, Hu = /* @__PURE__ */ new At(0), ju = function(a) {
|
|
@@ -2653,7 +2653,7 @@ var Xu = Object.defineProperty, $u = (a, e, t) => e in a ? Xu(a, e, { enumerable
|
|
|
2653
2653
|
const Ha = class extends pe {
|
|
2654
2654
|
constructor(a, e = {}) {
|
|
2655
2655
|
super(a), this.isReflector = !0, this.type = "Reflector", this.camera = new Lt();
|
|
2656
|
-
const t = this, n = e.color !== void 0 ? new be(e.color) : new be(8355711), s = e.textureWidth || 512, i = e.textureHeight || 512, o = e.clipBias || 0, r = e.shader || Ha.ReflectorShader, l = e.multisample !== void 0 ? e.multisample : 4, c = new bs(), f = new $(), u = new $(), d = new $(), h = new Ie(), p = new $(0, 0, -1), m = new at(), v = new $(), g = new $(), b = new at(), x = new Ie(), M = this.camera, R = new
|
|
2656
|
+
const t = this, n = e.color !== void 0 ? new be(e.color) : new be(8355711), s = e.textureWidth || 512, i = e.textureHeight || 512, o = e.clipBias || 0, r = e.shader || Ha.ReflectorShader, l = e.multisample !== void 0 ? e.multisample : 4, c = new bs(), f = new $(), u = new $(), d = new $(), h = new Ie(), p = new $(0, 0, -1), m = new at(), v = new $(), g = new $(), b = new at(), x = new Ie(), M = this.camera, R = new Wt(s, i, {
|
|
2657
2657
|
samples: l,
|
|
2658
2658
|
type: Dt
|
|
2659
2659
|
}), w = new Tt({
|
|
@@ -2668,10 +2668,10 @@ const Ha = class extends pe {
|
|
|
2668
2668
|
const y = M.projectionMatrix;
|
|
2669
2669
|
b.x = (Math.sign(m.x) + y.elements[8]) / y.elements[0], b.y = (Math.sign(m.y) + y.elements[9]) / y.elements[5], b.z = -1, b.w = (1 + y.elements[10]) / y.elements[14], m.multiplyScalar(2 / m.dot(b)), y.elements[2] = m.x, y.elements[6] = m.y, y.elements[10] = m.z + 1 - o, y.elements[14] = m.w, t.visible = !1;
|
|
2670
2670
|
const A = E.getRenderTarget(), C = E.xr.enabled, N = E.shadowMap.autoUpdate, U = E.toneMapping;
|
|
2671
|
-
let
|
|
2672
|
-
"outputColorSpace" in E ?
|
|
2673
|
-
const
|
|
2674
|
-
|
|
2671
|
+
let Y = !1;
|
|
2672
|
+
"outputColorSpace" in E ? Y = E.outputColorSpace === "srgb" : Y = E.outputEncoding === 3001, E.xr.enabled = !1, E.shadowMap.autoUpdate = !1, "outputColorSpace" in E ? E.outputColorSpace = "srgb-linear" : E.outputEncoding = 3e3, E.toneMapping = Pl, E.setRenderTarget(R), E.state.buffers.depth.setMask(!0), E.autoClear === !1 && E.clear(), E.render(_, M), E.xr.enabled = C, E.shadowMap.autoUpdate = N, E.toneMapping = U, "outputColorSpace" in E ? E.outputColorSpace = Y ? "srgb" : "srgb-linear" : E.outputEncoding = Y ? 3001 : 3e3, E.setRenderTarget(A);
|
|
2673
|
+
const V = T.viewport;
|
|
2674
|
+
V !== void 0 && E.state.viewport(V), t.visible = !0;
|
|
2675
2675
|
}, this.getRenderTarget = function() {
|
|
2676
2676
|
return R;
|
|
2677
2677
|
}, this.dispose = function() {
|
|
@@ -2748,15 +2748,15 @@ Zu(go, "ReflectorShader", {
|
|
|
2748
2748
|
var Ku = Object.defineProperty, qu = (a, e, t) => e in a ? Ku(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t, ja = (a, e, t) => (qu(a, typeof e != "symbol" ? e + "" : e, t), t);
|
|
2749
2749
|
const ui = new ht(), Qu = new Float32Array([-1, -1, 0, 0, 0, 1, -1, 0, 1, 0, 1, 1, 0, 1, 1, -1, 1, 0, 0, 1]), Va = new Mo(Qu, 5);
|
|
2750
2750
|
ui.setIndex([0, 1, 2, 0, 2, 3]);
|
|
2751
|
-
ui.setAttribute("position", new
|
|
2752
|
-
ui.setAttribute("uv", new
|
|
2751
|
+
ui.setAttribute("position", new nn(Va, 3, 0, !1));
|
|
2752
|
+
ui.setAttribute("uv", new nn(Va, 2, 3, !1));
|
|
2753
2753
|
const vo = class extends pe {
|
|
2754
2754
|
constructor() {
|
|
2755
|
-
super(vo.Geometry, new
|
|
2755
|
+
super(vo.Geometry, new Xt({ opacity: 0, transparent: !0 })), this.isLensflare = !0, this.type = "Lensflare", this.frustumCulled = !1, this.renderOrder = 1 / 0;
|
|
2756
2756
|
const a = new $(), e = new $(), t = new ti(new Uint8Array(16 * 16 * 3), 16, 16, ei);
|
|
2757
|
-
t.minFilter = Kn, t.magFilter = Kn, t.wrapS =
|
|
2757
|
+
t.minFilter = Kn, t.magFilter = Kn, t.wrapS = Yt, t.wrapT = Yt;
|
|
2758
2758
|
const n = new ti(new Uint8Array(16 * 16 * 3), 16, 16, ei);
|
|
2759
|
-
n.minFilter = Kn, n.magFilter = Kn, n.wrapS =
|
|
2759
|
+
n.minFilter = Kn, n.magFilter = Kn, n.wrapS = Yt, n.wrapT = Yt;
|
|
2760
2760
|
const s = vo.Geometry, i = new gi({
|
|
2761
2761
|
uniforms: {
|
|
2762
2762
|
scale: { value: null },
|
|
@@ -2963,7 +2963,7 @@ ja(Wa, "Shader", {
|
|
|
2963
2963
|
class Ju extends pe {
|
|
2964
2964
|
constructor(e, t = {}) {
|
|
2965
2965
|
super(e), this.isWater = !0;
|
|
2966
|
-
const n = this, s = t.textureWidth !== void 0 ? t.textureWidth : 512, i = t.textureHeight !== void 0 ? t.textureHeight : 512, o = t.clipBias !== void 0 ? t.clipBias : 0, r = t.alpha !== void 0 ? t.alpha : 1, l = t.time !== void 0 ? t.time : 0, c = t.waterNormals !== void 0 ? t.waterNormals : null, f = t.sunDirection !== void 0 ? t.sunDirection : new $(0.70707, 0.70707, 0), u = new be(t.sunColor !== void 0 ? t.sunColor : 16777215), d = new be(t.waterColor !== void 0 ? t.waterColor : 8355711), h = t.eye !== void 0 ? t.eye : new $(0, 0, 0), p = t.distortionScale !== void 0 ? t.distortionScale : 20, m = t.side !== void 0 ? t.side : ss, v = t.fog !== void 0 ? t.fog : !1, g = new bs(), b = new $(), x = new $(), M = new $(), R = new Ie(), w = new $(0, 0, -1), E = new at(), _ = new $(), T = new $(), y = new at(), A = new Ie(), C = new Lt(), N = new
|
|
2966
|
+
const n = this, s = t.textureWidth !== void 0 ? t.textureWidth : 512, i = t.textureHeight !== void 0 ? t.textureHeight : 512, o = t.clipBias !== void 0 ? t.clipBias : 0, r = t.alpha !== void 0 ? t.alpha : 1, l = t.time !== void 0 ? t.time : 0, c = t.waterNormals !== void 0 ? t.waterNormals : null, f = t.sunDirection !== void 0 ? t.sunDirection : new $(0.70707, 0.70707, 0), u = new be(t.sunColor !== void 0 ? t.sunColor : 16777215), d = new be(t.waterColor !== void 0 ? t.waterColor : 8355711), h = t.eye !== void 0 ? t.eye : new $(0, 0, 0), p = t.distortionScale !== void 0 ? t.distortionScale : 20, m = t.side !== void 0 ? t.side : ss, v = t.fog !== void 0 ? t.fog : !1, g = new bs(), b = new $(), x = new $(), M = new $(), R = new Ie(), w = new $(0, 0, -1), E = new at(), _ = new $(), T = new $(), y = new at(), A = new Ie(), C = new Lt(), N = new Wt(s, i), U = {
|
|
2967
2967
|
uniforms: Dn.merge([
|
|
2968
2968
|
ni.fog,
|
|
2969
2969
|
ni.lights,
|
|
@@ -3085,7 +3085,7 @@ class Ju extends pe {
|
|
|
3085
3085
|
#include <fog_fragment>
|
|
3086
3086
|
}`
|
|
3087
3087
|
)
|
|
3088
|
-
},
|
|
3088
|
+
}, Y = new Tt({
|
|
3089
3089
|
fragmentShader: U.fragmentShader,
|
|
3090
3090
|
vertexShader: U.vertexShader,
|
|
3091
3091
|
uniforms: Dn.clone(U.uniforms),
|
|
@@ -3093,16 +3093,16 @@ class Ju extends pe {
|
|
|
3093
3093
|
side: m,
|
|
3094
3094
|
fog: v
|
|
3095
3095
|
});
|
|
3096
|
-
|
|
3096
|
+
Y.uniforms.mirrorSampler.value = N.texture, Y.uniforms.textureMatrix.value = A, Y.uniforms.alpha.value = r, Y.uniforms.time.value = l, Y.uniforms.normalSampler.value = c, Y.uniforms.sunColor.value = u, Y.uniforms.waterColor.value = d, Y.uniforms.sunDirection.value = f, Y.uniforms.distortionScale.value = p, Y.uniforms.eye.value = h, n.material = Y, n.onBeforeRender = function(V, ne, Z) {
|
|
3097
3097
|
if (x.setFromMatrixPosition(n.matrixWorld), M.setFromMatrixPosition(Z.matrixWorld), R.extractRotation(n.matrixWorld), b.set(0, 0, 1), b.applyMatrix4(R), _.subVectors(x, M), _.dot(b) > 0)
|
|
3098
3098
|
return;
|
|
3099
3099
|
_.reflect(b).negate(), _.add(x), R.extractRotation(Z.matrixWorld), w.set(0, 0, -1), w.applyMatrix4(R), w.add(M), T.subVectors(x, w), T.reflect(b).negate(), T.add(x), C.position.copy(_), C.up.set(0, 1, 0), C.up.applyMatrix4(R), C.up.reflect(b), C.lookAt(T), C.far = Z.far, C.updateMatrixWorld(), C.projectionMatrix.copy(Z.projectionMatrix), A.set(0.5, 0, 0, 0.5, 0, 0.5, 0, 0.5, 0, 0, 0.5, 0.5, 0, 0, 0, 1), A.multiply(C.projectionMatrix), A.multiply(C.matrixWorldInverse), g.setFromNormalAndCoplanarPoint(b, x), g.applyMatrix4(C.matrixWorldInverse), E.set(g.normal.x, g.normal.y, g.normal.z, g.constant);
|
|
3100
|
-
const
|
|
3101
|
-
y.x = (Math.sign(E.x) +
|
|
3102
|
-
const te =
|
|
3103
|
-
n.visible = !1,
|
|
3100
|
+
const ee = C.projectionMatrix;
|
|
3101
|
+
y.x = (Math.sign(E.x) + ee.elements[8]) / ee.elements[0], y.y = (Math.sign(E.y) + ee.elements[9]) / ee.elements[5], y.z = -1, y.w = (1 + ee.elements[10]) / ee.elements[14], E.multiplyScalar(2 / E.dot(y)), ee.elements[2] = E.x, ee.elements[6] = E.y, ee.elements[10] = E.z + 1 - o, ee.elements[14] = E.w, h.setFromMatrixPosition(Z.matrixWorld);
|
|
3102
|
+
const te = V.getRenderTarget(), fe = V.xr.enabled, he = V.shadowMap.autoUpdate;
|
|
3103
|
+
n.visible = !1, V.xr.enabled = !1, V.shadowMap.autoUpdate = !1, V.setRenderTarget(N), V.state.buffers.depth.setMask(!0), V.autoClear === !1 && V.clear(), V.render(ne, C), n.visible = !0, V.xr.enabled = fe, V.shadowMap.autoUpdate = he, V.setRenderTarget(te);
|
|
3104
3104
|
const we = Z.viewport;
|
|
3105
|
-
we !== void 0 &&
|
|
3105
|
+
we !== void 0 && V.state.viewport(we);
|
|
3106
3106
|
};
|
|
3107
3107
|
}
|
|
3108
3108
|
}
|
|
@@ -3291,7 +3291,7 @@ const Qs = {
|
|
|
3291
3291
|
});
|
|
3292
3292
|
class Uo extends pe {
|
|
3293
3293
|
constructor() {
|
|
3294
|
-
super(new
|
|
3294
|
+
super(new Gt(1, 1, 1), $a);
|
|
3295
3295
|
}
|
|
3296
3296
|
}
|
|
3297
3297
|
Xa(Uo, "SkyShader", Qs);
|
|
@@ -3479,7 +3479,7 @@ class oh extends Pt {
|
|
|
3479
3479
|
}
|
|
3480
3480
|
class rh extends Pt {
|
|
3481
3481
|
constructor() {
|
|
3482
|
-
super(), q(this, "isTransformControlsGizmo", !0), q(this, "type", "TransformControlsGizmo"), q(this, "tempVector", new $(0, 0, 0)), q(this, "tempEuler", new
|
|
3482
|
+
super(), q(this, "isTransformControlsGizmo", !0), q(this, "type", "TransformControlsGizmo"), q(this, "tempVector", new $(0, 0, 0)), q(this, "tempEuler", new tn()), q(this, "alignVector", new $(0, 1, 0)), q(this, "zeroVector", new $(0, 0, 0)), q(this, "lookAtMatrix", new Ie()), q(this, "tempQuaternion", new je()), q(this, "tempQuaternion2", new je()), q(this, "identityQuaternion", new je()), q(this, "unitX", new $(1, 0, 0)), q(this, "unitY", new $(0, 1, 0)), q(this, "unitZ", new $(0, 0, 1)), q(this, "gizmo"), q(this, "picker"), q(this, "helper"), q(this, "rotationAxis", new $()), q(this, "cameraPosition", new $()), q(this, "worldPositionStart", new $()), q(this, "worldQuaternionStart", new je()), q(this, "worldPosition", new $()), q(this, "worldQuaternion", new je()), q(this, "eye", new $()), q(this, "camera", null), q(this, "enabled", !0), q(this, "axis", null), q(this, "mode", "translate"), q(this, "space", "world"), q(this, "size", 1), q(this, "dragging", !1), q(this, "showX", !0), q(this, "showY", !0), q(this, "showZ", !0), q(this, "updateMatrixWorld", () => {
|
|
3483
3483
|
let te = this.space;
|
|
3484
3484
|
this.mode === "scale" && (te = "local");
|
|
3485
3485
|
const fe = te === "local" ? this.worldQuaternion : this.identityQuaternion;
|
|
@@ -3502,11 +3502,11 @@ class rh extends Pt {
|
|
|
3502
3502
|
}
|
|
3503
3503
|
super.updateMatrixWorld();
|
|
3504
3504
|
});
|
|
3505
|
-
const e = new
|
|
3505
|
+
const e = new Xt({
|
|
3506
3506
|
depthTest: !1,
|
|
3507
3507
|
depthWrite: !1,
|
|
3508
3508
|
transparent: !0,
|
|
3509
|
-
side:
|
|
3509
|
+
side: on,
|
|
3510
3510
|
fog: !1,
|
|
3511
3511
|
toneMapped: !1
|
|
3512
3512
|
}), t = new ws({
|
|
@@ -3550,7 +3550,7 @@ class rh extends Pt {
|
|
|
3550
3550
|
x.color.set(7895160);
|
|
3551
3551
|
const M = b.clone();
|
|
3552
3552
|
M.opacity = 0.25;
|
|
3553
|
-
const R = new
|
|
3553
|
+
const R = new Rt(0, 0.05, 0.2, 12, 1, !1), w = new Gt(0.125, 0.125, 0.125), E = new ht();
|
|
3554
3554
|
E.setAttribute("position", new gt([0, 0, 0, 1, 0, 0], 3));
|
|
3555
3555
|
const _ = (te, fe) => {
|
|
3556
3556
|
const he = new ht(), we = [];
|
|
@@ -3578,18 +3578,18 @@ class rh extends Pt {
|
|
|
3578
3578
|
],
|
|
3579
3579
|
XYZ: [[new pe(new Mn(0.1, 0), l.clone()), [0, 0, 0], [0, 0, 0]]],
|
|
3580
3580
|
XY: [
|
|
3581
|
-
[new pe(new
|
|
3581
|
+
[new pe(new Ht(0.295, 0.295), c.clone()), [0.15, 0.15, 0]],
|
|
3582
3582
|
[new ke(E, b), [0.18, 0.3, 0], null, [0.125, 1, 1]],
|
|
3583
3583
|
[new ke(E, b), [0.3, 0.18, 0], [0, 0, Math.PI / 2], [0.125, 1, 1]]
|
|
3584
3584
|
],
|
|
3585
3585
|
YZ: [
|
|
3586
|
-
[new pe(new
|
|
3586
|
+
[new pe(new Ht(0.295, 0.295), f.clone()), [0, 0.15, 0.15], [0, Math.PI / 2, 0]],
|
|
3587
3587
|
[new ke(E, v), [0, 0.18, 0.3], [0, 0, Math.PI / 2], [0.125, 1, 1]],
|
|
3588
3588
|
[new ke(E, v), [0, 0.3, 0.18], [0, -Math.PI / 2, 0], [0.125, 1, 1]]
|
|
3589
3589
|
],
|
|
3590
3590
|
XZ: [
|
|
3591
3591
|
[
|
|
3592
|
-
new pe(new
|
|
3592
|
+
new pe(new Ht(0.295, 0.295), u.clone()),
|
|
3593
3593
|
[0.15, 0, 0.15],
|
|
3594
3594
|
[-Math.PI / 2, 0, 0]
|
|
3595
3595
|
],
|
|
@@ -3597,13 +3597,13 @@ class rh extends Pt {
|
|
|
3597
3597
|
[new ke(E, g), [0.3, 0, 0.18], [0, -Math.PI / 2, 0], [0.125, 1, 1]]
|
|
3598
3598
|
]
|
|
3599
3599
|
}, A = {
|
|
3600
|
-
X: [[new pe(new
|
|
3601
|
-
Y: [[new pe(new
|
|
3602
|
-
Z: [[new pe(new
|
|
3600
|
+
X: [[new pe(new Rt(0.2, 0, 1, 4, 1, !1), n), [0.6, 0, 0], [0, 0, -Math.PI / 2]]],
|
|
3601
|
+
Y: [[new pe(new Rt(0.2, 0, 1, 4, 1, !1), n), [0, 0.6, 0]]],
|
|
3602
|
+
Z: [[new pe(new Rt(0.2, 0, 1, 4, 1, !1), n), [0, 0, 0.6], [Math.PI / 2, 0, 0]]],
|
|
3603
3603
|
XYZ: [[new pe(new Mn(0.2, 0), n)]],
|
|
3604
|
-
XY: [[new pe(new
|
|
3605
|
-
YZ: [[new pe(new
|
|
3606
|
-
XZ: [[new pe(new
|
|
3604
|
+
XY: [[new pe(new Ht(0.4, 0.4), n), [0.2, 0.2, 0]]],
|
|
3605
|
+
YZ: [[new pe(new Ht(0.4, 0.4), n), [0, 0.2, 0.2], [0, Math.PI / 2, 0]]],
|
|
3606
|
+
XZ: [[new pe(new Ht(0.4, 0.4), n), [0.2, 0, 0.2], [-Math.PI / 2, 0, 0]]]
|
|
3607
3607
|
}, C = {
|
|
3608
3608
|
START: [[new pe(new Mn(0.01, 2), s), null, null, null, "helper"]],
|
|
3609
3609
|
END: [[new pe(new Mn(0.01, 2), s), null, null, null, "helper"]],
|
|
@@ -3627,25 +3627,25 @@ class rh extends Pt {
|
|
|
3627
3627
|
E: [
|
|
3628
3628
|
[new ke(_(1.25, 1), M), null, [0, Math.PI / 2, 0]],
|
|
3629
3629
|
[
|
|
3630
|
-
new pe(new
|
|
3630
|
+
new pe(new Rt(0.03, 0, 0.15, 4, 1, !1), M),
|
|
3631
3631
|
[1.17, 0, 0],
|
|
3632
3632
|
[0, 0, -Math.PI / 2],
|
|
3633
3633
|
[1, 1, 1e-3]
|
|
3634
3634
|
],
|
|
3635
3635
|
[
|
|
3636
|
-
new pe(new
|
|
3636
|
+
new pe(new Rt(0.03, 0, 0.15, 4, 1, !1), M),
|
|
3637
3637
|
[-1.17, 0, 0],
|
|
3638
3638
|
[0, 0, Math.PI / 2],
|
|
3639
3639
|
[1, 1, 1e-3]
|
|
3640
3640
|
],
|
|
3641
3641
|
[
|
|
3642
|
-
new pe(new
|
|
3642
|
+
new pe(new Rt(0.03, 0, 0.15, 4, 1, !1), M),
|
|
3643
3643
|
[0, -1.17, 0],
|
|
3644
3644
|
[Math.PI, 0, 0],
|
|
3645
3645
|
[1, 1, 1e-3]
|
|
3646
3646
|
],
|
|
3647
3647
|
[
|
|
3648
|
-
new pe(new
|
|
3648
|
+
new pe(new Rt(0.03, 0, 0.15, 4, 1, !1), M),
|
|
3649
3649
|
[0, 1.17, 0],
|
|
3650
3650
|
[0, 0, 0],
|
|
3651
3651
|
[1, 1, 1e-3]
|
|
@@ -3654,13 +3654,13 @@ class rh extends Pt {
|
|
|
3654
3654
|
XYZE: [[new ke(_(1, 1), x), null, [0, Math.PI / 2, 0]]]
|
|
3655
3655
|
}, U = {
|
|
3656
3656
|
AXIS: [[new ke(E, s.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]]
|
|
3657
|
-
},
|
|
3657
|
+
}, Y = {
|
|
3658
3658
|
X: [[new pe(new Ds(1, 0.1, 4, 24), n), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]],
|
|
3659
3659
|
Y: [[new pe(new Ds(1, 0.1, 4, 24), n), [0, 0, 0], [Math.PI / 2, 0, 0]]],
|
|
3660
3660
|
Z: [[new pe(new Ds(1, 0.1, 4, 24), n), [0, 0, 0], [0, 0, -Math.PI / 2]]],
|
|
3661
3661
|
E: [[new pe(new Ds(1.25, 0.1, 2, 24), n)]],
|
|
3662
3662
|
XYZE: [[new pe(new Cl(0.7, 10, 8), n)]]
|
|
3663
|
-
},
|
|
3663
|
+
}, V = {
|
|
3664
3664
|
X: [
|
|
3665
3665
|
[new pe(w, i), [0.8, 0, 0], [0, 0, -Math.PI / 2]],
|
|
3666
3666
|
[new ke(E, h), null, null, [0.8, 1, 1]]
|
|
@@ -3688,24 +3688,24 @@ class rh extends Pt {
|
|
|
3688
3688
|
[new ke(E, g), [0.855, 0, 0.98], null, [0.125, 1, 1]],
|
|
3689
3689
|
[new ke(E, g), [0.98, 0, 0.855], [0, -Math.PI / 2, 0], [0.125, 1, 1]]
|
|
3690
3690
|
],
|
|
3691
|
-
XYZX: [[new pe(new
|
|
3692
|
-
XYZY: [[new pe(new
|
|
3693
|
-
XYZZ: [[new pe(new
|
|
3694
|
-
},
|
|
3695
|
-
X: [[new pe(new
|
|
3696
|
-
Y: [[new pe(new
|
|
3697
|
-
Z: [[new pe(new
|
|
3691
|
+
XYZX: [[new pe(new Gt(0.125, 0.125, 0.125), l.clone()), [1.1, 0, 0]]],
|
|
3692
|
+
XYZY: [[new pe(new Gt(0.125, 0.125, 0.125), l.clone()), [0, 1.1, 0]]],
|
|
3693
|
+
XYZZ: [[new pe(new Gt(0.125, 0.125, 0.125), l.clone()), [0, 0, 1.1]]]
|
|
3694
|
+
}, ne = {
|
|
3695
|
+
X: [[new pe(new Rt(0.2, 0, 0.8, 4, 1, !1), n), [0.5, 0, 0], [0, 0, -Math.PI / 2]]],
|
|
3696
|
+
Y: [[new pe(new Rt(0.2, 0, 0.8, 4, 1, !1), n), [0, 0.5, 0]]],
|
|
3697
|
+
Z: [[new pe(new Rt(0.2, 0, 0.8, 4, 1, !1), n), [0, 0, 0.5], [Math.PI / 2, 0, 0]]],
|
|
3698
3698
|
XY: [[new pe(w, n), [0.85, 0.85, 0], null, [3, 3, 0.2]]],
|
|
3699
3699
|
YZ: [[new pe(w, n), [0, 0.85, 0.85], null, [0.2, 3, 3]]],
|
|
3700
3700
|
XZ: [[new pe(w, n), [0.85, 0, 0.85], null, [3, 0.2, 3]]],
|
|
3701
|
-
XYZX: [[new pe(new
|
|
3702
|
-
XYZY: [[new pe(new
|
|
3703
|
-
XYZZ: [[new pe(new
|
|
3701
|
+
XYZX: [[new pe(new Gt(0.2, 0.2, 0.2), n), [1.1, 0, 0]]],
|
|
3702
|
+
XYZY: [[new pe(new Gt(0.2, 0.2, 0.2), n), [0, 1.1, 0]]],
|
|
3703
|
+
XYZZ: [[new pe(new Gt(0.2, 0.2, 0.2), n), [0, 0, 1.1]]]
|
|
3704
3704
|
}, Z = {
|
|
3705
3705
|
X: [[new ke(E, s.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]],
|
|
3706
3706
|
Y: [[new ke(E, s.clone()), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]],
|
|
3707
3707
|
Z: [[new ke(E, s.clone()), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]]
|
|
3708
|
-
},
|
|
3708
|
+
}, ee = (te) => {
|
|
3709
3709
|
const fe = new Pt();
|
|
3710
3710
|
for (let he in te)
|
|
3711
3711
|
for (let we = te[he].length; we--; ) {
|
|
@@ -3716,17 +3716,17 @@ class rh extends Pt {
|
|
|
3716
3716
|
}
|
|
3717
3717
|
return fe;
|
|
3718
3718
|
};
|
|
3719
|
-
this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate =
|
|
3719
|
+
this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = ee(y)), this.add(this.gizmo.rotate = ee(N)), this.add(this.gizmo.scale = ee(V)), this.add(this.picker.translate = ee(A)), this.add(this.picker.rotate = ee(Y)), this.add(this.picker.scale = ee(ne)), this.add(this.helper.translate = ee(C)), this.add(this.helper.rotate = ee(U)), this.add(this.helper.scale = ee(Z)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
|
|
3720
3720
|
}
|
|
3721
3721
|
}
|
|
3722
3722
|
class ah extends pe {
|
|
3723
3723
|
constructor() {
|
|
3724
3724
|
super(
|
|
3725
|
-
new
|
|
3726
|
-
new
|
|
3725
|
+
new Ht(1e5, 1e5, 2, 2),
|
|
3726
|
+
new Xt({
|
|
3727
3727
|
visible: !1,
|
|
3728
3728
|
wireframe: !0,
|
|
3729
|
-
side:
|
|
3729
|
+
side: on,
|
|
3730
3730
|
transparent: !0,
|
|
3731
3731
|
opacity: 0.1,
|
|
3732
3732
|
toneMapped: !1
|
|
@@ -3770,7 +3770,7 @@ class ah extends pe {
|
|
|
3770
3770
|
}
|
|
3771
3771
|
}
|
|
3772
3772
|
var lh = Object.defineProperty, ch = (a, e, t) => e in a ? lh(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t, Je = (a, e, t) => (ch(a, typeof e != "symbol" ? e + "" : e, t), t);
|
|
3773
|
-
const zn = new
|
|
3773
|
+
const zn = new tn(0, 0, 0, "YXZ"), Gn = new $(), uh = { type: "change" }, hh = { type: "lock" }, fh = { type: "unlock" }, ar = Math.PI / 2;
|
|
3774
3774
|
class Za extends va {
|
|
3775
3775
|
constructor(e, t) {
|
|
3776
3776
|
super(), Je(this, "camera"), Je(this, "domElement"), Je(this, "isLocked"), Je(this, "minPolarAngle"), Je(this, "maxPolarAngle"), Je(this, "pointerSpeed"), Je(this, "onMouseMove", (n) => {
|
|
@@ -3804,10 +3804,10 @@ const zs = new Il(), lr = new bs(), mh = Math.cos(70 * (Math.PI / 180)), cr = (a
|
|
|
3804
3804
|
class Ka extends va {
|
|
3805
3805
|
constructor(e, t) {
|
|
3806
3806
|
super(), _e(this, "object"), _e(this, "domElement"), _e(this, "enabled", !0), _e(this, "target", new $()), _e(this, "minDistance", 0), _e(this, "maxDistance", 1 / 0), _e(this, "minZoom", 0), _e(this, "maxZoom", 1 / 0), _e(this, "minPolarAngle", 0), _e(this, "maxPolarAngle", Math.PI), _e(this, "minAzimuthAngle", -1 / 0), _e(this, "maxAzimuthAngle", 1 / 0), _e(this, "enableDamping", !1), _e(this, "dampingFactor", 0.05), _e(this, "enableZoom", !0), _e(this, "zoomSpeed", 1), _e(this, "enableRotate", !0), _e(this, "rotateSpeed", 1), _e(this, "enablePan", !0), _e(this, "panSpeed", 1), _e(this, "screenSpacePanning", !0), _e(this, "keyPanSpeed", 7), _e(this, "zoomToCursor", !1), _e(this, "autoRotate", !1), _e(this, "autoRotateSpeed", 2), _e(this, "reverseOrbit", !1), _e(this, "reverseHorizontalOrbit", !1), _e(this, "reverseVerticalOrbit", !1), _e(this, "keys", { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }), _e(this, "mouseButtons", {
|
|
3807
|
-
LEFT:
|
|
3808
|
-
MIDDLE:
|
|
3809
|
-
RIGHT:
|
|
3810
|
-
}), _e(this, "touches", { ONE:
|
|
3807
|
+
LEFT: Ot.ROTATE,
|
|
3808
|
+
MIDDLE: Ot.DOLLY,
|
|
3809
|
+
RIGHT: Ot.PAN
|
|
3810
|
+
}), _e(this, "touches", { ONE: jt.ROTATE, TWO: jt.DOLLY_PAN }), _e(this, "target0"), _e(this, "position0"), _e(this, "zoom0"), _e(this, "_domElementKeyEvents", null), _e(this, "getPolarAngle"), _e(this, "getAzimuthalAngle"), _e(this, "setPolarAngle"), _e(this, "setAzimuthalAngle"), _e(this, "getDistance"), _e(this, "getZoomScale"), _e(this, "listenToKeyEvents"), _e(this, "stopListenToKeyEvents"), _e(this, "saveState"), _e(this, "reset"), _e(this, "update"), _e(this, "connect"), _e(this, "dispose"), _e(this, "dollyIn"), _e(this, "dollyOut"), _e(this, "getScale"), _e(this, "setScale"), this.object = e, this.domElement = t, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this.getPolarAngle = () => f.phi, this.getAzimuthalAngle = () => f.theta, this.setPolarAngle = (W) => {
|
|
3811
3811
|
let le = cr(W, 2 * Math.PI), Ee = f.phi;
|
|
3812
3812
|
Ee < 0 && (Ee += 2 * Math.PI), le < 0 && (le += 2 * Math.PI);
|
|
3813
3813
|
let Ue = Math.abs(le - Ee);
|
|
@@ -3826,12 +3826,12 @@ class Ka extends va {
|
|
|
3826
3826
|
}, this.reset = () => {
|
|
3827
3827
|
n.target.copy(n.target0), n.object.position.copy(n.position0), n.object.zoom = n.zoom0, n.object.updateProjectionMatrix(), n.dispatchEvent(s), n.update(), l = r.NONE;
|
|
3828
3828
|
}, this.update = (() => {
|
|
3829
|
-
const W = new $(), le = new $(0, 1, 0), Ee = new je().setFromUnitVectors(e.up, le), Ue = Ee.clone().invert(), nt = new $(),
|
|
3829
|
+
const W = new $(), le = new $(0, 1, 0), Ee = new je().setFromUnitVectors(e.up, le), Ue = Ee.clone().invert(), nt = new $(), Kt = new je(), hn = 2 * Math.PI;
|
|
3830
3830
|
return function() {
|
|
3831
3831
|
const Wo = n.object.position;
|
|
3832
3832
|
Ee.setFromUnitVectors(e.up, le), Ue.copy(Ee).invert(), W.copy(Wo).sub(n.target), W.applyQuaternion(Ee), f.setFromVector3(W), n.autoRotate && l === r.NONE && U(C()), n.enableDamping ? (f.theta += u.theta * n.dampingFactor, f.phi += u.phi * n.dampingFactor) : (f.theta += u.theta, f.phi += u.phi);
|
|
3833
|
-
let
|
|
3834
|
-
isFinite(
|
|
3833
|
+
let qt = n.minAzimuthAngle, Qt = n.maxAzimuthAngle;
|
|
3834
|
+
isFinite(qt) && isFinite(Qt) && (qt < -Math.PI ? qt += hn : qt > Math.PI && (qt -= hn), Qt < -Math.PI ? Qt += hn : Qt > Math.PI && (Qt -= hn), qt <= Qt ? f.theta = Math.max(qt, Math.min(Qt, f.theta)) : f.theta = f.theta > (qt + Qt) / 2 ? Math.max(qt, f.theta) : Math.min(Qt, f.theta)), f.phi = Math.max(n.minPolarAngle, Math.min(n.maxPolarAngle, f.phi)), f.makeSafe(), n.enableDamping === !0 ? n.target.addScaledVector(h, n.dampingFactor) : n.target.add(h), n.zoomToCursor && T || n.object.isOrthographicCamera ? f.radius = we(f.radius) : f.radius = we(f.radius * d), W.setFromSpherical(f), W.applyQuaternion(Ue), Wo.copy(n.target).add(W), n.object.matrixAutoUpdate || n.object.updateMatrix(), n.object.lookAt(n.target), n.enableDamping === !0 ? (u.theta *= 1 - n.dampingFactor, u.phi *= 1 - n.dampingFactor, h.multiplyScalar(1 - n.dampingFactor)) : (u.set(0, 0, 0), h.set(0, 0, 0));
|
|
3835
3835
|
let os = !1;
|
|
3836
3836
|
if (n.zoomToCursor && T) {
|
|
3837
3837
|
let rs = null;
|
|
@@ -3849,13 +3849,13 @@ class Ka extends va {
|
|
|
3849
3849
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), n.zoomToCursor = !1;
|
|
3850
3850
|
rs !== null && (n.screenSpacePanning ? n.target.set(0, 0, -1).transformDirection(n.object.matrix).multiplyScalar(rs).add(n.object.position) : (zs.origin.copy(n.object.position), zs.direction.set(0, 0, -1).transformDirection(n.object.matrix), Math.abs(n.object.up.dot(zs.direction)) < mh ? e.lookAt(n.target) : (lr.setFromNormalAndCoplanarPoint(n.object.up, n.target), zs.intersectPlane(lr, n.target))));
|
|
3851
3851
|
} else n.object instanceof _n && n.object.isOrthographicCamera && (os = d !== 1, os && (n.object.zoom = Math.max(n.minZoom, Math.min(n.maxZoom, n.object.zoom / d)), n.object.updateProjectionMatrix()));
|
|
3852
|
-
return d = 1, T = !1, os || nt.distanceToSquared(n.object.position) > c || 8 * (1 -
|
|
3852
|
+
return d = 1, T = !1, os || nt.distanceToSquared(n.object.position) > c || 8 * (1 - Kt.dot(n.object.quaternion)) > c ? (n.dispatchEvent(s), nt.copy(n.object.position), Kt.copy(n.object.quaternion), os = !1, !0) : !1;
|
|
3853
3853
|
};
|
|
3854
3854
|
})(), this.connect = (W) => {
|
|
3855
3855
|
n.domElement = W, n.domElement.style.touchAction = "none", n.domElement.addEventListener("contextmenu", is), n.domElement.addEventListener("pointerdown", Re), n.domElement.addEventListener("pointercancel", He), n.domElement.addEventListener("wheel", En);
|
|
3856
3856
|
}, this.dispose = () => {
|
|
3857
|
-
var W, le, Ee, Ue, nt,
|
|
3858
|
-
n.domElement && (n.domElement.style.touchAction = "auto"), (W = n.domElement) == null || W.removeEventListener("contextmenu", is), (le = n.domElement) == null || le.removeEventListener("pointerdown", Re), (Ee = n.domElement) == null || Ee.removeEventListener("pointercancel", He), (Ue = n.domElement) == null || Ue.removeEventListener("wheel", En), (nt = n.domElement) == null || nt.ownerDocument.removeEventListener("pointermove", Ke), (
|
|
3857
|
+
var W, le, Ee, Ue, nt, Kt;
|
|
3858
|
+
n.domElement && (n.domElement.style.touchAction = "auto"), (W = n.domElement) == null || W.removeEventListener("contextmenu", is), (le = n.domElement) == null || le.removeEventListener("pointerdown", Re), (Ee = n.domElement) == null || Ee.removeEventListener("pointercancel", He), (Ue = n.domElement) == null || Ue.removeEventListener("wheel", En), (nt = n.domElement) == null || nt.ownerDocument.removeEventListener("pointermove", Ke), (Kt = n.domElement) == null || Kt.ownerDocument.removeEventListener("pointerup", He), n._domElementKeyEvents !== null && n._domElementKeyEvents.removeEventListener("keydown", kt);
|
|
3859
3859
|
};
|
|
3860
3860
|
const n = this, s = { type: "change" }, i = { type: "start" }, o = { type: "end" }, r = {
|
|
3861
3861
|
NONE: -1,
|
|
@@ -3882,15 +3882,15 @@ class Ka extends va {
|
|
|
3882
3882
|
function U(W) {
|
|
3883
3883
|
n.reverseOrbit || n.reverseHorizontalOrbit ? u.theta += W : u.theta -= W;
|
|
3884
3884
|
}
|
|
3885
|
-
function
|
|
3885
|
+
function Y(W) {
|
|
3886
3886
|
n.reverseOrbit || n.reverseVerticalOrbit ? u.phi += W : u.phi -= W;
|
|
3887
3887
|
}
|
|
3888
|
-
const
|
|
3888
|
+
const V = (() => {
|
|
3889
3889
|
const W = new $();
|
|
3890
3890
|
return function(Ee, Ue) {
|
|
3891
3891
|
W.setFromMatrixColumn(Ue, 0), W.multiplyScalar(-Ee), h.add(W);
|
|
3892
3892
|
};
|
|
3893
|
-
})(),
|
|
3893
|
+
})(), ne = (() => {
|
|
3894
3894
|
const W = new $();
|
|
3895
3895
|
return function(Ee, Ue) {
|
|
3896
3896
|
n.screenSpacePanning === !0 ? W.setFromMatrixColumn(Ue, 1) : (W.setFromMatrixColumn(Ue, 0), W.crossVectors(n.object.up, W)), W.multiplyScalar(Ee), h.add(W);
|
|
@@ -3900,34 +3900,34 @@ class Ka extends va {
|
|
|
3900
3900
|
return function(Ee, Ue) {
|
|
3901
3901
|
const nt = n.domElement;
|
|
3902
3902
|
if (nt && n.object instanceof Lt && n.object.isPerspectiveCamera) {
|
|
3903
|
-
const
|
|
3904
|
-
W.copy(
|
|
3905
|
-
let
|
|
3906
|
-
|
|
3907
|
-
} else nt && n.object instanceof _n && n.object.isOrthographicCamera ? (
|
|
3903
|
+
const Kt = n.object.position;
|
|
3904
|
+
W.copy(Kt).sub(n.target);
|
|
3905
|
+
let hn = W.length();
|
|
3906
|
+
hn *= Math.tan(n.object.fov / 2 * Math.PI / 180), V(2 * Ee * hn / nt.clientHeight, n.object.matrix), ne(2 * Ue * hn / nt.clientHeight, n.object.matrix);
|
|
3907
|
+
} else nt && n.object instanceof _n && n.object.isOrthographicCamera ? (V(
|
|
3908
3908
|
Ee * (n.object.right - n.object.left) / n.object.zoom / nt.clientWidth,
|
|
3909
3909
|
n.object.matrix
|
|
3910
|
-
),
|
|
3910
|
+
), ne(
|
|
3911
3911
|
Ue * (n.object.top - n.object.bottom) / n.object.zoom / nt.clientHeight,
|
|
3912
3912
|
n.object.matrix
|
|
3913
3913
|
)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), n.enablePan = !1);
|
|
3914
3914
|
};
|
|
3915
3915
|
})();
|
|
3916
|
-
function
|
|
3916
|
+
function ee(W) {
|
|
3917
3917
|
n.object instanceof Lt && n.object.isPerspectiveCamera || n.object instanceof _n && n.object.isOrthographicCamera ? d = W : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), n.enableZoom = !1);
|
|
3918
3918
|
}
|
|
3919
3919
|
function te(W) {
|
|
3920
|
-
|
|
3920
|
+
ee(d / W);
|
|
3921
3921
|
}
|
|
3922
3922
|
function fe(W) {
|
|
3923
|
-
|
|
3923
|
+
ee(d * W);
|
|
3924
3924
|
}
|
|
3925
3925
|
function he(W) {
|
|
3926
3926
|
if (!n.zoomToCursor || !n.domElement)
|
|
3927
3927
|
return;
|
|
3928
3928
|
T = !0;
|
|
3929
|
-
const le = n.domElement.getBoundingClientRect(), Ee = W.clientX - le.left, Ue = W.clientY - le.top, nt = le.width,
|
|
3930
|
-
_.x = Ee / nt * 2 - 1, _.y = -(Ue /
|
|
3929
|
+
const le = n.domElement.getBoundingClientRect(), Ee = W.clientX - le.left, Ue = W.clientY - le.top, nt = le.width, Kt = le.height;
|
|
3930
|
+
_.x = Ee / nt * 2 - 1, _.y = -(Ue / Kt) * 2 + 1, E.set(_.x, _.y, 1).unproject(n.object).sub(n.object.position).normalize();
|
|
3931
3931
|
}
|
|
3932
3932
|
function we(W) {
|
|
3933
3933
|
return Math.max(n.minDistance, Math.min(n.maxDistance, W));
|
|
@@ -3944,7 +3944,7 @@ class Ka extends va {
|
|
|
3944
3944
|
function O(W) {
|
|
3945
3945
|
m.set(W.clientX, W.clientY), v.subVectors(m, p).multiplyScalar(n.rotateSpeed);
|
|
3946
3946
|
const le = n.domElement;
|
|
3947
|
-
le && (U(2 * Math.PI * v.x / le.clientHeight),
|
|
3947
|
+
le && (U(2 * Math.PI * v.x / le.clientHeight), Y(2 * Math.PI * v.y / le.clientHeight)), p.copy(m), n.update();
|
|
3948
3948
|
}
|
|
3949
3949
|
function z(W) {
|
|
3950
3950
|
R.set(W.clientX, W.clientY), w.subVectors(R, M), w.y > 0 ? te(N()) : w.y < 0 && fe(N()), M.copy(R), n.update();
|
|
@@ -4008,7 +4008,7 @@ class Ka extends va {
|
|
|
4008
4008
|
}
|
|
4009
4009
|
v.subVectors(m, p).multiplyScalar(n.rotateSpeed);
|
|
4010
4010
|
const le = n.domElement;
|
|
4011
|
-
le && (U(2 * Math.PI * v.x / le.clientHeight),
|
|
4011
|
+
le && (U(2 * Math.PI * v.x / le.clientHeight), Y(2 * Math.PI * v.y / le.clientHeight)), p.copy(m);
|
|
4012
4012
|
}
|
|
4013
4013
|
function G(W) {
|
|
4014
4014
|
if (y.length == 1)
|
|
@@ -4034,7 +4034,7 @@ class Ka extends va {
|
|
|
4034
4034
|
n.enabled !== !1 && (y.length === 0 && ((le = n.domElement) == null || le.ownerDocument.addEventListener("pointermove", Ke), (Ee = n.domElement) == null || Ee.ownerDocument.addEventListener("pointerup", He)), Cs(W), W.pointerType === "touch" ? vt(W) : bt(W));
|
|
4035
4035
|
}
|
|
4036
4036
|
function Ke(W) {
|
|
4037
|
-
n.enabled !== !1 && (W.pointerType === "touch" ?
|
|
4037
|
+
n.enabled !== !1 && (W.pointerType === "touch" ? Nt(W) : un(W));
|
|
4038
4038
|
}
|
|
4039
4039
|
function He(W) {
|
|
4040
4040
|
var le, Ee, Ue;
|
|
@@ -4056,12 +4056,12 @@ class Ka extends va {
|
|
|
4056
4056
|
le = -1;
|
|
4057
4057
|
}
|
|
4058
4058
|
switch (le) {
|
|
4059
|
-
case
|
|
4059
|
+
case Ot.DOLLY:
|
|
4060
4060
|
if (n.enableZoom === !1)
|
|
4061
4061
|
return;
|
|
4062
4062
|
B(W), l = r.DOLLY;
|
|
4063
4063
|
break;
|
|
4064
|
-
case
|
|
4064
|
+
case Ot.ROTATE:
|
|
4065
4065
|
if (W.ctrlKey || W.metaKey || W.shiftKey) {
|
|
4066
4066
|
if (n.enablePan === !1)
|
|
4067
4067
|
return;
|
|
@@ -4072,7 +4072,7 @@ class Ka extends va {
|
|
|
4072
4072
|
I(W), l = r.ROTATE;
|
|
4073
4073
|
}
|
|
4074
4074
|
break;
|
|
4075
|
-
case
|
|
4075
|
+
case Ot.PAN:
|
|
4076
4076
|
if (W.ctrlKey || W.metaKey || W.shiftKey) {
|
|
4077
4077
|
if (n.enableRotate === !1)
|
|
4078
4078
|
return;
|
|
@@ -4088,7 +4088,7 @@ class Ka extends va {
|
|
|
4088
4088
|
}
|
|
4089
4089
|
l !== r.NONE && n.dispatchEvent(i);
|
|
4090
4090
|
}
|
|
4091
|
-
function
|
|
4091
|
+
function un(W) {
|
|
4092
4092
|
if (n.enabled !== !1)
|
|
4093
4093
|
switch (l) {
|
|
4094
4094
|
case r.ROTATE:
|
|
@@ -4118,12 +4118,12 @@ class Ka extends va {
|
|
|
4118
4118
|
switch (Is(W), y.length) {
|
|
4119
4119
|
case 1:
|
|
4120
4120
|
switch (n.touches.ONE) {
|
|
4121
|
-
case
|
|
4121
|
+
case jt.ROTATE:
|
|
4122
4122
|
if (n.enableRotate === !1)
|
|
4123
4123
|
return;
|
|
4124
4124
|
X(), l = r.TOUCH_ROTATE;
|
|
4125
4125
|
break;
|
|
4126
|
-
case
|
|
4126
|
+
case jt.PAN:
|
|
4127
4127
|
if (n.enablePan === !1)
|
|
4128
4128
|
return;
|
|
4129
4129
|
H(), l = r.TOUCH_PAN;
|
|
@@ -4134,12 +4134,12 @@ class Ka extends va {
|
|
|
4134
4134
|
break;
|
|
4135
4135
|
case 2:
|
|
4136
4136
|
switch (n.touches.TWO) {
|
|
4137
|
-
case
|
|
4137
|
+
case jt.DOLLY_PAN:
|
|
4138
4138
|
if (n.enableZoom === !1 && n.enablePan === !1)
|
|
4139
4139
|
return;
|
|
4140
4140
|
K(), l = r.TOUCH_DOLLY_PAN;
|
|
4141
4141
|
break;
|
|
4142
|
-
case
|
|
4142
|
+
case jt.DOLLY_ROTATE:
|
|
4143
4143
|
if (n.enableZoom === !1 && n.enableRotate === !1)
|
|
4144
4144
|
return;
|
|
4145
4145
|
se(), l = r.TOUCH_DOLLY_ROTATE;
|
|
@@ -4153,7 +4153,7 @@ class Ka extends va {
|
|
|
4153
4153
|
}
|
|
4154
4154
|
l !== r.NONE && n.dispatchEvent(i);
|
|
4155
4155
|
}
|
|
4156
|
-
function
|
|
4156
|
+
function Nt(W) {
|
|
4157
4157
|
switch (Is(W), l) {
|
|
4158
4158
|
case r.TOUCH_ROTATE:
|
|
4159
4159
|
if (n.enableRotate === !1)
|
|
@@ -4206,13 +4206,13 @@ class Ka extends va {
|
|
|
4206
4206
|
}, this.dollyOut = (W = N()) => {
|
|
4207
4207
|
te(W), n.update();
|
|
4208
4208
|
}, this.getScale = () => d, this.setScale = (W) => {
|
|
4209
|
-
|
|
4209
|
+
ee(W), n.update();
|
|
4210
4210
|
}, this.getZoomScale = () => N(), t !== void 0 && this.connect(t), this.update();
|
|
4211
4211
|
}
|
|
4212
4212
|
}
|
|
4213
4213
|
class gh extends Ka {
|
|
4214
4214
|
constructor(e, t) {
|
|
4215
|
-
super(e, t), this.screenSpacePanning = !1, this.mouseButtons.LEFT =
|
|
4215
|
+
super(e, t), this.screenSpacePanning = !1, this.mouseButtons.LEFT = Ot.PAN, this.mouseButtons.RIGHT = Ot.ROTATE, this.touches.ONE = jt.PAN, this.touches.TWO = jt.DOLLY_ROTATE;
|
|
4216
4216
|
}
|
|
4217
4217
|
}
|
|
4218
4218
|
function ns(a) {
|
|
@@ -4227,7 +4227,7 @@ function ns(a) {
|
|
|
4227
4227
|
return e;
|
|
4228
4228
|
}
|
|
4229
4229
|
}
|
|
4230
|
-
const In = "srgb",
|
|
4230
|
+
const In = "srgb", sn = "srgb-linear", ur = 3001, vh = 3e3;
|
|
4231
4231
|
class yh extends Un {
|
|
4232
4232
|
constructor(e) {
|
|
4233
4233
|
super(e), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(t) {
|
|
@@ -4442,7 +4442,7 @@ class xh {
|
|
|
4442
4442
|
const i = t.json, l = ((i.extensions && i.extensions[this.name] || {}).lights || [])[e];
|
|
4443
4443
|
let c;
|
|
4444
4444
|
const f = new be(16777215);
|
|
4445
|
-
l.color !== void 0 && f.setRGB(l.color[0], l.color[1], l.color[2],
|
|
4445
|
+
l.color !== void 0 && f.setRGB(l.color[0], l.color[1], l.color[2], sn);
|
|
4446
4446
|
const u = l.range !== void 0 ? l.range : 0;
|
|
4447
4447
|
switch (l.type) {
|
|
4448
4448
|
case "directional":
|
|
@@ -4457,7 +4457,7 @@ class xh {
|
|
|
4457
4457
|
default:
|
|
4458
4458
|
throw new Error("THREE.GLTFLoader: Unexpected light type: " + l.type);
|
|
4459
4459
|
}
|
|
4460
|
-
return c.position.set(0, 0, 0), c.decay = 2,
|
|
4460
|
+
return c.position.set(0, 0, 0), c.decay = 2, Jt(c, l), l.intensity !== void 0 && (c.intensity = l.intensity), c.name = t.createUniqueName(l.name || "light_" + e), s = Promise.resolve(c), t.cache.add(n, s), s;
|
|
4461
4461
|
}
|
|
4462
4462
|
getDependency(e, t) {
|
|
4463
4463
|
if (e === "light")
|
|
@@ -4475,7 +4475,7 @@ class wh {
|
|
|
4475
4475
|
this.name = Oe.KHR_MATERIALS_UNLIT;
|
|
4476
4476
|
}
|
|
4477
4477
|
getMaterialType() {
|
|
4478
|
-
return
|
|
4478
|
+
return Xt;
|
|
4479
4479
|
}
|
|
4480
4480
|
extendParams(e, t, n) {
|
|
4481
4481
|
const s = [];
|
|
@@ -4484,7 +4484,7 @@ class wh {
|
|
|
4484
4484
|
if (i) {
|
|
4485
4485
|
if (Array.isArray(i.baseColorFactor)) {
|
|
4486
4486
|
const o = i.baseColorFactor;
|
|
4487
|
-
e.color.setRGB(o[0], o[1], o[2],
|
|
4487
|
+
e.color.setRGB(o[0], o[1], o[2], sn), e.opacity = o[3];
|
|
4488
4488
|
}
|
|
4489
4489
|
i.baseColorTexture !== void 0 && s.push(n.assignTexture(e, "map", i.baseColorTexture, In));
|
|
4490
4490
|
}
|
|
@@ -4509,7 +4509,7 @@ class bh {
|
|
|
4509
4509
|
}
|
|
4510
4510
|
getMaterialType(e) {
|
|
4511
4511
|
const n = this.parser.json.materials[e];
|
|
4512
|
-
return !n.extensions || !n.extensions[this.name] ? null :
|
|
4512
|
+
return !n.extensions || !n.extensions[this.name] ? null : Zt;
|
|
4513
4513
|
}
|
|
4514
4514
|
extendMaterialParams(e, t) {
|
|
4515
4515
|
const n = this.parser, s = n.json.materials[e];
|
|
@@ -4529,7 +4529,7 @@ class Eh {
|
|
|
4529
4529
|
}
|
|
4530
4530
|
getMaterialType(e) {
|
|
4531
4531
|
const n = this.parser.json.materials[e];
|
|
4532
|
-
return !n.extensions || !n.extensions[this.name] ? null :
|
|
4532
|
+
return !n.extensions || !n.extensions[this.name] ? null : Zt;
|
|
4533
4533
|
}
|
|
4534
4534
|
extendMaterialParams(e, t) {
|
|
4535
4535
|
const s = this.parser.json.materials[e];
|
|
@@ -4545,7 +4545,7 @@ class Mh {
|
|
|
4545
4545
|
}
|
|
4546
4546
|
getMaterialType(e) {
|
|
4547
4547
|
const n = this.parser.json.materials[e];
|
|
4548
|
-
return !n.extensions || !n.extensions[this.name] ? null :
|
|
4548
|
+
return !n.extensions || !n.extensions[this.name] ? null : Zt;
|
|
4549
4549
|
}
|
|
4550
4550
|
extendMaterialParams(e, t) {
|
|
4551
4551
|
const n = this.parser, s = n.json.materials[e];
|
|
@@ -4563,7 +4563,7 @@ class Sh {
|
|
|
4563
4563
|
}
|
|
4564
4564
|
getMaterialType(e) {
|
|
4565
4565
|
const n = this.parser.json.materials[e];
|
|
4566
|
-
return !n.extensions || !n.extensions[this.name] ? null :
|
|
4566
|
+
return !n.extensions || !n.extensions[this.name] ? null : Zt;
|
|
4567
4567
|
}
|
|
4568
4568
|
extendMaterialParams(e, t) {
|
|
4569
4569
|
const n = this.parser, s = n.json.materials[e];
|
|
@@ -4574,7 +4574,7 @@ class Sh {
|
|
|
4574
4574
|
const o = s.extensions[this.name];
|
|
4575
4575
|
if (o.sheenColorFactor !== void 0) {
|
|
4576
4576
|
const r = o.sheenColorFactor;
|
|
4577
|
-
t.sheenColor.setRGB(r[0], r[1], r[2],
|
|
4577
|
+
t.sheenColor.setRGB(r[0], r[1], r[2], sn);
|
|
4578
4578
|
}
|
|
4579
4579
|
return o.sheenRoughnessFactor !== void 0 && (t.sheenRoughness = o.sheenRoughnessFactor), o.sheenColorTexture !== void 0 && i.push(n.assignTexture(t, "sheenColorMap", o.sheenColorTexture, In)), o.sheenRoughnessTexture !== void 0 && i.push(n.assignTexture(t, "sheenRoughnessMap", o.sheenRoughnessTexture)), Promise.all(i);
|
|
4580
4580
|
}
|
|
@@ -4585,7 +4585,7 @@ class Ah {
|
|
|
4585
4585
|
}
|
|
4586
4586
|
getMaterialType(e) {
|
|
4587
4587
|
const n = this.parser.json.materials[e];
|
|
4588
|
-
return !n.extensions || !n.extensions[this.name] ? null :
|
|
4588
|
+
return !n.extensions || !n.extensions[this.name] ? null : Zt;
|
|
4589
4589
|
}
|
|
4590
4590
|
extendMaterialParams(e, t) {
|
|
4591
4591
|
const n = this.parser, s = n.json.materials[e];
|
|
@@ -4601,7 +4601,7 @@ class Ph {
|
|
|
4601
4601
|
}
|
|
4602
4602
|
getMaterialType(e) {
|
|
4603
4603
|
const n = this.parser.json.materials[e];
|
|
4604
|
-
return !n.extensions || !n.extensions[this.name] ? null :
|
|
4604
|
+
return !n.extensions || !n.extensions[this.name] ? null : Zt;
|
|
4605
4605
|
}
|
|
4606
4606
|
extendMaterialParams(e, t) {
|
|
4607
4607
|
const n = this.parser, s = n.json.materials[e];
|
|
@@ -4614,7 +4614,7 @@ class Ph {
|
|
|
4614
4614
|
r[0],
|
|
4615
4615
|
r[1],
|
|
4616
4616
|
r[2],
|
|
4617
|
-
|
|
4617
|
+
sn
|
|
4618
4618
|
), Promise.all(i);
|
|
4619
4619
|
}
|
|
4620
4620
|
}
|
|
@@ -4624,7 +4624,7 @@ class Rh {
|
|
|
4624
4624
|
}
|
|
4625
4625
|
getMaterialType(e) {
|
|
4626
4626
|
const n = this.parser.json.materials[e];
|
|
4627
|
-
return !n.extensions || !n.extensions[this.name] ? null :
|
|
4627
|
+
return !n.extensions || !n.extensions[this.name] ? null : Zt;
|
|
4628
4628
|
}
|
|
4629
4629
|
extendMaterialParams(e, t) {
|
|
4630
4630
|
const s = this.parser.json.materials[e];
|
|
@@ -4640,7 +4640,7 @@ class Ch {
|
|
|
4640
4640
|
}
|
|
4641
4641
|
getMaterialType(e) {
|
|
4642
4642
|
const n = this.parser.json.materials[e];
|
|
4643
|
-
return !n.extensions || !n.extensions[this.name] ? null :
|
|
4643
|
+
return !n.extensions || !n.extensions[this.name] ? null : Zt;
|
|
4644
4644
|
}
|
|
4645
4645
|
extendMaterialParams(e, t) {
|
|
4646
4646
|
const n = this.parser, s = n.json.materials[e];
|
|
@@ -4649,7 +4649,7 @@ class Ch {
|
|
|
4649
4649
|
const i = [], o = s.extensions[this.name];
|
|
4650
4650
|
t.specularIntensity = o.specularFactor !== void 0 ? o.specularFactor : 1, o.specularTexture !== void 0 && i.push(n.assignTexture(t, "specularIntensityMap", o.specularTexture));
|
|
4651
4651
|
const r = o.specularColorFactor || [1, 1, 1];
|
|
4652
|
-
return t.specularColor = new be().setRGB(r[0], r[1], r[2],
|
|
4652
|
+
return t.specularColor = new be().setRGB(r[0], r[1], r[2], sn), o.specularColorTexture !== void 0 && i.push(
|
|
4653
4653
|
n.assignTexture(t, "specularColorMap", o.specularColorTexture, In)
|
|
4654
4654
|
), Promise.all(i);
|
|
4655
4655
|
}
|
|
@@ -4660,7 +4660,7 @@ class Ih {
|
|
|
4660
4660
|
}
|
|
4661
4661
|
getMaterialType(e) {
|
|
4662
4662
|
const n = this.parser.json.materials[e];
|
|
4663
|
-
return !n.extensions || !n.extensions[this.name] ? null :
|
|
4663
|
+
return !n.extensions || !n.extensions[this.name] ? null : Zt;
|
|
4664
4664
|
}
|
|
4665
4665
|
extendMaterialParams(e, t) {
|
|
4666
4666
|
const n = this.parser, s = n.json.materials[e];
|
|
@@ -4676,7 +4676,7 @@ class Oh {
|
|
|
4676
4676
|
}
|
|
4677
4677
|
getMaterialType(e) {
|
|
4678
4678
|
const n = this.parser.json.materials[e];
|
|
4679
|
-
return !n.extensions || !n.extensions[this.name] ? null :
|
|
4679
|
+
return !n.extensions || !n.extensions[this.name] ? null : Zt;
|
|
4680
4680
|
}
|
|
4681
4681
|
extendMaterialParams(e, t) {
|
|
4682
4682
|
const n = this.parser, s = n.json.materials[e];
|
|
@@ -4896,7 +4896,7 @@ class Fh {
|
|
|
4896
4896
|
},
|
|
4897
4897
|
r,
|
|
4898
4898
|
c,
|
|
4899
|
-
|
|
4899
|
+
sn,
|
|
4900
4900
|
d
|
|
4901
4901
|
);
|
|
4902
4902
|
});
|
|
@@ -4977,7 +4977,7 @@ const St = {
|
|
|
4977
4977
|
9986: fa,
|
|
4978
4978
|
9987: Eo
|
|
4979
4979
|
}, dr = {
|
|
4980
|
-
33071:
|
|
4980
|
+
33071: Yt,
|
|
4981
4981
|
33648: pa,
|
|
4982
4982
|
10497: Ln
|
|
4983
4983
|
}, Ri = {
|
|
@@ -5007,7 +5007,7 @@ const St = {
|
|
|
5007
5007
|
COLOR_0: "color",
|
|
5008
5008
|
WEIGHTS_0: "skinWeight",
|
|
5009
5009
|
JOINTS_0: "skinIndex"
|
|
5010
|
-
},
|
|
5010
|
+
}, dn = {
|
|
5011
5011
|
scale: "scale",
|
|
5012
5012
|
translation: "position",
|
|
5013
5013
|
rotation: "quaternion",
|
|
@@ -5038,7 +5038,7 @@ function An(a, e, t) {
|
|
|
5038
5038
|
for (const n in t.extensions)
|
|
5039
5039
|
a[n] === void 0 && (e.userData.gltfExtensions = e.userData.gltfExtensions || {}, e.userData.gltfExtensions[n] = t.extensions[n]);
|
|
5040
5040
|
}
|
|
5041
|
-
function
|
|
5041
|
+
function Jt(a, e) {
|
|
5042
5042
|
e.extras !== void 0 && (typeof e.extras == "object" ? Object.assign(a.userData, e.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + e.extras));
|
|
5043
5043
|
}
|
|
5044
5044
|
function Wh(a, e, t) {
|
|
@@ -5158,7 +5158,7 @@ class qh {
|
|
|
5158
5158
|
parser: n,
|
|
5159
5159
|
userData: {}
|
|
5160
5160
|
};
|
|
5161
|
-
return An(i, r, s),
|
|
5161
|
+
return An(i, r, s), Jt(r, s), Promise.all(
|
|
5162
5162
|
n._invokeAll(function(l) {
|
|
5163
5163
|
return l.afterRoot && l.afterRoot(r);
|
|
5164
5164
|
})
|
|
@@ -5360,7 +5360,7 @@ class qh {
|
|
|
5360
5360
|
if (h && h !== u) {
|
|
5361
5361
|
const g = Math.floor(d / h), b = "InterleavedBuffer:" + s.bufferView + ":" + s.componentType + ":" + g + ":" + s.count;
|
|
5362
5362
|
let x = t.cache.get(b);
|
|
5363
|
-
x || (m = new c(r, g * h, s.count * h / f), x = new Mo(m, h / f), t.cache.add(b, x)), v = new
|
|
5363
|
+
x || (m = new c(r, g * h, s.count * h / f), x = new Mo(m, h / f), t.cache.add(b, x)), v = new nn(
|
|
5364
5364
|
x,
|
|
5365
5365
|
l,
|
|
5366
5366
|
d % h / f,
|
|
@@ -5438,7 +5438,7 @@ class qh {
|
|
|
5438
5438
|
}), t.load(qn.resolveURL(u, i.path), p, void 0, h);
|
|
5439
5439
|
});
|
|
5440
5440
|
}).then(function(u) {
|
|
5441
|
-
return c === !0 && r.revokeObjectURL(l),
|
|
5441
|
+
return c === !0 && r.revokeObjectURL(l), Jt(u, o), u.userData.mimeType = o.mimeType || Zh(o.uri), u;
|
|
5442
5442
|
}).catch(function(u) {
|
|
5443
5443
|
throw console.error("THREE.GLTFLoader: Couldn't load texture", l), u;
|
|
5444
5444
|
});
|
|
@@ -5463,7 +5463,7 @@ class qh {
|
|
|
5463
5463
|
o = i.extensions[Oe.KHR_TEXTURE_TRANSFORM].extendTexture(o, r), i.associations.set(o, l);
|
|
5464
5464
|
}
|
|
5465
5465
|
}
|
|
5466
|
-
return s !== void 0 && (typeof s == "number" && (s = s === ur ? In :
|
|
5466
|
+
return s !== void 0 && (typeof s == "number" && (s = s === ur ? In : sn), "colorSpace" in o ? o.colorSpace = s : o.encoding = s === In ? ur : vh), e[t] = o, o;
|
|
5467
5467
|
});
|
|
5468
5468
|
}
|
|
5469
5469
|
/**
|
|
@@ -5514,7 +5514,7 @@ class qh {
|
|
|
5514
5514
|
const u = i.pbrMetallicRoughness || {};
|
|
5515
5515
|
if (r.color = new be(1, 1, 1), r.opacity = 1, Array.isArray(u.baseColorFactor)) {
|
|
5516
5516
|
const d = u.baseColorFactor;
|
|
5517
|
-
r.color.setRGB(d[0], d[1], d[2],
|
|
5517
|
+
r.color.setRGB(d[0], d[1], d[2], sn), r.opacity = d[3];
|
|
5518
5518
|
}
|
|
5519
5519
|
u.baseColorTexture !== void 0 && c.push(t.assignTexture(r, "map", u.baseColorTexture, In)), r.metalness = u.metallicFactor !== void 0 ? u.metallicFactor : 1, r.roughness = u.roughnessFactor !== void 0 ? u.roughnessFactor : 1, u.metallicRoughnessTexture !== void 0 && (c.push(t.assignTexture(r, "metalnessMap", u.metallicRoughnessTexture)), c.push(t.assignTexture(r, "roughnessMap", u.metallicRoughnessTexture))), o = this._invokeOne(function(d) {
|
|
5520
5520
|
return d.getMaterialType && d.getMaterialType(e);
|
|
@@ -5526,29 +5526,29 @@ class qh {
|
|
|
5526
5526
|
)
|
|
5527
5527
|
);
|
|
5528
5528
|
}
|
|
5529
|
-
i.doubleSided === !0 && (r.side =
|
|
5529
|
+
i.doubleSided === !0 && (r.side = on);
|
|
5530
5530
|
const f = i.alphaMode || Ci.OPAQUE;
|
|
5531
|
-
if (f === Ci.BLEND ? (r.transparent = !0, r.depthWrite = !1) : (r.transparent = !1, f === Ci.MASK && (r.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !==
|
|
5531
|
+
if (f === Ci.BLEND ? (r.transparent = !0, r.depthWrite = !1) : (r.transparent = !1, f === Ci.MASK && (r.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== Xt && (c.push(t.assignTexture(r, "normalMap", i.normalTexture)), r.normalScale = new ve(1, 1), i.normalTexture.scale !== void 0)) {
|
|
5532
5532
|
const u = i.normalTexture.scale;
|
|
5533
5533
|
r.normalScale.set(u, u);
|
|
5534
5534
|
}
|
|
5535
|
-
if (i.occlusionTexture !== void 0 && o !==
|
|
5535
|
+
if (i.occlusionTexture !== void 0 && o !== Xt && (c.push(t.assignTexture(r, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (r.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && o !== Xt) {
|
|
5536
5536
|
const u = i.emissiveFactor;
|
|
5537
5537
|
r.emissive = new be().setRGB(
|
|
5538
5538
|
u[0],
|
|
5539
5539
|
u[1],
|
|
5540
5540
|
u[2],
|
|
5541
|
-
|
|
5541
|
+
sn
|
|
5542
5542
|
);
|
|
5543
5543
|
}
|
|
5544
|
-
return i.emissiveTexture !== void 0 && o !==
|
|
5544
|
+
return i.emissiveTexture !== void 0 && o !== Xt && c.push(t.assignTexture(r, "emissiveMap", i.emissiveTexture, In)), Promise.all(c).then(function() {
|
|
5545
5545
|
const u = new o(r);
|
|
5546
|
-
return i.name && (u.name = i.name),
|
|
5546
|
+
return i.name && (u.name = i.name), Jt(u, i), t.associations.set(u, { materials: e }), i.extensions && An(s, u, i), u;
|
|
5547
5547
|
});
|
|
5548
5548
|
}
|
|
5549
5549
|
/** When Object3D instances are targeted by animation, they need unique names. */
|
|
5550
5550
|
createUniqueName(e) {
|
|
5551
|
-
const t =
|
|
5551
|
+
const t = rn.sanitizeNodeName(e || "");
|
|
5552
5552
|
return t in this.nodeNamesUsed ? t + "_" + ++this.nodeNamesUsed[t] : (this.nodeNamesUsed[t] = 0, t);
|
|
5553
5553
|
}
|
|
5554
5554
|
/**
|
|
@@ -5607,7 +5607,7 @@ class qh {
|
|
|
5607
5607
|
g = new wa(m, b);
|
|
5608
5608
|
else
|
|
5609
5609
|
throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + v.mode);
|
|
5610
|
-
Object.keys(g.geometry.morphAttributes).length > 0 && Xh(g, i), g.name = t.createUniqueName(i.name || "mesh_" + e),
|
|
5610
|
+
Object.keys(g.geometry.morphAttributes).length > 0 && Xh(g, i), g.name = t.createUniqueName(i.name || "mesh_" + e), Jt(g, i), v.extensions && An(s, g, v), t.assignFinalMaterial(g), u.push(g);
|
|
5611
5611
|
}
|
|
5612
5612
|
for (let h = 0, p = u.length; h < p; h++)
|
|
5613
5613
|
t.associations.set(u[h], {
|
|
@@ -5616,7 +5616,7 @@ class qh {
|
|
|
5616
5616
|
});
|
|
5617
5617
|
if (u.length === 1)
|
|
5618
5618
|
return i.extensions && An(s, u[0], i), u[0];
|
|
5619
|
-
const d = new
|
|
5619
|
+
const d = new $t();
|
|
5620
5620
|
i.extensions && An(s, d, i), t.associations.set(d, { meshes: e });
|
|
5621
5621
|
for (let h = 0, p = u.length; h < p; h++)
|
|
5622
5622
|
d.add(u[h]);
|
|
@@ -5640,7 +5640,7 @@ class qh {
|
|
|
5640
5640
|
s.aspectRatio || 1,
|
|
5641
5641
|
s.znear || 1,
|
|
5642
5642
|
s.zfar || 2e6
|
|
5643
|
-
) : n.type === "orthographic" && (t = new _n(-s.xmag, s.xmag, s.ymag, -s.ymag, s.znear, s.zfar)), n.name && (t.name = this.createUniqueName(n.name)),
|
|
5643
|
+
) : n.type === "orthographic" && (t = new _n(-s.xmag, s.xmag, s.ymag, -s.ymag, s.znear, s.zfar)), n.name && (t.name = this.createUniqueName(n.name)), Jt(t, n), Promise.resolve(t);
|
|
5644
5644
|
}
|
|
5645
5645
|
/**
|
|
5646
5646
|
* Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
|
|
@@ -5747,10 +5747,10 @@ class qh {
|
|
|
5747
5747
|
r.push(c);
|
|
5748
5748
|
}), this.nodeCache[e] = Promise.all(r).then(function(c) {
|
|
5749
5749
|
let f;
|
|
5750
|
-
if (i.isBone === !0 ? f = new ro() : c.length > 1 ? f = new
|
|
5750
|
+
if (i.isBone === !0 ? f = new ro() : c.length > 1 ? f = new $t() : c.length === 1 ? f = c[0] : f = new Pt(), f !== c[0])
|
|
5751
5751
|
for (let u = 0, d = c.length; u < d; u++)
|
|
5752
5752
|
f.add(c[u]);
|
|
5753
|
-
if (i.name && (f.userData.name = i.name, f.name = o),
|
|
5753
|
+
if (i.name && (f.userData.name = i.name, f.name = o), Jt(f, i), i.extensions && An(n, f, i), i.matrix !== void 0) {
|
|
5754
5754
|
const u = new Ie();
|
|
5755
5755
|
u.fromArray(i.matrix), f.applyMatrix4(u);
|
|
5756
5756
|
} else
|
|
@@ -5764,8 +5764,8 @@ class qh {
|
|
|
5764
5764
|
* @return {Promise<Group>}
|
|
5765
5765
|
*/
|
|
5766
5766
|
loadScene(e) {
|
|
5767
|
-
const t = this.extensions, n = this.json.scenes[e], s = this, i = new
|
|
5768
|
-
n.name && (i.name = s.createUniqueName(n.name)),
|
|
5767
|
+
const t = this.extensions, n = this.json.scenes[e], s = this, i = new $t();
|
|
5768
|
+
n.name && (i.name = s.createUniqueName(n.name)), Jt(i, n), n.extensions && An(t, i, n);
|
|
5769
5769
|
const o = n.nodes || [], r = [];
|
|
5770
5770
|
for (let l = 0, c = o.length; l < c; l++)
|
|
5771
5771
|
r.push(s.getDependency("node", o[l]));
|
|
@@ -5786,19 +5786,19 @@ class qh {
|
|
|
5786
5786
|
}
|
|
5787
5787
|
_createAnimationTracks(e, t, n, s, i) {
|
|
5788
5788
|
const o = [], r = e.name ? e.name : e.uuid, l = [];
|
|
5789
|
-
|
|
5789
|
+
dn[i.path] === dn.weights ? e.traverse(function(d) {
|
|
5790
5790
|
d.morphTargetInfluences && l.push(d.name ? d.name : d.uuid);
|
|
5791
5791
|
}) : l.push(r);
|
|
5792
5792
|
let c;
|
|
5793
|
-
switch (
|
|
5794
|
-
case
|
|
5793
|
+
switch (dn[i.path]) {
|
|
5794
|
+
case dn.weights:
|
|
5795
5795
|
c = lo;
|
|
5796
5796
|
break;
|
|
5797
|
-
case
|
|
5797
|
+
case dn.rotation:
|
|
5798
5798
|
c = co;
|
|
5799
5799
|
break;
|
|
5800
|
-
case
|
|
5801
|
-
case
|
|
5800
|
+
case dn.position:
|
|
5801
|
+
case dn.scale:
|
|
5802
5802
|
c = ao;
|
|
5803
5803
|
break;
|
|
5804
5804
|
default:
|
|
@@ -5817,7 +5817,7 @@ class qh {
|
|
|
5817
5817
|
const f = s.interpolation !== void 0 ? Vh[s.interpolation] : bo, u = this._getArrayFromAccessor(n);
|
|
5818
5818
|
for (let d = 0, h = l.length; d < h; d++) {
|
|
5819
5819
|
const p = new c(
|
|
5820
|
-
l[d] + "." +
|
|
5820
|
+
l[d] + "." + dn[i.path],
|
|
5821
5821
|
t.array,
|
|
5822
5822
|
u,
|
|
5823
5823
|
f
|
|
@@ -5898,7 +5898,7 @@ function pr(a, e, t) {
|
|
|
5898
5898
|
});
|
|
5899
5899
|
s.push(o);
|
|
5900
5900
|
}
|
|
5901
|
-
return
|
|
5901
|
+
return Jt(a, e), Qh(a, e, t), Promise.all(s).then(function() {
|
|
5902
5902
|
return e.targets !== void 0 ? Wh(a, e.targets, t) : a;
|
|
5903
5903
|
});
|
|
5904
5904
|
}
|
|
@@ -5909,7 +5909,7 @@ function Et(a, e, t, n, s, i) {
|
|
|
5909
5909
|
const c = 0.5 * o / (o + r), f = 1 - cs.angleTo(a) / l;
|
|
5910
5910
|
return Math.sign(cs[t]) === 1 ? f * c : r / (o + r) + c + c * (1 - f);
|
|
5911
5911
|
}
|
|
5912
|
-
class Jh extends
|
|
5912
|
+
class Jh extends Gt {
|
|
5913
5913
|
constructor(e = 1, t = 1, n = 1, s = 2, i = 0.1) {
|
|
5914
5914
|
if (s = s * 2 + 1, i = Math.min(e / 2, t / 2, n / 2, i), super(1, 1, 1, s, s, s), s === 1)
|
|
5915
5915
|
return;
|
|
@@ -6338,7 +6338,7 @@ class hf {
|
|
|
6338
6338
|
const n = this.loadTexture(e, t);
|
|
6339
6339
|
n.ID = e.id, n.name = e.attrName;
|
|
6340
6340
|
const s = e.WrapModeU, i = e.WrapModeV, o = s !== void 0 ? s.value : 0, r = i !== void 0 ? i.value : 0;
|
|
6341
|
-
if (n.wrapS = o === 0 ? Ln :
|
|
6341
|
+
if (n.wrapS = o === 0 ? Ln : Yt, n.wrapT = r === 0 ? Ln : Yt, "Scaling" in e) {
|
|
6342
6342
|
const l = e.Scaling.value;
|
|
6343
6343
|
n.repeat.x = l[0], n.repeat.y = l[1];
|
|
6344
6344
|
}
|
|
@@ -6516,7 +6516,7 @@ class hf {
|
|
|
6516
6516
|
}
|
|
6517
6517
|
// create the main Group() to be returned by the loader
|
|
6518
6518
|
parseScene(e, t, n) {
|
|
6519
|
-
mt = new
|
|
6519
|
+
mt = new $t();
|
|
6520
6520
|
const s = this.parseModels(e.skeletons, t, n), i = Ce.Objects.Model, o = this;
|
|
6521
6521
|
s.forEach(function(l) {
|
|
6522
6522
|
const c = i[l.ID];
|
|
@@ -6560,10 +6560,10 @@ class hf {
|
|
|
6560
6560
|
break;
|
|
6561
6561
|
case "Null":
|
|
6562
6562
|
default:
|
|
6563
|
-
f = new
|
|
6563
|
+
f = new $t();
|
|
6564
6564
|
break;
|
|
6565
6565
|
}
|
|
6566
|
-
f.name = l.attrName ?
|
|
6566
|
+
f.name = l.attrName ? rn.sanitizeNodeName(l.attrName) : "", f.ID = r;
|
|
6567
6567
|
}
|
|
6568
6568
|
this.getTransformData(f, l), s.set(r, f);
|
|
6569
6569
|
}
|
|
@@ -6577,7 +6577,7 @@ class hf {
|
|
|
6577
6577
|
l.rawBones.forEach(function(c, f) {
|
|
6578
6578
|
if (c.ID === o.ID) {
|
|
6579
6579
|
const u = i;
|
|
6580
|
-
i = new ro(), i.matrixWorld.copy(c.transformLink), i.name = s ?
|
|
6580
|
+
i = new ro(), i.matrixWorld.copy(c.transformLink), i.name = s ? rn.sanitizeNodeName(s) : "", i.ID = n, l.bones[f] = i, u !== null && i.add(u);
|
|
6581
6581
|
}
|
|
6582
6582
|
});
|
|
6583
6583
|
}
|
|
@@ -7076,7 +7076,7 @@ class df {
|
|
|
7076
7076
|
return;
|
|
7077
7077
|
}
|
|
7078
7078
|
const h = {
|
|
7079
|
-
modelName: d.attrName ?
|
|
7079
|
+
modelName: d.attrName ? rn.sanitizeNodeName(d.attrName) : "",
|
|
7080
7080
|
ID: d.id,
|
|
7081
7081
|
initialPosition: [0, 0, 0],
|
|
7082
7082
|
initialRotation: [0, 0, 0],
|
|
@@ -7093,7 +7093,7 @@ class df {
|
|
|
7093
7093
|
const u = Qe.get(l.ID).parents.filter(function(g) {
|
|
7094
7094
|
return g.relationship !== void 0;
|
|
7095
7095
|
})[0].ID, d = Qe.get(u).parents[0].ID, h = Qe.get(d).parents[0].ID, p = Qe.get(h).parents[0].ID, m = Ce.Objects.Model[p], v = {
|
|
7096
|
-
modelName: m.attrName ?
|
|
7096
|
+
modelName: m.attrName ? rn.sanitizeNodeName(m.attrName) : "",
|
|
7097
7097
|
morphName: Ce.Objects.Deformer[u].attrName
|
|
7098
7098
|
};
|
|
7099
7099
|
i[c] = v;
|
|
@@ -7132,7 +7132,7 @@ class df {
|
|
|
7132
7132
|
generateTracks(e) {
|
|
7133
7133
|
const t = [];
|
|
7134
7134
|
let n = new $(), s = new je(), i = new $();
|
|
7135
|
-
if (e.transform && e.transform.decompose(n, s, i), n = n.toArray(), s = new
|
|
7135
|
+
if (e.transform && e.transform.decompose(n, s, i), n = n.toArray(), s = new tn().setFromQuaternion(s, e.eulerOrder).toArray(), i = i.toArray(), e.T !== void 0 && Object.keys(e.T.curves).length > 0) {
|
|
7136
7136
|
const o = this.generateVectorTrack(
|
|
7137
7137
|
e.modelName,
|
|
7138
7138
|
e.T.curves,
|
|
@@ -7169,8 +7169,8 @@ class df {
|
|
|
7169
7169
|
generateRotationTrack(e, t, n, s, i, o) {
|
|
7170
7170
|
t.x !== void 0 && (this.interpolateRotations(t.x), t.x.values = t.x.values.map(Ye.degToRad)), t.y !== void 0 && (this.interpolateRotations(t.y), t.y.values = t.y.values.map(Ye.degToRad)), t.z !== void 0 && (this.interpolateRotations(t.z), t.z.values = t.z.values.map(Ye.degToRad));
|
|
7171
7171
|
const r = this.getTimesForAllAxes(t), l = this.getKeyframeTrackValues(r, t, n);
|
|
7172
|
-
s !== void 0 && (s = s.map(Ye.degToRad), s.push(o), s = new
|
|
7173
|
-
const c = new je(), f = new
|
|
7172
|
+
s !== void 0 && (s = s.map(Ye.degToRad), s.push(o), s = new tn().fromArray(s), s = new je().setFromEuler(s)), i !== void 0 && (i = i.map(Ye.degToRad), i.push(o), i = new tn().fromArray(i), i = new je().setFromEuler(i).invert());
|
|
7173
|
+
const c = new je(), f = new tn(), u = [];
|
|
7174
7174
|
for (let d = 0; d < l.length; d += 3)
|
|
7175
7175
|
f.set(l[d], l[d + 1], l[d + 2], o), c.setFromEuler(f), s !== void 0 && c.premultiply(s), i !== void 0 && c.multiply(i), c.toArray(u, d / 3 * 4);
|
|
7176
7176
|
return new co(e + ".quaternion", r, u);
|
|
@@ -7630,7 +7630,7 @@ function Gs(a, e, t, n) {
|
|
|
7630
7630
|
const i = s * n.dataSize, o = i + n.dataSize;
|
|
7631
7631
|
return wf(_f, n.buffer, i, o);
|
|
7632
7632
|
}
|
|
7633
|
-
const Oi = new
|
|
7633
|
+
const Oi = new tn(), Hn = new $();
|
|
7634
7634
|
function tl(a) {
|
|
7635
7635
|
const e = new Ie(), t = new Ie(), n = new Ie(), s = new Ie(), i = new Ie(), o = new Ie(), r = new Ie(), l = new Ie(), c = new Ie(), f = new Ie(), u = new Ie(), d = new Ie(), h = a.inheritType ? a.inheritType : 0;
|
|
7636
7636
|
if (a.translation && e.setPosition(Hn.fromArray(a.translation)), a.preRotation) {
|
|
@@ -7763,7 +7763,7 @@ function Sf(a, e, t, n, s) {
|
|
|
7763
7763
|
console.error('THREE.Font: character "' + a + '" does not exists in font family ' + s.familyName + ".");
|
|
7764
7764
|
return;
|
|
7765
7765
|
}
|
|
7766
|
-
const o = new
|
|
7766
|
+
const o = new pn();
|
|
7767
7767
|
let r, l, c, f, u, d, h, p;
|
|
7768
7768
|
if (i.o) {
|
|
7769
7769
|
const m = i._cachedOutline || (i._cachedOutline = i.o.split(" "));
|
|
@@ -7806,10 +7806,10 @@ class xr extends jl {
|
|
|
7806
7806
|
}, f = `
|
|
7807
7807
|
`, u = function(_, T, y) {
|
|
7808
7808
|
T = T || 1024;
|
|
7809
|
-
let C = _.pos, N = -1, U = 0,
|
|
7810
|
-
for (; 0 > (N =
|
|
7811
|
-
|
|
7812
|
-
return -1 < N ? (_.pos += U + N + 1,
|
|
7809
|
+
let C = _.pos, N = -1, U = 0, Y = "", V = String.fromCharCode.apply(null, new Uint16Array(_.subarray(C, C + 128)));
|
|
7810
|
+
for (; 0 > (N = V.indexOf(f)) && U < T && C < _.byteLength; )
|
|
7811
|
+
Y += V, U += V.length, C += 128, V += String.fromCharCode.apply(null, new Uint16Array(_.subarray(C, C + 128)));
|
|
7812
|
+
return -1 < N ? (_.pos += U + N + 1, Y + V.slice(0, N)) : !1;
|
|
7813
7813
|
}, d = function(_) {
|
|
7814
7814
|
const T = /^#\?(\S+)/, y = /^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/, A = /^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/, C = /^\s*FORMAT=(\S+)\s*$/, N = /^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/, U = {
|
|
7815
7815
|
valid: 0,
|
|
@@ -7822,16 +7822,16 @@ class xr extends jl {
|
|
|
7822
7822
|
width: 0,
|
|
7823
7823
|
height: 0
|
|
7824
7824
|
};
|
|
7825
|
-
let
|
|
7826
|
-
for ((_.pos >= _.byteLength || !(
|
|
7827
|
-
`;
|
|
7828
|
-
if (U.string +=
|
|
7829
|
-
`,
|
|
7830
|
-
U.comments +=
|
|
7825
|
+
let Y, V;
|
|
7826
|
+
for ((_.pos >= _.byteLength || !(Y = u(_))) && o(1, "no header found"), (V = Y.match(T)) || o(3, "bad initial token"), U.valid |= 1, U.programtype = V[1], U.string += Y + `
|
|
7827
|
+
`; Y = u(_), Y !== !1; ) {
|
|
7828
|
+
if (U.string += Y + `
|
|
7829
|
+
`, Y.charAt(0) === "#") {
|
|
7830
|
+
U.comments += Y + `
|
|
7831
7831
|
`;
|
|
7832
7832
|
continue;
|
|
7833
7833
|
}
|
|
7834
|
-
if ((
|
|
7834
|
+
if ((V = Y.match(y)) && (U.gamma = parseFloat(V[1])), (V = Y.match(A)) && (U.exposure = parseFloat(V[1])), (V = Y.match(C)) && (U.valid |= 2, U.format = V[1]), (V = Y.match(N)) && (U.valid |= 4, U.height = parseInt(V[1], 10), U.width = parseInt(V[2], 10)), U.valid & 2 && U.valid & 4)
|
|
7835
7835
|
break;
|
|
7836
7836
|
}
|
|
7837
7837
|
return U.valid & 2 || o(3, "missing format specifier"), U.valid & 4 || o(3, "missing image size specifier"), U;
|
|
@@ -7847,25 +7847,25 @@ class xr extends jl {
|
|
|
7847
7847
|
const C = new Uint8Array(4 * T * y);
|
|
7848
7848
|
C.length || o(4, "unable to allocate buffer space");
|
|
7849
7849
|
let N = 0, U = 0;
|
|
7850
|
-
const
|
|
7850
|
+
const Y = 4 * A, V = new Uint8Array(4), ne = new Uint8Array(Y);
|
|
7851
7851
|
let Z = y;
|
|
7852
7852
|
for (; Z > 0 && U < _.byteLength; ) {
|
|
7853
|
-
U + 4 > _.byteLength && o(1),
|
|
7854
|
-
let
|
|
7855
|
-
for (;
|
|
7853
|
+
U + 4 > _.byteLength && o(1), V[0] = _[U++], V[1] = _[U++], V[2] = _[U++], V[3] = _[U++], (V[0] != 2 || V[1] != 2 || (V[2] << 8 | V[3]) != A) && o(3, "bad rgbe scanline format");
|
|
7854
|
+
let ee = 0, te;
|
|
7855
|
+
for (; ee < Y && U < _.byteLength; ) {
|
|
7856
7856
|
te = _[U++];
|
|
7857
7857
|
const he = te > 128;
|
|
7858
|
-
if (he && (te -= 128), (te === 0 ||
|
|
7858
|
+
if (he && (te -= 128), (te === 0 || ee + te > Y) && o(3, "bad scanline data"), he) {
|
|
7859
7859
|
const we = _[U++];
|
|
7860
7860
|
for (let I = 0; I < te; I++)
|
|
7861
|
-
ee
|
|
7861
|
+
ne[ee++] = we;
|
|
7862
7862
|
} else
|
|
7863
|
-
|
|
7863
|
+
ne.set(_.subarray(U, U + te), ee), ee += te, U += te;
|
|
7864
7864
|
}
|
|
7865
7865
|
const fe = A;
|
|
7866
7866
|
for (let he = 0; he < fe; he++) {
|
|
7867
7867
|
let we = 0;
|
|
7868
|
-
C[N] =
|
|
7868
|
+
C[N] = ne[he + we], we += A, C[N + 1] = ne[he + we], we += A, C[N + 2] = ne[he + we], we += A, C[N + 3] = ne[he + we], N += 4;
|
|
7869
7869
|
}
|
|
7870
7870
|
Z--;
|
|
7871
7871
|
}
|
|
@@ -8000,7 +8000,7 @@ class _s extends Un {
|
|
|
8000
8000
|
D && (U.pop(), U.length > 0 ? fe.copy(U[U.length - 1]) : fe.identity());
|
|
8001
8001
|
}
|
|
8002
8002
|
function s(I) {
|
|
8003
|
-
const B = new
|
|
8003
|
+
const B = new pn(), D = new ve(), O = new ve(), z = new ve();
|
|
8004
8004
|
let S = !0, P = !1;
|
|
8005
8005
|
const L = I.getAttribute("d");
|
|
8006
8006
|
if (L === "" || L === "none")
|
|
@@ -8198,14 +8198,14 @@ class _s extends Un {
|
|
|
8198
8198
|
let se = B * B, ie = D * D;
|
|
8199
8199
|
const G = j * j, k = K * K, oe = G / se + k / ie;
|
|
8200
8200
|
if (oe > 1) {
|
|
8201
|
-
const
|
|
8202
|
-
B =
|
|
8201
|
+
const Nt = Math.sqrt(oe);
|
|
8202
|
+
B = Nt * B, D = Nt * D, se = B * B, ie = D * D;
|
|
8203
8203
|
}
|
|
8204
8204
|
const me = se * k + ie * G, Re = (se * ie - me) / me;
|
|
8205
8205
|
let Ke = Math.sqrt(Math.max(0, Re));
|
|
8206
8206
|
z === S && (Ke = -Ke);
|
|
8207
|
-
const He = Ke * B * K / D, bt = -Ke * D * j / B,
|
|
8208
|
-
I.currentPath.absellipse(
|
|
8207
|
+
const He = Ke * B * K / D, bt = -Ke * D * j / B, un = Math.cos(O) * He - Math.sin(O) * bt + (P.x + L.x) / 2, En = Math.sin(O) * He + Math.cos(O) * bt + (P.y + L.y) / 2, kt = r(1, 0, (j - He) / B, (K - bt) / D), vt = r((j - He) / B, (K - bt) / D, (-j - He) / B, (-K - bt) / D) % (Math.PI * 2);
|
|
8208
|
+
I.currentPath.absellipse(un, En, B, D, kt, kt + vt, S === 0, O);
|
|
8209
8209
|
}
|
|
8210
8210
|
function r(I, B, D, O) {
|
|
8211
8211
|
const z = I * D + B * O, S = Math.sqrt(I * I + B * B) * Math.sqrt(D * D + O * O);
|
|
@@ -8213,7 +8213,7 @@ class _s extends Un {
|
|
|
8213
8213
|
return I * O - B * D < 0 && (P = -P), P;
|
|
8214
8214
|
}
|
|
8215
8215
|
function l(I) {
|
|
8216
|
-
const B = x(I.getAttribute("x") || 0), D = x(I.getAttribute("y") || 0), O = x(I.getAttribute("rx") || I.getAttribute("ry") || 0), z = x(I.getAttribute("ry") || I.getAttribute("rx") || 0), S = x(I.getAttribute("width")), P = x(I.getAttribute("height")), L = 1 - 0.551915024494, X = new
|
|
8216
|
+
const B = x(I.getAttribute("x") || 0), D = x(I.getAttribute("y") || 0), O = x(I.getAttribute("rx") || I.getAttribute("ry") || 0), z = x(I.getAttribute("ry") || I.getAttribute("rx") || 0), S = x(I.getAttribute("width")), P = x(I.getAttribute("height")), L = 1 - 0.551915024494, X = new pn();
|
|
8217
8217
|
return X.moveTo(B + O, D), X.lineTo(B + S - O, D), (O !== 0 || z !== 0) && X.bezierCurveTo(B + S - O * L, D, B + S, D + z * L, B + S, D + z), X.lineTo(B + S, D + P - z), (O !== 0 || z !== 0) && X.bezierCurveTo(B + S, D + P - z * L, B + S - O * L, D + P, B + S - O, D + P), X.lineTo(B + O, D + P), (O !== 0 || z !== 0) && X.bezierCurveTo(B + O * L, D + P, B, D + P - z * L, B, D + P - z), X.lineTo(B, D + z), (O !== 0 || z !== 0) && X.bezierCurveTo(B, D + z * L, B + O * L, D, B + O, D), X;
|
|
8218
8218
|
}
|
|
8219
8219
|
function c(I) {
|
|
@@ -8221,7 +8221,7 @@ class _s extends Un {
|
|
|
8221
8221
|
const X = x(P), H = x(L);
|
|
8222
8222
|
z === 0 ? O.moveTo(X, H) : O.lineTo(X, H), z++;
|
|
8223
8223
|
}
|
|
8224
|
-
const D = /([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g, O = new
|
|
8224
|
+
const D = /([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g, O = new pn();
|
|
8225
8225
|
let z = 0;
|
|
8226
8226
|
return I.getAttribute("points").replace(D, B), O.currentPath.autoClose = !0, O;
|
|
8227
8227
|
}
|
|
@@ -8230,24 +8230,24 @@ class _s extends Un {
|
|
|
8230
8230
|
const X = x(P), H = x(L);
|
|
8231
8231
|
z === 0 ? O.moveTo(X, H) : O.lineTo(X, H), z++;
|
|
8232
8232
|
}
|
|
8233
|
-
const D = /([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g, O = new
|
|
8233
|
+
const D = /([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g, O = new pn();
|
|
8234
8234
|
let z = 0;
|
|
8235
8235
|
return I.getAttribute("points").replace(D, B), O.currentPath.autoClose = !1, O;
|
|
8236
8236
|
}
|
|
8237
8237
|
function u(I) {
|
|
8238
8238
|
const B = x(I.getAttribute("cx") || 0), D = x(I.getAttribute("cy") || 0), O = x(I.getAttribute("r") || 0), z = new _i();
|
|
8239
8239
|
z.absarc(B, D, O, 0, Math.PI * 2);
|
|
8240
|
-
const S = new
|
|
8240
|
+
const S = new pn();
|
|
8241
8241
|
return S.subPaths.push(z), S;
|
|
8242
8242
|
}
|
|
8243
8243
|
function d(I) {
|
|
8244
8244
|
const B = x(I.getAttribute("cx") || 0), D = x(I.getAttribute("cy") || 0), O = x(I.getAttribute("rx") || 0), z = x(I.getAttribute("ry") || 0), S = new _i();
|
|
8245
8245
|
S.absellipse(B, D, O, z, 0, Math.PI * 2);
|
|
8246
|
-
const P = new
|
|
8246
|
+
const P = new pn();
|
|
8247
8247
|
return P.subPaths.push(S), P;
|
|
8248
8248
|
}
|
|
8249
8249
|
function h(I) {
|
|
8250
|
-
const B = x(I.getAttribute("x1") || 0), D = x(I.getAttribute("y1") || 0), O = x(I.getAttribute("x2") || 0), z = x(I.getAttribute("y2") || 0), S = new
|
|
8250
|
+
const B = x(I.getAttribute("x1") || 0), D = x(I.getAttribute("y1") || 0), O = x(I.getAttribute("x2") || 0), z = x(I.getAttribute("y2") || 0), S = new pn();
|
|
8251
8251
|
return S.moveTo(B, D), S.lineTo(O, z), S.currentPath.autoClose = !1, S;
|
|
8252
8252
|
}
|
|
8253
8253
|
function p(I, B) {
|
|
@@ -8425,7 +8425,7 @@ class _s extends Un {
|
|
|
8425
8425
|
return U.length > 0 && B.premultiply(U[U.length - 1]), fe.copy(B), U.push(B), B;
|
|
8426
8426
|
}
|
|
8427
8427
|
function R(I) {
|
|
8428
|
-
const B = new Cn(), D =
|
|
8428
|
+
const B = new Cn(), D = Y;
|
|
8429
8429
|
if (I.nodeName === "use" && (I.hasAttribute("x") || I.hasAttribute("y"))) {
|
|
8430
8430
|
const O = x(I.getAttribute("x")), z = x(I.getAttribute("y"));
|
|
8431
8431
|
B.translate(O, z);
|
|
@@ -8450,7 +8450,7 @@ class _s extends Un {
|
|
|
8450
8450
|
case "rotate":
|
|
8451
8451
|
if (H.length >= 1) {
|
|
8452
8452
|
let j = 0, K = 0, se = 0;
|
|
8453
|
-
j = H[0] * Math.PI / 180, H.length >= 3 && (K = H[1], se = H[2]),
|
|
8453
|
+
j = H[0] * Math.PI / 180, H.length >= 3 && (K = H[1], se = H[2]), V.makeTranslation(-K, -se), ne.makeRotation(j), Z.multiplyMatrices(ne, V), V.makeTranslation(K, se), D.multiplyMatrices(V, Z);
|
|
8454
8454
|
}
|
|
8455
8455
|
break;
|
|
8456
8456
|
case "scale":
|
|
@@ -8481,10 +8481,10 @@ class _s extends Un {
|
|
|
8481
8481
|
te.set(P.x, P.y, 1).applyMatrix3(B), P.set(te.x, te.y);
|
|
8482
8482
|
}
|
|
8483
8483
|
function O(P) {
|
|
8484
|
-
const L = P.xRadius, X = P.yRadius, H = Math.cos(P.aRotation), j = Math.sin(P.aRotation), K = new $(L * H, L * j, 0), se = new $(-X * j, X * H, 0), ie = K.applyMatrix3(B), G = se.applyMatrix3(B), k =
|
|
8485
|
-
if (P.xRadius = 1 / bt, P.yRadius = 1 /
|
|
8486
|
-
const kt =
|
|
8487
|
-
const { x: di, y: Is } = new $(Math.cos(Cs), Math.sin(Cs), 0).applyMatrix3(
|
|
8484
|
+
const L = P.xRadius, X = P.yRadius, H = Math.cos(P.aRotation), j = Math.sin(P.aRotation), K = new $(L * H, L * j, 0), se = new $(-X * j, X * H, 0), ie = K.applyMatrix3(B), G = se.applyMatrix3(B), k = Y.set(ie.x, G.x, 0, ie.y, G.y, 0, 0, 0, 1), oe = V.copy(k).invert(), Ke = ne.copy(oe).transpose().multiply(oe).elements, He = A(Ke[0], Ke[1], Ke[4]), bt = Math.sqrt(He.rt1), un = Math.sqrt(He.rt2);
|
|
8485
|
+
if (P.xRadius = 1 / bt, P.yRadius = 1 / un, P.aRotation = Math.atan2(He.sn, He.cs), !((P.aEndAngle - P.aStartAngle) % (2 * Math.PI) < Number.EPSILON)) {
|
|
8486
|
+
const kt = V.set(bt, 0, 0, 0, un, 0, 0, 0, 1), vt = ne.set(He.cs, He.sn, 0, -He.sn, He.cs, 0, 0, 0, 1), Nt = kt.multiply(vt).multiply(k), is = (Cs) => {
|
|
8487
|
+
const { x: di, y: Is } = new $(Math.cos(Cs), Math.sin(Cs), 0).applyMatrix3(Nt);
|
|
8488
8488
|
return Math.atan2(Is, di);
|
|
8489
8489
|
};
|
|
8490
8490
|
P.aStartAngle = is(P.aStartAngle), P.aEndAngle = is(P.aEndAngle), E(B) && (P.aClockwise = !P.aClockwise);
|
|
@@ -8501,7 +8501,7 @@ class _s extends Un {
|
|
|
8501
8501
|
const H = S[P].curves;
|
|
8502
8502
|
for (let j = 0; j < H.length; j++) {
|
|
8503
8503
|
const K = H[j];
|
|
8504
|
-
K.isLineCurve ? (D(K.v1), D(K.v2)) : K.isCubicBezierCurve ? (D(K.v0), D(K.v1), D(K.v2), D(K.v3)) : K.isQuadraticBezierCurve ? (D(K.v0), D(K.v1), D(K.v2)) : K.isEllipseCurve && (
|
|
8504
|
+
K.isLineCurve ? (D(K.v1), D(K.v2)) : K.isCubicBezierCurve ? (D(K.v0), D(K.v1), D(K.v2), D(K.v3)) : K.isQuadraticBezierCurve ? (D(K.v0), D(K.v1), D(K.v2)) : K.isEllipseCurve && (ee.set(K.aX, K.aY), D(ee), K.aX = ee.x, K.aY = ee.y, _(B) ? O(K) : z(K));
|
|
8505
8505
|
}
|
|
8506
8506
|
}
|
|
8507
8507
|
}
|
|
@@ -8529,7 +8529,7 @@ class _s extends Un {
|
|
|
8529
8529
|
const X = I + D, H = I - D, j = Math.sqrt(H * H + 4 * B * B);
|
|
8530
8530
|
return X > 0 ? (O = 0.5 * (X + j), L = 1 / O, z = I * L * D - B * L * B) : X < 0 ? z = 0.5 * (X - j) : (O = 0.5 * j, z = -0.5 * j), H > 0 ? S = H + j : S = H - j, Math.abs(S) > 2 * Math.abs(B) ? (L = -2 * B / S, P = 1 / Math.sqrt(1 + L * L), S = L * P) : Math.abs(B) === 0 ? (S = 1, P = 0) : (L = -0.5 * S / B, S = 1 / Math.sqrt(1 + L * L), P = L * S), H > 0 && (L = S, S = -P, P = L), { rt1: O, rt2: z, cs: S, sn: P };
|
|
8531
8531
|
}
|
|
8532
|
-
const C = [], N = {}, U = [],
|
|
8532
|
+
const C = [], N = {}, U = [], Y = new Cn(), V = new Cn(), ne = new Cn(), Z = new Cn(), ee = new ve(), te = new $(), fe = new Cn(), he = new DOMParser().parseFromString(e, "image/svg+xml");
|
|
8533
8533
|
return n(he.documentElement, {
|
|
8534
8534
|
fill: "#000",
|
|
8535
8535
|
fillOpacity: 1,
|
|
@@ -8554,27 +8554,27 @@ class _s extends Un {
|
|
|
8554
8554
|
t: 0
|
|
8555
8555
|
};
|
|
8556
8556
|
function i(m, v, g, b) {
|
|
8557
|
-
const x = m.x, M = v.x, R = g.x, w = b.x, E = m.y, _ = v.y, T = g.y, y = b.y, A = (w - R) * (E - T) - (y - T) * (x - R), C = (M - x) * (E - T) - (_ - E) * (x - R), N = (y - T) * (M - x) - (w - R) * (_ - E), U = A / N,
|
|
8558
|
-
if (N === 0 && A !== 0 || U <= 0 || U >= 1 ||
|
|
8557
|
+
const x = m.x, M = v.x, R = g.x, w = b.x, E = m.y, _ = v.y, T = g.y, y = b.y, A = (w - R) * (E - T) - (y - T) * (x - R), C = (M - x) * (E - T) - (_ - E) * (x - R), N = (y - T) * (M - x) - (w - R) * (_ - E), U = A / N, Y = C / N;
|
|
8558
|
+
if (N === 0 && A !== 0 || U <= 0 || U >= 1 || Y < 0 || Y > 1)
|
|
8559
8559
|
return null;
|
|
8560
8560
|
if (A === 0 && N === 0) {
|
|
8561
|
-
for (let
|
|
8562
|
-
if (o(
|
|
8563
|
-
const
|
|
8564
|
-
return { x:
|
|
8561
|
+
for (let V = 0; V < 2; V++)
|
|
8562
|
+
if (o(V === 0 ? g : b, m, v), s.loc == n.ORIGIN) {
|
|
8563
|
+
const ne = V === 0 ? g : b;
|
|
8564
|
+
return { x: ne.x, y: ne.y, t: s.t };
|
|
8565
8565
|
} else if (s.loc == n.BETWEEN) {
|
|
8566
|
-
const
|
|
8567
|
-
return { x:
|
|
8566
|
+
const ne = +(x + s.t * (M - x)).toPrecision(10), Z = +(E + s.t * (_ - E)).toPrecision(10);
|
|
8567
|
+
return { x: ne, y: Z, t: s.t };
|
|
8568
8568
|
}
|
|
8569
8569
|
return null;
|
|
8570
8570
|
} else {
|
|
8571
8571
|
for (let Z = 0; Z < 2; Z++)
|
|
8572
8572
|
if (o(Z === 0 ? g : b, m, v), s.loc == n.ORIGIN) {
|
|
8573
|
-
const
|
|
8574
|
-
return { x:
|
|
8573
|
+
const ee = Z === 0 ? g : b;
|
|
8574
|
+
return { x: ee.x, y: ee.y, t: s.t };
|
|
8575
8575
|
}
|
|
8576
|
-
const
|
|
8577
|
-
return { x:
|
|
8576
|
+
const V = +(x + U * (M - x)).toPrecision(10), ne = +(E + U * (_ - E)).toPrecision(10);
|
|
8577
|
+
return { x: V, y: ne, t: U };
|
|
8578
8578
|
}
|
|
8579
8579
|
}
|
|
8580
8580
|
function o(m, v, g) {
|
|
@@ -8648,9 +8648,9 @@ class _s extends Un {
|
|
|
8648
8648
|
return { identifier: m.identifier, isHole: C, for: N };
|
|
8649
8649
|
} else if (x === "nonzero") {
|
|
8650
8650
|
let C = !0, N = null, U = null;
|
|
8651
|
-
for (let
|
|
8652
|
-
const
|
|
8653
|
-
C ? (U = v[
|
|
8651
|
+
for (let Y = 0; Y < y.length; Y++) {
|
|
8652
|
+
const V = y[Y];
|
|
8653
|
+
C ? (U = v[V].isCW, C = !1, N = V) : U !== v[V].isCW && (U = v[V].isCW, C = !0);
|
|
8654
8654
|
}
|
|
8655
8655
|
return { identifier: m.identifier, isHole: C, for: N };
|
|
8656
8656
|
} else
|
|
@@ -8717,51 +8717,51 @@ class _s extends Un {
|
|
|
8717
8717
|
return 0;
|
|
8718
8718
|
const A = e[0].equals(e[y - 1]);
|
|
8719
8719
|
let C, N = e[0], U;
|
|
8720
|
-
const
|
|
8721
|
-
let
|
|
8722
|
-
D(e[0], e[1], c).multiplyScalar(
|
|
8720
|
+
const Y = t.strokeWidth / 2, V = 1 / (y - 1);
|
|
8721
|
+
let ne = 0, Z, ee, te, fe, he = !1, we = 0, I = l * 3, B = l * 2;
|
|
8722
|
+
D(e[0], e[1], c).multiplyScalar(Y), v.copy(e[0]).sub(c), g.copy(e[0]).add(c), b.copy(v), x.copy(g);
|
|
8723
8723
|
for (let j = 1; j < y; j++) {
|
|
8724
8724
|
C = e[j], j === y - 1 ? A ? U = e[1] : U = void 0 : U = e[j + 1];
|
|
8725
8725
|
const K = c;
|
|
8726
|
-
if (D(N, C, K), u.copy(K).multiplyScalar(
|
|
8727
|
-
D(C, U, f), u.copy(f).multiplyScalar(
|
|
8726
|
+
if (D(N, C, K), u.copy(K).multiplyScalar(Y), M.copy(C).sub(u), R.copy(C).add(u), Z = ne + V, ee = !1, U !== void 0) {
|
|
8727
|
+
D(C, U, f), u.copy(f).multiplyScalar(Y), w.copy(C).sub(u), E.copy(C).add(u), te = !0, u.subVectors(U, N), K.dot(u) < 0 && (te = !1), j === 1 && (he = te), u.subVectors(U, C), u.normalize();
|
|
8728
8728
|
const se = Math.abs(K.dot(u));
|
|
8729
8729
|
if (se > Number.EPSILON) {
|
|
8730
|
-
const ie =
|
|
8730
|
+
const ie = Y / se;
|
|
8731
8731
|
u.multiplyScalar(-ie), d.subVectors(C, N), h.copy(d).setLength(ie).add(u), _.copy(h).negate();
|
|
8732
8732
|
const G = h.length(), k = d.length();
|
|
8733
8733
|
d.divideScalar(k), p.subVectors(U, C);
|
|
8734
8734
|
const oe = p.length();
|
|
8735
|
-
switch (p.divideScalar(oe), d.dot(_) < k && p.dot(_) < oe && (
|
|
8735
|
+
switch (p.divideScalar(oe), d.dot(_) < k && p.dot(_) < oe && (ee = !0), T.copy(h).add(C), _.add(C), fe = !1, ee ? te ? (E.copy(_), R.copy(_)) : (w.copy(_), M.copy(_)) : S(), t.strokeLineJoin) {
|
|
8736
8736
|
case "bevel":
|
|
8737
|
-
P(te,
|
|
8737
|
+
P(te, ee, Z);
|
|
8738
8738
|
break;
|
|
8739
8739
|
case "round":
|
|
8740
|
-
L(te,
|
|
8740
|
+
L(te, ee), te ? z(C, M, w, Z, 0) : z(C, E, R, Z, 1);
|
|
8741
8741
|
break;
|
|
8742
8742
|
case "miter":
|
|
8743
8743
|
case "miter-clip":
|
|
8744
8744
|
default:
|
|
8745
|
-
const me =
|
|
8745
|
+
const me = Y * t.strokeMiterLimit / G;
|
|
8746
8746
|
if (me < 1)
|
|
8747
8747
|
if (t.strokeLineJoin !== "miter-clip") {
|
|
8748
|
-
P(te,
|
|
8748
|
+
P(te, ee, Z);
|
|
8749
8749
|
break;
|
|
8750
8750
|
} else
|
|
8751
|
-
L(te,
|
|
8751
|
+
L(te, ee), te ? (p.subVectors(T, M).multiplyScalar(me).add(M), m.subVectors(T, w).multiplyScalar(me).add(w), O(M, Z, 0), O(p, Z, 0), O(C, Z, 0.5), O(C, Z, 0.5), O(p, Z, 0), O(m, Z, 0), O(C, Z, 0.5), O(m, Z, 0), O(w, Z, 0)) : (p.subVectors(T, R).multiplyScalar(me).add(R), m.subVectors(T, E).multiplyScalar(me).add(E), O(R, Z, 1), O(p, Z, 1), O(C, Z, 0.5), O(C, Z, 0.5), O(p, Z, 1), O(m, Z, 1), O(C, Z, 0.5), O(m, Z, 1), O(E, Z, 1));
|
|
8752
8752
|
else
|
|
8753
|
-
|
|
8753
|
+
ee ? (te ? (O(g, ne, 1), O(v, ne, 0), O(T, Z, 0), O(g, ne, 1), O(T, Z, 0), O(_, Z, 1)) : (O(g, ne, 1), O(v, ne, 0), O(T, Z, 1), O(v, ne, 0), O(_, Z, 0), O(T, Z, 1)), te ? w.copy(T) : E.copy(T)) : te ? (O(M, Z, 0), O(T, Z, 0), O(C, Z, 0.5), O(C, Z, 0.5), O(T, Z, 0), O(w, Z, 0)) : (O(R, Z, 1), O(T, Z, 1), O(C, Z, 0.5), O(C, Z, 0.5), O(T, Z, 1), O(E, Z, 1)), fe = !0;
|
|
8754
8754
|
break;
|
|
8755
8755
|
}
|
|
8756
8756
|
} else
|
|
8757
8757
|
S();
|
|
8758
8758
|
} else
|
|
8759
8759
|
S();
|
|
8760
|
-
!A && j === y - 1 && X(e[0], b, x, te, !0,
|
|
8760
|
+
!A && j === y - 1 && X(e[0], b, x, te, !0, ne), ne = Z, N = C, v.copy(w), g.copy(E);
|
|
8761
8761
|
}
|
|
8762
8762
|
if (!A)
|
|
8763
8763
|
X(C, M, R, te, !1, Z);
|
|
8764
|
-
else if (
|
|
8764
|
+
else if (ee && i) {
|
|
8765
8765
|
let j = T, K = _;
|
|
8766
8766
|
he !== te && (j = _, K = T), te ? (fe || he) && (K.toArray(i, 0 * 3), K.toArray(i, 3 * 3), fe && j.toArray(i, 1 * 3)) : (fe || !he) && (K.toArray(i, 1 * 3), K.toArray(i, 3 * 3), fe && j.toArray(i, 0 * 3));
|
|
8767
8767
|
}
|
|
@@ -8782,13 +8782,13 @@ class _s extends Un {
|
|
|
8782
8782
|
O(d, ie, G), O(se, ie, G), O(j, ie, 0.5);
|
|
8783
8783
|
}
|
|
8784
8784
|
function S() {
|
|
8785
|
-
O(g,
|
|
8785
|
+
O(g, ne, 1), O(v, ne, 0), O(M, Z, 0), O(g, ne, 1), O(M, Z, 0), O(R, Z, 1);
|
|
8786
8786
|
}
|
|
8787
8787
|
function P(j, K, se) {
|
|
8788
|
-
K ? j ? (O(g,
|
|
8788
|
+
K ? j ? (O(g, ne, 1), O(v, ne, 0), O(M, Z, 0), O(g, ne, 1), O(M, Z, 0), O(_, Z, 1), O(M, se, 0), O(w, se, 0), O(_, se, 0.5)) : (O(g, ne, 1), O(v, ne, 0), O(R, Z, 1), O(v, ne, 0), O(_, Z, 0), O(R, Z, 1), O(R, se, 1), O(_, se, 0), O(E, se, 1)) : j ? (O(M, se, 0), O(w, se, 0), O(C, se, 0.5)) : (O(R, se, 1), O(E, se, 0), O(C, se, 0.5));
|
|
8789
8789
|
}
|
|
8790
8790
|
function L(j, K) {
|
|
8791
|
-
K && (j ? (O(g,
|
|
8791
|
+
K && (j ? (O(g, ne, 1), O(v, ne, 0), O(M, Z, 0), O(g, ne, 1), O(M, Z, 0), O(_, Z, 1), O(M, ne, 0), O(C, Z, 0.5), O(_, Z, 1), O(C, Z, 0.5), O(w, ne, 0), O(_, Z, 1)) : (O(g, ne, 1), O(v, ne, 0), O(R, Z, 1), O(v, ne, 0), O(_, Z, 0), O(R, Z, 1), O(R, ne, 1), O(_, Z, 0), O(C, Z, 0.5), O(C, Z, 0.5), O(_, Z, 0), O(E, ne, 1)));
|
|
8792
8792
|
}
|
|
8793
8793
|
function X(j, K, se, ie, G, k) {
|
|
8794
8794
|
switch (t.strokeLineCap) {
|
|
@@ -9080,13 +9080,13 @@ class il extends Wl {
|
|
|
9080
9080
|
let t;
|
|
9081
9081
|
e instanceof Float32Array ? t = e : Array.isArray(e) && (t = new Float32Array(e));
|
|
9082
9082
|
const n = new ho(t, 6, 1);
|
|
9083
|
-
return this.setAttribute("instanceStart", new
|
|
9083
|
+
return this.setAttribute("instanceStart", new nn(n, 3, 0)), this.setAttribute("instanceEnd", new nn(n, 3, 3)), this.computeBoundingBox(), this.computeBoundingSphere(), this;
|
|
9084
9084
|
}
|
|
9085
9085
|
setColors(e, t = 3) {
|
|
9086
9086
|
let n;
|
|
9087
9087
|
e instanceof Float32Array ? n = e : Array.isArray(e) && (n = new Float32Array(e));
|
|
9088
9088
|
const s = new ho(n, t * 2, 1);
|
|
9089
|
-
return this.setAttribute("instanceColorStart", new
|
|
9089
|
+
return this.setAttribute("instanceColorStart", new nn(s, t, 0)), this.setAttribute("instanceColorEnd", new nn(s, t, t)), this;
|
|
9090
9090
|
}
|
|
9091
9091
|
fromWireframeGeometry(e) {
|
|
9092
9092
|
return this.setPositions(e.attributes.position.array), this;
|
|
@@ -9695,20 +9695,20 @@ class Go extends Tt {
|
|
|
9695
9695
|
}), this.setValues(e);
|
|
9696
9696
|
}
|
|
9697
9697
|
}
|
|
9698
|
-
const ki = new at(), Tr = new $(), br = new $(), it = new at(), ot = new at(),
|
|
9699
|
-
let
|
|
9698
|
+
const ki = new at(), Tr = new $(), br = new $(), it = new at(), ot = new at(), Bt = new at(), Ni = new $(), Bi = new Ie(), rt = new $l(), Er = new $(), js = new yt(), Vs = new Ms(), Ut = new at();
|
|
9699
|
+
let Vt, On;
|
|
9700
9700
|
function Mr(a, e, t) {
|
|
9701
|
-
return
|
|
9701
|
+
return Ut.set(0, 0, -e, 1).applyMatrix4(a.projectionMatrix), Ut.multiplyScalar(1 / Ut.w), Ut.x = On / t.width, Ut.y = On / t.height, Ut.applyMatrix4(a.projectionMatrixInverse), Ut.multiplyScalar(1 / Ut.w), Math.abs(Math.max(Ut.x, Ut.y));
|
|
9702
9702
|
}
|
|
9703
9703
|
function Cf(a, e) {
|
|
9704
9704
|
const t = a.matrixWorld, n = a.geometry, s = n.attributes.instanceStart, i = n.attributes.instanceEnd, o = Math.min(n.instanceCount, s.count);
|
|
9705
9705
|
for (let r = 0, l = o; r < l; r++) {
|
|
9706
9706
|
rt.start.fromBufferAttribute(s, r), rt.end.fromBufferAttribute(i, r), rt.applyMatrix4(t);
|
|
9707
9707
|
const c = new $(), f = new $();
|
|
9708
|
-
|
|
9708
|
+
Vt.distanceSqToSegment(rt.start, rt.end, f, c), f.distanceTo(c) < On * 0.5 && e.push({
|
|
9709
9709
|
point: f,
|
|
9710
9710
|
pointOnLine: c,
|
|
9711
|
-
distance:
|
|
9711
|
+
distance: Vt.origin.distanceTo(f),
|
|
9712
9712
|
object: a,
|
|
9713
9713
|
face: null,
|
|
9714
9714
|
faceIndex: r,
|
|
@@ -9719,7 +9719,7 @@ function Cf(a, e) {
|
|
|
9719
9719
|
}
|
|
9720
9720
|
function If(a, e, t) {
|
|
9721
9721
|
const n = e.projectionMatrix, i = a.material.resolution, o = a.matrixWorld, r = a.geometry, l = r.attributes.instanceStart, c = r.attributes.instanceEnd, f = Math.min(r.instanceCount, l.count), u = -e.near;
|
|
9722
|
-
|
|
9722
|
+
Vt.at(1, Bt), Bt.w = 1, Bt.applyMatrix4(e.matrixWorldInverse), Bt.applyMatrix4(n), Bt.multiplyScalar(1 / Bt.w), Bt.x *= i.x / 2, Bt.y *= i.y / 2, Bt.z = 0, Ni.copy(Bt), Bi.multiplyMatrices(e.matrixWorldInverse, o);
|
|
9723
9723
|
for (let d = 0, h = f; d < h; d++) {
|
|
9724
9724
|
if (it.fromBufferAttribute(l, d), ot.fromBufferAttribute(c, d), it.w = 1, ot.w = 1, it.applyMatrix4(Bi), ot.applyMatrix4(Bi), it.z > u && ot.z > u)
|
|
9725
9725
|
continue;
|
|
@@ -9737,10 +9737,10 @@ function If(a, e, t) {
|
|
|
9737
9737
|
if (g && b) {
|
|
9738
9738
|
rt.start.fromBufferAttribute(l, d), rt.end.fromBufferAttribute(c, d), rt.start.applyMatrix4(o), rt.end.applyMatrix4(o);
|
|
9739
9739
|
const x = new $(), M = new $();
|
|
9740
|
-
|
|
9740
|
+
Vt.distanceSqToSegment(rt.start, rt.end, M, x), t.push({
|
|
9741
9741
|
point: M,
|
|
9742
9742
|
pointOnLine: x,
|
|
9743
|
-
distance:
|
|
9743
|
+
distance: Vt.origin.distanceTo(M),
|
|
9744
9744
|
object: a,
|
|
9745
9745
|
face: null,
|
|
9746
9746
|
faceIndex: d,
|
|
@@ -9760,7 +9760,7 @@ class Of extends pe {
|
|
|
9760
9760
|
for (let o = 0, r = 0, l = t.count; o < l; o++, r += 2)
|
|
9761
9761
|
Tr.fromBufferAttribute(t, o), br.fromBufferAttribute(n, o), s[r] = r === 0 ? 0 : s[r - 1], s[r + 1] = s[r] + Tr.distanceTo(br);
|
|
9762
9762
|
const i = new ho(s, 2, 1);
|
|
9763
|
-
return e.setAttribute("instanceDistanceStart", new
|
|
9763
|
+
return e.setAttribute("instanceDistanceStart", new nn(i, 1, 0)), e.setAttribute("instanceDistanceEnd", new nn(i, 1, 1)), this;
|
|
9764
9764
|
}
|
|
9765
9765
|
raycast(e, t) {
|
|
9766
9766
|
const n = this.material.worldUnits, s = e.camera;
|
|
@@ -9768,27 +9768,27 @@ class Of extends pe {
|
|
|
9768
9768
|
'LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.'
|
|
9769
9769
|
);
|
|
9770
9770
|
const i = e.params.Line2 !== void 0 && e.params.Line2.threshold || 0;
|
|
9771
|
-
|
|
9771
|
+
Vt = e.ray;
|
|
9772
9772
|
const o = this.matrixWorld, r = this.geometry, l = this.material;
|
|
9773
9773
|
On = l.linewidth + i, r.boundingSphere === null && r.computeBoundingSphere(), Vs.copy(r.boundingSphere).applyMatrix4(o);
|
|
9774
9774
|
let c;
|
|
9775
9775
|
if (n)
|
|
9776
9776
|
c = On * 0.5;
|
|
9777
9777
|
else {
|
|
9778
|
-
const u = Math.max(s.near, Vs.distanceToPoint(
|
|
9778
|
+
const u = Math.max(s.near, Vs.distanceToPoint(Vt.origin));
|
|
9779
9779
|
c = Mr(s, u, l.resolution);
|
|
9780
9780
|
}
|
|
9781
|
-
if (Vs.radius += c,
|
|
9781
|
+
if (Vs.radius += c, Vt.intersectsSphere(Vs) === !1)
|
|
9782
9782
|
return;
|
|
9783
9783
|
r.boundingBox === null && r.computeBoundingBox(), js.copy(r.boundingBox).applyMatrix4(o);
|
|
9784
9784
|
let f;
|
|
9785
9785
|
if (n)
|
|
9786
9786
|
f = On * 0.5;
|
|
9787
9787
|
else {
|
|
9788
|
-
const u = Math.max(s.near, js.distanceToPoint(
|
|
9788
|
+
const u = Math.max(s.near, js.distanceToPoint(Vt.origin));
|
|
9789
9789
|
f = Mr(s, u, l.resolution);
|
|
9790
9790
|
}
|
|
9791
|
-
js.expandByScalar(f),
|
|
9791
|
+
js.expandByScalar(f), Vt.intersectsBox(js) !== !1 && (n ? Cf(this, t) : If(this, s, t));
|
|
9792
9792
|
}
|
|
9793
9793
|
onBeforeRender(e) {
|
|
9794
9794
|
const t = this.material.uniforms;
|
|
@@ -9844,7 +9844,7 @@ function Uf(a) {
|
|
|
9844
9844
|
function Ff(a) {
|
|
9845
9845
|
return a < 1 / 2.75 ? 7.5625 * a * a : a < 2 / 2.75 ? 7.5625 * (a -= 1.5 / 2.75) * a + 0.75 : a < 2.5 / 2.75 ? 7.5625 * (a -= 2.25 / 2.75) * a + 0.9375 : 7.5625 * (a -= 2.625 / 2.75) * a + 0.984375;
|
|
9846
9846
|
}
|
|
9847
|
-
const
|
|
9847
|
+
const cn = "https://raw.githubusercontent.com/Tresjs/assets/93976c7d63ac83d4a254a41a10b2362bc17e90c9/textures/lensflare/", Ho = `${cn}circle.png`, hi = `${cn}circleBlur.png`, zf = `${cn}circleRainbow.png`, Gf = `${cn}line.png`, rl = `${cn}poly6.png`, al = `${cn}polyStroke6.png`, Hf = `${cn}rays.png`, fi = `${cn}ring.png`, jf = `${cn}starThin6.png`, Vf = {
|
|
9848
9848
|
texture: [Gf, fi],
|
|
9849
9849
|
color: ["white"],
|
|
9850
9850
|
distance: [0, 0],
|
|
@@ -10062,7 +10062,7 @@ const Gg = /* @__PURE__ */ ue({
|
|
|
10062
10062
|
const p = h.texture;
|
|
10063
10063
|
h.texture = o.load(p), h.texture.name = p;
|
|
10064
10064
|
}
|
|
10065
|
-
return h.color =
|
|
10065
|
+
return h.color = en(h.color), h;
|
|
10066
10066
|
}, u = () => {
|
|
10067
10067
|
for (let h = s.value.length - 1; h < l.length; h++)
|
|
10068
10068
|
l[h].size = 0;
|
|
@@ -10084,7 +10084,7 @@ const Gg = /* @__PURE__ */ ue({
|
|
|
10084
10084
|
}
|
|
10085
10085
|
} else
|
|
10086
10086
|
m.texture !== v && (m.texture.dispose(), m.texture = v);
|
|
10087
|
-
m.size = g, m.distance = b, m.color =
|
|
10087
|
+
m.size = g, m.distance = b, m.color = en(x);
|
|
10088
10088
|
}), u();
|
|
10089
10089
|
};
|
|
10090
10090
|
return tt(() => {
|
|
@@ -10272,7 +10272,7 @@ const Gg = /* @__PURE__ */ ue({
|
|
|
10272
10272
|
}
|
|
10273
10273
|
}
|
|
10274
10274
|
function c() {
|
|
10275
|
-
s.side = li, s.transparent = t.transparent, s.thickness = t.thickness, s.color =
|
|
10275
|
+
s.side = li, s.transparent = t.transparent, s.thickness = t.thickness, s.color = en(t.color), s.opacity = t.opacity, s.size = i, s.screenspace = t.screenspace, s.toneMapped = t.toneMapped, s.polygonOffset = t.polygonOffset, s.polygonOffsetFactor = t.polygonOffsetFactor;
|
|
10276
10276
|
}
|
|
10277
10277
|
const f = xn().sizes;
|
|
10278
10278
|
return J(() => [f.width.value, f.height.value], ([u, d]) => {
|
|
@@ -10309,8 +10309,8 @@ const Gg = /* @__PURE__ */ ue({
|
|
|
10309
10309
|
async setup(a, { expose: e, emit: t }) {
|
|
10310
10310
|
let n, s;
|
|
10311
10311
|
const i = a, o = t, { ready: r, url: l, distance: c, helper: f, loop: u, autoplay: d, innerAngle: h, outerAngle: p, outerGain: m } = Le(i), { camera: v } = xe(), g = re(null), b = re(null), x = re(null), M = Sa(new aa()), R = () => {
|
|
10312
|
-
var N, U,
|
|
10313
|
-
(N = g == null ? void 0 : g.value) != null && N.isPlaying || ((U = g == null ? void 0 : g.value) == null || U.play(), o("isPlaying", (
|
|
10312
|
+
var N, U, Y;
|
|
10313
|
+
(N = g == null ? void 0 : g.value) != null && N.isPlaying || ((U = g == null ? void 0 : g.value) == null || U.play(), o("isPlaying", (Y = g == null ? void 0 : g.value) == null ? void 0 : Y.isPlaying));
|
|
10314
10314
|
}, w = () => {
|
|
10315
10315
|
var N, U;
|
|
10316
10316
|
(N = g == null ? void 0 : g.value) != null && N.isPlaying && (g.value.pause(), o("isPlaying", (U = g == null ? void 0 : g.value) == null ? void 0 : U.isPlaying));
|
|
@@ -10333,10 +10333,10 @@ const Gg = /* @__PURE__ */ ue({
|
|
|
10333
10333
|
!U.visible && p.value !== h.value && (U.visible = !0);
|
|
10334
10334
|
}
|
|
10335
10335
|
}, A = () => {
|
|
10336
|
-
var
|
|
10336
|
+
var V, ne;
|
|
10337
10337
|
y();
|
|
10338
|
-
const N = (
|
|
10339
|
-
b.value = new Lf(g.value,
|
|
10338
|
+
const N = (V = g.value) == null ? void 0 : V.parent, U = new yt().setFromObject(N), Y = (U.max.z - U.min.z) * 2;
|
|
10339
|
+
b.value = new Lf(g.value, Y, 32, 16), (ne = g == null ? void 0 : g.value) == null || ne.add(b.value), b.value.update();
|
|
10340
10340
|
}, C = () => {
|
|
10341
10341
|
var N;
|
|
10342
10342
|
(N = v == null ? void 0 : v.value) == null || N.remove(M), _(), T();
|
|
@@ -10483,9 +10483,9 @@ const Gg = /* @__PURE__ */ ue({
|
|
|
10483
10483
|
key: 0,
|
|
10484
10484
|
args: [R.value, _.value],
|
|
10485
10485
|
center: F(i)
|
|
10486
|
-
}, null, 8, id)) :
|
|
10486
|
+
}, null, 8, id)) : an("", !0),
|
|
10487
10487
|
Ne(T.$slots, "default")
|
|
10488
|
-
], 512)) :
|
|
10488
|
+
], 512)) : an("", !0);
|
|
10489
10489
|
}
|
|
10490
10490
|
});
|
|
10491
10491
|
function Kg(a, e) {
|
|
@@ -10519,7 +10519,7 @@ function od(a) {
|
|
|
10519
10519
|
const e = ge(null), { height: t, width: n, settings: s, depth: i, autoRender: o = ge(!0) } = fo(a) ? Le(a) : Le(ts(a)), { onBeforeRender: r } = Ve(), { camera: l, renderer: c, scene: f, sizes: u, invalidate: d } = xe();
|
|
10520
10520
|
return J(() => [n == null ? void 0 : n.value, u.width.value, t == null ? void 0 : t.value, u.height.value], () => {
|
|
10521
10521
|
var h;
|
|
10522
|
-
(h = e.value) == null || h.dispose(), e.value = new
|
|
10522
|
+
(h = e.value) == null || h.dispose(), e.value = new Wt((n == null ? void 0 : n.value) || u.width.value, (t == null ? void 0 : t.value) || u.height.value, {
|
|
10523
10523
|
minFilter: xt,
|
|
10524
10524
|
magFilter: xt,
|
|
10525
10525
|
type: Dt,
|
|
@@ -10782,11 +10782,11 @@ const qe = {
|
|
|
10782
10782
|
function Pn(a) {
|
|
10783
10783
|
return a.isPerspectiveCamera;
|
|
10784
10784
|
}
|
|
10785
|
-
function
|
|
10785
|
+
function mn(a) {
|
|
10786
10786
|
return a.isOrthographicCamera;
|
|
10787
10787
|
}
|
|
10788
10788
|
const Vn = Math.PI * 2, Ir = Math.PI / 2, ul = 1e-5, us = Math.PI / 180;
|
|
10789
|
-
function
|
|
10789
|
+
function It(a, e, t) {
|
|
10790
10790
|
return Math.max(e, Math.min(t, a));
|
|
10791
10791
|
}
|
|
10792
10792
|
function We(a, e = ul) {
|
|
@@ -10809,7 +10809,7 @@ function Ws(a, e, t, n, s = 1 / 0, i) {
|
|
|
10809
10809
|
const o = 2 / n, r = o * i, l = 1 / (1 + r + 0.48 * r * r + 0.235 * r * r * r);
|
|
10810
10810
|
let c = a - e;
|
|
10811
10811
|
const f = e, u = s * n;
|
|
10812
|
-
c =
|
|
10812
|
+
c = It(c, -u, u), e = a - c;
|
|
10813
10813
|
const d = (t.value + o * c) * i;
|
|
10814
10814
|
t.value = (t.value - o * d) * l;
|
|
10815
10815
|
let h = e + (c + d) * l;
|
|
@@ -10821,8 +10821,8 @@ function Dr(a, e, t, n, s = 1 / 0, i, o) {
|
|
|
10821
10821
|
let f = e.x, u = e.y, d = e.z, h = a.x - f, p = a.y - u, m = a.z - d;
|
|
10822
10822
|
const v = f, g = u, b = d, x = s * n, M = x * x, R = h * h + p * p + m * m;
|
|
10823
10823
|
if (R > M) {
|
|
10824
|
-
const
|
|
10825
|
-
h = h /
|
|
10824
|
+
const Y = Math.sqrt(R);
|
|
10825
|
+
h = h / Y * x, p = p / Y * x, m = m / Y * x;
|
|
10826
10826
|
}
|
|
10827
10827
|
f = a.x - h, u = a.y - p, d = a.z - m;
|
|
10828
10828
|
const w = (t.x + r * h) * i, E = (t.y + r * p) * i, _ = (t.z + r * m) * i;
|
|
@@ -10836,7 +10836,7 @@ function Ui(a, e) {
|
|
|
10836
10836
|
}), e.x /= a.length, e.y /= a.length;
|
|
10837
10837
|
}
|
|
10838
10838
|
function Fi(a, e) {
|
|
10839
|
-
return
|
|
10839
|
+
return mn(a) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
|
|
10840
10840
|
}
|
|
10841
10841
|
class gd {
|
|
10842
10842
|
constructor() {
|
|
@@ -10904,7 +10904,7 @@ class gd {
|
|
|
10904
10904
|
}
|
|
10905
10905
|
var zi;
|
|
10906
10906
|
const vd = "2.9.0", Xs = 1 / 8, yd = /Mac/.test((zi = globalThis == null ? void 0 : globalThis.navigator) === null || zi === void 0 ? void 0 : zi.platform);
|
|
10907
|
-
let Te, Lr, $s, Gi, ft, Ae, Be, Yn, ds,
|
|
10907
|
+
let Te, Lr, $s, Gi, ft, Ae, Be, Yn, ds, Ft, zt, Rn, kr, Nr, Mt, ps, Wn, Br, Hi, Ur, ji, Vi, Zs;
|
|
10908
10908
|
class lt extends gd {
|
|
10909
10909
|
/**
|
|
10910
10910
|
* Injects THREE as the dependency. You can then proceed to use CameraControls.
|
|
@@ -10947,7 +10947,7 @@ class lt extends gd {
|
|
|
10947
10947
|
* @category Statics
|
|
10948
10948
|
*/
|
|
10949
10949
|
static install(e) {
|
|
10950
|
-
Te = e.THREE, Lr = Object.freeze(new Te.Vector3(0, 0, 0)), $s = Object.freeze(new Te.Vector3(0, 1, 0)), Gi = Object.freeze(new Te.Vector3(0, 0, 1)), ft = new Te.Vector2(), Ae = new Te.Vector3(), Be = new Te.Vector3(), Yn = new Te.Vector3(), ds = new Te.Vector3(),
|
|
10950
|
+
Te = e.THREE, Lr = Object.freeze(new Te.Vector3(0, 0, 0)), $s = Object.freeze(new Te.Vector3(0, 1, 0)), Gi = Object.freeze(new Te.Vector3(0, 0, 1)), ft = new Te.Vector2(), Ae = new Te.Vector3(), Be = new Te.Vector3(), Yn = new Te.Vector3(), ds = new Te.Vector3(), Ft = new Te.Vector3(), zt = new Te.Vector3(), Rn = new Te.Vector3(), kr = new Te.Vector3(), Nr = new Te.Vector3(), Mt = new Te.Spherical(), ps = new Te.Spherical(), Wn = new Te.Box3(), Br = new Te.Box3(), Hi = new Te.Sphere(), Ur = new Te.Quaternion(), ji = new Te.Quaternion(), Vi = new Te.Matrix4(), Zs = new Te.Raycaster();
|
|
10951
10951
|
}
|
|
10952
10952
|
/**
|
|
10953
10953
|
* list all ACTIONs
|
|
@@ -10980,7 +10980,7 @@ class lt extends gd {
|
|
|
10980
10980
|
if (Pn(this._camera)) {
|
|
10981
10981
|
const w = Ae.copy(this._camera.position).sub(this._target), E = this._camera.getEffectiveFOV() * us, _ = w.length() * Math.tan(E * 0.5);
|
|
10982
10982
|
M = this.truckSpeed * g * _ / this._elementRect.height, R = this.truckSpeed * b * _ / this._elementRect.height;
|
|
10983
|
-
} else if (
|
|
10983
|
+
} else if (mn(this._camera)) {
|
|
10984
10984
|
const w = this._camera;
|
|
10985
10985
|
M = g * (w.right - w.left) / w.zoom / this._elementRect.width, R = b * (w.top - w.bottom) / w.zoom / this._elementRect.height;
|
|
10986
10986
|
} else
|
|
@@ -10990,7 +10990,7 @@ class lt extends gd {
|
|
|
10990
10990
|
const x = Vn * this.azimuthRotateSpeed * g / this._elementRect.height, M = Vn * this.polarRotateSpeed * b / this._elementRect.height;
|
|
10991
10991
|
this.rotate(x, M, !0);
|
|
10992
10992
|
}, this._dollyInternal = (g, b, x) => {
|
|
10993
|
-
const M = Math.pow(0.95, -g * this.dollySpeed), R = this._sphericalEnd.radius, w = this._sphericalEnd.radius * M, E =
|
|
10993
|
+
const M = Math.pow(0.95, -g * this.dollySpeed), R = this._sphericalEnd.radius, w = this._sphericalEnd.radius * M, E = It(w, this.minDistance, this.maxDistance), _ = E - w;
|
|
10994
10994
|
this.infinityDolly && this.dollyToCursor ? this._dollyToNoClamp(w, !0) : this.infinityDolly && !this.dollyToCursor ? (this.dollyInFixed(_, !0), this._dollyToNoClamp(E, !0)) : this._dollyToNoClamp(E, !0), this.dollyToCursor && (this._changedDolly += (this.infinityDolly ? w : E) - R, this._dollyControlCoord.set(b, x)), this._lastDollyDirection = Math.sign(-g);
|
|
10995
10995
|
}, this._zoomInternal = (g, b, x) => {
|
|
10996
10996
|
const M = Math.pow(0.95, g * this.dollySpeed), R = this._zoom, w = this._zoom * M;
|
|
@@ -11004,10 +11004,10 @@ class lt extends gd {
|
|
|
11004
11004
|
left: Q.ROTATE,
|
|
11005
11005
|
middle: Q.DOLLY,
|
|
11006
11006
|
right: Q.TRUCK,
|
|
11007
|
-
wheel: Pn(this._camera) ? Q.DOLLY :
|
|
11007
|
+
wheel: Pn(this._camera) ? Q.DOLLY : mn(this._camera) ? Q.ZOOM : Q.NONE
|
|
11008
11008
|
}, this.touches = {
|
|
11009
11009
|
one: Q.TOUCH_ROTATE,
|
|
11010
|
-
two: Pn(this._camera) ? Q.TOUCH_DOLLY_TRUCK :
|
|
11010
|
+
two: Pn(this._camera) ? Q.TOUCH_DOLLY_TRUCK : mn(this._camera) ? Q.TOUCH_ZOOM_TRUCK : Q.NONE,
|
|
11011
11011
|
three: Q.TOUCH_TRUCK
|
|
11012
11012
|
};
|
|
11013
11013
|
const n = new Te.Vector2(), s = new Te.Vector2(), i = new Te.Vector2(), o = (g) => {
|
|
@@ -11281,7 +11281,7 @@ class lt extends gd {
|
|
|
11281
11281
|
* @category Properties
|
|
11282
11282
|
*/
|
|
11283
11283
|
set interactiveArea(e) {
|
|
11284
|
-
this._interactiveArea.width =
|
|
11284
|
+
this._interactiveArea.width = It(e.width, 0, 1), this._interactiveArea.height = It(e.height, 0, 1), this._interactiveArea.x = It(e.x, 0, 1 - this._interactiveArea.width), this._interactiveArea.y = It(e.y, 0, 1 - this._interactiveArea.height);
|
|
11285
11285
|
}
|
|
11286
11286
|
/**
|
|
11287
11287
|
* Adds the specified event listener.
|
|
@@ -11403,7 +11403,7 @@ class lt extends gd {
|
|
|
11403
11403
|
*/
|
|
11404
11404
|
rotateTo(e, t, n = !1) {
|
|
11405
11405
|
this._isUserControllingRotate = !1;
|
|
11406
|
-
const s =
|
|
11406
|
+
const s = It(e, this.minAzimuthAngle, this.maxAzimuthAngle), i = It(t, this.minPolarAngle, this.maxPolarAngle);
|
|
11407
11407
|
this._sphericalEnd.theta = s, this._sphericalEnd.phi = i, this._sphericalEnd.makeSafe(), this._needsUpdate = !0, n || (this._spherical.theta = this._sphericalEnd.theta, this._spherical.phi = this._sphericalEnd.phi);
|
|
11408
11408
|
const o = !n || Fe(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && Fe(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold);
|
|
11409
11409
|
return this._createOnRestPromise(o);
|
|
@@ -11424,7 +11424,7 @@ class lt extends gd {
|
|
|
11424
11424
|
* @category Methods
|
|
11425
11425
|
*/
|
|
11426
11426
|
dollyTo(e, t = !1) {
|
|
11427
|
-
return this._isUserControllingDolly = !1, this._lastDollyDirection = jn.NONE, this._changedDolly = 0, this._dollyToNoClamp(
|
|
11427
|
+
return this._isUserControllingDolly = !1, this._lastDollyDirection = jn.NONE, this._changedDolly = 0, this._dollyToNoClamp(It(e, this.minDistance, this.maxDistance), t);
|
|
11428
11428
|
}
|
|
11429
11429
|
_dollyToNoClamp(e, t = !1) {
|
|
11430
11430
|
const n = this._sphericalEnd.radius;
|
|
@@ -11469,7 +11469,7 @@ class lt extends gd {
|
|
|
11469
11469
|
* @category Methods
|
|
11470
11470
|
*/
|
|
11471
11471
|
zoomTo(e, t = !1) {
|
|
11472
|
-
this._isUserControllingZoom = !1, this._zoomEnd =
|
|
11472
|
+
this._isUserControllingZoom = !1, this._zoomEnd = It(e, this.minZoom, this.maxZoom), this._needsUpdate = !0, t || (this._zoom = this._zoomEnd);
|
|
11473
11473
|
const n = !t || Fe(this._zoom, this._zoomEnd, this.restThreshold);
|
|
11474
11474
|
return this._changedZoom = 0, this._createOnRestPromise(n);
|
|
11475
11475
|
}
|
|
@@ -11488,8 +11488,8 @@ class lt extends gd {
|
|
|
11488
11488
|
* @category Methods
|
|
11489
11489
|
*/
|
|
11490
11490
|
truck(e, t, n = !1) {
|
|
11491
|
-
this._camera.updateMatrix(),
|
|
11492
|
-
const s = Ae.copy(
|
|
11491
|
+
this._camera.updateMatrix(), Ft.setFromMatrixColumn(this._camera.matrix, 0), zt.setFromMatrixColumn(this._camera.matrix, 1), Ft.multiplyScalar(e), zt.multiplyScalar(-t);
|
|
11492
|
+
const s = Ae.copy(Ft).add(zt), i = Be.copy(this._targetEnd).add(s);
|
|
11493
11493
|
return this.moveTo(i.x, i.y, i.z, n);
|
|
11494
11494
|
}
|
|
11495
11495
|
/**
|
|
@@ -11566,7 +11566,7 @@ class lt extends gd {
|
|
|
11566
11566
|
if (Pn(this._camera)) {
|
|
11567
11567
|
const b = this.getDistanceToFitBox(v.x, v.y, v.z, n);
|
|
11568
11568
|
l.push(this.moveTo(g.x, g.y, g.z, t)), l.push(this.dollyTo(b, t)), l.push(this.setFocalOffset(0, 0, 0, t));
|
|
11569
|
-
} else if (
|
|
11569
|
+
} else if (mn(this._camera)) {
|
|
11570
11570
|
const b = this._camera, x = b.right - b.left, M = b.top - b.bottom, R = n ? Math.max(x / v.x, M / v.y) : Math.min(x / v.x, M / v.y);
|
|
11571
11571
|
l.push(this.moveTo(g.x, g.y, g.z, t)), l.push(this.zoomTo(R, t)), l.push(this.setFocalOffset(0, 0, 0, t));
|
|
11572
11572
|
}
|
|
@@ -11583,7 +11583,7 @@ class lt extends gd {
|
|
|
11583
11583
|
if (n.push(this.moveTo(i.center.x, i.center.y, i.center.z, t)), Pn(this._camera)) {
|
|
11584
11584
|
const o = this.getDistanceToFitSphere(i.radius);
|
|
11585
11585
|
n.push(this.dollyTo(o, t));
|
|
11586
|
-
} else if (
|
|
11586
|
+
} else if (mn(this._camera)) {
|
|
11587
11587
|
const o = this._camera.right - this._camera.left, r = this._camera.top - this._camera.bottom, l = 2 * i.radius, c = Math.min(o / l, r / l);
|
|
11588
11588
|
n.push(this.zoomTo(c, t));
|
|
11589
11589
|
}
|
|
@@ -11659,7 +11659,7 @@ class lt extends gd {
|
|
|
11659
11659
|
*/
|
|
11660
11660
|
setTarget(e, t, n, s = !1) {
|
|
11661
11661
|
const i = this.getPosition(Ae), o = this.setLookAt(i.x, i.y, i.z, e, t, n, s);
|
|
11662
|
-
return this._sphericalEnd.phi =
|
|
11662
|
+
return this._sphericalEnd.phi = It(this._sphericalEnd.phi, this.minPolarAngle, this.maxPolarAngle), o;
|
|
11663
11663
|
}
|
|
11664
11664
|
/**
|
|
11665
11665
|
* Set focal offset using the screen parallel coordinates. z doesn't affect in Orthographic as with Dolly.
|
|
@@ -11683,9 +11683,9 @@ class lt extends gd {
|
|
|
11683
11683
|
* @category Methods
|
|
11684
11684
|
*/
|
|
11685
11685
|
setOrbitPoint(e, t, n) {
|
|
11686
|
-
this._camera.updateMatrixWorld(),
|
|
11686
|
+
this._camera.updateMatrixWorld(), Ft.setFromMatrixColumn(this._camera.matrixWorldInverse, 0), zt.setFromMatrixColumn(this._camera.matrixWorldInverse, 1), Rn.setFromMatrixColumn(this._camera.matrixWorldInverse, 2);
|
|
11687
11687
|
const s = Ae.set(e, t, n), i = s.distanceTo(this._camera.position), o = s.sub(this._camera.position);
|
|
11688
|
-
|
|
11688
|
+
Ft.multiplyScalar(o.x), zt.multiplyScalar(o.y), Rn.multiplyScalar(o.z), Ae.copy(Ft).add(zt).add(Rn), Ae.z = Ae.z + i, this.dollyTo(i, !1), this.setFocalOffset(-Ae.x, Ae.y, -Ae.z, !1), this.moveTo(e, t, n, !1);
|
|
11689
11689
|
}
|
|
11690
11690
|
/**
|
|
11691
11691
|
* Set the boundary box that encloses the target of the camera. box3 is in THREE.Box3
|
|
@@ -11892,7 +11892,7 @@ class lt extends gd {
|
|
|
11892
11892
|
this._boundary.clampPoint(M, M);
|
|
11893
11893
|
const E = Be.subVectors(M, this._targetEnd);
|
|
11894
11894
|
this._targetEnd.copy(M), this._target.add(E), this._changedDolly -= u, We(this._changedDolly) && (this._changedDolly = 0);
|
|
11895
|
-
} else if (
|
|
11895
|
+
} else if (mn(this._camera) && this._changedZoom !== 0) {
|
|
11896
11896
|
const u = this._zoom - this._lastZoom, d = this._camera, h = Ae.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (d.near + d.far) / (d.near - d.far)).unproject(d), p = Be.set(0, 0, -1).applyQuaternion(d.quaternion), m = Yn.copy(h).add(p.multiplyScalar(-h.dot(d.up))), g = -(this._zoom - u - this._zoom) / this._zoom, b = this._getCameraDirection(ds), x = this._targetEnd.dot(b), M = Ae.copy(this._targetEnd).lerp(m, g), R = M.dot(b), w = b.multiplyScalar(R - x);
|
|
11897
11897
|
M.sub(w), this._boundary.clampPoint(M, M);
|
|
11898
11898
|
const E = Be.subVectors(M, this._targetEnd);
|
|
@@ -11901,7 +11901,7 @@ class lt extends gd {
|
|
|
11901
11901
|
}
|
|
11902
11902
|
this._camera.zoom !== this._zoom && (this._camera.zoom = this._zoom, this._camera.updateProjectionMatrix(), this._updateNearPlaneCorners(), this._needsUpdate = !0), this._dragNeedsUpdate = !0;
|
|
11903
11903
|
const l = this._collisionTest();
|
|
11904
|
-
this._spherical.radius = Math.min(this._spherical.radius, l), this._spherical.makeSafe(), this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target), this._camera.lookAt(this._target), (!We(this._focalOffset.x) || !We(this._focalOffset.y) || !We(this._focalOffset.z)) && (this._camera.updateMatrixWorld(),
|
|
11904
|
+
this._spherical.radius = Math.min(this._spherical.radius, l), this._spherical.makeSafe(), this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target), this._camera.lookAt(this._target), (!We(this._focalOffset.x) || !We(this._focalOffset.y) || !We(this._focalOffset.z)) && (this._camera.updateMatrixWorld(), Ft.setFromMatrixColumn(this._camera.matrix, 0), zt.setFromMatrixColumn(this._camera.matrix, 1), Rn.setFromMatrixColumn(this._camera.matrix, 2), Ft.multiplyScalar(this._focalOffset.x), zt.multiplyScalar(-this._focalOffset.y), Rn.multiplyScalar(this._focalOffset.z), Ae.copy(Ft).add(zt).add(Rn), this._camera.position.add(Ae)), this._boundaryEnclosesCamera && this._encloseToBoundary(this._camera.position.copy(this._target), Ae.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse), 1);
|
|
11905
11905
|
const f = this._needsUpdate;
|
|
11906
11906
|
return f && !this._updatedLastTime ? (this._hasRested = !1, this.dispatchEvent({ type: "wake" }), this.dispatchEvent({ type: "update" })) : f ? (this.dispatchEvent({ type: "update" }), We(t, this.restThreshold) && We(n, this.restThreshold) && We(s, this.restThreshold) && We(i.x, this.restThreshold) && We(i.y, this.restThreshold) && We(i.z, this.restThreshold) && We(o.x, this.restThreshold) && We(o.y, this.restThreshold) && We(o.z, this.restThreshold) && We(r, this.restThreshold) && !this._hasRested && (this._hasRested = !0, this.dispatchEvent({ type: "rest" }))) : !f && this._updatedLastTime && this.dispatchEvent({ type: "sleep" }), this._lastDistance = this._spherical.radius, this._lastZoom = this._zoom, this._updatedLastTime = f, this._needsUpdate = !1, f;
|
|
11907
11907
|
}
|
|
@@ -12007,7 +12007,7 @@ class lt extends gd {
|
|
|
12007
12007
|
if (Pn(this._camera)) {
|
|
12008
12008
|
const e = this._camera, t = e.near, n = e.getEffectiveFOV() * us, s = Math.tan(n * 0.5) * t, i = s * e.aspect;
|
|
12009
12009
|
this._nearPlaneCorners[0].set(-i, -s, 0), this._nearPlaneCorners[1].set(i, -s, 0), this._nearPlaneCorners[2].set(i, s, 0), this._nearPlaneCorners[3].set(-i, s, 0);
|
|
12010
|
-
} else if (
|
|
12010
|
+
} else if (mn(this._camera)) {
|
|
12011
12011
|
const e = this._camera, t = 1 / e.zoom, n = e.left * t, s = e.right * t, i = e.top * t, o = e.bottom * t;
|
|
12012
12012
|
this._nearPlaneCorners[0].set(n, i, 0), this._nearPlaneCorners[1].set(s, i, 0), this._nearPlaneCorners[2].set(s, o, 0), this._nearPlaneCorners[3].set(n, o, 0);
|
|
12013
12013
|
}
|
|
@@ -12187,23 +12187,23 @@ const hl = (a) => !!(a && a.isPerspectiveCamera), fl = (a) => !!(a && a.isOrthog
|
|
|
12187
12187
|
Vector4: at
|
|
12188
12188
|
};
|
|
12189
12189
|
lt.install({ THREE: U });
|
|
12190
|
-
const { camera:
|
|
12190
|
+
const { camera: Y, renderer: V, extend: ne, controls: Z, invalidate: ee } = xe();
|
|
12191
12191
|
J(n, () => {
|
|
12192
|
-
|
|
12192
|
+
ee();
|
|
12193
12193
|
});
|
|
12194
12194
|
const te = Pe(() => Fr(
|
|
12195
|
-
n.camera ||
|
|
12195
|
+
n.camera || Y.value,
|
|
12196
12196
|
n.mouseButtons
|
|
12197
12197
|
)), fe = Pe(() => zr(
|
|
12198
|
-
n.camera ||
|
|
12198
|
+
n.camera || Y.value,
|
|
12199
12199
|
n.touches
|
|
12200
12200
|
)), he = re(null);
|
|
12201
|
-
|
|
12201
|
+
ne({ CameraControls: lt }), et(() => {
|
|
12202
12202
|
we(), he.value && i.value ? Z.value = he.value : Z.value = null;
|
|
12203
12203
|
});
|
|
12204
12204
|
function we() {
|
|
12205
12205
|
Xe(he.value, "update", () => {
|
|
12206
|
-
s("change", he.value),
|
|
12206
|
+
s("change", he.value), ee();
|
|
12207
12207
|
}), Xe(he.value, "controlend", () => s("end", he.value)), Xe(he.value, "controlstart", () => s("start", he.value));
|
|
12208
12208
|
}
|
|
12209
12209
|
const { onBeforeRender: I } = Ve();
|
|
@@ -12214,7 +12214,7 @@ const hl = (a) => !!(a && a.isPerspectiveCamera), fl = (a) => !!(a && a.isOrthog
|
|
|
12214
12214
|
he.value && he.value.disconnect();
|
|
12215
12215
|
}), e({
|
|
12216
12216
|
instance: he
|
|
12217
|
-
}), (B, D) => (B.camera || F(
|
|
12217
|
+
}), (B, D) => (B.camera || F(Y)) && (B.domElement || F(V)) ? (ae(), ce("TresCameraControls", {
|
|
12218
12218
|
key: 0,
|
|
12219
12219
|
ref_key: "controlsRef",
|
|
12220
12220
|
ref: he,
|
|
@@ -12242,10 +12242,10 @@ const hl = (a) => !!(a && a.isPerspectiveCamera), fl = (a) => !!(a && a.isOrthog
|
|
|
12242
12242
|
"boundary-friction": F(A),
|
|
12243
12243
|
"rest-threshold": F(C),
|
|
12244
12244
|
"collider-meshes": F(N),
|
|
12245
|
-
args: [B.camera || F(
|
|
12245
|
+
args: [B.camera || F(Y), B.domElement || F(V).domElement],
|
|
12246
12246
|
"mouse-buttons": te.value,
|
|
12247
12247
|
touches: fe.value
|
|
12248
|
-
}, null, 8, _d)) :
|
|
12248
|
+
}, null, 8, _d)) : an("", !0);
|
|
12249
12249
|
}
|
|
12250
12250
|
}), sv = /* @__PURE__ */ ue({
|
|
12251
12251
|
__name: "KeyboardControls",
|
|
@@ -12269,8 +12269,8 @@ const hl = (a) => !!(a && a.isPerspectiveCamera), fl = (a) => !!(a && a.isOrthog
|
|
|
12269
12269
|
instance: r
|
|
12270
12270
|
});
|
|
12271
12271
|
const M = (A) => s("isLock", A), R = (A) => s("change", A), w = new $(), E = new $(), _ = new je(), T = (A, C) => {
|
|
12272
|
-
var
|
|
12273
|
-
if (!((
|
|
12272
|
+
var Y;
|
|
12273
|
+
if (!((Y = o.value) != null && Y.position) && !w)
|
|
12274
12274
|
return;
|
|
12275
12275
|
const N = o.value, U = A * 1e-3;
|
|
12276
12276
|
N == null || N.translateZ(-C), _.set(E.x * U, E.y * U, E.z * U, 1).normalize(), N == null || N.quaternion.multiply(_), (f.value || u.value) && s("change", r.value);
|
|
@@ -12375,9 +12375,9 @@ const hl = (a) => !!(a && a.isPerspectiveCamera), fl = (a) => !!(a && a.isOrthog
|
|
|
12375
12375
|
"zoom-speed": F(x),
|
|
12376
12376
|
"enable-rotate": F(M),
|
|
12377
12377
|
"rotate-speed": F(R)
|
|
12378
|
-
}, null, 8, xd)) :
|
|
12378
|
+
}, null, 8, xd)) : an("", !0);
|
|
12379
12379
|
}
|
|
12380
|
-
}), wd = ["target", "auto-rotate", "auto-rotate-speed", "enable-damping", "damping-factor", "enable-pan", "key-pan-speed", "keys", "max-azimuth-angle", "min-azimuth-angle", "max-polar-angle", "min-polar-angle", "min-distance", "max-distance", "min-zoom", "max-zoom", "touches", "enable-zoom", "zoom-speed", "enable-rotate", "rotate-speed", "args"], ov = /* @__PURE__ */ ue({
|
|
12380
|
+
}), wd = ["target", "auto-rotate", "auto-rotate-speed", "enable-damping", "damping-factor", "enable-pan", "key-pan-speed", "keys", "max-azimuth-angle", "min-azimuth-angle", "max-polar-angle", "min-polar-angle", "min-distance", "max-distance", "min-zoom", "max-zoom", "touches", "enable-zoom", "zoom-speed", "enable-rotate", "rotate-speed", "mouse-buttons", "args"], ov = /* @__PURE__ */ ue({
|
|
12381
12381
|
__name: "OrbitControls",
|
|
12382
12382
|
props: {
|
|
12383
12383
|
makeDefault: { type: Boolean, default: !1 },
|
|
@@ -12399,11 +12399,12 @@ const hl = (a) => !!(a && a.isPerspectiveCamera), fl = (a) => !!(a && a.isOrthog
|
|
|
12399
12399
|
maxDistance: { default: Number.POSITIVE_INFINITY },
|
|
12400
12400
|
minZoom: { default: 0 },
|
|
12401
12401
|
maxZoom: { default: Number.POSITIVE_INFINITY },
|
|
12402
|
-
touches: { default: () => ({ ONE:
|
|
12402
|
+
touches: { default: () => ({ ONE: jt.ROTATE, TWO: jt.DOLLY_PAN }) },
|
|
12403
12403
|
enableZoom: { type: Boolean, default: !0 },
|
|
12404
12404
|
zoomSpeed: { default: 1 },
|
|
12405
12405
|
enableRotate: { type: Boolean, default: !0 },
|
|
12406
|
-
rotateSpeed: { default: 1 }
|
|
12406
|
+
rotateSpeed: { default: 1 },
|
|
12407
|
+
mouseButtons: { default: () => ({ LEFT: Ot.ROTATE, MIDDLE: Ot.DOLLY, RIGHT: Ot.PAN }) }
|
|
12407
12408
|
},
|
|
12408
12409
|
emits: ["change", "start", "end"],
|
|
12409
12410
|
setup(a, { expose: e, emit: t }) {
|
|
@@ -12428,22 +12429,23 @@ const hl = (a) => !!(a && a.isPerspectiveCamera), fl = (a) => !!(a && a.isOrthog
|
|
|
12428
12429
|
enableRotate: w,
|
|
12429
12430
|
touches: E,
|
|
12430
12431
|
rotateSpeed: _,
|
|
12431
|
-
target: T
|
|
12432
|
-
|
|
12433
|
-
|
|
12434
|
-
|
|
12432
|
+
target: T,
|
|
12433
|
+
mouseButtons: y
|
|
12434
|
+
} = Le(n), { camera: A, renderer: C, extend: N, controls: U, invalidate: Y } = xe(), V = re(null);
|
|
12435
|
+
N({ OrbitControls: Ka }), J(V, (ee) => {
|
|
12436
|
+
ne(), ee && i.value ? U.value = ee : U.value = null;
|
|
12435
12437
|
});
|
|
12436
|
-
function
|
|
12438
|
+
function ne() {
|
|
12437
12439
|
Xe(V.value, "change", () => {
|
|
12438
|
-
s("change", V.value),
|
|
12440
|
+
s("change", V.value), Y();
|
|
12439
12441
|
}), Xe(V.value, "start", () => s("start", V.value)), Xe(V.value, "end", () => s("end", V.value));
|
|
12440
12442
|
}
|
|
12441
|
-
const { onBeforeRender:
|
|
12442
|
-
return
|
|
12443
|
-
V.value && (l.value || o.value) && (V.value.update(), o.value &&
|
|
12443
|
+
const { onBeforeRender: Z } = Ve();
|
|
12444
|
+
return Z(({ invalidate: ee }) => {
|
|
12445
|
+
V.value && (l.value || o.value) && (V.value.update(), o.value && ee());
|
|
12444
12446
|
}), tt(() => {
|
|
12445
12447
|
V.value && V.value.dispose();
|
|
12446
|
-
}), e({ instance: V }), (
|
|
12448
|
+
}), e({ instance: V }), (ee, te) => (ee.camera || F(A)) && (ee.domElement || F(C)) ? (ae(), ce("TresOrbitControls", {
|
|
12447
12449
|
key: 0,
|
|
12448
12450
|
ref_key: "controlsRef",
|
|
12449
12451
|
ref: V,
|
|
@@ -12454,7 +12456,7 @@ const hl = (a) => !!(a && a.isPerspectiveCamera), fl = (a) => !!(a && a.isOrthog
|
|
|
12454
12456
|
"damping-factor": F(c),
|
|
12455
12457
|
"enable-pan": F(f),
|
|
12456
12458
|
"key-pan-speed": F(u),
|
|
12457
|
-
keys:
|
|
12459
|
+
keys: ee.keys,
|
|
12458
12460
|
"max-azimuth-angle": F(d),
|
|
12459
12461
|
"min-azimuth-angle": F(h),
|
|
12460
12462
|
"max-polar-angle": F(p),
|
|
@@ -12468,8 +12470,9 @@ const hl = (a) => !!(a && a.isPerspectiveCamera), fl = (a) => !!(a && a.isOrthog
|
|
|
12468
12470
|
"zoom-speed": F(R),
|
|
12469
12471
|
"enable-rotate": F(w),
|
|
12470
12472
|
"rotate-speed": F(_),
|
|
12471
|
-
|
|
12472
|
-
|
|
12473
|
+
"mouse-buttons": F(y),
|
|
12474
|
+
args: [ee.camera || F(A), ee.domElement || F(C).domElement]
|
|
12475
|
+
}, null, 8, wd)) : an("", !0);
|
|
12473
12476
|
}
|
|
12474
12477
|
}), Td = ["args"], bd = /* @__PURE__ */ ue({
|
|
12475
12478
|
__name: "PointerLockControls",
|
|
@@ -12505,7 +12508,7 @@ const hl = (a) => !!(a && a.isPerspectiveCamera), fl = (a) => !!(a && a.isOrthog
|
|
|
12505
12508
|
ref_key: "controlsRef",
|
|
12506
12509
|
ref: f,
|
|
12507
12510
|
args: [h.camera || F(i), h.domElement || F(o).domElement]
|
|
12508
|
-
}, null, 8, Td)) :
|
|
12511
|
+
}, null, 8, Td)) : an("", !0);
|
|
12509
12512
|
}
|
|
12510
12513
|
}), rv = /* @__PURE__ */ ue({
|
|
12511
12514
|
__name: "ScrollControls",
|
|
@@ -12561,8 +12564,8 @@ const hl = (a) => !!(a && a.isPerspectiveCamera), fl = (a) => !!(a && a.isOrthog
|
|
|
12561
12564
|
if (n.htmlScroll && (y != null && y.domElement))
|
|
12562
12565
|
A != null && A.style.width && (A != null && A.style.position) && (A != null && A.style.top) && (A != null && A.style.left) && (A.style.width = "100%", A.style.position = "fixed", A.style.zIndex = " -99999", A.style.top = "0", A.style.left = "0"), w.value = document.body.scrollHeight;
|
|
12563
12566
|
else {
|
|
12564
|
-
const U = document.createElement("div"),
|
|
12565
|
-
u.style[n.horizontal ? "overflowX" : "overflowY"] = "auto", u.style[n.horizontal ? "overflowY" : "overflowX"] = "hidden", u.style.position = "absolute", u.style.width = "100%", u.style.height = " 100%", u.style.top = "0", u.style.left = "0", u.classList.add("scrollContainer"), U.style.position = "sticky", U.style.top = "0px", U.style.left = "0px", U.style.width = "100%", U.style.height = "100%", U.style.overflow = "hidden", u.appendChild(U),
|
|
12567
|
+
const U = document.createElement("div"), Y = document.createElement("div");
|
|
12568
|
+
u.style[n.horizontal ? "overflowX" : "overflowY"] = "auto", u.style[n.horizontal ? "overflowY" : "overflowX"] = "hidden", u.style.position = "absolute", u.style.width = "100%", u.style.height = " 100%", u.style.top = "0", u.style.left = "0", u.classList.add("scrollContainer"), U.style.position = "sticky", U.style.top = "0px", U.style.left = "0px", U.style.width = "100%", U.style.height = "100%", U.style.overflow = "hidden", u.appendChild(U), Y.style.height = n.horizontal ? "100%" : `${v.value * n.pages}px`, Y.style.width = n.horizontal ? `${g.value * n.pages}px` : "100vw", Y.style.pointerEvents = "none", A.style.position = "fixed", A.style.zIndex = "0", A != null && A.style.width && (A.style.width = "100%"), u.appendChild(Y), y != null && y.domElement.parentNode && (y.domElement.parentNode.style.position = "relative"), (N = (C = y == null ? void 0 : y.domElement) == null ? void 0 : C.parentNode) == null || N.appendChild(u), w.value = n.horizontal ? g.value * n.pages : v.value * n.pages;
|
|
12566
12569
|
}
|
|
12567
12570
|
},
|
|
12568
12571
|
{
|
|
@@ -12629,11 +12632,11 @@ const hl = (a) => !!(a && a.isPerspectiveCamera), fl = (a) => !!(a && a.isOrthog
|
|
|
12629
12632
|
}), e({
|
|
12630
12633
|
instance: g
|
|
12631
12634
|
}), (N, U) => {
|
|
12632
|
-
var
|
|
12635
|
+
var Y;
|
|
12633
12636
|
return (N.camera || F(x)) && F(M) ? (ae(), ce("TresTransformControls", {
|
|
12634
12637
|
ref_key: "controlsRef",
|
|
12635
12638
|
ref: g,
|
|
12636
|
-
key: (
|
|
12639
|
+
key: (Y = N.camera || F(x)) == null ? void 0 : Y.uuid,
|
|
12637
12640
|
object: F(i),
|
|
12638
12641
|
args: [N.camera || F(x), F(M).domElement],
|
|
12639
12642
|
mode: F(o),
|
|
@@ -12648,7 +12651,7 @@ const hl = (a) => !!(a && a.isPerspectiveCamera), fl = (a) => !!(a && a.isOrthog
|
|
|
12648
12651
|
"show-y": F(m),
|
|
12649
12652
|
"show-z": F(v),
|
|
12650
12653
|
visible: !0
|
|
12651
|
-
}, null, 8, Ed)) :
|
|
12654
|
+
}, null, 8, Ed)) : an("", !0);
|
|
12652
12655
|
};
|
|
12653
12656
|
}
|
|
12654
12657
|
}), Md = ["geometry", "render-order"], lv = /* @__PURE__ */ ue({
|
|
@@ -12694,7 +12697,7 @@ const hl = (a) => !!(a && a.isPerspectiveCamera), fl = (a) => !!(a && a.isOrthog
|
|
|
12694
12697
|
color: y.fill,
|
|
12695
12698
|
opacity: y.fillOpacity,
|
|
12696
12699
|
transparent: !0,
|
|
12697
|
-
side:
|
|
12700
|
+
side: on,
|
|
12698
12701
|
depthWrite: x
|
|
12699
12702
|
}, t.fillMaterial);
|
|
12700
12703
|
if (!o.value && y.fill !== void 0 && y.fill !== "none")
|
|
@@ -12711,13 +12714,13 @@ const hl = (a) => !!(a && a.isPerspectiveCamera), fl = (a) => !!(a && a.isOrthog
|
|
|
12711
12714
|
color: (E = T.userData) == null ? void 0 : E.style.stroke,
|
|
12712
12715
|
opacity: (_ = T.userData) == null ? void 0 : _.style.strokeOpacity,
|
|
12713
12716
|
transparent: !0,
|
|
12714
|
-
side:
|
|
12717
|
+
side: on,
|
|
12715
12718
|
depthWrite: x
|
|
12716
12719
|
}, t.strokeMaterial);
|
|
12717
12720
|
for (const N of T.subPaths) {
|
|
12718
|
-
const U = N.getPoints().map((
|
|
12719
|
-
M &&
|
|
12720
|
-
geometry:
|
|
12721
|
+
const U = N.getPoints().map((V) => new ve(V.x, -V.y)), Y = _s.pointsToStroke(U, y || "none");
|
|
12722
|
+
M && Y.translate(0, 0, R++ * M), b.push({
|
|
12723
|
+
geometry: Y,
|
|
12721
12724
|
material: C,
|
|
12722
12725
|
isStroke: !0
|
|
12723
12726
|
});
|
|
@@ -13029,12 +13032,12 @@ function Ud() {
|
|
|
13029
13032
|
}, _array: function(y, U) {
|
|
13030
13033
|
U = U !== void 0 ? U : w.unorderedArrays !== !1;
|
|
13031
13034
|
var C = this;
|
|
13032
|
-
if (T("array:" + y.length + ":"), !U || y.length <= 1) return y.forEach(function(
|
|
13033
|
-
return C.dispatch(
|
|
13035
|
+
if (T("array:" + y.length + ":"), !U || y.length <= 1) return y.forEach(function(Y) {
|
|
13036
|
+
return C.dispatch(Y);
|
|
13034
13037
|
});
|
|
13035
|
-
var N = [], U = y.map(function(
|
|
13036
|
-
var
|
|
13037
|
-
return M(w,
|
|
13038
|
+
var N = [], U = y.map(function(Y) {
|
|
13039
|
+
var V = new R(), ne = _.slice();
|
|
13040
|
+
return M(w, V, ne).dispatch(Y), N = N.concat(ne.slice(_.length)), V.read().toString();
|
|
13038
13041
|
});
|
|
13039
13042
|
return _ = _.concat(N), U.sort(), this._array(U, !1);
|
|
13040
13043
|
}, _date: function(y) {
|
|
@@ -13157,23 +13160,23 @@ Use "options.replacer" or "options.ignoreUnknown"
|
|
|
13157
13160
|
var T, y;
|
|
13158
13161
|
if (0 < _.length % 4) throw new Error("Invalid string. Length must be a multiple of 4");
|
|
13159
13162
|
var A = _.length, A = _.charAt(A - 2) === "=" ? 2 : _.charAt(A - 1) === "=" ? 1 : 0, C = new m(3 * _.length / 4 - A), N = 0 < A ? _.length - 4 : _.length, U = 0;
|
|
13160
|
-
function V
|
|
13161
|
-
C[U++] =
|
|
13163
|
+
function Y(V) {
|
|
13164
|
+
C[U++] = V;
|
|
13162
13165
|
}
|
|
13163
|
-
for (T = 0; T < N; T += 4, 0)
|
|
13164
|
-
return A == 2 ?
|
|
13166
|
+
for (T = 0; T < N; T += 4, 0) Y((16711680 & (y = E(_.charAt(T)) << 18 | E(_.charAt(T + 1)) << 12 | E(_.charAt(T + 2)) << 6 | E(_.charAt(T + 3)))) >> 16), Y((65280 & y) >> 8), Y(255 & y);
|
|
13167
|
+
return A == 2 ? Y(255 & (y = E(_.charAt(T)) << 2 | E(_.charAt(T + 1)) >> 4)) : A == 1 && (Y((y = E(_.charAt(T)) << 10 | E(_.charAt(T + 1)) << 4 | E(_.charAt(T + 2)) >> 2) >> 8 & 255), Y(255 & y)), C;
|
|
13165
13168
|
}, p.fromByteArray = function(_) {
|
|
13166
13169
|
var T, y, A, C, N = _.length % 3, U = "";
|
|
13167
|
-
function V
|
|
13168
|
-
return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(
|
|
13170
|
+
function Y(V) {
|
|
13171
|
+
return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(V);
|
|
13169
13172
|
}
|
|
13170
|
-
for (T = 0, A = _.length - N; T < A; T += 3) y = (_[T] << 16) + (_[T + 1] << 8) + _[T + 2], U +=
|
|
13173
|
+
for (T = 0, A = _.length - N; T < A; T += 3) y = (_[T] << 16) + (_[T + 1] << 8) + _[T + 2], U += Y((C = y) >> 18 & 63) + Y(C >> 12 & 63) + Y(C >> 6 & 63) + Y(63 & C);
|
|
13171
13174
|
switch (N) {
|
|
13172
13175
|
case 1:
|
|
13173
|
-
U = (U +=
|
|
13176
|
+
U = (U += Y((y = _[_.length - 1]) >> 2)) + Y(y << 4 & 63) + "==";
|
|
13174
13177
|
break;
|
|
13175
13178
|
case 2:
|
|
13176
|
-
U = (U = (U +=
|
|
13179
|
+
U = (U = (U += Y((y = (_[_.length - 2] << 8) + _[_.length - 1]) >> 10)) + Y(y >> 4 & 63)) + Y(y << 2 & 63) + "=";
|
|
13177
13180
|
}
|
|
13178
13181
|
return U;
|
|
13179
13182
|
};
|
|
@@ -13193,7 +13196,7 @@ Use "options.replacer" or "options.ignoreUnknown"
|
|
|
13193
13196
|
X = Z(S.length);
|
|
13194
13197
|
}
|
|
13195
13198
|
if (v._useTypedArrays ? H = v._augment(new Uint8Array(X)) : ((H = this).length = X, H._isBuffer = !0), v._useTypedArrays && typeof S.byteLength == "number") H._set(S);
|
|
13196
|
-
else if (
|
|
13199
|
+
else if (ee(K = S) || v.isBuffer(K) || K && typeof K == "object" && typeof K.length == "number") for (j = 0; j < X; j++) v.isBuffer(S) ? H[j] = S.readUInt8(j) : H[j] = S[j];
|
|
13197
13200
|
else if (se == "string") H.write(S, 0, P);
|
|
13198
13201
|
else if (se == "number" && !v._useTypedArrays && !L) for (j = 0; j < X; j++) H[j] = 0;
|
|
13199
13202
|
return H;
|
|
@@ -13253,7 +13256,7 @@ Use "options.replacer" or "options.ignoreUnknown"
|
|
|
13253
13256
|
function U(S, P, L, X, H) {
|
|
13254
13257
|
H || (z(P != null, "missing value"), z(typeof X == "boolean", "missing or invalid endian"), z(L != null, "missing offset"), z(L + 3 < S.length, "Trying to write beyond buffer length"), O(P, 34028234663852886e22, -34028234663852886e22)), S.length <= L || m.write(S, P, L, X, 23, 4);
|
|
13255
13258
|
}
|
|
13256
|
-
function
|
|
13259
|
+
function Y(S, P, L, X, H) {
|
|
13257
13260
|
H || (z(P != null, "missing value"), z(typeof X == "boolean", "missing or invalid endian"), z(L != null, "missing offset"), z(L + 7 < S.length, "Trying to write beyond buffer length"), O(P, 17976931348623157e292, -17976931348623157e292)), S.length <= L || m.write(S, P, L, X, 52, 8);
|
|
13258
13261
|
}
|
|
13259
13262
|
s.Buffer = v, s.SlowBuffer = v, s.INSPECT_MAX_BYTES = 50, v.poolSize = 8192, v._useTypedArrays = function() {
|
|
@@ -13313,7 +13316,7 @@ Use "options.replacer" or "options.ignoreUnknown"
|
|
|
13313
13316
|
}
|
|
13314
13317
|
return L;
|
|
13315
13318
|
}, v.concat = function(S, P) {
|
|
13316
|
-
if (z(
|
|
13319
|
+
if (z(ee(S), `Usage: Buffer.concat(list, [totalLength])
|
|
13317
13320
|
list should be an Array.`), S.length === 0) return new v(0);
|
|
13318
13321
|
if (S.length === 1) return S[0];
|
|
13319
13322
|
if (typeof P != "number") for (H = P = 0; H < S.length; H++) P += S[H].length;
|
|
@@ -13411,7 +13414,7 @@ list should be an Array.`), S.length === 0) return new v(0);
|
|
|
13411
13414
|
}
|
|
13412
13415
|
}, v.prototype.slice = function(S, P) {
|
|
13413
13416
|
var L = this.length;
|
|
13414
|
-
if (S =
|
|
13417
|
+
if (S = ne(S, L, 0), P = ne(P, L, L), v._useTypedArrays) return v._augment(this.subarray(S, P));
|
|
13415
13418
|
for (var X = P - S, H = new v(X, void 0, !0), j = 0; j < X; j++) H[j] = this[j + S];
|
|
13416
13419
|
return H;
|
|
13417
13420
|
}, v.prototype.get = function(S) {
|
|
@@ -13471,9 +13474,9 @@ list should be an Array.`), S.length === 0) return new v(0);
|
|
|
13471
13474
|
}, v.prototype.writeFloatBE = function(S, P, L) {
|
|
13472
13475
|
U(this, S, P, !1, L);
|
|
13473
13476
|
}, v.prototype.writeDoubleLE = function(S, P, L) {
|
|
13474
|
-
|
|
13477
|
+
Y(this, S, P, !0, L);
|
|
13475
13478
|
}, v.prototype.writeDoubleBE = function(S, P, L) {
|
|
13476
|
-
|
|
13479
|
+
Y(this, S, P, !1, L);
|
|
13477
13480
|
}, v.prototype.fill = function(S, P, L) {
|
|
13478
13481
|
if (P = P || 0, L = L || this.length, z(typeof (S = typeof (S = S || 0) == "string" ? S.charCodeAt(0) : S) == "number" && !isNaN(S), "value is not a number"), z(P <= L, "end < start"), L !== P && this.length !== 0) {
|
|
13479
13482
|
z(0 <= P && P < this.length, "start out of bounds"), z(0 <= L && L <= this.length, "end out of bounds");
|
|
@@ -13491,14 +13494,14 @@ list should be an Array.`), S.length === 0) return new v(0);
|
|
|
13491
13494
|
for (var S = new Uint8Array(this.length), P = 0, L = S.length; P < L; P += 1) S[P] = this[P];
|
|
13492
13495
|
return S.buffer;
|
|
13493
13496
|
};
|
|
13494
|
-
var
|
|
13495
|
-
function
|
|
13497
|
+
var V = v.prototype;
|
|
13498
|
+
function ne(S, P, L) {
|
|
13496
13499
|
return typeof S != "number" ? L : P <= (S = ~~S) ? P : 0 <= S || 0 <= (S += P) ? S : 0;
|
|
13497
13500
|
}
|
|
13498
13501
|
function Z(S) {
|
|
13499
13502
|
return (S = ~~Math.ceil(+S)) < 0 ? 0 : S;
|
|
13500
13503
|
}
|
|
13501
|
-
function
|
|
13504
|
+
function ee(S) {
|
|
13502
13505
|
return (Array.isArray || function(P) {
|
|
13503
13506
|
return Object.prototype.toString.call(P) === "[object Array]";
|
|
13504
13507
|
})(S);
|
|
@@ -13541,7 +13544,7 @@ list should be an Array.`), S.length === 0) return new v(0);
|
|
|
13541
13544
|
if (!S) throw new Error(P || "Failed assertion");
|
|
13542
13545
|
}
|
|
13543
13546
|
v._augment = function(S) {
|
|
13544
|
-
return S._isBuffer = !0, S._get = S.get, S._set = S.set, S.get =
|
|
13547
|
+
return S._isBuffer = !0, S._get = S.get, S._set = S.set, S.get = V.get, S.set = V.set, S.write = V.write, S.toString = V.toString, S.toLocaleString = V.toString, S.toJSON = V.toJSON, S.copy = V.copy, S.slice = V.slice, S.readUInt8 = V.readUInt8, S.readUInt16LE = V.readUInt16LE, S.readUInt16BE = V.readUInt16BE, S.readUInt32LE = V.readUInt32LE, S.readUInt32BE = V.readUInt32BE, S.readInt8 = V.readInt8, S.readInt16LE = V.readInt16LE, S.readInt16BE = V.readInt16BE, S.readInt32LE = V.readInt32LE, S.readInt32BE = V.readInt32BE, S.readFloatLE = V.readFloatLE, S.readFloatBE = V.readFloatBE, S.readDoubleLE = V.readDoubleLE, S.readDoubleBE = V.readDoubleBE, S.writeUInt8 = V.writeUInt8, S.writeUInt16LE = V.writeUInt16LE, S.writeUInt16BE = V.writeUInt16BE, S.writeUInt32LE = V.writeUInt32LE, S.writeUInt32BE = V.writeUInt32BE, S.writeInt8 = V.writeInt8, S.writeInt16LE = V.writeInt16LE, S.writeInt16BE = V.writeInt16BE, S.writeInt32LE = V.writeInt32LE, S.writeInt32BE = V.writeInt32BE, S.writeFloatLE = V.writeFloatLE, S.writeFloatBE = V.writeFloatBE, S.writeDoubleLE = V.writeDoubleLE, S.writeDoubleBE = V.writeDoubleBE, S.fill = V.fill, S.inspect = V.inspect, S.toArrayBuffer = V.toArrayBuffer, S;
|
|
13545
13548
|
};
|
|
13546
13549
|
}).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/buffer/index.js", "/node_modules/gulp-browserify/node_modules/buffer");
|
|
13547
13550
|
}, { "base64-js": 2, buffer: 3, ieee754: 10, lYpoI2: 11 }], 4: [function(t, n, s) {
|
|
@@ -13550,7 +13553,7 @@ list should be an Array.`), S.length === 0) return new v(0);
|
|
|
13550
13553
|
v.fill(0), n.exports = { hash: function(g, b, x, M) {
|
|
13551
13554
|
for (var R = b(function(y, A) {
|
|
13552
13555
|
y.length % m != 0 && (C = y.length + (m - y.length % m), y = p.concat([y, v], C));
|
|
13553
|
-
for (var C, N = [], U = A ? y.readInt32BE : y.readInt32LE,
|
|
13556
|
+
for (var C, N = [], U = A ? y.readInt32BE : y.readInt32LE, Y = 0; Y < y.length; Y += m) N.push(U.call(y, Y));
|
|
13554
13557
|
return N;
|
|
13555
13558
|
}(g = p.isBuffer(g) ? g : new p(g), M), 8 * g.length), b = M, w = new p(x), E = b ? w.writeInt32BE : w.writeInt32LE, _ = 0; _ < R.length; _++) E.call(w, R[_], 4 * _, !0);
|
|
13556
13559
|
return w;
|
|
@@ -13564,12 +13567,12 @@ list should be an Array.`), S.length === 0) return new v(0);
|
|
|
13564
13567
|
return C || w("algorithm:", y, "is not yet supported"), { update: function(U) {
|
|
13565
13568
|
return p.isBuffer(U) || (U = new p(U)), N.push(U), U.length, this;
|
|
13566
13569
|
}, digest: function(U) {
|
|
13567
|
-
var
|
|
13568
|
-
p.isBuffer(
|
|
13569
|
-
for (var
|
|
13570
|
-
return Z =
|
|
13571
|
-
}(C, A,
|
|
13572
|
-
return N = null, U ?
|
|
13570
|
+
var Y = p.concat(N), Y = A ? function(V, ne, Z) {
|
|
13571
|
+
p.isBuffer(ne) || (ne = new p(ne)), p.isBuffer(Z) || (Z = new p(Z)), ne.length > x ? ne = V(ne) : ne.length < x && (ne = p.concat([ne, M], x));
|
|
13572
|
+
for (var ee = new p(x), te = new p(x), fe = 0; fe < x; fe++) ee[fe] = 54 ^ ne[fe], te[fe] = 92 ^ ne[fe];
|
|
13573
|
+
return Z = V(p.concat([ee, Z])), V(p.concat([te, Z]));
|
|
13574
|
+
}(C, A, Y) : C(Y);
|
|
13575
|
+
return N = null, U ? Y.toString(U) : Y;
|
|
13573
13576
|
} };
|
|
13574
13577
|
}
|
|
13575
13578
|
function w() {
|
|
@@ -13600,8 +13603,8 @@ list should be an Array.`), S.length === 0) return new v(0);
|
|
|
13600
13603
|
function m(w, E) {
|
|
13601
13604
|
w[E >> 5] |= 128 << E % 32, w[14 + (E + 64 >>> 9 << 4)] = E;
|
|
13602
13605
|
for (var _ = 1732584193, T = -271733879, y = -1732584194, A = 271733878, C = 0; C < w.length; C += 16) {
|
|
13603
|
-
var N = _, U = T,
|
|
13604
|
-
_ = g(_, T, y, A, w[C + 4], 7, -176418897), A = g(A, _, T, y, w[C + 5], 12, 1200080426), y = g(y, A, _, T, w[C + 6], 17, -1473231341), T = g(T, y, A, _, w[C + 7], 22, -45705983), _ = g(_, T, y, A, w[C + 8], 7, 1770035416), A = g(A, _, T, y, w[C + 9], 12, -1958414417), y = g(y, A, _, T, w[C + 10], 17, -42063), T = g(T, y, A, _, w[C + 11], 22, -1990404162), _ = g(_, T, y, A, w[C + 12], 7, 1804603682), A = g(A, _, T, y, w[C + 13], 12, -40341101), y = g(y, A, _, T, w[C + 14], 17, -1502002290), _ = b(_, T = g(T, y, A, _, w[C + 15], 22, 1236535329), y, A, w[C + 1], 5, -165796510), A = b(A, _, T, y, w[C + 6], 9, -1069501632), y = b(y, A, _, T, w[C + 11], 14, 643717713), T = b(T, y, A, _, w[C + 0], 20, -373897302), _ = b(_, T, y, A, w[C + 5], 5, -701558691), A = b(A, _, T, y, w[C + 10], 9, 38016083), y = b(y, A, _, T, w[C + 15], 14, -660478335), T = b(T, y, A, _, w[C + 4], 20, -405537848), _ = b(_, T, y, A, w[C + 9], 5, 568446438), A = b(A, _, T, y, w[C + 14], 9, -1019803690), y = b(y, A, _, T, w[C + 3], 14, -187363961), T = b(T, y, A, _, w[C + 8], 20, 1163531501), _ = b(_, T, y, A, w[C + 13], 5, -1444681467), A = b(A, _, T, y, w[C + 2], 9, -51403784), y = b(y, A, _, T, w[C + 7], 14, 1735328473), _ = x(_, T = b(T, y, A, _, w[C + 12], 20, -1926607734), y, A, w[C + 5], 4, -378558), A = x(A, _, T, y, w[C + 8], 11, -2022574463), y = x(y, A, _, T, w[C + 11], 16, 1839030562), T = x(T, y, A, _, w[C + 14], 23, -35309556), _ = x(_, T, y, A, w[C + 1], 4, -1530992060), A = x(A, _, T, y, w[C + 4], 11, 1272893353), y = x(y, A, _, T, w[C + 7], 16, -155497632), T = x(T, y, A, _, w[C + 10], 23, -1094730640), _ = x(_, T, y, A, w[C + 13], 4, 681279174), A = x(A, _, T, y, w[C + 0], 11, -358537222), y = x(y, A, _, T, w[C + 3], 16, -722521979), T = x(T, y, A, _, w[C + 6], 23, 76029189), _ = x(_, T, y, A, w[C + 9], 4, -640364487), A = x(A, _, T, y, w[C + 12], 11, -421815835), y = x(y, A, _, T, w[C + 15], 16, 530742520), _ = M(_, T = x(T, y, A, _, w[C + 2], 23, -995338651), y, A, w[C + 0], 6, -198630844), A = M(A, _, T, y, w[C + 7], 10, 1126891415), y = M(y, A, _, T, w[C + 14], 15, -1416354905), T = M(T, y, A, _, w[C + 5], 21, -57434055), _ = M(_, T, y, A, w[C + 12], 6, 1700485571), A = M(A, _, T, y, w[C + 3], 10, -1894986606), y = M(y, A, _, T, w[C + 10], 15, -1051523), T = M(T, y, A, _, w[C + 1], 21, -2054922799), _ = M(_, T, y, A, w[C + 8], 6, 1873313359), A = M(A, _, T, y, w[C + 15], 10, -30611744), y = M(y, A, _, T, w[C + 6], 15, -1560198380), T = M(T, y, A, _, w[C + 13], 21, 1309151649), _ = M(_, T, y, A, w[C + 4], 6, -145523070), A = M(A, _, T, y, w[C + 11], 10, -1120210379), y = M(y, A, _, T, w[C + 2], 15, 718787259), T = M(T, y, A, _, w[C + 9], 21, -343485551), _ = R(_, N), T = R(T, U), y = R(y,
|
|
13606
|
+
var N = _, U = T, Y = y, V = A, _ = g(_, T, y, A, w[C + 0], 7, -680876936), A = g(A, _, T, y, w[C + 1], 12, -389564586), y = g(y, A, _, T, w[C + 2], 17, 606105819), T = g(T, y, A, _, w[C + 3], 22, -1044525330);
|
|
13607
|
+
_ = g(_, T, y, A, w[C + 4], 7, -176418897), A = g(A, _, T, y, w[C + 5], 12, 1200080426), y = g(y, A, _, T, w[C + 6], 17, -1473231341), T = g(T, y, A, _, w[C + 7], 22, -45705983), _ = g(_, T, y, A, w[C + 8], 7, 1770035416), A = g(A, _, T, y, w[C + 9], 12, -1958414417), y = g(y, A, _, T, w[C + 10], 17, -42063), T = g(T, y, A, _, w[C + 11], 22, -1990404162), _ = g(_, T, y, A, w[C + 12], 7, 1804603682), A = g(A, _, T, y, w[C + 13], 12, -40341101), y = g(y, A, _, T, w[C + 14], 17, -1502002290), _ = b(_, T = g(T, y, A, _, w[C + 15], 22, 1236535329), y, A, w[C + 1], 5, -165796510), A = b(A, _, T, y, w[C + 6], 9, -1069501632), y = b(y, A, _, T, w[C + 11], 14, 643717713), T = b(T, y, A, _, w[C + 0], 20, -373897302), _ = b(_, T, y, A, w[C + 5], 5, -701558691), A = b(A, _, T, y, w[C + 10], 9, 38016083), y = b(y, A, _, T, w[C + 15], 14, -660478335), T = b(T, y, A, _, w[C + 4], 20, -405537848), _ = b(_, T, y, A, w[C + 9], 5, 568446438), A = b(A, _, T, y, w[C + 14], 9, -1019803690), y = b(y, A, _, T, w[C + 3], 14, -187363961), T = b(T, y, A, _, w[C + 8], 20, 1163531501), _ = b(_, T, y, A, w[C + 13], 5, -1444681467), A = b(A, _, T, y, w[C + 2], 9, -51403784), y = b(y, A, _, T, w[C + 7], 14, 1735328473), _ = x(_, T = b(T, y, A, _, w[C + 12], 20, -1926607734), y, A, w[C + 5], 4, -378558), A = x(A, _, T, y, w[C + 8], 11, -2022574463), y = x(y, A, _, T, w[C + 11], 16, 1839030562), T = x(T, y, A, _, w[C + 14], 23, -35309556), _ = x(_, T, y, A, w[C + 1], 4, -1530992060), A = x(A, _, T, y, w[C + 4], 11, 1272893353), y = x(y, A, _, T, w[C + 7], 16, -155497632), T = x(T, y, A, _, w[C + 10], 23, -1094730640), _ = x(_, T, y, A, w[C + 13], 4, 681279174), A = x(A, _, T, y, w[C + 0], 11, -358537222), y = x(y, A, _, T, w[C + 3], 16, -722521979), T = x(T, y, A, _, w[C + 6], 23, 76029189), _ = x(_, T, y, A, w[C + 9], 4, -640364487), A = x(A, _, T, y, w[C + 12], 11, -421815835), y = x(y, A, _, T, w[C + 15], 16, 530742520), _ = M(_, T = x(T, y, A, _, w[C + 2], 23, -995338651), y, A, w[C + 0], 6, -198630844), A = M(A, _, T, y, w[C + 7], 10, 1126891415), y = M(y, A, _, T, w[C + 14], 15, -1416354905), T = M(T, y, A, _, w[C + 5], 21, -57434055), _ = M(_, T, y, A, w[C + 12], 6, 1700485571), A = M(A, _, T, y, w[C + 3], 10, -1894986606), y = M(y, A, _, T, w[C + 10], 15, -1051523), T = M(T, y, A, _, w[C + 1], 21, -2054922799), _ = M(_, T, y, A, w[C + 8], 6, 1873313359), A = M(A, _, T, y, w[C + 15], 10, -30611744), y = M(y, A, _, T, w[C + 6], 15, -1560198380), T = M(T, y, A, _, w[C + 13], 21, 1309151649), _ = M(_, T, y, A, w[C + 4], 6, -145523070), A = M(A, _, T, y, w[C + 11], 10, -1120210379), y = M(y, A, _, T, w[C + 2], 15, 718787259), T = M(T, y, A, _, w[C + 9], 21, -343485551), _ = R(_, N), T = R(T, U), y = R(y, Y), A = R(A, V);
|
|
13605
13608
|
}
|
|
13606
13609
|
return Array(_, T, y, A);
|
|
13607
13610
|
}
|
|
@@ -13641,11 +13644,11 @@ list should be an Array.`), S.length === 0) return new v(0);
|
|
|
13641
13644
|
function m(b, x) {
|
|
13642
13645
|
b[x >> 5] |= 128 << 24 - x % 32, b[15 + (x + 64 >> 9 << 4)] = x;
|
|
13643
13646
|
for (var M, R, w, E = Array(80), _ = 1732584193, T = -271733879, y = -1732584194, A = 271733878, C = -1009589776, N = 0; N < b.length; N += 16) {
|
|
13644
|
-
for (var U = _,
|
|
13645
|
-
E[
|
|
13646
|
-
var te = v(v(g(_, 5), (te = T, R = y, w = A, (M =
|
|
13647
|
+
for (var U = _, Y = T, V = y, ne = A, Z = C, ee = 0; ee < 80; ee++) {
|
|
13648
|
+
E[ee] = ee < 16 ? b[N + ee] : g(E[ee - 3] ^ E[ee - 8] ^ E[ee - 14] ^ E[ee - 16], 1);
|
|
13649
|
+
var te = v(v(g(_, 5), (te = T, R = y, w = A, (M = ee) < 20 ? te & R | ~te & w : !(M < 40) && M < 60 ? te & R | te & w | R & w : te ^ R ^ w)), v(v(C, E[ee]), (M = ee) < 20 ? 1518500249 : M < 40 ? 1859775393 : M < 60 ? -1894007588 : -899497514)), C = A, A = y, y = g(T, 30), T = _, _ = te;
|
|
13647
13650
|
}
|
|
13648
|
-
_ = v(_, U), T = v(T,
|
|
13651
|
+
_ = v(_, U), T = v(T, Y), y = v(y, V), A = v(A, ne), C = v(C, Z);
|
|
13649
13652
|
}
|
|
13650
13653
|
return Array(_, T, y, A, C);
|
|
13651
13654
|
}
|
|
@@ -13670,8 +13673,8 @@ list should be an Array.`), S.length === 0) return new v(0);
|
|
|
13670
13673
|
var R, w = 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), E = new Array(1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225), _ = new Array(64);
|
|
13671
13674
|
x[M >> 5] |= 128 << 24 - M % 32, x[15 + (M + 64 >> 9 << 4)] = M;
|
|
13672
13675
|
for (var T, y, A = 0; A < x.length; A += 16) {
|
|
13673
|
-
for (var C = E[0], N = E[1], U = E[2],
|
|
13674
|
-
E[0] = p(C, E[0]), E[1] = p(N, E[1]), E[2] = p(U, E[2]), E[3] = p(
|
|
13676
|
+
for (var C = E[0], N = E[1], U = E[2], Y = E[3], V = E[4], ne = E[5], Z = E[6], ee = E[7], te = 0; te < 64; te++) _[te] = te < 16 ? x[te + A] : p(p(p((y = _[te - 2], g(y, 17) ^ g(y, 19) ^ b(y, 10)), _[te - 7]), (y = _[te - 15], g(y, 7) ^ g(y, 18) ^ b(y, 3))), _[te - 16]), R = p(p(p(p(ee, g(y = V, 6) ^ g(y, 11) ^ g(y, 25)), V & ne ^ ~V & Z), w[te]), _[te]), T = p(g(T = C, 2) ^ g(T, 13) ^ g(T, 22), C & N ^ C & U ^ N & U), ee = Z, Z = ne, ne = V, V = p(Y, R), Y = U, U = N, N = C, C = p(R, T);
|
|
13677
|
+
E[0] = p(C, E[0]), E[1] = p(N, E[1]), E[2] = p(U, E[2]), E[3] = p(Y, E[3]), E[4] = p(V, E[4]), E[5] = p(ne, E[5]), E[6] = p(Z, E[6]), E[7] = p(ee, E[7]);
|
|
13675
13678
|
}
|
|
13676
13679
|
return E;
|
|
13677
13680
|
}
|
|
@@ -14205,7 +14208,7 @@ function Vd() {
|
|
|
14205
14208
|
"integer"
|
|
14206
14209
|
];
|
|
14207
14210
|
function M(R) {
|
|
14208
|
-
var w = 0, E = 0, _ = i, T, y, A = [], C = [], N = 1, U = 0,
|
|
14211
|
+
var w = 0, E = 0, _ = i, T, y, A = [], C = [], N = 1, U = 0, Y = 0, V = !1, ne = !1, Z = "", ee;
|
|
14209
14212
|
R = R || {};
|
|
14210
14213
|
var te = t, fe = a;
|
|
14211
14214
|
R.version === "300 es" && (te = s, fe = n);
|
|
@@ -14220,15 +14223,15 @@ function Vd() {
|
|
|
14220
14223
|
G.length && C.push({
|
|
14221
14224
|
type: x[_],
|
|
14222
14225
|
data: G,
|
|
14223
|
-
position:
|
|
14226
|
+
position: Y,
|
|
14224
14227
|
line: N,
|
|
14225
14228
|
column: U
|
|
14226
14229
|
});
|
|
14227
14230
|
}
|
|
14228
14231
|
function B(G) {
|
|
14229
14232
|
w = 0, G.toString && (G = G.toString()), Z += G.replace(/\r\n/g, `
|
|
14230
|
-
`),
|
|
14231
|
-
for (var k; T = Z[w], w <
|
|
14233
|
+
`), ee = Z.length;
|
|
14234
|
+
for (var k; T = Z[w], w < ee; ) {
|
|
14232
14235
|
switch (k = w, _) {
|
|
14233
14236
|
case r:
|
|
14234
14237
|
w = L();
|
|
@@ -14278,7 +14281,7 @@ function Vd() {
|
|
|
14278
14281
|
return A.length && I(A.join("")), _ = g, I("(eof)"), C;
|
|
14279
14282
|
}
|
|
14280
14283
|
function O() {
|
|
14281
|
-
return A = A.length ? [] : A, y === "/" && T === "*" ? (
|
|
14284
|
+
return A = A.length ? [] : A, y === "/" && T === "*" ? (Y = E + w - 1, _ = r, y = T, w + 1) : y === "/" && T === "/" ? (Y = E + w - 1, _ = l, y = T, w + 1) : T === "#" ? (_ = c, Y = E + w, w) : /\s/.test(T) ? (_ = v, Y = E + w, w) : (V = /\d/.test(T), ne = /[^\w_]/.test(T), Y = E + w, _ = V ? u : ne ? f : o, w);
|
|
14282
14285
|
}
|
|
14283
14286
|
function z() {
|
|
14284
14287
|
return /[^\s]/g.test(T) ? (I(A.join("")), _ = i, w) : (A.push(T), y = T, w + 1);
|
|
@@ -14322,7 +14325,7 @@ function Vd() {
|
|
|
14322
14325
|
if (k-- + G.length > 0) continue;
|
|
14323
14326
|
me = G.slice(0, 1).join("");
|
|
14324
14327
|
}
|
|
14325
|
-
return I(me),
|
|
14328
|
+
return I(me), Y += me.length, A = A.slice(me.length), A.length;
|
|
14326
14329
|
} while (!0);
|
|
14327
14330
|
}
|
|
14328
14331
|
function j() {
|
|
@@ -15484,7 +15487,7 @@ class Dp {
|
|
|
15484
15487
|
de(this, "camera");
|
|
15485
15488
|
de(this, "screen");
|
|
15486
15489
|
de(this, "renderToScreen", !1);
|
|
15487
|
-
this.renderTargetA = new
|
|
15490
|
+
this.renderTargetA = new Wt(e, e, {
|
|
15488
15491
|
minFilter: xt,
|
|
15489
15492
|
magFilter: xt,
|
|
15490
15493
|
stencilBuffer: !1,
|
|
@@ -15756,7 +15759,7 @@ const kp = ["texture-matrix", "t-sharp", "t-depth", "t-blur", "defines-USE_BLUR"
|
|
|
15756
15759
|
metalnessMap: {},
|
|
15757
15760
|
alphaMap: {},
|
|
15758
15761
|
envMap: {},
|
|
15759
|
-
envMapRotation: { default: () => new
|
|
15762
|
+
envMapRotation: { default: () => new tn() },
|
|
15760
15763
|
envMapIntensity: { default: 1 },
|
|
15761
15764
|
wireframe: { type: Boolean, default: !1 },
|
|
15762
15765
|
wireframeLinewidth: { default: 1 },
|
|
@@ -15783,7 +15786,7 @@ const kp = ["texture-matrix", "t-sharp", "t-depth", "t-blur", "defines-USE_BLUR"
|
|
|
15783
15786
|
q: new at(),
|
|
15784
15787
|
virtualCamera: new Lt(),
|
|
15785
15788
|
textureMatrix: new Ie()
|
|
15786
|
-
}, p = new
|
|
15789
|
+
}, p = new Wt(
|
|
15787
15790
|
t.resolution,
|
|
15788
15791
|
t.resolution,
|
|
15789
15792
|
{
|
|
@@ -15796,7 +15799,7 @@ const kp = ["texture-matrix", "t-sharp", "t-depth", "t-blur", "defines-USE_BLUR"
|
|
|
15796
15799
|
t.resolution
|
|
15797
15800
|
)
|
|
15798
15801
|
}
|
|
15799
|
-
), m = new
|
|
15802
|
+
), m = new Wt(
|
|
15800
15803
|
t.resolution,
|
|
15801
15804
|
t.resolution,
|
|
15802
15805
|
{
|
|
@@ -15983,7 +15986,8 @@ function ta(a, e, t) {
|
|
|
15983
15986
|
const s = t.width / 2, i = t.height / 2;
|
|
15984
15987
|
return [
|
|
15985
15988
|
(Number.isNaN(n.x) ? 0 : n.x) * s + s,
|
|
15986
|
-
-(n.y * i) + i
|
|
15989
|
+
-(n.y * i) + i,
|
|
15990
|
+
n.z
|
|
15987
15991
|
];
|
|
15988
15992
|
}
|
|
15989
15993
|
function Gp(a, e) {
|
|
@@ -16025,7 +16029,7 @@ function _l(a, e, t = "") {
|
|
|
16025
16029
|
const Yp = /* @__PURE__ */ ((a) => (e) => _l(e, a))([1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1]), Wp = /* @__PURE__ */ ((a) => (e, t) => _l(e, a(t), "translate(-50%,-50%)"))((a) => [1 / a, 1 / a, 1 / a, 1, -1 / a, -1 / a, -1 / a, -1, 1 / a, 1 / a, 1 / a, 1, 1, 1, 1, 1]), Xp = ["geometry", "material"], xv = /* @__PURE__ */ ue({
|
|
16026
16030
|
__name: "HTML",
|
|
16027
16031
|
props: {
|
|
16028
|
-
geometry: { default: new
|
|
16032
|
+
geometry: { default: new Ht() },
|
|
16029
16033
|
material: {},
|
|
16030
16034
|
as: { default: "div" },
|
|
16031
16035
|
transform: { type: Boolean, default: !1 },
|
|
@@ -16057,7 +16061,7 @@ const Yp = /* @__PURE__ */ ((a) => (e) => _l(e, a))([1, -1, 1, 1, 1, -1, 1, 1, 1
|
|
|
16057
16061
|
sprite: M,
|
|
16058
16062
|
occlude: R,
|
|
16059
16063
|
zIndexRange: w
|
|
16060
|
-
} = Le(n), { renderer: E, scene: _, camera: T, raycaster: y, sizes: A } = xe(), C = Pe(() => document.createElement(u.value)), N = ge([0, 0]), U = ge(0),
|
|
16064
|
+
} = Le(n), { renderer: E, scene: _, camera: T, raycaster: y, sizes: A } = xe(), C = Pe(() => document.createElement(u.value)), N = ge([0, 0, 0]), U = ge(0), Y = ge(), V = Pe(() => d.value ? {
|
|
16061
16065
|
position: "absolute",
|
|
16062
16066
|
top: 0,
|
|
16063
16067
|
left: 0,
|
|
@@ -16065,8 +16069,7 @@ const Yp = /* @__PURE__ */ ((a) => (e) => _l(e, a))([1, -1, 1, 1, 1, -1, 1, 1, 1
|
|
|
16065
16069
|
height: `${A.height.value}px`,
|
|
16066
16070
|
transformStyle: "preserve-3d",
|
|
16067
16071
|
pointerEvents: "none",
|
|
16068
|
-
zIndex: 2
|
|
16069
|
-
willChange: "transform"
|
|
16072
|
+
zIndex: 2
|
|
16070
16073
|
} : {
|
|
16071
16074
|
position: "absolute",
|
|
16072
16075
|
transform: b.value ? "translate3d(-50%,-50%,0)" : "none",
|
|
@@ -16077,12 +16080,11 @@ const Yp = /* @__PURE__ */ ((a) => (e) => _l(e, a))([1, -1, 1, 1, 1, -1, 1, 1, 1
|
|
|
16077
16080
|
height: `${A.height.value}px`
|
|
16078
16081
|
},
|
|
16079
16082
|
zIndex: 2,
|
|
16080
|
-
...Object.assign({}, o.style)
|
|
16081
|
-
|
|
16082
|
-
}), ee = Pe(() => ({
|
|
16083
|
+
...Object.assign({}, o.style)
|
|
16084
|
+
}), ne = Pe(() => ({
|
|
16083
16085
|
position: "absolute",
|
|
16084
16086
|
pointerEvents: x.value
|
|
16085
|
-
})), Z = ge(null),
|
|
16087
|
+
})), Z = ge(null), ee = ge(!1), te = Pe(
|
|
16086
16088
|
() => (R == null ? void 0 : R.value) && (R == null ? void 0 : R.value) !== "blending" || Array.isArray(R == null ? void 0 : R.value) && (R == null ? void 0 : R.value.length) && ii(R.value[0])
|
|
16087
16089
|
);
|
|
16088
16090
|
J(
|
|
@@ -16108,8 +16110,8 @@ const Yp = /* @__PURE__ */ ((a) => (e) => _l(e, a))([1, -1, 1, 1, 1, -1, 1, 1, 1
|
|
|
16108
16110
|
});
|
|
16109
16111
|
C.value.style.cssText = `position:absolute;top:0;left:0;transform:translate3d(${j[0]}px,${j[1]}px,0);transform-origin:0 0;`;
|
|
16110
16112
|
}
|
|
16111
|
-
H && !C.value.parentNode && ((z = H.parentNode) == null || z.appendChild(C.value)), d.value ?
|
|
16112
|
-
ms("div", { id: "inner", style:
|
|
16113
|
+
H && !C.value.parentNode && ((z = H.parentNode) == null || z.appendChild(C.value)), d.value ? Y.value = ms("div", { id: "outer", style: V.value }, [
|
|
16114
|
+
ms("div", { id: "inner", style: ne.value }, [
|
|
16113
16115
|
ms("div", {
|
|
16114
16116
|
key: (S = l.value) == null ? void 0 : S.uuid,
|
|
16115
16117
|
id: _ == null ? void 0 : _.value.uuid,
|
|
@@ -16117,11 +16119,11 @@ const Yp = /* @__PURE__ */ ((a) => (e) => _l(e, a))([1, -1, 1, 1, 1, -1, 1, 1, 1
|
|
|
16117
16119
|
style: o.style
|
|
16118
16120
|
}, (P = i.default) == null ? void 0 : P.call(i))
|
|
16119
16121
|
])
|
|
16120
|
-
]) :
|
|
16122
|
+
]) : Y.value = ms("div", {
|
|
16121
16123
|
key: (L = l.value) == null ? void 0 : L.uuid,
|
|
16122
16124
|
id: _ == null ? void 0 : _.value.uuid,
|
|
16123
|
-
style:
|
|
16124
|
-
}, (X = i.default) == null ? void 0 : X.call(i)), pc(
|
|
16125
|
+
style: V.value
|
|
16126
|
+
}, (X = i.default) == null ? void 0 : X.call(i)), pc(Y.value, C.value);
|
|
16125
16127
|
}
|
|
16126
16128
|
}
|
|
16127
16129
|
), et(() => {
|
|
@@ -16136,7 +16138,7 @@ const Yp = /* @__PURE__ */ ((a) => (e) => _l(e, a))([1, -1, 1, 1, 1, -1, 1, 1, 1
|
|
|
16136
16138
|
width: A.width.value || 0,
|
|
16137
16139
|
height: A.height.value || 0
|
|
16138
16140
|
});
|
|
16139
|
-
if (d.value || Math.abs(U.value - T.value.zoom) > m.value || Math.abs(N.value[0] - H[0]) > m.value || Math.abs(N.value[1] - H[1]) > m.value) {
|
|
16141
|
+
if (d.value || Math.abs(U.value - T.value.zoom) > m.value || Math.abs(N.value[0] - H[0]) > m.value || Math.abs(N.value[1] - H[1]) > m.value || Math.abs(N.value[2] - H[2]) > m.value) {
|
|
16140
16142
|
const j = Gp(r.value, T.value);
|
|
16141
16143
|
let K = !1;
|
|
16142
16144
|
te.value && (Array.isArray(R == null ? void 0 : R.value) ? K = R == null ? void 0 : R.value : (R == null ? void 0 : R.value) !== "blending" && (K = [_.value]));
|
|
@@ -16153,16 +16155,16 @@ const Yp = /* @__PURE__ */ ((a) => (e) => _l(e, a))([1, -1, 1, 1, 1, -1, 1, 1, 1
|
|
|
16153
16155
|
fe.value = !j;
|
|
16154
16156
|
se !== fe.value && (s("onOcclude", !fe.value), C.value.style.display = fe.value ? "block" : "none");
|
|
16155
16157
|
const ie = Math.floor(w.value[0] / 2), G = R != null && R.value ? te.value ? [w.value[0], ie] : [ie - 1, 0] : w.value;
|
|
16156
|
-
if (C.value.style.zIndex = `${Vp(r.value, T.value, G)}`,
|
|
16158
|
+
if (C.value.style.zIndex = `${Vp(r.value, T.value, G)}`, d.value) {
|
|
16157
16159
|
const [k, oe] = [
|
|
16158
16160
|
A.width.value / 2,
|
|
16159
16161
|
A.height.value / 2
|
|
16160
|
-
], me = T.value.projectionMatrix.elements[5] * oe, { isOrthographicCamera: Re, top: Ke, left: He, bottom: bt, right:
|
|
16162
|
+
], me = T.value.projectionMatrix.elements[5] * oe, { isOrthographicCamera: Re, top: Ke, left: He, bottom: bt, right: un } = T.value, En = Yp(T.value.matrixWorldInverse), kt = Re ? `scale(${me})translate(${To(-(un + He) / 2)}px,${To((Ke + bt) / 2)}px)` : `translateZ(${me}px)`;
|
|
16161
16163
|
let vt = r.value.matrixWorld;
|
|
16162
|
-
if (M.value && (vt = T.value.matrixWorldInverse.clone().transpose().copyPosition(vt).scale(r.value.scale), vt.elements[3] = vt.elements[7] = vt.elements[11] = 0, vt.elements[15] = 1), C.value.style.width = `${A.width.value}px`, C.value.style.height = `${A.height.value}px`, C.value.style.perspective = Re ? "" : `${me}px`, (O =
|
|
16163
|
-
|
|
16164
|
-
const
|
|
16165
|
-
|
|
16164
|
+
if (M.value && (vt = T.value.matrixWorldInverse.clone().transpose().copyPosition(vt).scale(r.value.scale), vt.elements[3] = vt.elements[7] = vt.elements[11] = 0, vt.elements[15] = 1), C.value.style.width = `${A.width.value}px`, C.value.style.height = `${A.height.value}px`, C.value.style.perspective = Re ? "" : `${me}px`, (O = Y.value) != null && O.el && ((z = Y.value) != null && z.children) && Array.isArray(Y.value.children)) {
|
|
16165
|
+
Y.value.el.style.transform = `${kt}${En}translate(${k}px,${oe}px)`;
|
|
16166
|
+
const Nt = Y.value.children[0];
|
|
16167
|
+
Nt && Nt.el && (Nt.el.style.transform = Wp(
|
|
16166
16168
|
vt,
|
|
16167
16169
|
1 / (((v == null ? void 0 : v.value) || 10) / 400)
|
|
16168
16170
|
));
|
|
@@ -16174,10 +16176,10 @@ const Yp = /* @__PURE__ */ ((a) => (e) => _l(e, a))([1, -1, 1, 1, 1, -1, 1, 1, 1
|
|
|
16174
16176
|
}
|
|
16175
16177
|
N.value = H, U.value = T.value.zoom;
|
|
16176
16178
|
}
|
|
16177
|
-
if (!te.value && l.value && !
|
|
16179
|
+
if (!te.value && l.value && !ee.value)
|
|
16178
16180
|
if (d.value) {
|
|
16179
|
-
if ((S =
|
|
16180
|
-
const H = ((L =
|
|
16181
|
+
if ((S = Y.value) != null && S.el && ((P = Y.value) != null && P.children)) {
|
|
16182
|
+
const H = ((L = Y.value) == null ? void 0 : L.children)[0];
|
|
16181
16183
|
if (H != null && H.clientWidth && (H != null && H.clientHeight)) {
|
|
16182
16184
|
const { isOrthographicCamera: j } = T.value;
|
|
16183
16185
|
if (j || c)
|
|
@@ -16186,14 +16188,14 @@ const Yp = /* @__PURE__ */ ((a) => (e) => _l(e, a))([1, -1, 1, 1, 1, -1, 1, 1, 1
|
|
|
16186
16188
|
const K = ((v == null ? void 0 : v.value) || 10) / 400, se = H.clientWidth * K, ie = H.clientHeight * K;
|
|
16187
16189
|
l.value.scale.set(se, ie, 1);
|
|
16188
16190
|
}
|
|
16189
|
-
|
|
16191
|
+
ee.value = !0;
|
|
16190
16192
|
}
|
|
16191
16193
|
}
|
|
16192
16194
|
} else {
|
|
16193
16195
|
const H = C.value.children[0];
|
|
16194
16196
|
if (H != null && H.clientWidth && (H != null && H.clientHeight)) {
|
|
16195
16197
|
const K = H.clientWidth * 1, se = H.clientHeight * 1;
|
|
16196
|
-
l.value.scale.set(K, se, 1),
|
|
16198
|
+
l.value.scale.set(K, se, 1), ee.value = !0;
|
|
16197
16199
|
}
|
|
16198
16200
|
Z.value.lookAt((X = T.value) == null ? void 0 : X.position);
|
|
16199
16201
|
}
|
|
@@ -16206,7 +16208,7 @@ const Yp = /* @__PURE__ */ ((a) => (e) => _l(e, a))([1, -1, 1, 1, 1, -1, 1, 1, 1
|
|
|
16206
16208
|
return f.value || new Tt({
|
|
16207
16209
|
vertexShader: B.vertexShader,
|
|
16208
16210
|
fragmentShader: B.fragmentShader,
|
|
16209
|
-
side:
|
|
16211
|
+
side: on
|
|
16210
16212
|
});
|
|
16211
16213
|
});
|
|
16212
16214
|
return tt(() => {
|
|
@@ -16221,7 +16223,7 @@ const Yp = /* @__PURE__ */ ((a) => (e) => _l(e, a))([1, -1, 1, 1, 1, -1, 1, 1, 1
|
|
|
16221
16223
|
ref: l,
|
|
16222
16224
|
geometry: F(c),
|
|
16223
16225
|
material: I.value
|
|
16224
|
-
}, null, 8, Xp)) :
|
|
16226
|
+
}, null, 8, Xp)) : an("", !0)
|
|
16225
16227
|
], 512));
|
|
16226
16228
|
}
|
|
16227
16229
|
});
|
|
@@ -16607,12 +16609,12 @@ const sm = ["args"], im = ["color"], Ev = /* @__PURE__ */ ue({
|
|
|
16607
16609
|
const t = a;
|
|
16608
16610
|
function n(h, p) {
|
|
16609
16611
|
if (!h || h.length === 0)
|
|
16610
|
-
return Array.from({ length: p }).fill(
|
|
16612
|
+
return Array.from({ length: p }).fill(en(t.color));
|
|
16611
16613
|
if (h.length === 1)
|
|
16612
|
-
return Array.from({ length: p }).fill(
|
|
16614
|
+
return Array.from({ length: p }).fill(en(h[0]));
|
|
16613
16615
|
if (h.length === p)
|
|
16614
|
-
return h.map(
|
|
16615
|
-
const m = p - 1, v = h.map(
|
|
16616
|
+
return h.map(en);
|
|
16617
|
+
const m = p - 1, v = h.map(en);
|
|
16616
16618
|
closed && v.push(v[0].clone());
|
|
16617
16619
|
const g = [v[0]], b = m / (v.length - 1);
|
|
16618
16620
|
for (let x = 1; x < m; x++) {
|
|
@@ -16623,7 +16625,7 @@ const sm = ["args"], im = ["color"], Ev = /* @__PURE__ */ ue({
|
|
|
16623
16625
|
}
|
|
16624
16626
|
const s = new Go(), i = new ol(), o = new Df(i, s), { sizes: r, invalidate: l } = xe(), c = Pe(() => Array.isArray(t.vertexColors));
|
|
16625
16627
|
function f(h, p) {
|
|
16626
|
-
h.color =
|
|
16628
|
+
h.color = en(p.color), h.linewidth = p.lineWidth, h.alphaToCoverage = p.alphaToCoverage, h.worldUnits = p.worldUnits, h.vertexColors = Array.isArray(p.vertexColors), h.dashed = p.dashed, h.dashScale = p.dashScale, h.dashSize = p.dashSize, h.dashOffset = p.dashOffset, h.gapSize = p.gapSize, h.needsUpdate = !0;
|
|
16627
16629
|
}
|
|
16628
16630
|
function u(h, p, m) {
|
|
16629
16631
|
const v = p.map((b) => b instanceof $ ? [b.x, b.y, b.z] : b instanceof ve ? [b.x, b.y, 0] : Array.isArray(b) && b.length === 2 ? [b[0], b[1], 0] : b).flat();
|
|
@@ -16949,19 +16951,19 @@ const sm = ["args"], im = ["color"], Ev = /* @__PURE__ */ ue({
|
|
|
16949
16951
|
}
|
|
16950
16952
|
function u(h, p, m, v, g, b, x, M, R, w, E) {
|
|
16951
16953
|
const _ = 2 * Math.PI / w, T = -Math.PI, y = Math.PI / (E - 1), A = -0.5 * Math.PI, C = h.getAttribute("position");
|
|
16952
|
-
let N = 0, U = 0,
|
|
16953
|
-
for (let
|
|
16954
|
+
let N = 0, U = 0, Y = A;
|
|
16955
|
+
for (let V = 0; V < E; V++) {
|
|
16954
16956
|
U = T;
|
|
16955
|
-
for (let
|
|
16956
|
-
const Z = f(U, p, m, v, g),
|
|
16957
|
+
for (let ne = 0; ne < w; ne++) {
|
|
16958
|
+
const Z = f(U, p, m, v, g), ee = f(Y, b, x, M, R);
|
|
16957
16959
|
C.setXYZ(
|
|
16958
16960
|
N,
|
|
16959
|
-
Z * s(U) *
|
|
16960
|
-
|
|
16961
|
-
Z * i(U) *
|
|
16961
|
+
Z * s(U) * ee * s(Y),
|
|
16962
|
+
ee * i(Y),
|
|
16963
|
+
Z * i(U) * ee * s(Y)
|
|
16962
16964
|
), N++, U += _;
|
|
16963
16965
|
}
|
|
16964
|
-
|
|
16966
|
+
Y += y;
|
|
16965
16967
|
}
|
|
16966
16968
|
C.needsUpdate = !0, h.computeVertexNormals();
|
|
16967
16969
|
}
|
|
@@ -17237,11 +17239,11 @@ const sm = ["args"], im = ["color"], Ev = /* @__PURE__ */ ue({
|
|
|
17237
17239
|
m.setClearAlpha(0), m.setRenderTarget(g), m.render(p, b), p.overrideMaterial = null, n(h.blur, m, v), h.smooth && n(h.blur * 0.4, m, v), m.setRenderTarget(null), m.setClearAlpha(R), p.background = M;
|
|
17238
17240
|
}
|
|
17239
17241
|
function i(h) {
|
|
17240
|
-
const p = new
|
|
17242
|
+
const p = new $t(), m = new Wt(h.resolution, h.resolution);
|
|
17241
17243
|
m.texture.generateMipmaps = !1;
|
|
17242
|
-
const v = new
|
|
17244
|
+
const v = new Wt(h.resolution, h.resolution);
|
|
17243
17245
|
v.texture.generateMipmaps = !1;
|
|
17244
|
-
const g = new
|
|
17246
|
+
const g = new Ht(h.width, h.height).rotateX(Math.PI / 2), b = new Xt({
|
|
17245
17247
|
map: m.texture,
|
|
17246
17248
|
opacity: h.opacity,
|
|
17247
17249
|
transparent: !0,
|
|
@@ -17275,7 +17277,7 @@ const sm = ["args"], im = ["color"], Ev = /* @__PURE__ */ ue({
|
|
|
17275
17277
|
p.shadowGroup.scale.set(v, h.far, g);
|
|
17276
17278
|
}
|
|
17277
17279
|
function r(h, p) {
|
|
17278
|
-
p.renderTarget.dispose(), p.renderTargetBlur.dispose(), p.renderTarget = new
|
|
17280
|
+
p.renderTarget.dispose(), p.renderTargetBlur.dispose(), p.renderTarget = new Wt(h, h), p.renderTarget.texture.generateMipmaps = !1, p.renderTargetBlur = new Wt(h, h), p.renderTargetBlur.texture.generateMipmaps = !1, p.plane.material.map = p.renderTarget.texture;
|
|
17279
17281
|
}
|
|
17280
17282
|
function l(h, p) {
|
|
17281
17283
|
p.plane.material.color = new be(h.color ?? "black"), p.depthMaterial.dispose(), p.depthMaterial = new Zo(), p.depthMaterial.onBeforeCompile = function(m) {
|
|
@@ -17315,7 +17317,7 @@ const sm = ["args"], im = ["color"], Ev = /* @__PURE__ */ ue({
|
|
|
17315
17317
|
precise: { type: Boolean, default: !1 }
|
|
17316
17318
|
},
|
|
17317
17319
|
setup(a, { expose: e }) {
|
|
17318
|
-
const t = a, { invalidate: n } = xe(), s = re(new
|
|
17320
|
+
const t = a, { invalidate: n } = xe(), s = re(new $t()), i = re(new $t());
|
|
17319
17321
|
function o(c, f) {
|
|
17320
17322
|
if (s.value.position.set(0, 0, 0), s.value.updateMatrixWorld(), i.value.scale.set(1, 1, 1), i.value.updateMatrixWorld(), !i.value.children.length || c === null)
|
|
17321
17323
|
return;
|
|
@@ -17629,8 +17631,8 @@ const sm = ["args"], im = ["color"], Ev = /* @__PURE__ */ ue({
|
|
|
17629
17631
|
if ((y = v.value) != null && y.attributes.position.array && ((A = v.value) != null && A.attributes.position.count)) {
|
|
17630
17632
|
const C = v.value.attributes.position.array;
|
|
17631
17633
|
for (let N = 0; N < v.value.attributes.position.count; N++) {
|
|
17632
|
-
const U = b[N * 2],
|
|
17633
|
-
C[N * 3] += U, C[N * 3 + 1] -=
|
|
17634
|
+
const U = b[N * 2], Y = b[N * 2 + 1];
|
|
17635
|
+
C[N * 3] += U, C[N * 3 + 1] -= Y, (C[N * 3] <= -s.value[0] / 2 || C[N * 3] >= s.value[0] / 2) && (C[N * 3] = C[N * 3] * -1), (C[N * 3 + 1] <= -s.value[1] / 2 || C[N * 3 + 1] >= s.value[1] / 2) && (C[N * 3 + 1] = C[N * 3 + 1] * -1);
|
|
17634
17636
|
}
|
|
17635
17637
|
v.value.attributes.position.needsUpdate = !0, T();
|
|
17636
17638
|
}
|
|
@@ -17896,7 +17898,7 @@ float PCSS (sampler2D shadowMap, vec4 coords) {
|
|
|
17896
17898
|
});
|
|
17897
17899
|
function Jm(a) {
|
|
17898
17900
|
return Vo(a, {
|
|
17899
|
-
normalizeValue: (e) =>
|
|
17901
|
+
normalizeValue: (e) => en(e),
|
|
17900
17902
|
getDefaultValue: () => new be(0, 0, 0),
|
|
17901
17903
|
isSingleValue: (e) => !Array.isArray(e),
|
|
17902
17904
|
isMultipleValues: (e) => Array.isArray(e) && (e.length === 0 || !Array.isArray(e[0])),
|
|
@@ -18023,8 +18025,8 @@ class og {
|
|
|
18023
18025
|
ei,
|
|
18024
18026
|
lc,
|
|
18025
18027
|
cc,
|
|
18026
|
-
|
|
18027
|
-
|
|
18028
|
+
Yt,
|
|
18029
|
+
Yt
|
|
18028
18030
|
);
|
|
18029
18031
|
return t.needsUpdate = !0, t;
|
|
18030
18032
|
}
|
|
@@ -18434,8 +18436,8 @@ const Jv = /* @__PURE__ */ ue({
|
|
|
18434
18436
|
(R) => R instanceof pe && R.userData.isEnvironment
|
|
18435
18437
|
);
|
|
18436
18438
|
M || (M = new pe(
|
|
18437
|
-
new
|
|
18438
|
-
new
|
|
18439
|
+
new Gt(1, 1, 1),
|
|
18440
|
+
new Xt({ side: li })
|
|
18439
18441
|
), M.userData.isEnvironment = !0, x.add(M)), x.background = g, x.backgroundBlurriness = s.blur;
|
|
18440
18442
|
}
|
|
18441
18443
|
}, { immediate: !0 });
|
|
@@ -18460,7 +18462,7 @@ const Jv = /* @__PURE__ */ ue({
|
|
|
18460
18462
|
ref: d
|
|
18461
18463
|
}, [
|
|
18462
18464
|
Ne(g.$slots, "default")
|
|
18463
|
-
], 512)) :
|
|
18465
|
+
], 512)) : an("", !0);
|
|
18464
18466
|
}
|
|
18465
18467
|
}), gg = {
|
|
18466
18468
|
key: 0,
|
|
@@ -18495,7 +18497,7 @@ const Jv = /* @__PURE__ */ ue({
|
|
|
18495
18497
|
ref: n,
|
|
18496
18498
|
"tone-mapped": i.toneMapped,
|
|
18497
18499
|
map: i.map,
|
|
18498
|
-
side: F(
|
|
18500
|
+
side: F(on),
|
|
18499
18501
|
color: i.color
|
|
18500
18502
|
}, null, 8, _g)
|
|
18501
18503
|
], 512));
|