soonspacejs 2.14.31 → 2.14.33

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/index.esm.js CHANGED
@@ -1,11 +1,11 @@
1
- import * as An from "three";
2
- import { Vector3 as D, Euler as pe, MathUtils as Oe, Object3D as je, Box3 as Wt, Scene as ca, Quaternion as he, CubeTextureLoader as al, HalfFloatType as on, EquirectangularReflectionMapping as lr, Color as me, Texture as qt, FileLoader as Er, ImageLoader as ol, TextureLoader as ha, Vector2 as oe, Vector4 as Ms, CurvePath as ll, LineCurve as cl, LineCurve3 as hl, Line3 as ua, Matrix3 as Kt, Skeleton as Or, AnimationClip as pt, VectorKeyframeTrack as St, InterpolateLinear as Ts, QuaternionKeyframeTrack as Mt, EventDispatcher as ul, LoopPingPong as dl, InterpolateDiscrete as pl, Bone as ps, SkinnedMesh as Lr, Matrix4 as Q, Uint16BufferAttribute as hn, Float32BufferAttribute as ge, StringKeyframeTrack as fl, ColorKeyframeTrack as ml, NumberKeyframeTrack as da, BooleanKeyframeTrack as gl, KeyframeTrack as yl, NormalAnimationBlendMode as vl, FogExp2 as xl, MeshStandardMaterial as Ue, MeshPhongMaterial as Fr, MeshPhysicalMaterial as wl, Mesh as we, LineSegments as cr, LineBasicMaterial as En, BufferGeometry as Ce, EdgesGeometry as bl, OrthographicCamera as Qt, PerspectiveCamera as Ps, WebGLRenderer as Sl, PCFShadowMap as Ml, Spherical as Be, Sphere as Is, BufferAttribute as $e, ShaderMaterial as at, WebGLRenderTarget as Ot, RGBAFormat as nn, LinearFilter as ot, DataTexture as Tl, NoColorSpace as Pl, RepeatWrapping as ft, NearestFilter as Et, REVISION as pa, RedFormat as Il, FloatType as Dl, DepthTexture as Cl, UnsignedIntType as Al, GLBufferAttribute as El, InterleavedBufferAttribute as Ol, Raycaster as un, BoxGeometry as Ll, Sprite as Ut, MeshBasicMaterial as dn, CanvasTexture as Br, SRGBColorSpace as dt, SpriteMaterial as hr, PMREMGenerator as Fl, AnimationMixer as Bl, Timer as kl, LinearSRGBColorSpace as zl, NeutralToneMapping as Rl, AgXToneMapping as Nl, ACESFilmicToneMapping as jl, CineonToneMapping as Ul, ReinhardToneMapping as Gl, NoToneMapping as Vl, UVMapping as Hl, CubeTexture as Wl, SphereGeometry as ui, DoubleSide as Tt, CircleGeometry as ql, PlaneGeometry as pn, ExtrudeGeometry as Kl, Shape as fa, Box2 as ur, Group as fs, Triangle as ma, VideoTexture as Ql, ShapeGeometry as Yl, Plane as _l, AmbientLight as ga, DirectionalLight as ya, HemisphereLight as Xl, SpotLight as va, PointLight as dr, RectAreaLight as Zl, Loader as ms, LoaderUtils as Jl, ClampToEdgeWrapping as di, PropertyBinding as gs, Line as $l, ShapeUtils as ec, Material as pi, PointsMaterial as Hn, Points as Ns, FrontSide as fi, BackSide as mi, LoadingManager as tc, InstancedMesh as nc, GridHelper as sc, AxesHelper as rc, Box3Helper as ic, DirectionalLightHelper as ac, HemisphereLightHelper as oc, SpotLightHelper as lc, PointLightHelper as cc } from "three";
3
- import * as gi from "three/examples/jsm/libs/tween.module.js";
4
- import pr, { Easing as ye, Tween as hc } from "three/examples/jsm/libs/tween.module.js";
5
- import On from "camera-controls";
1
+ import * as Cn from "three";
2
+ import { Vector3 as D, Euler as pe, MathUtils as Oe, Object3D as je, Box3 as Wt, Scene as ca, Quaternion as he, CubeTextureLoader as al, HalfFloatType as on, EquirectangularReflectionMapping as cr, Color as me, Texture as qt, FileLoader as Or, ImageLoader as ol, TextureLoader as ha, Vector2 as oe, Vector4 as Ts, CurvePath as ll, LineCurve as cl, LineCurve3 as hl, Line3 as ua, Matrix3 as Kt, Skeleton as Lr, AnimationClip as pt, VectorKeyframeTrack as St, InterpolateLinear as Ps, QuaternionKeyframeTrack as Mt, EventDispatcher as ul, LoopPingPong as dl, InterpolateDiscrete as pl, Bone as ps, SkinnedMesh as Fr, Matrix4 as Q, Uint16BufferAttribute as hn, Float32BufferAttribute as ge, StringKeyframeTrack as fl, ColorKeyframeTrack as ml, NumberKeyframeTrack as da, BooleanKeyframeTrack as gl, KeyframeTrack as yl, NormalAnimationBlendMode as vl, FogExp2 as xl, MeshStandardMaterial as Ue, MeshPhongMaterial as Br, MeshPhysicalMaterial as wl, Mesh as we, LineSegments as hr, LineBasicMaterial as An, BufferGeometry as Ce, EdgesGeometry as bl, OrthographicCamera as Qt, PerspectiveCamera as Is, WebGLRenderer as Sl, PCFShadowMap as Ml, Spherical as Be, Sphere as Ds, BufferAttribute as $e, ShaderMaterial as at, WebGLRenderTarget as Ot, RGBAFormat as nn, LinearFilter as ot, DataTexture as Tl, NoColorSpace as Pl, RepeatWrapping as ft, NearestFilter as Et, REVISION as pa, RedFormat as Il, FloatType as Dl, DepthTexture as Cl, UnsignedIntType as Al, GLBufferAttribute as El, InterleavedBufferAttribute as Ol, Raycaster as Nn, BoxGeometry as Ll, Sprite as Ut, MeshBasicMaterial as un, CanvasTexture as kr, SRGBColorSpace as dt, SpriteMaterial as ur, PMREMGenerator as Fl, AnimationMixer as Bl, Timer as kl, LinearSRGBColorSpace as zl, NeutralToneMapping as Rl, AgXToneMapping as Nl, ACESFilmicToneMapping as jl, CineonToneMapping as Ul, ReinhardToneMapping as Gl, NoToneMapping as Vl, UVMapping as Hl, CubeTexture as Wl, SphereGeometry as di, DoubleSide as Tt, CircleGeometry as ql, PlaneGeometry as dn, ExtrudeGeometry as Kl, Shape as fa, Box2 as dr, Group as fs, Triangle as ma, VideoTexture as Ql, ShapeGeometry as Yl, Plane as _l, AmbientLight as ga, DirectionalLight as ya, HemisphereLight as Xl, SpotLight as va, PointLight as pr, RectAreaLight as Zl, Loader as ms, LoaderUtils as Jl, ClampToEdgeWrapping as pi, PropertyBinding as gs, Line as $l, ShapeUtils as ec, Material as fi, PointsMaterial as Hn, Points as js, FrontSide as mi, BackSide as gi, LoadingManager as tc, InstancedMesh as nc, GridHelper as sc, AxesHelper as rc, Box3Helper as ic, DirectionalLightHelper as ac, HemisphereLightHelper as oc, SpotLightHelper as lc, PointLightHelper as cc } from "three";
3
+ import * as yi from "three/examples/jsm/libs/tween.module.js";
4
+ import fr, { Easing as ye, Tween as hc } from "three/examples/jsm/libs/tween.module.js";
5
+ import En from "camera-controls";
6
6
  import { HDRLoader as uc } from "three/examples/jsm/loaders/HDRLoader.js";
7
7
  import { GLTFExporter as dc } from "three/examples/jsm/exporters/GLTFExporter.js";
8
- import { Pass as pc, EffectPass as yi, EffectComposer as fc, RenderPass as mc, NormalPass as gc, SMAAEffect as yc, EdgeDetectionMode as vc, SMAAPreset as xc, ToneMappingEffect as wc, ToneMappingMode as an, BloomEffect as bc, BlendFunction as vi, OutlineEffect as Sc } from "postprocessing";
8
+ import { Pass as pc, EffectPass as vi, EffectComposer as fc, RenderPass as mc, NormalPass as gc, SMAAEffect as yc, EdgeDetectionMode as vc, SMAAPreset as xc, ToneMappingEffect as wc, ToneMappingMode as an, BloomEffect as bc, BlendFunction as xi, OutlineEffect as Sc } from "postprocessing";
9
9
  import { RoomEnvironment as Mc } from "three/examples/jsm/environments/RoomEnvironment.js";
10
10
  import Tc from "three/examples/jsm/libs/stats.module.js";
11
11
  import { Sky as Pc } from "three/examples/jsm/objects/Sky.js";
@@ -20,31 +20,31 @@ import { TGALoader as kc } from "three/examples/jsm/loaders/TGALoader.js";
20
20
  import { DRACOLoader as zc } from "three/examples/jsm/loaders/DRACOLoader.js";
21
21
  import { KTX2Loader as Rc } from "three/examples/jsm/loaders/KTX2Loader.js";
22
22
  import { MeshoptDecoder as Nc } from "three/examples/jsm/libs/meshopt_decoder.module.js";
23
- import * as xi from "three/examples/jsm/utils/SkeletonUtils.js";
23
+ import * as wi from "three/examples/jsm/utils/SkeletonUtils.js";
24
24
  import * as jc from "three/examples/jsm/libs/fflate.module.js";
25
25
  import { NURBSCurve as Uc } from "three/examples/jsm/curves/NURBSCurve.js";
26
26
  import { RectAreaLightHelper as Gc } from "three/examples/jsm/helpers/RectAreaLightHelper.js";
27
- const Vc = "soonspacejs", Hc = "2.14.31", wi = {
27
+ const Vc = "soonspacejs", Hc = "2.14.33", bi = {
28
28
  name: Vc,
29
29
  version: Hc
30
30
  }, wa = "[soonspacejs]: ";
31
31
  var et = /* @__PURE__ */ ((i) => (i.Group = "Group", i.Light = "Light", i.Model = "Model", i.Poi = "Poi", i.PoiNode = "PoiNode", i.Canvas3D = "Canvas3D", i.Topology = "Topology", i.Helper = "Helper", i.Decal = "Decal", i.PluginObject = "PluginObject", i))(et || {}), Ft = /* @__PURE__ */ ((i) => (i.sbm = "SBM", i.sbmx = "SBMX", i.glb = "GLB", i.gltf = "GLTF", i.fbx = "FBX", i.obj = "OBJ", i.stl = "STL", i))(Ft || {});
32
- const Ln = "In soonspacejs: ", Gt = (i, e) => {
32
+ const On = "In soonspacejs: ", Gt = (i, e) => {
33
33
  let t = "";
34
34
  for (const n in e) t += `${n}: ${e[n]};`;
35
35
  console.log(`%c${i}`, t);
36
36
  }, ys = {}, R = (i) => {
37
- i in ys || (ys[i] = !0, console.warn(Ln + i));
38
- }, kr = (i) => {
39
- i in ys || (ys[i] = !0, console.error(Ln + i));
37
+ i in ys || (ys[i] = !0, console.warn(On + i));
38
+ }, zr = (i) => {
39
+ i in ys || (ys[i] = !0, console.error(On + i));
40
40
  };
41
41
  function be(i) {
42
42
  return i instanceof D ? i : new D(i.x, i.y, i.z);
43
43
  }
44
- function zr(i) {
44
+ function Rr(i) {
45
45
  return i instanceof pe ? i : new pe(i.x, i.y, i.z);
46
46
  }
47
- function fn(i, e) {
47
+ function pn(i, e) {
48
48
  const t = new Wt();
49
49
  return i instanceof ca ? i.children.filter((n) => !("isTransformControls" in n)).reduce((n, s) => n.union(new Wt().setFromObject(s, e)), t) : t.setFromObject(i, e), t.isEmpty() && (i.getWorldPosition(t.min), t.max.copy(t.min)), t;
50
50
  }
@@ -61,13 +61,13 @@ function Wc(i, e) {
61
61
  e.order
62
62
  );
63
63
  }
64
- function Fn(i) {
64
+ function Ln(i) {
65
65
  return Math.PI / 180 * i;
66
66
  }
67
67
  function qc(i) {
68
68
  return i / (Math.PI / 180);
69
69
  }
70
- function Rr(i, e = !0) {
70
+ function Nr(i, e = !0) {
71
71
  return e ? {
72
72
  position: i.getWorldPosition(new D()),
73
73
  rotation: new pe().setFromQuaternion(
@@ -81,7 +81,7 @@ function Rr(i, e = !0) {
81
81
  };
82
82
  }
83
83
  function ba(i, e, t = !0) {
84
- const n = Rr(e, t);
84
+ const n = Nr(e, t);
85
85
  i.position.copy(n.position), i.rotation.copy(n.rotation), i.scale.copy(n.scale);
86
86
  }
87
87
  function jn(i) {
@@ -197,17 +197,17 @@ async function ln({ path: i = "", file: e }) {
197
197
  if (Array.isArray(e))
198
198
  return new al().setPath(i).loadAsync(e);
199
199
  {
200
- const t = Vr(e);
200
+ const t = Hr(e);
201
201
  if (t === "hdr" || t === "pic") {
202
- const n = await Ur.setPath(i).setDataType(on).loadAsync(e);
203
- return n.mapping = lr, n;
202
+ const n = await Gr.setPath(i).setDataType(on).loadAsync(e);
203
+ return n.mapping = cr, n;
204
204
  } else {
205
205
  const n = await _t.setPath(i).loadAsync(e);
206
- return n.mapping = lr, n;
206
+ return n.mapping = cr, n;
207
207
  }
208
208
  }
209
209
  }
210
- function gn(i) {
210
+ function mn(i) {
211
211
  if (!i) return null;
212
212
  const { colors: e, stops: t, size: n = 1024 } = i, s = document.createElement("canvas"), r = s.getContext("2d");
213
213
  if (!r) return null;
@@ -219,40 +219,40 @@ function gn(i) {
219
219
  const c = new qt(s);
220
220
  return c.needsUpdate = !0, c;
221
221
  }
222
- const fr = (i) => {
222
+ const mr = (i) => {
223
223
  const e = i.lastIndexOf("/");
224
224
  return e === -1 ? "./" : i.slice(0, e + 1);
225
225
  };
226
- function Ds(i) {
226
+ function Cs(i) {
227
227
  return ke(i) ? Jc(i) : Ne(i) ? Zc(i) : i;
228
228
  }
229
229
  function Zc(i) {
230
230
  if (Ne(i)) {
231
231
  const e = {};
232
232
  for (const t in i)
233
- e[t] = Ds(i[t]);
233
+ e[t] = Cs(i[t]);
234
234
  return e;
235
235
  }
236
236
  return i;
237
237
  }
238
238
  function Jc(i) {
239
- return i.map((e) => Ds(e));
239
+ return i.map((e) => Cs(e));
240
240
  }
241
- const Ia = (i) => mn(i, (e) => e.clone()), Da = (i) => mn(i, (e) => e.dispose()), Nr = {}, Bn = new Er();
242
- Bn.setRequestHeader(Nr);
243
- const jr = async (i, e) => (Bn.setResponseType(e), Bn.loadAsync(i)), Cs = new ol();
244
- Cs.load = (i, e, t, n) => {
241
+ const Ia = (i) => fn(i, (e) => e.clone()), Da = (i) => fn(i, (e) => e.dispose()), jr = {}, Fn = new Or();
242
+ Fn.setRequestHeader(jr);
243
+ const Ur = async (i, e) => (Fn.setResponseType(e), Fn.loadAsync(i)), As = new ol();
244
+ As.load = (i, e, t, n) => {
245
245
  const s = new Image();
246
- return Bn.setResponseType("blob"), Bn.load(i, function(r) {
246
+ return Fn.setResponseType("blob"), Fn.load(i, function(r) {
247
247
  s.src = URL.createObjectURL(r), s.onload = () => {
248
248
  URL.revokeObjectURL(s.src), e?.(s);
249
249
  };
250
250
  }, t, n), s;
251
251
  };
252
252
  const _t = new ha();
253
- _t.setRequestHeader(Nr);
254
- const Ur = new uc();
255
- Ur.setRequestHeader(Nr);
253
+ _t.setRequestHeader(jr);
254
+ const Gr = new uc();
255
+ Gr.setRequestHeader(jr);
256
256
  const Ca = new D(), $c = new D(), Aa = new D();
257
257
  function eh(i, e) {
258
258
  const t = Aa.setFromMatrixColumn(e.matrixWorld, 2).normalize().negate();
@@ -268,7 +268,7 @@ function Ea(i, e, t, n) {
268
268
  }
269
269
  return !0;
270
270
  }
271
- function Gr(i, e) {
271
+ function Vr(i, e) {
272
272
  const t = i.parent;
273
273
  if (!t.occlude) return;
274
274
  const { occludeThrottle: n } = t;
@@ -345,7 +345,7 @@ function La(i) {
345
345
  removeLineBreaks: !0
346
346
  });
347
347
  }
348
- return jr(i, "text").then((t) => Promise.resolve(e(t)));
348
+ return Ur(i, "text").then((t) => Promise.resolve(e(t)));
349
349
  }
350
350
  function us(i) {
351
351
  const e = new DataView(i);
@@ -355,21 +355,21 @@ function us(i) {
355
355
  }
356
356
  return e.buffer;
357
357
  }
358
- const kn = {
358
+ const Bn = {
359
359
  source: null
360
360
  };
361
361
  function nh(i, e) {
362
- kn.source = i;
362
+ Bn.source = i;
363
363
  const t = e();
364
- return kn.source = null, t;
364
+ return Bn.source = null, t;
365
365
  }
366
366
  function sh(i) {
367
367
  return nh("code", i);
368
368
  }
369
369
  async function rh(i, e) {
370
- kn.source = i;
370
+ Bn.source = i;
371
371
  const t = await e();
372
- return kn.source = null, t;
372
+ return Bn.source = null, t;
373
373
  }
374
374
  async function ih(i) {
375
375
  return rh("code", i);
@@ -384,17 +384,17 @@ function ah(i, e = {}) {
384
384
  );
385
385
  });
386
386
  }
387
- const oh = Object.prototype.hasOwnProperty, lh = (i, e) => oh.call(i, e), Bt = (i) => tt(i) === "String", As = (i) => tt(i) === "Boolean", Xe = (i) => tt(i) === "Number", ch = (i) => tt(i) === "Null", hh = (i) => tt(i) === "Undefined", uh = (i) => tt(i) === "Symbol", dh = (i) => tt(i) === "Date", ke = Array.isArray, Ne = (i) => tt(i) === "Object", vs = (i) => tt(i) === "Function", ph = (i) => tt(i) === "Promise", tt = (i) => Object.prototype.toString.call(i).slice(8, -1), fh = (i) => new Promise((e) => setTimeout(() => e(), i)), mr = (i) => new TextDecoder().decode(new Uint8Array(i)), We = () => wa + Math.random().toString(36).substring(7).split("").join("_"), Vr = (i) => {
387
+ const oh = Object.prototype.hasOwnProperty, lh = (i, e) => oh.call(i, e), Bt = (i) => tt(i) === "String", Es = (i) => tt(i) === "Boolean", Xe = (i) => tt(i) === "Number", ch = (i) => tt(i) === "Null", hh = (i) => tt(i) === "Undefined", uh = (i) => tt(i) === "Symbol", dh = (i) => tt(i) === "Date", ke = Array.isArray, Ne = (i) => tt(i) === "Object", vs = (i) => tt(i) === "Function", ph = (i) => tt(i) === "Promise", tt = (i) => Object.prototype.toString.call(i).slice(8, -1), fh = (i) => new Promise((e) => setTimeout(() => e(), i)), gr = (i) => new TextDecoder().decode(new Uint8Array(i)), We = () => wa + Math.random().toString(36).substring(7).split("").join("_"), Hr = (i) => {
388
388
  const { href: e } = new URL(i, location.origin);
389
389
  if (e.includes(".")) {
390
390
  const t = e.split(".").pop();
391
391
  return t ? t.includes("?") ? t.split("?").shift()?.toLowerCase() : t : void 0;
392
392
  }
393
- }, Hr = 1e-5;
394
- function Fa(i, e = Hr) {
393
+ }, Wr = 1e-5;
394
+ function Fa(i, e = Wr) {
395
395
  return Math.abs(i) < e;
396
396
  }
397
- function mh(i, e, t = Hr) {
397
+ function mh(i, e, t = Wr) {
398
398
  return Fa(i - e, t);
399
399
  }
400
400
  function Ba(i, e = 50) {
@@ -410,10 +410,10 @@ function gh(i, e) {
410
410
  return r ? r.push(s) : n.set(s[e], [s]), n;
411
411
  }, t), t;
412
412
  }
413
- const mn = (i, e) => ke(i) ? i.map(e) : e(i), bi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
413
+ const fn = (i, e) => ke(i) ? i.map(e) : e(i), Si = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
414
414
  __proto__: null,
415
- EPSILON: Hr,
416
- IVector3ToEuler: zr,
415
+ EPSILON: Wr,
416
+ IVector3ToEuler: Rr,
417
417
  IVector3ToVector3: be,
418
418
  MinHeap: Pa,
419
419
  absoluteAngle: Ta,
@@ -421,30 +421,30 @@ const mn = (i, e) => ke(i) ? i.map(e) : e(i), bi = /* @__PURE__ */ Object.freeze
421
421
  approxZero: Fa,
422
422
  asyncRunWithCode: ih,
423
423
  calculateScaleFactor: Sa,
424
- cloneDeep: Ds,
424
+ cloneDeep: Cs,
425
425
  cloneMaterials: Ia,
426
426
  computeTargetByRotation: Ma,
427
- consoleSspTitle: Ln,
427
+ consoleSspTitle: On,
428
428
  debounce: Ba,
429
- deg2Euler: Fn,
429
+ deg2Euler: Ln,
430
430
  disposeMaterials: Da,
431
- error: kr,
431
+ error: zr,
432
432
  euler2Deg: qc,
433
433
  exportGltf: ah,
434
- fetchFile: jr,
435
- getAsciiString: mr,
436
- getBoundingBox: fn,
437
- getExtension: Vr,
438
- getSpaceAttributeFromObject: Rr,
434
+ fetchFile: Ur,
435
+ getAsciiString: gr,
436
+ getBoundingBox: pn,
437
+ getExtension: Hr,
438
+ getSpaceAttributeFromObject: Nr,
439
439
  getTexture: ln,
440
440
  getValueType: tt,
441
- gradientTexture: gn,
441
+ gradientTexture: mn,
442
442
  groupBy: gh,
443
443
  hasOwn: lh,
444
444
  idleTask: Oa,
445
- imageLoader: Cs,
445
+ imageLoader: As,
446
446
  isArray: ke,
447
- isBoolean: As,
447
+ isBoolean: Es,
448
448
  isDate: dh,
449
449
  isFunction: vs,
450
450
  isNull: ch,
@@ -458,12 +458,12 @@ const mn = (i, e) => ke(i) ? i.map(e) : e(i), bi = /* @__PURE__ */ Object.freeze
458
458
  isSymbol: uh,
459
459
  isUndefined: hh,
460
460
  log: Gt,
461
- objectHandle: mn,
462
- parseFilePath: fr,
463
- poiNodeOccludeHandler: Gr,
464
- propertiesCtx: kn,
461
+ objectHandle: fn,
462
+ parseFilePath: mr,
463
+ poiNodeOccludeHandler: Vr,
464
+ propertiesCtx: Bn,
465
465
  randomString: We,
466
- rgbeLoader: Ur,
466
+ rgbeLoader: Gr,
467
467
  rotationAFix: Wc,
468
468
  rotationAxisFix: hs,
469
469
  runWithCode: sh,
@@ -523,10 +523,10 @@ function wt(i, e, t = {}, n, s) {
523
523
  }).onStart(() => {
524
524
  s?.(f);
525
525
  });
526
- Xe(c) ? f.repeat(c) : As(c) && c && f.repeat(1 / 0), h && f.repeatDelay(20), f.yoyo(h), f.start();
526
+ Xe(c) ? f.repeat(c) : Es(c) && c && f.repeat(1 / 0), h && f.repeatDelay(20), f.yoyo(h), f.start();
527
527
  });
528
528
  }
529
- class Si {
529
+ class Mi {
530
530
  /**
531
531
  *
532
532
  * @param target - 被动画的目标对象
@@ -637,7 +637,7 @@ function ka(i) {
637
637
  function vh(i) {
638
638
  return i && typeof i[Symbol.iterator] == "function";
639
639
  }
640
- var gr = /* @__PURE__ */ ((i) => (i[i.x = 0] = "x", i[i.y = 1] = "y", i[i.z = 2] = "z", i))(gr || {});
640
+ var yr = /* @__PURE__ */ ((i) => (i[i.x = 0] = "x", i[i.y = 1] = "y", i[i.z = 2] = "z", i))(yr || {});
641
641
  ((i) => {
642
642
  function e(s) {
643
643
  return i[s];
@@ -652,8 +652,8 @@ var gr = /* @__PURE__ */ ((i) => (i[i.x = 0] = "x", i[i.y = 1] = "y", i[i.z = 2]
652
652
  return [r, a];
653
653
  }
654
654
  i.getCrossAxiss = n;
655
- })(gr || (gr = {}));
656
- var yr = /* @__PURE__ */ ((i) => (i[i.x = 0] = "x", i[i.y = 1] = "y", i[i.z = 2] = "z", i[i.w = 3] = "w", i))(yr || {});
655
+ })(yr || (yr = {}));
656
+ var vr = /* @__PURE__ */ ((i) => (i[i.x = 0] = "x", i[i.y = 1] = "y", i[i.z = 2] = "z", i[i.w = 3] = "w", i))(vr || {});
657
657
  ((i) => {
658
658
  function e(s) {
659
659
  return i[s];
@@ -668,10 +668,10 @@ var yr = /* @__PURE__ */ ((i) => (i[i.x = 0] = "x", i[i.y = 1] = "y", i[i.z = 2]
668
668
  return [r, a];
669
669
  }
670
670
  i.getCrossAxiss = n;
671
- })(yr || (yr = {}));
672
- var xh = Object.defineProperty, wh = (i, e, t) => e in i ? xh(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, In = (i, e, t) => (wh(i, typeof e != "symbol" ? e + "" : e, t), t);
671
+ })(vr || (vr = {}));
672
+ var xh = Object.defineProperty, wh = (i, e, t) => e in i ? xh(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, Pn = (i, e, t) => (wh(i, typeof e != "symbol" ? e + "" : e, t), t);
673
673
  function bh(i) {
674
- return i.w != null ? new Ms().copy(i) : i.z != null ? new D().copy(i) : new oe().copy(i);
674
+ return i.w != null ? new Ts().copy(i) : i.z != null ? new D().copy(i) : new oe().copy(i);
675
675
  }
676
676
  function cn(i, e, t) {
677
677
  t = t ?? 0;
@@ -713,15 +713,15 @@ function Sh(i, e) {
713
713
  let n = i.dot(e) / t;
714
714
  return n = Math.max(-1, Math.min(1, n)), Math.acos(n);
715
715
  }
716
- function js(i, e, t) {
716
+ function Us(i, e, t) {
717
717
  let n = Sh(i, e);
718
718
  return n === 0 ? n : i.clone().cross(e).dot(t) < 0 ? -n : n;
719
719
  }
720
720
  function Mh(i, e, t) {
721
- const n = e.clone().negate(), s = t.clone().projectOnPlane(e), r = i.clone().projectOnPlane(s), a = js(e, r, s), o = e.clone().cross(s), l = i.clone().projectOnPlane(o), c = js(e, l, o), u = i.clone().projectOnPlane(n), h = js(s, u, n);
721
+ const n = e.clone().negate(), s = t.clone().projectOnPlane(e), r = i.clone().projectOnPlane(s), a = Us(e, r, s), o = e.clone().cross(s), l = i.clone().projectOnPlane(o), c = Us(e, l, o), u = i.clone().projectOnPlane(n), h = Us(s, u, n);
722
722
  return { yaw: a, pitch: c, roll: h };
723
723
  }
724
- const Us = 180 / Math.PI, vr = {
724
+ const Gs = 180 / Math.PI, xr = {
725
725
  yaw: [
726
726
  { name: "前", range: [-15, 15] },
727
727
  { name: "左", range: [15, 165] },
@@ -750,21 +750,21 @@ function Th(i) {
750
750
  e[t] = Array.isArray(n) ? n : Object.entries(n).map(([s, r]) => ({ name: s, range: r }));
751
751
  return e;
752
752
  }
753
- const Gs = {
753
+ const Vs = {
754
754
  degrees: !0,
755
- map: vr,
755
+ map: xr,
756
756
  front: { x: 0, y: 0, z: 1 },
757
757
  up: { x: 0, y: 1, z: 0 }
758
758
  };
759
759
  class za {
760
760
  constructor(e) {
761
- In(this, "_options"), In(this, "_listMap"), In(this, "_front"), In(this, "_up"), e && (this.options = e);
761
+ Pn(this, "_options"), Pn(this, "_listMap"), Pn(this, "_front"), Pn(this, "_up"), e && (this.options = e);
762
762
  }
763
763
  static get options() {
764
- return this._options ?? (this.options = Gs);
764
+ return this._options ?? (this.options = Vs);
765
765
  }
766
766
  static set options(e) {
767
- this._options = Object.assign({}, structuredClone(vr), e);
767
+ this._options = Object.assign({}, structuredClone(xr), e);
768
768
  }
769
769
  /**
770
770
  * 默认选项
@@ -791,7 +791,7 @@ class za {
791
791
  return this.options.map || (this.map = this.defaultOptions.map), this.options.map;
792
792
  }
793
793
  set map(e) {
794
- const t = structuredClone(this.defaultOptions.map), n = structuredClone(vr);
794
+ const t = structuredClone(this.defaultOptions.map), n = structuredClone(xr);
795
795
  e = e ? {
796
796
  yaw: e.yaw ?? t.yaw ?? n.yaw,
797
797
  pitch: e.pitch ?? t.pitch ?? n.pitch,
@@ -802,13 +802,13 @@ class za {
802
802
  return this._listMap ?? (this._listMap = Th(this.map ?? {}));
803
803
  }
804
804
  get front() {
805
- return this._front || (this.front = this.options.front ?? this.defaultOptions.front ?? Gs.front), this._front;
805
+ return this._front || (this.front = this.options.front ?? this.defaultOptions.front ?? Vs.front), this._front;
806
806
  }
807
807
  set front(e) {
808
808
  this._front = new D().copy(e);
809
809
  }
810
810
  get up() {
811
- return this._up || (this.up = this.options.up ?? this.defaultOptions.up ?? Gs.up), this._up;
811
+ return this._up || (this.up = this.options.up ?? this.defaultOptions.up ?? Vs.up), this._up;
812
812
  }
813
813
  set up(e) {
814
814
  this._up = new D().copy(e);
@@ -822,7 +822,7 @@ class za {
822
822
  computeAzimuth(e, t, n) {
823
823
  const s = new D().copy(e), r = new D().copy(t ?? this.front), a = new D().copy(n ?? this.up);
824
824
  let { yaw: o, pitch: l, roll: c } = Mh(s, r, a);
825
- return this.degrees && (o *= Us, l *= Us, c *= Us), {
825
+ return this.degrees && (o *= Gs, l *= Gs, c *= Gs), {
826
826
  yaw: {
827
827
  angle: o,
828
828
  name: this.findAzimuthNames("yaw", o)
@@ -852,7 +852,7 @@ class za {
852
852
  return n;
853
853
  }
854
854
  }
855
- In(za, "_options");
855
+ Pn(za, "_options");
856
856
  new za();
857
857
  function Ph(i, e, t) {
858
858
  const n = t ? (l) => i.getPointAt(l) : (l) => i.getPoint(l);
@@ -874,13 +874,13 @@ function Ih(i, e) {
874
874
  }
875
875
  return Math.ceil(e / t);
876
876
  }
877
- function Wr(i) {
877
+ function qr(i) {
878
878
  const { curve: e } = i;
879
879
  let t = e.getLength();
880
880
  const n = Ih(i, t);
881
881
  return e.arcLengthDivisions < n && (e.arcLengthDivisions = n, e.updateArcLengths(), t = e.getLength()), { length: t, division: n };
882
882
  }
883
- var qr = /* @__PURE__ */ ((i) => (i.back = "back", i.front = "front", i))(qr || {});
883
+ var Kr = /* @__PURE__ */ ((i) => (i.back = "back", i.front = "front", i))(Kr || {});
884
884
  function Ra(i) {
885
885
  const { curve: e, distance: t, fromU: n = 0, side: s, tolerance: r = t * 0.1 } = i, a = i.length ?? e.getLength(), o = e.getPointAt(n);
886
886
  let l = t / a;
@@ -905,10 +905,10 @@ function Ra(i) {
905
905
  };
906
906
  }
907
907
  function Dh(i) {
908
- const e = Kr(i), t = [0], n = e.reduce((s, r) => (s += r.distance(), t.push(s), s), 0);
908
+ const e = Qr(i), t = [0], n = e.reduce((s, r) => (s += r.distance(), t.push(s), s), 0);
909
909
  return { lines: e, lengths: t, length: n };
910
910
  }
911
- function Kr(i) {
911
+ function Qr(i) {
912
912
  const e = [];
913
913
  return i.reduce((t, n) => {
914
914
  const s = new ua(t, n);
@@ -943,16 +943,16 @@ new Kt();
943
943
  var Eh = Object.defineProperty, Oh = (i, e, t) => e in i ? Eh(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, ce = (i, e, t) => (Oh(i, typeof e != "symbol" ? e + "" : e, t), t);
944
944
  const xs = new D(), ja = new D(1, 1, 1);
945
945
  new he();
946
- const zn = new Q();
946
+ const kn = new Q();
947
947
  function Ua(i) {
948
948
  const { joints: e, axials: t } = i;
949
949
  if (e)
950
950
  var n = Lh(e);
951
951
  else
952
- t ? n = Qr(i) : n = Fh(i);
952
+ t ? n = Yr(i) : n = Fh(i);
953
953
  return n;
954
954
  }
955
- function Qr(i) {
955
+ function Yr(i) {
956
956
  const { axials: e, start: t } = i, n = new ps();
957
957
  t && (n.position.copy(t), n.updateMatrix());
958
958
  const s = [n];
@@ -966,13 +966,13 @@ function Lh(i) {
966
966
  return i.reduce((t, n) => {
967
967
  const s = n.clone().sub(t);
968
968
  return e.push(s), n;
969
- }), Qr({ axials: e, start: i[0] });
969
+ }), Yr({ axials: e, start: i[0] });
970
970
  }
971
971
  function Fh(i) {
972
972
  const { start: e, axial: t } = i;
973
973
  let n = i.number;
974
974
  const s = new Array(n - 1);
975
- return s.fill(t), Qr({ axials: s, start: e });
975
+ return s.fill(t), Yr({ axials: s, start: e });
976
976
  }
977
977
  function Bh(i) {
978
978
  const { geometry: e, flexible: t = 1, axial: n, number: s } = i, r = i.start ?? new D(), a = n.clone().normalize(), o = n.length(), l = s - 1, c = new he().setFromUnitVectors(new D(1, 0, 0), a), u = new Q().compose(r, c, new D(1, 1, 1)).invert(), h = e.getAttribute("position").clone(), d = h.count;
@@ -994,7 +994,7 @@ function Bh(i) {
994
994
  }
995
995
  return e.setAttribute("skinIndex", new hn(f, 4)), e.setAttribute("skinWeight", new ge(p, 4)), e;
996
996
  }
997
- function gf(i) {
997
+ function yf(i) {
998
998
  const { skeleton: e, geometryFrame: t } = i, n = e.boneInverses[0].clone().invert(), s = e.boneInverses[1].clone().invert();
999
999
  if (t) {
1000
1000
  const o = t.clone().invert();
@@ -1009,10 +1009,10 @@ function gf(i) {
1009
1009
  });
1010
1010
  }
1011
1011
  function Ga(i) {
1012
- const { skeleton: e, geometry: t, flexible: n = 1, geometryFrame: s } = i, r = s?.clone().invert() ?? zn.clone(), a = e.boneInverses.map((f) => {
1012
+ const { skeleton: e, geometry: t, flexible: n = 1, geometryFrame: s } = i, r = s?.clone().invert() ?? kn.clone(), a = e.boneInverses.map((f) => {
1013
1013
  const p = f.clone().invert().premultiply(r);
1014
1014
  return new D().setFromMatrixPosition(p);
1015
- }), o = Kr(a), l = t.getAttribute("position"), c = l.count, u = [], h = [], d = new D();
1015
+ }), o = Qr(a), l = t.getAttribute("position"), c = l.count, u = [], h = [], d = new D();
1016
1016
  for (let f = 0; f < c; f++) {
1017
1017
  d.fromBufferAttribute(l, f);
1018
1018
  const { index: p, clampT: g } = Ch(d, o), v = g * n;
@@ -1020,18 +1020,18 @@ function Ga(i) {
1020
1020
  }
1021
1021
  return t.setAttribute("skinIndex", new hn(u, 4)), t.setAttribute("skinWeight", new ge(h, 4)), t;
1022
1022
  }
1023
- function yf(i) {
1024
- const { geometry: e } = i, t = i.material ?? void 0, n = new Lr(e, t), s = Ua(i);
1023
+ function vf(i) {
1024
+ const { geometry: e } = i, t = i.material ?? void 0, n = new Fr(e, t), s = Ua(i);
1025
1025
  n.add(s[0]);
1026
- const r = new Or(s);
1026
+ const r = new Lr(s);
1027
1027
  return n.bind(r), Ga({ ...i, skeleton: r }), n;
1028
1028
  }
1029
- function vf(i) {
1029
+ function xf(i) {
1030
1030
  const { skeleton: e } = i, t = Va(i);
1031
1031
  return t.updateMatrix(), t.updateMatrixWorld(), t.bind(e), t;
1032
1032
  }
1033
1033
  function Va(i) {
1034
- const { target: e, skeleton: t } = i, n = e.geometry, s = new Lr();
1034
+ const { target: e, skeleton: t } = i, n = e.geometry, s = new Fr();
1035
1035
  return e.copy.call(s, e, !1), Ga({ ...i, geometry: n, skeleton: t, geometryFrame: e.matrixWorld }), s;
1036
1036
  }
1037
1037
  function Ha(i) {
@@ -1041,7 +1041,7 @@ function Ha(i) {
1041
1041
  var n = t.bones[0];
1042
1042
  else {
1043
1043
  const r = Ua(i);
1044
- t = new Or(r), n = r[0];
1044
+ t = new Lr(r), n = r[0];
1045
1045
  }
1046
1046
  e.add(n), e.updateWorldMatrix(!1, !0), t.calculateInverses(), n.removeFromParent();
1047
1047
  const s = Wa({ ...i, target: e, skeleton: t });
@@ -1055,7 +1055,7 @@ function Wa(i) {
1055
1055
  Wa({ ...i, target: l, parent: a });
1056
1056
  return a;
1057
1057
  }
1058
- function xf(i) {
1058
+ function wf(i) {
1059
1059
  return i.filter((e) => {
1060
1060
  var t;
1061
1061
  return !((t = e.parent) != null && t.isBone);
@@ -1067,7 +1067,7 @@ function kh(i) {
1067
1067
  return !((t = e.parent) != null && t.isBone);
1068
1068
  });
1069
1069
  }
1070
- function wf(i) {
1070
+ function bf(i) {
1071
1071
  return kh(i) ?? i[0];
1072
1072
  }
1073
1073
  function zh(i) {
@@ -1078,7 +1078,7 @@ function Rh(i) {
1078
1078
  return { ...n, clip: s };
1079
1079
  }
1080
1080
  function qa(i) {
1081
- const { curve: e, lookDistance: t } = i, n = i.targetPath ?? "", s = Wr(i).division, r = Es(i, e.getLength()), a = Ts, o = [], l = _r(s), c = { ...i, duration: r, division: s, ts: l, lookPoint: { distance: t } }, u = Xr(c), { points: h, rotates: d, ...f } = Yr(c);
1081
+ const { curve: e, lookDistance: t } = i, n = i.targetPath ?? "", s = qr(i).division, r = Os(i, e.getLength()), a = Ps, o = [], l = Xr(s), c = { ...i, duration: r, division: s, ts: l, lookPoint: { distance: t } }, u = Zr(c), { points: h, rotates: d, ...f } = _r(c);
1082
1082
  if (h.length) {
1083
1083
  const p = [];
1084
1084
  h.forEach((v, w) => {
@@ -1097,7 +1097,7 @@ function qa(i) {
1097
1097
  }
1098
1098
  return { ...f, keyframeTracks: o, duration: r };
1099
1099
  }
1100
- function Es(i, e) {
1100
+ function Os(i, e) {
1101
1101
  let t = i.duration;
1102
1102
  if (!t) {
1103
1103
  const n = i.speed;
@@ -1109,7 +1109,7 @@ function Es(i, e) {
1109
1109
  }
1110
1110
  return t;
1111
1111
  }
1112
- function Yr(i) {
1112
+ function _r(i) {
1113
1113
  var e, t;
1114
1114
  const { curve: n, target: s, lookPoint: r, enableUp: a, fixUp: o } = i, l = i.position ?? !0, c = i.rotate ?? !0, u = [], h = [], d = [];
1115
1115
  if (!(l || c))
@@ -1117,7 +1117,7 @@ function Yr(i) {
1117
1117
  const f = (i.anchor ?? xs).clone(), p = i.ts ?? i.us, g = !i.ts;
1118
1118
  if (!p)
1119
1119
  throw "缺少参数:至少传递 ts 和 us 任意之一";
1120
- let v = zn.clone(), w = zn.clone(), S = ja.clone(), b = je.DEFAULT_UP;
1120
+ let v = kn.clone(), w = kn.clone(), S = ja.clone(), b = je.DEFAULT_UP;
1121
1121
  s && (s.updateWorldMatrix(!0, !1), v = s.matrix, w = s.matrixWorld, S = s.scale, b = s.up);
1122
1122
  const A = v.clone().invert(), I = w.clone().multiply(A).clone().invert(), C = n.getTangent(0);
1123
1123
  C.transformDirection(I);
@@ -1189,13 +1189,13 @@ function Yr(i) {
1189
1189
  }
1190
1190
  return { rotates: u, points: h, curveLength: se ?? void 0, lengths: K ?? void 0 };
1191
1191
  }
1192
- function _r(i) {
1192
+ function Xr(i) {
1193
1193
  const e = [];
1194
1194
  for (let t = 0; t <= i; t++)
1195
1195
  e.push(t / i);
1196
1196
  return e;
1197
1197
  }
1198
- function Xr(i) {
1198
+ function Zr(i) {
1199
1199
  const { curve: e, division: t, duration: n } = i, s = e.getLengths(t), r = s.length, a = s[r - 1];
1200
1200
  return s.map((o) => o / a * n);
1201
1201
  }
@@ -1211,13 +1211,13 @@ function Nh(i) {
1211
1211
  return { ...r, clip: a };
1212
1212
  }
1213
1213
  function jh(i) {
1214
- const e = i.targetPath ?? "", t = i.points, { lines: n, length: s, lengths: r } = Dh(t), a = Es(i, s), o = [], l = r.map((f) => f / s * a), { points: c, pointTimes: u, rotates: h, rotateTimes: d } = Uh({ ...i, times: l }, n);
1214
+ const e = i.targetPath ?? "", t = i.points, { lines: n, length: s, lengths: r } = Dh(t), a = Os(i, s), o = [], l = r.map((f) => f / s * a), { points: c, pointTimes: u, rotates: h, rotateTimes: d } = Uh({ ...i, times: l }, n);
1215
1215
  if (c.length) {
1216
1216
  const f = [];
1217
1217
  c.forEach((g, v) => {
1218
1218
  g.toArray(f, v * 3);
1219
1219
  });
1220
- const p = new St(`${e}.position`, u, f, Ts);
1220
+ const p = new St(`${e}.position`, u, f, Ps);
1221
1221
  o.push(p);
1222
1222
  }
1223
1223
  if (h.length) {
@@ -1233,12 +1233,12 @@ function jh(i) {
1233
1233
  function Uh(i, e) {
1234
1234
  var t, n;
1235
1235
  const { points: s, target: r, times: a, enableUp: o, fixUp: l } = i, c = i.position ?? !0, u = i.rotate ?? !0, h = s.length, d = h - 1;
1236
- e = e ?? Kr(s);
1236
+ e = e ?? Qr(s);
1237
1237
  const f = [], p = a, g = [], v = [], w = [], S = { rotates: f, points: g, rotateTimes: p, pointTimes: v };
1238
1238
  if (!(c || u))
1239
1239
  return S;
1240
1240
  const b = (i.anchor ?? xs).clone();
1241
- let A = zn.clone(), I = zn.clone(), C = ja.clone(), O = je.DEFAULT_UP;
1241
+ let A = kn.clone(), I = kn.clone(), C = ja.clone(), O = je.DEFAULT_UP;
1242
1242
  r && (r.updateWorldMatrix(!0, !1), A = r.matrix, I = r.matrixWorld, C = r.scale, O = r.up);
1243
1243
  const j = A.clone().invert(), G = I.clone().multiply(j).clone().invert(), V = e[0].delta(new D());
1244
1244
  V.transformDirection(G);
@@ -1315,7 +1315,7 @@ function Ka(i) {
1315
1315
  return { ...n, clip: r };
1316
1316
  }
1317
1317
  function Vh(i) {
1318
- const { skeleton: e, targetPath: t } = i, n = e.bones, { times: s, boneSampleDatas: r, duration: a, ...o } = Hh(i), l = s.length, c = Ts, u = r.map((h, d) => {
1318
+ const { skeleton: e, targetPath: t } = i, n = e.bones, { times: s, boneSampleDatas: r, duration: a, ...o } = Hh(i), l = s.length, c = Ps, u = r.map((h, d) => {
1319
1319
  const { points: f, rotates: p } = h, g = n[d], v = t ? `${t}.skeleton.bones[${d}]` : `${g.name || g.uuid}`, w = [], S = [];
1320
1320
  for (let I = 0; I < l; I++)
1321
1321
  f && f[I].toArray(w, I * 3), p[I].toArray(S, I * 4);
@@ -1336,7 +1336,7 @@ function Hh(i) {
1336
1336
  throw "target 或 根骨骼的 parent 不存在";
1337
1337
  const c = i.tolerance ?? 0.1;
1338
1338
  o.updateWorldMatrix(!0, !0);
1339
- const { division: u, length: h } = Wr(i), { matrixWorld: d } = l, f = d.clone().invert(), p = [], g = [];
1339
+ const { division: u, length: h } = qr(i), { matrixWorld: d } = l, f = d.clone().invert(), p = [], g = [];
1340
1340
  a.reduce((z, H) => {
1341
1341
  const Z = H.clone().invert();
1342
1342
  p.push(Z);
@@ -1345,7 +1345,7 @@ function Hh(i) {
1345
1345
  }, f);
1346
1346
  const v = g[0], w = new D(), S = new he(), b = new D();
1347
1347
  v.decompose(w, S, b);
1348
- const A = Es(i, h), I = _r(u), C = Xr({ curve: t, division: u, duration: A }), O = I.length, j = [], G = new D().setFromMatrixPosition(g[1]).negate(), V = a[0], $ = (e = i.up) == null ? void 0 : e.clone().applyMatrix4(d).transformDirection(V), { points: J, rotates: re, ...W } = Yr({ ...i, curve: t, ts: I, target: o, rotate: !0, front: G, up: $, anchor: null });
1348
+ const A = Os(i, h), I = Xr(u), C = Zr({ curve: t, division: u, duration: A }), O = I.length, j = [], G = new D().setFromMatrixPosition(g[1]).negate(), V = a[0], $ = (e = i.up) == null ? void 0 : e.clone().applyMatrix4(d).transformDirection(V), { points: J, rotates: re, ...W } = _r({ ...i, curve: t, ts: I, target: o, rotate: !0, front: G, up: $, anchor: null });
1349
1349
  for (let z = 0; z < O; z++)
1350
1350
  j.push(d.clone());
1351
1351
  const se = J.map((z, H) => {
@@ -1365,7 +1365,7 @@ function Hh(i) {
1365
1365
  distance: Z,
1366
1366
  fromU: Y,
1367
1367
  length: h,
1368
- side: qr.front,
1368
+ side: Kr.front,
1369
1369
  tolerance: c * Z
1370
1370
  });
1371
1371
  return { u: ne, point: ie ? fe : null };
@@ -1373,13 +1373,13 @@ function Hh(i) {
1373
1373
  for (let z = 1; z < U; z++) {
1374
1374
  const H = [], Z = [], Y = [], ne = [];
1375
1375
  L.push({ points: H, rotates: Z, us: Y, matrixs: ne });
1376
- const fe = g[z], ie = p[z], ee = z - 1, Me = L[ee], kt = g[ee], gt = p[ee], { matrixs: vn, points: xn, rotates: wn } = Me, Ge = new D().setFromMatrixScale(kt), zt = ee - 1, Xt = zt < 0 ? j : L[zt].matrixs, Ve = new D(), Ze = new he(), Je = new D();
1376
+ const fe = g[z], ie = p[z], ee = z - 1, Me = L[ee], kt = g[ee], gt = p[ee], { matrixs: yn, points: vn, rotates: xn } = Me, Ge = new D().setFromMatrixScale(kt), zt = ee - 1, Xt = zt < 0 ? j : L[zt].matrixs, Ve = new D(), Ze = new he(), Je = new D();
1377
1377
  fe.decompose(Ve, Ze, Je);
1378
1378
  const Pt = new D().setFromMatrixPosition(ie).sub(new D().setFromMatrixPosition(gt)).length(), Zt = Ve.length();
1379
1379
  for (let Ae = 0; Ae < O; Ae++) {
1380
1380
  const { point: Ee, u: nt } = q(ee, Ae, Pt);
1381
1381
  Y.push(nt), Z.push(Ze.clone());
1382
- const st = vn[Ae];
1382
+ const st = yn[Ae];
1383
1383
  if (nt < 0 || !Ee) {
1384
1384
  H.push(Ve);
1385
1385
  const vt = st.clone().multiply(fe);
@@ -1388,9 +1388,9 @@ function Hh(i) {
1388
1388
  }
1389
1389
  const Rt = Xt[Ae];
1390
1390
  let He = Rt.clone().invert();
1391
- const Fe = Ee.clone().applyMatrix4(He), rt = xn[Ae];
1391
+ const Fe = Ee.clone().applyMatrix4(He), rt = vn[Ae];
1392
1392
  Fe.sub(rt).normalize();
1393
- const qe = wn[Ae], Nt = new Q().compose(rt, qe, Ge), Jt = Ve.clone().transformDirection(Nt), It = new he().setFromUnitVectors(Jt, Fe);
1393
+ const qe = xn[Ae], Nt = new Q().compose(rt, qe, Ge), Jt = Ve.clone().transformDirection(Nt), It = new he().setFromUnitVectors(Jt, Fe);
1394
1394
  qe.premultiply(It).normalize(), st.compose(rt, qe, Ge), st.premultiply(Rt);
1395
1395
  const Dt = st.clone().invert();
1396
1396
  Ee.applyMatrix4(Dt);
@@ -1413,7 +1413,7 @@ function Wh(i) {
1413
1413
  return { ...s, clip: a };
1414
1414
  }
1415
1415
  function qh(i) {
1416
- const { skeleton: e, targetPath: t } = i, { times: n, boneSampleDatas: s, duration: r, targetSampleDatas: a, ...o } = Kh(i), l = n.length, c = e.bones, u = Ts, h = [], d = [], { points: f, rotates: p } = a;
1416
+ const { skeleton: e, targetPath: t } = i, { times: n, boneSampleDatas: s, duration: r, targetSampleDatas: a, ...o } = Kh(i), l = n.length, c = e.bones, u = Ps, h = [], d = [], { points: f, rotates: p } = a;
1417
1417
  for (let A = 0; A < l; A++)
1418
1418
  f[A].toArray(h, A * 3), p[A].toArray(d, A * 4);
1419
1419
  const g = t ?? "", v = new St(`${g}.position`, n, h, u), w = new Mt(`${g}.quaternion`, n, d, u), S = [v, w], b = s.map((A, I) => {
@@ -1436,7 +1436,7 @@ function Kh(i) {
1436
1436
  throw "target 或 根骨骼的 parent 不存在";
1437
1437
  const l = i.tolerance ?? 0.1;
1438
1438
  a.updateWorldMatrix(!0, !0);
1439
- const { division: c, length: u } = Wr(i), { matrix: h, matrixWorld: d, scale: f } = o, p = d.clone().multiply(h.clone().invert()), g = d.clone().invert(), v = [], w = [];
1439
+ const { division: c, length: u } = qr(i), { matrix: h, matrixWorld: d, scale: f } = o, p = d.clone().multiply(h.clone().invert()), g = d.clone().invert(), v = [], w = [];
1440
1440
  r.reduce((Y, ne) => {
1441
1441
  const fe = ne.clone().invert();
1442
1442
  v.push(fe);
@@ -1445,7 +1445,7 @@ function Kh(i) {
1445
1445
  }, g);
1446
1446
  const S = w[0], b = new D(), A = new he(), I = new D();
1447
1447
  S.decompose(b, A, I);
1448
- const C = Es(i, u), O = _r(c), j = v[0], G = new D().setFromMatrixPosition(w[1]).negate().transformDirection(j).transformDirection(g), { rotates: V, points: $, ...J } = Yr({ ...i, curve: e, target: o, position: !0, rotate: !0, anchor: b, front: G, ts: O }), re = Xr({ curve: e, division: c, duration: C }), W = $.map((Y, ne) => {
1448
+ const C = Os(i, u), O = Xr(c), j = v[0], G = new D().setFromMatrixPosition(w[1]).negate().transformDirection(j).transformDirection(g), { rotates: V, points: $, ...J } = _r({ ...i, curve: e, target: o, position: !0, rotate: !0, anchor: b, front: G, ts: O }), re = Zr({ curve: e, division: c, duration: C }), W = $.map((Y, ne) => {
1449
1449
  const fe = V[ne], ie = new Q().compose(Y, fe, f);
1450
1450
  return ie.premultiply(p), ie;
1451
1451
  }), se = { points: $, rotates: V, matrixs: W }, K = [], L = W.map((Y) => (K.push(A.clone()), Y.clone().multiply(S))), q = O.length, U = e.getLengths(c).map((Y) => Y / u), _ = [{ rotates: K, us: U, matrixs: L }], z = n ? function(Y, ne, fe) {
@@ -1460,7 +1460,7 @@ function Kh(i) {
1460
1460
  distance: fe,
1461
1461
  fromU: ie,
1462
1462
  length: u,
1463
- side: qr.front,
1463
+ side: Kr.front,
1464
1464
  tolerance: l * fe
1465
1465
  });
1466
1466
  return { u: ee, point: kt ? Me : null };
@@ -1468,11 +1468,11 @@ function Kh(i) {
1468
1468
  for (let Y = 1; Y < H; Y++) {
1469
1469
  const ne = [], fe = [], ie = [], ee = [];
1470
1470
  _.push({ points: ne, rotates: fe, us: ie, matrixs: ee });
1471
- const Me = w[Y], kt = v[Y], gt = Y - 1, vn = _[gt], xn = w[gt], wn = v[gt], { matrixs: Ge, points: zt, rotates: Xt } = vn, Ve = new D(), Ze = new he(), Je = new D();
1472
- xn.decompose(Ve, Ze, Je);
1471
+ const Me = w[Y], kt = v[Y], gt = Y - 1, yn = _[gt], vn = w[gt], xn = v[gt], { matrixs: Ge, points: zt, rotates: Xt } = yn, Ve = new D(), Ze = new he(), Je = new D();
1472
+ vn.decompose(Ve, Ze, Je);
1473
1473
  const Pt = gt - 1, Zt = Pt < 0 ? W : _[Pt].matrixs, Ae = new D(), Ee = new he(), nt = new D();
1474
1474
  Me.decompose(Ae, Ee, nt);
1475
- const st = new D().setFromMatrixPosition(kt).sub(new D().setFromMatrixPosition(wn)).length(), Rt = Ae.length();
1475
+ const st = new D().setFromMatrixPosition(kt).sub(new D().setFromMatrixPosition(xn)).length(), Rt = Ae.length();
1476
1476
  for (let He = 0; He < q; He++) {
1477
1477
  const { point: Fe, u: rt } = z(gt, He, st);
1478
1478
  ie.push(rt), fe.push(Ee.clone());
@@ -1493,14 +1493,14 @@ function Kh(i) {
1493
1493
  Fe.applyMatrix4(At);
1494
1494
  const it = Fe.length();
1495
1495
  Fe.copy(Ae).multiplyScalar(it / Rt), ne.push(Fe);
1496
- const bn = new Q().compose(Fe, Ee, nt);
1496
+ const wn = new Q().compose(Fe, Ee, nt);
1497
1497
  if (Y === Z) {
1498
1498
  const $t = e.getTangentAt(rt);
1499
1499
  $t.negate().transformDirection(At);
1500
1500
  const en = new he().setFromUnitVectors(Fe.clone().normalize(), $t);
1501
- en.premultiply(Ee).normalize(), fe[He] = en, bn.compose(Fe, en, nt);
1501
+ en.premultiply(Ee).normalize(), fe[He] = en, wn.compose(Fe, en, nt);
1502
1502
  }
1503
- bn.premultiply(qe), ee.push(bn);
1503
+ wn.premultiply(qe), ee.push(wn);
1504
1504
  }
1505
1505
  }
1506
1506
  return { ...J, times: re, boneSampleDatas: _, targetSampleDatas: se, duration: C };
@@ -1550,7 +1550,7 @@ class Qh {
1550
1550
  }
1551
1551
  }
1552
1552
  var Yh = /* @__PURE__ */ ((i) => (i.keyframe = "keyframe", i.position = ".position", i.quaternion = ".quaternion", i.rotation = ".rotation", i.scale = ".scale", i.loop = "loop", i.finished = "finished", i.point = "point", i))(Yh || {});
1553
- const Mi = [
1553
+ const Ti = [
1554
1554
  "loop",
1555
1555
  "finished"
1556
1556
  /* finished */
@@ -1799,10 +1799,10 @@ class _h extends Qh {
1799
1799
  * @returns
1800
1800
  */
1801
1801
  addEventListener(e, t) {
1802
- const n = this.mixerListener, s = Mi.includes(e);
1802
+ const n = this.mixerListener, s = Ti.includes(e);
1803
1803
  s && !this.mixer.hasEventListener(e, n) && this.mixer.addEventListener(e, n);
1804
1804
  const r = this.frameEventNames.includes(e);
1805
- return s || r ? (this.event.addEventListener(e, t), r && !this._stopListenFun && this.enableFrameEvent && (this._stopListenFun = Vs(this.frameFun)), !0) : !1;
1805
+ return s || r ? (this.event.addEventListener(e, t), r && !this._stopListenFun && this.enableFrameEvent && (this._stopListenFun = Hs(this.frameFun)), !0) : !1;
1806
1806
  }
1807
1807
  /**
1808
1808
  * 移除事件监听器
@@ -1810,7 +1810,7 @@ class _h extends Qh {
1810
1810
  * @param listener
1811
1811
  */
1812
1812
  removeEventListener(e, t) {
1813
- if (Mi.includes(e) && this.getListeners(e).length === 1) {
1813
+ if (Ti.includes(e) && this.getListeners(e).length === 1) {
1814
1814
  const n = this.mixerListener;
1815
1815
  this.mixer.removeEventListener(e, n);
1816
1816
  }
@@ -1947,7 +1947,7 @@ class _h extends Qh {
1947
1947
  * 开始监听
1948
1948
  */
1949
1949
  startListen() {
1950
- this.stopListenFun || (this.stopListenFun = Vs(this.frameFun));
1950
+ this.stopListenFun || (this.stopListenFun = Hs(this.frameFun));
1951
1951
  }
1952
1952
  /**
1953
1953
  * 停止监听
@@ -1960,7 +1960,7 @@ class _h extends Qh {
1960
1960
  * 自动开始监听
1961
1961
  */
1962
1962
  autoStartListen() {
1963
- !this.stopListenFun && this.enableFrameEvent && this.hasListeners && (this.stopListenFun = Vs(this.frameFun));
1963
+ !this.stopListenFun && this.enableFrameEvent && this.hasListeners && (this.stopListenFun = Hs(this.frameFun));
1964
1964
  }
1965
1965
  /**
1966
1966
  * 获取所有的监听器
@@ -1992,7 +1992,7 @@ class _h extends Qh {
1992
1992
  this.stopListen(), n.removeEventListener("loop", s), n.removeEventListener("finished", s), this.event._listeners = null, !e && (t.stop(), t.reset(), n._deactivateAction(t), n._removeInactiveAction(t));
1993
1993
  }
1994
1994
  }
1995
- function Vs(i) {
1995
+ function Hs(i) {
1996
1996
  let e;
1997
1997
  const t = (n) => {
1998
1998
  i(n), e = requestAnimationFrame(t);
@@ -2098,7 +2098,7 @@ let _a = class extends Zh {
2098
2098
  }
2099
2099
  };
2100
2100
  ce(_a, "updateGUI", Ya);
2101
- function Sf(i) {
2101
+ function Mf(i) {
2102
2102
  const e = new _a(i);
2103
2103
  return new Proxy(e, {
2104
2104
  get: function(t, n, s) {
@@ -2549,7 +2549,7 @@ class Xa {
2549
2549
  }
2550
2550
  }
2551
2551
  ce(Xa, "options", tu);
2552
- class Mf extends Xa {
2552
+ class Tf extends Xa {
2553
2553
  constructor(e, t) {
2554
2554
  super(), ce(this, "_mixer"), ce(this, "_root", null), ce(this, "_action", null), this.mixer = e, this.root = t;
2555
2555
  }
@@ -2618,7 +2618,7 @@ function nu(i, e = 1) {
2618
2618
  return a == null || r - a <= e ? s.push(r) : (s = [r], n.push(s)), s;
2619
2619
  }, n[0]), n;
2620
2620
  }
2621
- function Tf(i, e) {
2621
+ function Pf(i, e) {
2622
2622
  let { count: t = 4, min: n = -1 / 0, max: s = 1 / 0 } = e ?? {};
2623
2623
  const r = i[0];
2624
2624
  n = Math.max(r - t + 1, n), s = Math.min(r + t - 1, s), t = Math.min(t, s - n + 1);
@@ -2677,10 +2677,10 @@ function ru(i) {
2677
2677
  function qn(i) {
2678
2678
  throw new Error('Could not dynamically require "' + i + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
2679
2679
  }
2680
- var Hs = { exports: {} };
2681
- var Ti;
2680
+ var Ws = { exports: {} };
2681
+ var Pi;
2682
2682
  function iu() {
2683
- return Ti || (Ti = 1, (function(i, e) {
2683
+ return Pi || (Pi = 1, (function(i, e) {
2684
2684
  (function(t) {
2685
2685
  i.exports = t();
2686
2686
  })(function() {
@@ -3365,7 +3365,7 @@ function iu() {
3365
3365
  });
3366
3366
  return d(y, m), y;
3367
3367
  }
3368
- function vn(m, x) {
3368
+ function yn(m, x) {
3369
3369
  x = g.apply(this, arguments);
3370
3370
  var y = this.config();
3371
3371
  m = typeof m != "function" && m || {}, m.name || (m.name = m.name || y.name, m.storeName = m.storeName || y.storeName);
@@ -3393,8 +3393,8 @@ function iu() {
3393
3393
  var ve = new h(function(xe, Ie) {
3394
3394
  var Te = l.open(m.name, B);
3395
3395
  Te.onerror = function(Ke) {
3396
- var Mn = Te.result;
3397
- Mn.close(), Ie(Ke);
3396
+ var Sn = Te.result;
3397
+ Sn.close(), Ie(Ke);
3398
3398
  }, Te.onupgradeneeded = function() {
3399
3399
  var Ke = Te.result;
3400
3400
  Ke.deleteObjectStore(m.storeName);
@@ -3448,7 +3448,7 @@ function iu() {
3448
3448
  }
3449
3449
  return d(P, x), P;
3450
3450
  }
3451
- var xn = {
3451
+ var vn = {
3452
3452
  _driver: "asyncStorage",
3453
3453
  _initStorage: Z,
3454
3454
  _support: c(),
@@ -3460,9 +3460,9 @@ function iu() {
3460
3460
  length: Me,
3461
3461
  key: kt,
3462
3462
  keys: gt,
3463
- dropInstance: vn
3463
+ dropInstance: yn
3464
3464
  };
3465
- function wn() {
3465
+ function xn() {
3466
3466
  return typeof openDatabase == "function";
3467
3467
  }
3468
3468
  var Ge = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", zt = "~~local_forage_type~", Xt = /^~~local_forage_type~([^~]+)~/, Ve = "__lfsc__:", Ze = Ve.length, Je = "arbf", Pt = "blob", Zt = "si08", Ae = "ui08", Ee = "uic8", nt = "si16", st = "si32", Rt = "ur16", He = "ui32", Fe = "fl32", rt = "fl64", qe = Ze + Je.length, Nt = Object.prototype.toString;
@@ -3575,7 +3575,7 @@ function iu() {
3575
3575
  }, M) : M(E, F);
3576
3576
  }, M);
3577
3577
  }
3578
- function bn(m, x) {
3578
+ function wn(m, x) {
3579
3579
  var y = this;
3580
3580
  m = p(m);
3581
3581
  var T = new h(function(P, M) {
@@ -3784,9 +3784,9 @@ function iu() {
3784
3784
  var ko = {
3785
3785
  _driver: "webSQLStorage",
3786
3786
  _initStorage: At,
3787
- _support: wn(),
3787
+ _support: xn(),
3788
3788
  iterate: $t,
3789
- getItem: bn,
3789
+ getItem: wn,
3790
3790
  setItem: Do,
3791
3791
  removeItem: Co,
3792
3792
  clear: Ao,
@@ -3803,7 +3803,7 @@ function iu() {
3803
3803
  return !1;
3804
3804
  }
3805
3805
  }
3806
- function oi(m, x) {
3806
+ function li(m, x) {
3807
3807
  var y = m.name + "/";
3808
3808
  return m.storeName !== x.storeName && (y += m.storeName + "/"), y;
3809
3809
  }
@@ -3823,7 +3823,7 @@ function iu() {
3823
3823
  if (m)
3824
3824
  for (var T in m)
3825
3825
  y[T] = m[T];
3826
- return y.keyPrefix = oi(m, x._defaultConfig), No() ? (x._dbInfo = y, y.serializer = yt, h.resolve()) : h.reject();
3826
+ return y.keyPrefix = li(m, x._defaultConfig), No() ? (x._dbInfo = y, y.serializer = yt, h.resolve()) : h.reject();
3827
3827
  }
3828
3828
  function Uo(m) {
3829
3829
  var x = this, y = x.ready().then(function() {
@@ -3922,7 +3922,7 @@ function iu() {
3922
3922
  }
3923
3923
  var T = this, P;
3924
3924
  return m.name ? P = new h(function(M) {
3925
- m.storeName ? M(oi(m, T._defaultConfig)) : M(m.name + "/");
3925
+ m.storeName ? M(li(m, T._defaultConfig)) : M(m.name + "/");
3926
3926
  }).then(function(M) {
3927
3927
  for (var E = localStorage.length - 1; E >= 0; E--) {
3928
3928
  var F = localStorage.key(E);
@@ -3952,13 +3952,13 @@ function iu() {
3952
3952
  P++;
3953
3953
  }
3954
3954
  return !1;
3955
- }, li = Array.isArray || function(m) {
3955
+ }, ci = Array.isArray || function(m) {
3956
3956
  return Object.prototype.toString.call(m) === "[object Array]";
3957
- }, Sn = {}, ci = {}, tn = {
3958
- INDEXEDDB: xn,
3957
+ }, bn = {}, hi = {}, tn = {
3958
+ INDEXEDDB: vn,
3959
3959
  WEBSQL: ko,
3960
3960
  LOCALSTORAGE: _o
3961
- }, Jo = [tn.INDEXEDDB._driver, tn.WEBSQL._driver, tn.LOCALSTORAGE._driver], Vn = ["dropInstance"], Bs = ["clear", "getItem", "iterate", "key", "keys", "length", "removeItem", "setItem"].concat(Vn), $o = {
3961
+ }, Jo = [tn.INDEXEDDB._driver, tn.WEBSQL._driver, tn.LOCALSTORAGE._driver], Vn = ["dropInstance"], ks = ["clear", "getItem", "iterate", "key", "keys", "length", "removeItem", "setItem"].concat(Vn), $o = {
3962
3962
  description: "",
3963
3963
  driver: Jo.slice(),
3964
3964
  name: "localforage",
@@ -3976,12 +3976,12 @@ function iu() {
3976
3976
  });
3977
3977
  };
3978
3978
  }
3979
- function ks() {
3979
+ function zs() {
3980
3980
  for (var m = 1; m < arguments.length; m++) {
3981
3981
  var x = arguments[m];
3982
3982
  if (x)
3983
3983
  for (var y in x)
3984
- x.hasOwnProperty(y) && (li(x[y]) ? arguments[0][y] = x[y].slice() : arguments[0][y] = x[y]);
3984
+ x.hasOwnProperty(y) && (ci(x[y]) ? arguments[0][y] = x[y].slice() : arguments[0][y] = x[y]);
3985
3985
  }
3986
3986
  return arguments[0];
3987
3987
  }
@@ -3991,9 +3991,9 @@ function iu() {
3991
3991
  for (var y in tn)
3992
3992
  if (tn.hasOwnProperty(y)) {
3993
3993
  var T = tn[y], P = T._driver;
3994
- this[y] = P, Sn[P] || this.defineDriver(T);
3994
+ this[y] = P, bn[P] || this.defineDriver(T);
3995
3995
  }
3996
- this._defaultConfig = ks({}, $o), this._config = ks({}, this._defaultConfig, x), this._driverSet = null, this._initDriver = null, this._ready = !1, this._dbInfo = null, this._wrapLibraryMethodsWithReady(), this.setDriver(this._config.driver).catch(function() {
3996
+ this._defaultConfig = zs({}, $o), this._config = zs({}, this._defaultConfig, x), this._driverSet = null, this._initDriver = null, this._ready = !1, this._dbInfo = null, this._wrapLibraryMethodsWithReady(), this.setDriver(this._config.driver).catch(function() {
3997
3997
  });
3998
3998
  }
3999
3999
  return m.prototype.config = function(y) {
@@ -4015,7 +4015,7 @@ function iu() {
4015
4015
  F(k);
4016
4016
  return;
4017
4017
  }
4018
- for (var N = Bs.concat("_initStorage"), X = 0, ue = N.length; X < ue; X++) {
4018
+ for (var N = ks.concat("_initStorage"), X = 0, ue = N.length; X < ue; X++) {
4019
4019
  var ve = N[X], xe = !Zo(Vn, ve);
4020
4020
  if ((xe || y[ve]) && typeof y[ve] != "function") {
4021
4021
  F(k);
@@ -4023,19 +4023,19 @@ function iu() {
4023
4023
  }
4024
4024
  }
4025
4025
  var Ie = function() {
4026
- for (var Mn = function(rl) {
4026
+ for (var Sn = function(rl) {
4027
4027
  return function() {
4028
- var il = new Error("Method " + rl + " is not implemented by the current driver"), hi = h.reject(il);
4029
- return d(hi, arguments[arguments.length - 1]), hi;
4028
+ var il = new Error("Method " + rl + " is not implemented by the current driver"), ui = h.reject(il);
4029
+ return d(ui, arguments[arguments.length - 1]), ui;
4030
4030
  };
4031
- }, zs = 0, sl = Vn.length; zs < sl; zs++) {
4032
- var Rs = Vn[zs];
4033
- y[Rs] || (y[Rs] = Mn(Rs));
4031
+ }, Rs = 0, sl = Vn.length; Rs < sl; Rs++) {
4032
+ var Ns = Vn[Rs];
4033
+ y[Ns] || (y[Ns] = Sn(Ns));
4034
4034
  }
4035
4035
  };
4036
4036
  Ie();
4037
- var Te = function(Mn) {
4038
- Sn[B] && console.info("Redefining LocalForage driver: " + B), Sn[B] = y, ci[B] = Mn, E();
4037
+ var Te = function(Sn) {
4038
+ bn[B] && console.info("Redefining LocalForage driver: " + B), bn[B] = y, hi[B] = Sn, E();
4039
4039
  };
4040
4040
  "_support" in y ? y._support && typeof y._support == "function" ? y._support().then(Te, F) : Te(!!y._support) : Te(!0);
4041
4041
  } catch (Ke) {
@@ -4046,7 +4046,7 @@ function iu() {
4046
4046
  }, m.prototype.driver = function() {
4047
4047
  return this._driver || null;
4048
4048
  }, m.prototype.getDriver = function(y, T, P) {
4049
- var M = Sn[y] ? h.resolve(Sn[y]) : h.reject(new Error("Driver not found."));
4049
+ var M = bn[y] ? h.resolve(bn[y]) : h.reject(new Error("Driver not found."));
4050
4050
  return f(M, T, P), M;
4051
4051
  }, m.prototype.getSerializer = function(y) {
4052
4052
  var T = h.resolve(yt);
@@ -4058,7 +4058,7 @@ function iu() {
4058
4058
  return f(P, y, y), P;
4059
4059
  }, m.prototype.setDriver = function(y, T, P) {
4060
4060
  var M = this;
4061
- li(y) || (y = [y]);
4061
+ ci(y) || (y = [y]);
4062
4062
  var E = this._getSupportedDrivers(y);
4063
4063
  function F() {
4064
4064
  M._config.driver = M.driver();
@@ -4095,9 +4095,9 @@ function iu() {
4095
4095
  return M._driverSet = h.reject(X), M._driverSet;
4096
4096
  }), f(this._driverSet, T, P), this._driverSet;
4097
4097
  }, m.prototype.supports = function(y) {
4098
- return !!ci[y];
4098
+ return !!hi[y];
4099
4099
  }, m.prototype._extend = function(y) {
4100
- ks(this, y);
4100
+ zs(this, y);
4101
4101
  }, m.prototype._getSupportedDrivers = function(y) {
4102
4102
  for (var T = [], P = 0, M = y.length; P < M; P++) {
4103
4103
  var E = y[P];
@@ -4105,8 +4105,8 @@ function iu() {
4105
4105
  }
4106
4106
  return T;
4107
4107
  }, m.prototype._wrapLibraryMethodsWithReady = function() {
4108
- for (var y = 0, T = Bs.length; y < T; y++)
4109
- el(this, Bs[y]);
4108
+ for (var y = 0, T = ks.length; y < T; y++)
4109
+ el(this, ks[y]);
4110
4110
  }, m.prototype.createInstance = function(y) {
4111
4111
  return new m(y);
4112
4112
  }, m;
@@ -4114,10 +4114,10 @@ function iu() {
4114
4114
  n.exports = nl;
4115
4115
  }, { 3: 3 }] }, {}, [4])(4);
4116
4116
  });
4117
- })(Hs)), Hs.exports;
4117
+ })(Ws)), Ws.exports;
4118
4118
  }
4119
4119
  var au = iu();
4120
- const xr = /* @__PURE__ */ su(au), Za = new ca();
4120
+ const wr = /* @__PURE__ */ su(au), Za = new ca();
4121
4121
  Za.name = "Scene";
4122
4122
  const ou = /* @__PURE__ */ new Set(["opacity", "highlight", "emissive"]);
4123
4123
  class lu {
@@ -4147,7 +4147,7 @@ class lu {
4147
4147
  /**
4148
4148
  * 线框
4149
4149
  */
4150
- strokeStore = xr.createInstance({
4150
+ strokeStore = wr.createInstance({
4151
4151
  name: "soonspace",
4152
4152
  storeName: "modelStrokeCache"
4153
4153
  });
@@ -4175,7 +4175,7 @@ class lu {
4175
4175
  e.traverse((s) => {
4176
4176
  if (s.geometry && s.material) {
4177
4177
  const h = s;
4178
- h.geometry.dispose(), mn(h.material, t);
4178
+ h.geometry.dispose(), fn(h.material, t);
4179
4179
  }
4180
4180
  s instanceof Ht && s.element?.remove();
4181
4181
  const { meshOfModelList: r, poiIconList: a, otherObjList: o } = this.intersectsList, l = r.findIndex(
@@ -4225,7 +4225,7 @@ class lu {
4225
4225
  const d = new Yt({
4226
4226
  id: `${h.sid ?? h.id}_stroke`,
4227
4227
  name: `${h.name}_stroke`
4228
- }), f = new cr(), p = new En({
4228
+ }), f = new hr(), p = new An({
4229
4229
  color: a,
4230
4230
  transparent: !0,
4231
4231
  opacity: o
@@ -4329,7 +4329,7 @@ class lu {
4329
4329
  duration: o = 1e3,
4330
4330
  yoyo: l = !1
4331
4331
  } = t;
4332
- (e instanceof Ue || e instanceof Fr || e instanceof wl) && (s && e.color.set(s), e.emissive.set(n), e.emissiveIntensity = r, o !== 0 && wt(
4332
+ (e instanceof Ue || e instanceof Br || e instanceof wl) && (s && e.color.set(s), e.emissive.set(n), e.emissiveIntensity = r, o !== 0 && wt(
4333
4333
  { emissiveIntensity: r },
4334
4334
  { emissiveIntensity: a },
4335
4335
  {
@@ -4342,14 +4342,14 @@ class lu {
4342
4342
  ));
4343
4343
  }
4344
4344
  _handleUnEmissive(e) {
4345
- e.userData.animation && pr.remove(e.userData.animation);
4345
+ e.userData.animation && (fr.remove(e.userData.animation), Reflect.deleteProperty(e.userData, "animation"));
4346
4346
  }
4347
4347
  _triggerObjectAdded(e) {
4348
4348
  e instanceof De ? e.stype === "Model" ? e.traverse((t) => {
4349
4349
  t instanceof we && this.intersectsList.meshOfModelList.findIndex(
4350
4350
  (s) => s.uuid === t.uuid
4351
4351
  ) === -1 && this.intersectsList.meshOfModelList.push(t);
4352
- }) : e.stype === "Poi" && e instanceof Fs ? this.intersectsList.poiIconList.findIndex(
4352
+ }) : e.stype === "Poi" && e instanceof Bs ? this.intersectsList.poiIconList.findIndex(
4353
4353
  (n) => n.uuid === e.icon?.uuid
4354
4354
  ) === -1 && e.icon && this.intersectsList.poiIconList.push(e.icon) : e.stype === "Group" ? e.children.forEach((t) => this._triggerObjectAdded(t)) : e.isObject3D && e.traverse((t) => {
4355
4355
  t instanceof we && this.intersectsList.otherObjList.findIndex(
@@ -4387,17 +4387,17 @@ class lu {
4387
4387
  }
4388
4388
  e.userData.material || (e.userData.material = e.material), e.material = Ia(e.userData.material);
4389
4389
  const r = Object.assign({}, ...s);
4390
- mn(e.material, (a) => this.updateMaterial(a, r));
4390
+ fn(e.material, (a) => this.updateMaterial(a, r));
4391
4391
  }
4392
4392
  }
4393
4393
  }
4394
- class Zr extends je {
4394
+ class Jr extends je {
4395
4395
  isCSS2DObject = !0;
4396
4396
  element;
4397
4397
  constructor(e = document.createElement("div")) {
4398
4398
  super(), this.element = e, this.element.style.position = "absolute", this.addEventListener("removed", () => {
4399
4399
  this.traverse(function(t) {
4400
- t instanceof Zr && t.element instanceof Element && t.element.parentNode !== null && t.element.parentNode.removeChild(t.element);
4400
+ t instanceof Jr && t.element instanceof Element && t.element.parentNode !== null && t.element.parentNode.removeChild(t.element);
4401
4401
  });
4402
4402
  });
4403
4403
  }
@@ -4405,7 +4405,7 @@ class Zr extends je {
4405
4405
  return super.copy(e, t), this.element = e.element.cloneNode(!0), this;
4406
4406
  }
4407
4407
  }
4408
- const sn = new D(), Pi = new Q(), Ii = new Q(), Di = new D(), Ci = new D();
4408
+ const sn = new D(), Ii = new Q(), Di = new Q(), Ci = new D(), Ai = new D();
4409
4409
  class cu {
4410
4410
  constructor(e) {
4411
4411
  this.viewport = e;
@@ -4419,17 +4419,17 @@ class cu {
4419
4419
  height: n
4420
4420
  };
4421
4421
  }, this.render = function(u, h) {
4422
- h.parent === null && h.matrixWorldAutoUpdate === !0 && h.updateMatrixWorld(), Pi.copy(h.matrixWorldInverse), Ii.multiplyMatrices(h.projectionMatrix, Pi);
4423
- const d = [...u].filter((f) => ei(f.elementType)).map((f) => f.children[0]);
4422
+ h.parent === null && h.matrixWorldAutoUpdate === !0 && h.updateMatrixWorld(), Ii.copy(h.matrixWorldInverse), Di.multiplyMatrices(h.projectionMatrix, Ii);
4423
+ const d = [...u].filter((f) => ti(f.elementType)).map((f) => f.children[0]);
4424
4424
  o(d, h), c(d);
4425
4425
  }, this.setSize = (u, h) => {
4426
4426
  t = u, n = h, s = t / 2, r = n / 2, this.domElement.style.width = u + "px", this.domElement.style.height = h + "px";
4427
4427
  };
4428
4428
  const o = (u, h) => {
4429
4429
  u.forEach((d) => {
4430
- Gr(d, this.viewport);
4430
+ Vr(d, this.viewport);
4431
4431
  const f = d.parent;
4432
- sn.setFromMatrixPosition(d.matrixWorld), sn.applyMatrix4(Ii);
4432
+ sn.setFromMatrixPosition(d.matrixWorld), sn.applyMatrix4(Di);
4433
4433
  const p = jn(d) && sn.z >= -1 && sn.z <= 1 && d.layers.test(h.layers) === !0;
4434
4434
  if (d.userData.prevVisible !== p && (f.onChange?.(p), f.elementAutoDisplay && (d.element.style.display = p === !0 ? "" : "none")), d.userData.prevVisible = p, p === !0 || f.elementAutoDisplay === !1) {
4435
4435
  const v = d.element;
@@ -4442,7 +4442,7 @@ class cu {
4442
4442
  });
4443
4443
  };
4444
4444
  function l(u, h) {
4445
- return Di.setFromMatrixPosition(u.matrixWorld), Ci.setFromMatrixPosition(h.matrixWorld), Di.distanceToSquared(Ci);
4445
+ return Ci.setFromMatrixPosition(u.matrixWorld), Ai.setFromMatrixPosition(h.matrixWorld), Ci.distanceToSquared(Ai);
4446
4446
  }
4447
4447
  function c(u) {
4448
4448
  const h = u.sort(function(f, p) {
@@ -4460,7 +4460,7 @@ class cu {
4460
4460
  render;
4461
4461
  setSize;
4462
4462
  }
4463
- const Ai = new D(), hu = new he(), Ei = new D();
4463
+ const Ei = new D(), hu = new he(), Oi = new D();
4464
4464
  class Un extends je {
4465
4465
  isCSS3DObject = !0;
4466
4466
  element;
@@ -4506,9 +4506,9 @@ class du {
4506
4506
  p.view && p.view.enabled ? (o.style.transform = `translate( ${-p.view.offsetX * (t / p.view.width)}px, ${-p.view.offsetY * (n / p.view.height)}px )`, o.style.transform += `scale( ${p.view.fullWidth / p.view.width}, ${p.view.fullHeight / p.view.height} )`) : o.style.transform = "", p.parent === null && p.matrixWorldAutoUpdate === !0 && p.updateMatrixWorld();
4507
4507
  let v = 0, w = 0;
4508
4508
  p instanceof Qt && (v = -(p.right + p.left) / 2, w = (p.top + p.bottom) / 2);
4509
- const S = p.view && p.view.enabled ? p.view.height / p.view.fullHeight : 1, b = p instanceof Qt ? `scale( ${S} )scale(` + g + ")translate(" + c(v) + "px," + c(w) + "px)" + u(p.matrixWorldInverse) : `scale( ${S} )translateZ(` + g + "px)" + u(p.matrixWorldInverse), I = (p instanceof Ps ? "perspective(" + g + "px) " : "") + b + "translate(" + s + "px," + r + "px)";
4509
+ const S = p.view && p.view.enabled ? p.view.height / p.view.fullHeight : 1, b = p instanceof Qt ? `scale( ${S} )scale(` + g + ")translate(" + c(v) + "px," + c(w) + "px)" + u(p.matrixWorldInverse) : `scale( ${S} )translateZ(` + g + "px)" + u(p.matrixWorldInverse), I = (p instanceof Is ? "perspective(" + g + "px) " : "") + b + "translate(" + s + "px," + r + "px)";
4510
4510
  a.camera.style !== I && (l.style.transform = I, a.camera.style = I);
4511
- const C = [...f].filter((O) => ti(O.elementType) || ni(O.elementType)).map((O) => O.children[0]);
4511
+ const C = [...f].filter((O) => ni(O.elementType) || si(O.elementType)).map((O) => O.children[0]);
4512
4512
  d(C, p);
4513
4513
  }, this.setSize = (f, p) => {
4514
4514
  t = f, n = p, s = t / 2, r = n / 2, this.domElement.style.width = f + "px", this.domElement.style.height = p + "px", o.style.width = f + "px", o.style.height = p + "px", l.style.width = f + "px", l.style.height = p + "px";
@@ -4527,11 +4527,11 @@ class du {
4527
4527
  const d = (f, p) => {
4528
4528
  f.forEach((g) => {
4529
4529
  if (g instanceof Un) {
4530
- Gr(g, this.viewport);
4530
+ Vr(g, this.viewport);
4531
4531
  const v = g.parent, w = jn(g) && g.layers.test(p.layers) === !0;
4532
4532
  if (g.userData.prevVisible !== w && (v.onChange?.(w), v.elementAutoDisplay && (g.element.style.display = w === !0 ? "" : "none")), g.userData.prevVisible = w, w === !0 || v.elementAutoDisplay === !1) {
4533
4533
  let S;
4534
- g instanceof Ja ? (lt.copy(p.matrixWorldInverse), lt.transpose(), g.rotation2D !== 0 && lt.multiply(uu.makeRotationZ(g.rotation2D)), g.matrixWorld.decompose(Ai, hu, Ei), lt.setPosition(Ai), lt.scale(Ei), lt.elements[3] = 0, lt.elements[7] = 0, lt.elements[11] = 0, lt.elements[15] = 1, S = h(lt)) : S = h(g.matrixWorld);
4534
+ g instanceof Ja ? (lt.copy(p.matrixWorldInverse), lt.transpose(), g.rotation2D !== 0 && lt.multiply(uu.makeRotationZ(g.rotation2D)), g.matrixWorld.decompose(Ei, hu, Oi), lt.setPosition(Ei), lt.scale(Oi), lt.elements[3] = 0, lt.elements[7] = 0, lt.elements[11] = 0, lt.elements[15] = 1, S = h(lt)) : S = h(g.matrixWorld);
4535
4535
  const b = g.element, A = a.objects.get(g);
4536
4536
  if (A === void 0 || A.style !== S) {
4537
4537
  b.style.transform = S;
@@ -4593,12 +4593,12 @@ class mu {
4593
4593
  return this.rendererCSS3D.domElement;
4594
4594
  }
4595
4595
  }
4596
- const Ws = new Q(), yn = (i, e) => {
4597
- const t = Ws.clone(), n = Ws.clone(), s = Ws.clone();
4596
+ const qs = new Q(), gn = (i, e) => {
4597
+ const t = qs.clone(), n = qs.clone(), s = qs.clone();
4598
4598
  t.makeRotationY(i), n.makeRotationX(e);
4599
4599
  const r = new pe();
4600
4600
  return s.multiplyMatrices(t, n), r.setFromRotationMatrix(s), r;
4601
- }, qs = yn(-Math.PI / 2, -Math.PI / 4), Ks = yn(Math.PI / 2, -Math.PI / 4), Qs = yn(-Math.PI / 4, -Math.PI / 4), Ys = yn(Math.PI / 4, -Math.PI / 4), _s = yn(Math.PI * 1.25, -Math.PI / 4), Xs = yn(Math.PI * 0.75, -Math.PI / 4), Zs = {
4601
+ }, Ks = gn(-Math.PI / 2, -Math.PI / 4), Qs = gn(Math.PI / 2, -Math.PI / 4), Ys = gn(-Math.PI / 4, -Math.PI / 4), _s = gn(Math.PI / 4, -Math.PI / 4), Xs = gn(Math.PI * 1.25, -Math.PI / 4), Zs = gn(Math.PI * 0.75, -Math.PI / 4), Js = {
4602
4602
  LEFT: new pe(0, -Math.PI / 2, 0),
4603
4603
  RIGHT: new pe(0, Math.PI / 2, 0),
4604
4604
  FRONT: new pe(0, 0, 0),
@@ -4607,12 +4607,12 @@ const Ws = new Q(), yn = (i, e) => {
4607
4607
  BOTTOM: new pe(Math.PI / 2, 0, 0),
4608
4608
  FRONTTOP: new pe(-Math.PI / 4, 0, 0),
4609
4609
  BACKTOP: new pe(Math.PI / 4, Math.PI, 0),
4610
- LEFTTOP: new pe(qs.x, qs.y, qs.z),
4611
- RIGHTTOP: new pe(Ks.x, Ks.y, Ks.z),
4612
- LEFTFRONTTOP: new pe(Qs.x, Qs.y, Qs.z),
4613
- RIGHTFRONTTOP: new pe(Ys.x, Ys.y, Ys.z),
4614
- LEFTBACKTOP: new pe(_s.x, _s.y, _s.z),
4615
- RIGHTBACKTOP: new pe(Xs.x, Xs.y, Xs.z)
4610
+ LEFTTOP: new pe(Ks.x, Ks.y, Ks.z),
4611
+ RIGHTTOP: new pe(Qs.x, Qs.y, Qs.z),
4612
+ LEFTFRONTTOP: new pe(Ys.x, Ys.y, Ys.z),
4613
+ RIGHTFRONTTOP: new pe(_s.x, _s.y, _s.z),
4614
+ LEFTBACKTOP: new pe(Xs.x, Xs.y, Xs.z),
4615
+ RIGHTBACKTOP: new pe(Zs.x, Zs.y, Zs.z)
4616
4616
  }, $a = {
4617
4617
  LEFT: new Be(0, Math.PI / 2, -Math.PI / 2),
4618
4618
  RIGHT: new Be(0, Math.PI / 2, Math.PI / 2),
@@ -4628,13 +4628,13 @@ const Ws = new Q(), yn = (i, e) => {
4628
4628
  RIGHTFRONTTOP: new Be(0, Math.PI / 4, Math.PI / 4),
4629
4629
  LEFTBACKTOP: new Be(0, Math.PI / 4, -Math.PI / 4 * 3),
4630
4630
  RIGHTBACKTOP: new Be(0, Math.PI / 4, Math.PI / 4 * 3)
4631
- }, gu = (i) => Xe(i) ? i : i.includes("%") ? Number(i.split("%")[0]) * 0.01 : isNaN(+i) ? 0 : Number(i), ct = /* @__PURE__ */ new D(), Tn = /* @__PURE__ */ new pe(), Vt = new Ps(50, 1, 0.1, 1 * 1e6);
4631
+ }, gu = (i) => Xe(i) ? i : i.includes("%") ? Number(i.split("%")[0]) * 0.01 : isNaN(+i) ? 0 : Number(i), ct = /* @__PURE__ */ new D(), Mn = /* @__PURE__ */ new pe(), Vt = new Is(50, 1, 0.1, 1 * 1e6);
4632
4632
  Vt.position.set(500, 1e3, 500);
4633
4633
  Vt.lookAt(ct.set(0, 0, 0));
4634
4634
  Vt.name = "SspCamera";
4635
- const Jr = new Qt(-500, 500, 500, -500, 0.01, 5e4);
4636
- Jr.position.set(500, 1e3, 500);
4637
- Jr.lookAt(ct.set(0, 0, 0));
4635
+ const $r = new Qt(-500, 500, 500, -500, 0.01, 5e4);
4636
+ $r.position.set(500, 1e3, 500);
4637
+ $r.lookAt(ct.set(0, 0, 0));
4638
4638
  Vt.name = "SspCamera";
4639
4639
  class yu {
4640
4640
  viewport;
@@ -4667,9 +4667,9 @@ class yu {
4667
4667
  async setCamera(e, t, n) {
4668
4668
  let s = Vt.clone();
4669
4669
  const r = e === "orthographic";
4670
- if (r && (s = Jr.clone()), this.mainCamera.type !== s.type) {
4670
+ if (r && (s = $r.clone()), this.mainCamera.type !== s.type) {
4671
4671
  const { controls: a } = this.viewport;
4672
- this.mainCamera = a.camera = s, r ? a.mouseButtons.wheel = On.ACTION.ZOOM : (a.mouseButtons.wheel = On.ACTION.DOLLY, a.zoomTo(1)), this.setCurrentCamera(s);
4672
+ this.mainCamera = a.camera = s, r ? a.mouseButtons.wheel = En.ACTION.ZOOM : (a.mouseButtons.wheel = En.ACTION.DOLLY, a.zoomTo(1)), this.setCurrentCamera(s);
4673
4673
  }
4674
4674
  t && await this.setCameraViewpoint(t, n);
4675
4675
  }
@@ -4698,15 +4698,15 @@ class yu {
4698
4698
  const { enableTransition: s = !0 } = n;
4699
4699
  if (Bt(t)) {
4700
4700
  const r = t.toLocaleUpperCase();
4701
- r === "CURRENT" ? Tn.copy(this.currentCamera.rotation) : Zs[r] && Tn.copy(Zs[r]);
4702
- } else t instanceof pe ? Tn.copy(t) : Ne(t) && Tn.set(t.x, t.y, t.z);
4703
- return this.setCameraViewpoint({ position: e, rotation: Tn }, s);
4701
+ r === "CURRENT" ? Mn.copy(this.currentCamera.rotation) : Js[r] && Mn.copy(Js[r]);
4702
+ } else t instanceof pe ? Mn.copy(t) : Ne(t) && Mn.set(t.x, t.y, t.z);
4703
+ return this.setCameraViewpoint({ position: e, rotation: Mn }, s);
4704
4704
  }
4705
4705
  async flyToObj(e, t = "frontTop", n = {}) {
4706
4706
  let { padding: s = "30%" } = n;
4707
4707
  const { enableTransition: r = !0, viewpointSpace: a = "world", minPadding: o = 1 } = n;
4708
4708
  e instanceof Ht && (s = n.padding ?? 50);
4709
- const l = e instanceof je ? fn(e) : e, c = l.getSize(ct);
4709
+ const l = e instanceof je ? pn(e) : e, c = l.getSize(ct);
4710
4710
  if (Bt(s)) {
4711
4711
  const d = Math.max(c.x, c.y, c.z, o);
4712
4712
  s = gu(s) * d;
@@ -4723,7 +4723,7 @@ class yu {
4723
4723
  }
4724
4724
  h.push(u.rotateTo(f, p, r));
4725
4725
  } else {
4726
- const d = new Is();
4726
+ const d = new Ds();
4727
4727
  l.getBoundingSphere(d), h.push(u.fitToSphere(d, r));
4728
4728
  }
4729
4729
  await Promise.all(h);
@@ -4732,10 +4732,10 @@ class yu {
4732
4732
  const { duration: n = 3e3, startAngle: s = 0, endAngle: r = 360, onStart: a } = t, o = be(e), { controls: l } = this.viewport;
4733
4733
  return l.setTarget(o.x, o.y, o.z), wt(
4734
4734
  {
4735
- radian: Fn(s)
4735
+ radian: Ln(s)
4736
4736
  },
4737
4737
  {
4738
- radian: Fn(r)
4738
+ radian: Ln(r)
4739
4739
  },
4740
4740
  {
4741
4741
  duration: n
@@ -4747,7 +4747,7 @@ class yu {
4747
4747
  );
4748
4748
  }
4749
4749
  surroundOnObject(e, t = {}) {
4750
- const n = fn(e).getCenter(ct);
4750
+ const n = pn(e).getCenter(ct);
4751
4751
  return this.surroundOnTarget(n, t);
4752
4752
  }
4753
4753
  getObjectLabelPos(e, t = "frontTop", n = {}) {
@@ -4760,7 +4760,7 @@ class yu {
4760
4760
  c.add(d.multiplyScalar(p));
4761
4761
  };
4762
4762
  let h;
4763
- return Bt(t) ? h = Zs[t.toLocaleUpperCase()] : h = zr(t), u(ct.set(0, 0, 1).applyEuler(h)), c;
4763
+ return Bt(t) ? h = Js[t.toLocaleUpperCase()] : h = Rr(t), u(ct.set(0, 0, 1).applyEuler(h)), c;
4764
4764
  } else return r === "screen" ? e.getCenter(ct).clone() : new D();
4765
4765
  }
4766
4766
  }
@@ -4781,7 +4781,7 @@ Gn.setAttribute("uv", new $e(new Float32Array([
4781
4781
  0,
4782
4782
  2
4783
4783
  ]), 2));
4784
- Gn.boundingSphere = new Is();
4784
+ Gn.boundingSphere = new Ds();
4785
4785
  Gn.computeBoundingSphere = function() {
4786
4786
  };
4787
4787
  const vu = new Qt();
@@ -6137,7 +6137,7 @@ class Iu extends pc {
6137
6137
  }
6138
6138
  }
6139
6139
  Uint8Array.from(atob(eo), (i) => i.charCodeAt(0));
6140
- const Js = "Ssp-EffectPass";
6140
+ const $s = "Ssp-EffectPass";
6141
6141
  class _e {
6142
6142
  constructor(e, t, n) {
6143
6143
  this.renderer = e, this.scene = t, this.camera = n, this.effectComposer = this._initEffectComposer(), this._initPasses(), this._initEffects();
@@ -6162,10 +6162,10 @@ class _e {
6162
6162
  updateEffectPass() {
6163
6163
  if (!this.effectsNeedsUpdate) return;
6164
6164
  this.effectsNeedsUpdate = !1;
6165
- const { effectComposer: e } = this, t = e.passes.find((r) => r.name === Js);
6165
+ const { effectComposer: e } = this, t = e.passes.find((r) => r.name === $s);
6166
6166
  t && (e.removePass(t), t.dispose());
6167
- const n = Array.from(this.effectsMap).filter(([, { enabled: r }]) => r).map(([, { effect: r }]) => r), s = new yi(this.camera, ...n);
6168
- s.name = Js, s.enabled = !!n.length, this.passesMap.set(_e.CONSTANTS.effectPass, s), e.addPass(s);
6167
+ const n = Array.from(this.effectsMap).filter(([, { enabled: r }]) => r).map(([, { effect: r }]) => r), s = new vi(this.camera, ...n);
6168
+ s.name = $s, s.enabled = !!n.length, this.passesMap.set(_e.CONSTANTS.effectPass, s), e.addPass(s);
6169
6169
  }
6170
6170
  /**
6171
6171
  * 更新 camera
@@ -6197,8 +6197,8 @@ class _e {
6197
6197
  return e.enabled = !1, e.configuration.gammaCorrection = !1, e;
6198
6198
  }
6199
6199
  _initEffectPass() {
6200
- const e = new yi(this.camera);
6201
- return e.name = Js, e;
6200
+ const e = new vi(this.camera);
6201
+ return e.name = $s, e;
6202
6202
  }
6203
6203
  _initEffects() {
6204
6204
  const { CONSTANTS: e } = _e, t = this._initSMAAEffect(), n = this._initToneMappingEffect(), s = this._initOutlineEffect(), r = this._initBloomEffect();
@@ -6223,12 +6223,12 @@ class _e {
6223
6223
  }
6224
6224
  _initBloomEffect() {
6225
6225
  return new bc({
6226
- blendFunction: vi.ADD
6226
+ blendFunction: xi.ADD
6227
6227
  });
6228
6228
  }
6229
6229
  _initOutlineEffect() {
6230
6230
  return new Sc(this.scene, this.camera, {
6231
- blendFunction: vi.SCREEN
6231
+ blendFunction: xi.SCREEN
6232
6232
  });
6233
6233
  }
6234
6234
  }
@@ -6330,11 +6330,11 @@ class Eu {
6330
6330
  });
6331
6331
  }
6332
6332
  dispose() {
6333
- this.computedGeometriesUuid.clear(), this.generateMeshBVHWorker.dispose();
6333
+ this.timer && clearTimeout(this.timer), this.timer = null, this.computedGeometriesUuid.clear(), this.generateMeshBVHWorker.dispose();
6334
6334
  }
6335
6335
  }
6336
- On.install({ THREE: An });
6337
- class Ou extends On {
6336
+ En.install({ THREE: Cn });
6337
+ class Ou extends En {
6338
6338
  constructor(e) {
6339
6339
  super(e.cameraManager.mainCamera, e.interactiveContainer), this.viewport = e;
6340
6340
  }
@@ -6348,28 +6348,28 @@ class Ou extends On {
6348
6348
  }
6349
6349
  }
6350
6350
  var Le = {}, Kn = {};
6351
- var wr = function(i, e) {
6352
- return wr = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) {
6351
+ var br = function(i, e) {
6352
+ return br = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) {
6353
6353
  t.__proto__ = n;
6354
6354
  } || function(t, n) {
6355
6355
  for (var s in n) n.hasOwnProperty(s) && (t[s] = n[s]);
6356
- }, wr(i, e);
6356
+ }, br(i, e);
6357
6357
  };
6358
6358
  function Lu(i, e) {
6359
- wr(i, e);
6359
+ br(i, e);
6360
6360
  function t() {
6361
6361
  this.constructor = i;
6362
6362
  }
6363
6363
  i.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
6364
6364
  }
6365
- var br = function() {
6366
- return br = Object.assign || function(e) {
6365
+ var Sr = function() {
6366
+ return Sr = Object.assign || function(e) {
6367
6367
  for (var t, n = 1, s = arguments.length; n < s; n++) {
6368
6368
  t = arguments[n];
6369
6369
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
6370
6370
  }
6371
6371
  return e;
6372
- }, br.apply(this, arguments);
6372
+ }, Sr.apply(this, arguments);
6373
6373
  };
6374
6374
  function Fu(i, e) {
6375
6375
  var t = {};
@@ -6486,7 +6486,7 @@ function ju(i, e, t, n) {
6486
6486
  function Uu(i, e) {
6487
6487
  for (var t in i) t !== "default" && !e.hasOwnProperty(t) && (e[t] = i[t]);
6488
6488
  }
6489
- function Sr(i) {
6489
+ function Mr(i) {
6490
6490
  var e = typeof Symbol == "function" && Symbol.iterator, t = e && i[e], n = 0;
6491
6491
  if (t) return t.call(i);
6492
6492
  if (i && typeof i.length == "number") return {
@@ -6525,8 +6525,8 @@ function Vu() {
6525
6525
  n[s] = r[a];
6526
6526
  return n;
6527
6527
  }
6528
- function Rn(i) {
6529
- return this instanceof Rn ? (this.v = i, this) : new Rn(i);
6528
+ function zn(i) {
6529
+ return this instanceof zn ? (this.v = i, this) : new zn(i);
6530
6530
  }
6531
6531
  function Hu(i, e, t) {
6532
6532
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
@@ -6549,7 +6549,7 @@ function Hu(i, e, t) {
6549
6549
  }
6550
6550
  }
6551
6551
  function l(d) {
6552
- d.value instanceof Rn ? Promise.resolve(d.value.v).then(c, u) : h(r[0][2], d);
6552
+ d.value instanceof zn ? Promise.resolve(d.value.v).then(c, u) : h(r[0][2], d);
6553
6553
  }
6554
6554
  function c(d) {
6555
6555
  o("next", d);
@@ -6570,14 +6570,14 @@ function Wu(i) {
6570
6570
  }, e;
6571
6571
  function n(s, r) {
6572
6572
  e[s] = i[s] ? function(a) {
6573
- return (t = !t) ? { value: Rn(i[s](a)), done: s === "return" } : r ? r(a) : a;
6573
+ return (t = !t) ? { value: zn(i[s](a)), done: s === "return" } : r ? r(a) : a;
6574
6574
  } : r;
6575
6575
  }
6576
6576
  }
6577
6577
  function qu(i) {
6578
6578
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
6579
6579
  var e = i[Symbol.asyncIterator], t;
6580
- return e ? e.call(i) : (i = typeof Sr == "function" ? Sr(i) : i[Symbol.iterator](), t = {}, n("next"), n("throw"), n("return"), t[Symbol.asyncIterator] = function() {
6580
+ return e ? e.call(i) : (i = typeof Mr == "function" ? Mr(i) : i[Symbol.iterator](), t = {}, n("next"), n("throw"), n("return"), t[Symbol.asyncIterator] = function() {
6581
6581
  return this;
6582
6582
  }, t);
6583
6583
  function n(r) {
@@ -6618,12 +6618,12 @@ function Xu(i, e, t) {
6618
6618
  const Zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6619
6619
  __proto__: null,
6620
6620
  get __assign() {
6621
- return br;
6621
+ return Sr;
6622
6622
  },
6623
6623
  __asyncDelegator: Wu,
6624
6624
  __asyncGenerator: Hu,
6625
6625
  __asyncValues: qu,
6626
- __await: Rn,
6626
+ __await: zn,
6627
6627
  __awaiter: Ru,
6628
6628
  __classPrivateFieldGet: _u,
6629
6629
  __classPrivateFieldSet: Xu,
@@ -6641,12 +6641,12 @@ const Zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6641
6641
  __rest: Fu,
6642
6642
  __spread: Gu,
6643
6643
  __spreadArrays: Vu,
6644
- __values: Sr
6645
- }, Symbol.toStringTag, { value: "Module" })), Os = /* @__PURE__ */ ru(Zu);
6646
- var Qn = {}, Yn = {}, _n = {}, Xn = {}, Oi;
6644
+ __values: Mr
6645
+ }, Symbol.toStringTag, { value: "Module" })), Ls = /* @__PURE__ */ ru(Zu);
6646
+ var Qn = {}, Yn = {}, _n = {}, Xn = {}, Li;
6647
6647
  function so() {
6648
- if (Oi) return Xn;
6649
- Oi = 1, Object.defineProperty(Xn, "__esModule", { value: !0 });
6648
+ if (Li) return Xn;
6649
+ Li = 1, Object.defineProperty(Xn, "__esModule", { value: !0 });
6650
6650
  var i = (
6651
6651
  /** @class */
6652
6652
  (function() {
@@ -6737,10 +6737,10 @@ function so() {
6737
6737
  );
6738
6738
  return Xn.SlotList = i, Xn;
6739
6739
  }
6740
- var Zn = {}, Li;
6741
- function Ls() {
6742
- if (Li) return Zn;
6743
- Li = 1, Object.defineProperty(Zn, "__esModule", { value: !0 });
6740
+ var Zn = {}, Fi;
6741
+ function Fs() {
6742
+ if (Fi) return Zn;
6743
+ Fi = 1, Object.defineProperty(Zn, "__esModule", { value: !0 });
6744
6744
  var i = (
6745
6745
  /** @class */
6746
6746
  (function() {
@@ -6842,11 +6842,11 @@ Did you want to set enabled to false instead?`);
6842
6842
  );
6843
6843
  return Zn.Slot = i, Zn;
6844
6844
  }
6845
- var Fi;
6846
- function $r() {
6847
- if (Fi) return _n;
6848
- Fi = 1, Object.defineProperty(_n, "__esModule", { value: !0 });
6849
- var i = so(), e = Ls(), t = (
6845
+ var Bi;
6846
+ function ei() {
6847
+ if (Bi) return _n;
6848
+ Bi = 1, Object.defineProperty(_n, "__esModule", { value: !0 });
6849
+ var i = so(), e = Fs(), t = (
6850
6850
  /** @class */
6851
6851
  (function() {
6852
6852
  function n() {
@@ -6918,11 +6918,11 @@ function $r() {
6918
6918
  );
6919
6919
  return _n.OnceSignal = t, _n;
6920
6920
  }
6921
- var Bi;
6921
+ var ki;
6922
6922
  function ro() {
6923
- if (Bi) return Yn;
6924
- Bi = 1, Object.defineProperty(Yn, "__esModule", { value: !0 });
6925
- var i = Os, e = $r(), t = (
6923
+ if (ki) return Yn;
6924
+ ki = 1, Object.defineProperty(Yn, "__esModule", { value: !0 });
6925
+ var i = Ls, e = ei(), t = (
6926
6926
  /** @class */
6927
6927
  (function(n) {
6928
6928
  i.__extends(s, n);
@@ -6936,11 +6936,11 @@ function ro() {
6936
6936
  );
6937
6937
  return Yn.Signal = t, Yn;
6938
6938
  }
6939
- var ki;
6939
+ var zi;
6940
6940
  function io() {
6941
- if (ki) return Qn;
6942
- ki = 1, Object.defineProperty(Qn, "__esModule", { value: !0 });
6943
- var i = Os, e = ro(), t = Ls(), n = (
6941
+ if (zi) return Qn;
6942
+ zi = 1, Object.defineProperty(Qn, "__esModule", { value: !0 });
6943
+ var i = Ls, e = ro(), t = Fs(), n = (
6944
6944
  /** @class */
6945
6945
  (function(s) {
6946
6946
  i.__extends(r, s);
@@ -6964,11 +6964,11 @@ function io() {
6964
6964
  );
6965
6965
  return Qn.PrioritySignal = n, Qn;
6966
6966
  }
6967
- var zi;
6967
+ var Ri;
6968
6968
  function Ju() {
6969
- if (zi) return Kn;
6970
- zi = 1, Object.defineProperty(Kn, "__esModule", { value: !0 });
6971
- var i = Os, e = io(), t = (
6969
+ if (Ri) return Kn;
6970
+ Ri = 1, Object.defineProperty(Kn, "__esModule", { value: !0 });
6971
+ var i = Ls, e = io(), t = (
6972
6972
  /** @class */
6973
6973
  (function(n) {
6974
6974
  i.__extends(s, n);
@@ -7010,10 +7010,10 @@ function Ju() {
7010
7010
  );
7011
7011
  return Kn.DeluxeSignal = t, Kn;
7012
7012
  }
7013
- var Jn = {}, Ri;
7013
+ var Jn = {}, Ni;
7014
7014
  function $u() {
7015
- if (Ri) return Jn;
7016
- Ri = 1, Object.defineProperty(Jn, "__esModule", { value: !0 });
7015
+ if (Ni) return Jn;
7016
+ Ni = 1, Object.defineProperty(Jn, "__esModule", { value: !0 });
7017
7017
  var i = (
7018
7018
  /** @class */
7019
7019
  (function() {
@@ -7067,27 +7067,27 @@ function $u() {
7067
7067
  );
7068
7068
  return Jn.GenericEvent = i, Jn;
7069
7069
  }
7070
- var $n = {}, Ni;
7070
+ var $n = {}, ji;
7071
7071
  function ed() {
7072
- return Ni || (Ni = 1, Object.defineProperty($n, "__esModule", { value: !0 }), $n.IOnceSignal = /* @__PURE__ */ Symbol("IOnceSignal")), $n;
7072
+ return ji || (ji = 1, Object.defineProperty($n, "__esModule", { value: !0 }), $n.IOnceSignal = /* @__PURE__ */ Symbol("IOnceSignal")), $n;
7073
7073
  }
7074
- var es = {}, ji;
7074
+ var es = {}, Ui;
7075
7075
  function td() {
7076
- return ji || (ji = 1, Object.defineProperty(es, "__esModule", { value: !0 }), es.IPrioritySignal = /* @__PURE__ */ Symbol("IPrioritySignal")), es;
7076
+ return Ui || (Ui = 1, Object.defineProperty(es, "__esModule", { value: !0 }), es.IPrioritySignal = /* @__PURE__ */ Symbol("IPrioritySignal")), es;
7077
7077
  }
7078
- var ts = {}, Ui;
7078
+ var ts = {}, Gi;
7079
7079
  function nd() {
7080
- return Ui || (Ui = 1, Object.defineProperty(ts, "__esModule", { value: !0 }), ts.ISignal = /* @__PURE__ */ Symbol("ISignal")), ts;
7080
+ return Gi || (Gi = 1, Object.defineProperty(ts, "__esModule", { value: !0 }), ts.ISignal = /* @__PURE__ */ Symbol("ISignal")), ts;
7081
7081
  }
7082
- var ns = {}, Gi;
7082
+ var ns = {}, Vi;
7083
7083
  function sd() {
7084
- return Gi || (Gi = 1, Object.defineProperty(ns, "__esModule", { value: !0 }), ns.ISlot = /* @__PURE__ */ Symbol("ISlot")), ns;
7084
+ return Vi || (Vi = 1, Object.defineProperty(ns, "__esModule", { value: !0 }), ns.ISlot = /* @__PURE__ */ Symbol("ISlot")), ns;
7085
7085
  }
7086
- var ss = {}, Vi;
7086
+ var ss = {}, Hi;
7087
7087
  function rd() {
7088
- if (Vi) return ss;
7089
- Vi = 1, Object.defineProperty(ss, "__esModule", { value: !0 });
7090
- var i = Ls(), e = (
7088
+ if (Hi) return ss;
7089
+ Hi = 1, Object.defineProperty(ss, "__esModule", { value: !0 });
7090
+ var i = Fs(), e = (
7091
7091
  /** @class */
7092
7092
  (function() {
7093
7093
  function t() {
@@ -7150,11 +7150,11 @@ function rd() {
7150
7150
  );
7151
7151
  return ss.MonoSignal = e, ss;
7152
7152
  }
7153
- var rs = {}, Hi;
7153
+ var rs = {}, Wi;
7154
7154
  function id() {
7155
- if (Hi) return rs;
7156
- Hi = 1, Object.defineProperty(rs, "__esModule", { value: !0 });
7157
- var i = Os, e = $r(), t = (
7155
+ if (Wi) return rs;
7156
+ Wi = 1, Object.defineProperty(rs, "__esModule", { value: !0 });
7157
+ var i = Ls, e = ei(), t = (
7158
7158
  /** @class */
7159
7159
  (function(n) {
7160
7160
  i.__extends(s, n);
@@ -7175,10 +7175,10 @@ function id() {
7175
7175
  );
7176
7176
  return rs.Promise = t, rs;
7177
7177
  }
7178
- var Wi;
7178
+ var qi;
7179
7179
  function ad() {
7180
- if (Wi) return Le;
7181
- Wi = 1, Object.defineProperty(Le, "__esModule", { value: !0 });
7180
+ if (qi) return Le;
7181
+ qi = 1, Object.defineProperty(Le, "__esModule", { value: !0 });
7182
7182
  var i = Ju();
7183
7183
  Le.DeluxeSignal = i.DeluxeSignal;
7184
7184
  var e = $u();
@@ -7193,7 +7193,7 @@ function ad() {
7193
7193
  Le.ISlot = r.ISlot;
7194
7194
  var a = rd();
7195
7195
  Le.MonoSignal = a.MonoSignal;
7196
- var o = $r();
7196
+ var o = ei();
7197
7197
  Le.OnceSignal = o.OnceSignal;
7198
7198
  var l = io();
7199
7199
  Le.PrioritySignal = l.PrioritySignal;
@@ -7201,19 +7201,24 @@ function ad() {
7201
7201
  Le.Promise = c.Promise;
7202
7202
  var u = ro();
7203
7203
  Le.Signal = u.Signal;
7204
- var h = Ls();
7204
+ var h = Fs();
7205
7205
  Le.Slot = h.Slot;
7206
7206
  var d = so();
7207
7207
  return Le.SlotList = d.SlotList, Le;
7208
7208
  }
7209
7209
  var ae = ad();
7210
- function $s(i) {
7210
+ function er(i) {
7211
7211
  return i.charAt(0).toLowerCase() + i.slice(1);
7212
7212
  }
7213
7213
  function od(i) {
7214
7214
  let e = i, t;
7215
- for (; e; )
7216
- e instanceof De && e.stype !== "BaseObject3D" && (e.stype !== "Group" || !t) && (t = e), e = e.parent;
7215
+ for (; e; ) {
7216
+ if (e instanceof De && e.stype !== "Group") {
7217
+ t = e;
7218
+ break;
7219
+ }
7220
+ e = e.parent;
7221
+ }
7217
7222
  return t;
7218
7223
  }
7219
7224
  function is(i, e) {
@@ -7262,7 +7267,7 @@ class ld {
7262
7267
  const s = this.viewport.getIntersects(t, n);
7263
7268
  if (s.length === 0) {
7264
7269
  this.hoverSelectMap.forEach((g, v) => {
7265
- const w = $s(v), S = this.signals[`${w}Hover`];
7270
+ const w = er(v), S = this.signals[`${w}Hover`];
7266
7271
  S && S.numListeners > 0 && is(this.signals, `${w}UnHover`).dispatch(g);
7267
7272
  }), this.hoverSelectMap.clear(), e === "click" && this.signals.sceneClick.dispatch({
7268
7273
  type: e,
@@ -7293,14 +7298,14 @@ class ld {
7293
7298
  S ? S(g) : g.isEventPropagation = !0, g.isEventPropagation && (is(this.signals, v).dispatch(w), g.isEventPropagation = !1), e !== "hover" && g.dispatchEvent({ type: e });
7294
7299
  };
7295
7300
  o === "Hover" && this.hoverSelectMap.forEach((g, v) => {
7296
- const w = $s(v), S = a.get(v);
7301
+ const w = er(v), S = a.get(v);
7297
7302
  S && S.length > 0 ? g.uuid !== S[0].target.uuid && (is(this.signals, `${w}UnHover`).dispatch(g), this.hoverSelectMap.delete(v)) : (this.signals[`${w}UnHover`]?.dispatch(g), this.hoverSelectMap.delete(v));
7298
7303
  });
7299
7304
  const c = r.type;
7300
7305
  if (!c) return;
7301
7306
  const u = a.get(c);
7302
7307
  if (!u || u.length === 0) return;
7303
- const { target: h } = u[0], f = `${$s(c)}${o}`;
7308
+ const { target: h } = u[0], f = `${er(c)}${o}`;
7304
7309
  let p;
7305
7310
  c === "Model" ? p = {
7306
7311
  target: h,
@@ -7377,7 +7382,7 @@ class ld {
7377
7382
  this.container.removeEventListener("mousedown", this.handleMouseDown), this.container.removeEventListener("mousemove", this.handleMouseMove), this.container.removeEventListener("dblclick", this.handleDblClick), this.container.removeEventListener("wheel", this.handleMouseWheel), this.container.removeEventListener("touchstart", this.handleTouchStart), this.container.removeEventListener("contextmenu", this.handleContextmenu), document.removeEventListener("keydown", this.handleKeyDown), document.removeEventListener("keyup", this.handleKeyUp);
7378
7383
  }
7379
7384
  dispose() {
7380
- this.removeEventListeners(), this.hoverSelectMap.clear();
7385
+ this.timer && clearTimeout(this.timer), this.timer = null, this.removeEventListeners(), this.hoverSelectMap.clear();
7381
7386
  }
7382
7387
  }
7383
7388
  class cd {
@@ -7425,13 +7430,13 @@ class cd {
7425
7430
  class hd extends je {
7426
7431
  constructor(e, t, n) {
7427
7432
  super(), this.camera = e, this.controls = n;
7428
- const s = new me("#ff3653"), r = new me("#8adb00"), a = new me("#2c8fff"), o = new me("#000000"), l = {}, c = [], u = new un(), h = new oe(), d = new Qt(-2, 2, 2, -2, 0, 4);
7433
+ const s = new me("#ff3653"), r = new me("#8adb00"), a = new me("#2c8fff"), o = new me("#000000"), l = {}, c = [], u = new Nn(), h = new oe(), d = new Qt(-2, 2, 2, -2, 0, 4);
7429
7434
  d.position.set(0, 0, 2);
7430
7435
  const f = new Ll(0.8, 0.05, 0.05).translate(0.4, 0, 0), p = new we(f, W(s)), g = new we(f, W(r)), v = new we(f, W(a));
7431
7436
  g.rotation.z = Math.PI / 2, v.rotation.y = -Math.PI / 2, this.add(p), this.add(v), this.add(g);
7432
7437
  const w = se(s), S = se(r), b = se(a), A = se(o), I = new Ut(w), C = new Ut(S), O = new Ut(b), j = new Ut(A), G = new Ut(A), V = new Ut(A);
7433
7438
  I.userData.type = "right", C.userData.type = "top", O.userData.type = "front", j.userData.type = "left", G.userData.type = "bottom", V.userData.type = "back", I.position.x = 1, C.position.y = 1, O.position.z = 1, j.position.x = -1, j.scale.setScalar(0.8), G.position.y = -1, G.scale.setScalar(0.8), V.position.z = -1, V.scale.setScalar(0.8), this.add(I), this.add(C), this.add(O), this.add(j), this.add(G), this.add(V), c.push(I), c.push(C), c.push(O), c.push(j), c.push(G), c.push(V);
7434
- const $ = new D(), J = new Ms(), re = 128;
7439
+ const $ = new D(), J = new Ts(), re = 128;
7435
7440
  this.setLabels = function(L, q, U) {
7436
7441
  l.labelX = L, l.labelY = q, l.labelZ = U, K();
7437
7442
  }, this.setLabelStyle = function(L, q, U) {
@@ -7454,15 +7459,15 @@ class hd extends je {
7454
7459
  f.dispose(), p.material.dispose(), g.material.dispose(), v.material.dispose(), I.material.map?.dispose(), C.material.map?.dispose(), O.material.map?.dispose(), j.material.map?.dispose(), G.material.map?.dispose(), V.material.map?.dispose(), I.material.dispose(), C.material.dispose(), O.material.dispose(), j.material.dispose(), G.material.dispose(), V.material.dispose();
7455
7460
  };
7456
7461
  function W(L) {
7457
- return new dn({ color: L, toneMapped: !1 });
7462
+ return new un({ color: L, toneMapped: !1 });
7458
7463
  }
7459
7464
  function se(L, q) {
7460
7465
  const { font: U = "24px Arial", color: _ = "#000000", radius: z = 16 } = l, H = document.createElement("canvas");
7461
7466
  H.width = 64, H.height = 64;
7462
7467
  const Z = H.getContext("2d");
7463
7468
  Z.beginPath(), Z.arc(32, 32, z, 0, 2 * Math.PI), Z.closePath(), Z.fillStyle = L.getStyle(), Z.fill(), q && (Z.font = U, Z.textAlign = "center", Z.fillStyle = _, Z.fillText(q, 32, 41));
7464
- const Y = new Br(H);
7465
- return Y.colorSpace = dt, new hr({ map: Y, toneMapped: !1 });
7469
+ const Y = new kr(H);
7470
+ return Y.colorSpace = dt, new ur({ map: Y, toneMapped: !1 });
7466
7471
  }
7467
7472
  function K() {
7468
7473
  I.material.map?.dispose(), C.material.map?.dispose(), O.material.map?.dispose(), I.material.dispose(), C.material.dispose(), O.material.dispose(), I.material = se(s, l.labelX), C.material = se(r, l.labelY), O.material = se(a, l.labelZ);
@@ -7479,8 +7484,8 @@ class hd extends je {
7479
7484
  const Se = {
7480
7485
  needsUpdate: !1
7481
7486
  };
7482
- let qi = 0, Ki = 0;
7483
- const Pn = (i) => {
7487
+ let Ki = 0, Qi = 0;
7488
+ const Tn = (i) => {
7484
7489
  i instanceof qt && i.dispose();
7485
7490
  };
7486
7491
  class ud {
@@ -7494,7 +7499,7 @@ class ud {
7494
7499
  }, this.scener = new lu(this.signals, this.state), this.scene = this.scener.scene, this.cameraManager = new yu(this), this.camera = this.cameraManager.currentCamera, this.rendererManager = new mu(this), this.container = this.rendererManager.container, this.interactiveContainer = this.rendererManager.interactiveContainer, this.renderer = this.rendererManager.renderer, this.rendererCSS3D = this.rendererManager.rendererCSS3D, this.rendererCSS2D = this.rendererManager.rendererCSS2D, this.pmremGenerator = new Fl(this.renderer), this.pmremGenerator.compileEquirectangularShader(), this.effectManager = new _e(this.renderer, this.scene, this.camera), this.effectComposer = this.effectManager.effectComposer, this.bvh = new Eu(this), this.controls = new Ou(this), this.info = new cd(this.scene, this.signals), this.stats = new Tc(), this.mixer = new Bl(this.scene), this.clipsSet = /* @__PURE__ */ new Set(), this.postUpdate = /* @__PURE__ */ new Map(), this.postRender = /* @__PURE__ */ new Map(), this._loop = 0, this.viewHelper = new hd(this.camera, this.container, this.controls), this.viewHelper.setLabels("x", "y", "z"), this.eventHandler = new ld(this), this.resizeObserver.observe(this.container), this._initInfo(), this._initStats(), this._signalsEventListenr(), this.animate(0);
7495
7500
  }
7496
7501
  clock = new kl();
7497
- raycaster = new un();
7502
+ raycaster = new Nn();
7498
7503
  scene;
7499
7504
  sky = null;
7500
7505
  state;
@@ -7611,17 +7616,17 @@ class ud {
7611
7616
  */
7612
7617
  async setSphereSkyBackground(e) {
7613
7618
  const t = await ln({ file: e });
7614
- Pn(this.scene.background), this.scene.background = t, this.signals.backgroundChanged.dispatch();
7619
+ Tn(this.scene.background), this.scene.background = t, this.signals.backgroundChanged.dispatch();
7615
7620
  }
7616
7621
  async setSkyBackground(e, t = ["px.jpg", "nx.jpg", "py.jpg", "ny.jpg", "pz.jpg", "nz.jpg"]) {
7617
7622
  const n = await ln({ path: e, file: t });
7618
- Pn(this.scene.background), this.scene.background = n, this.signals.backgroundChanged.dispatch();
7623
+ Tn(this.scene.background), this.scene.background = n, this.signals.backgroundChanged.dispatch();
7619
7624
  }
7620
7625
  setBackgroundColor(e) {
7621
- Pn(this.scene.background), this.scene.background = new me(e), this.signals.backgroundChanged.dispatch();
7626
+ Tn(this.scene.background), this.scene.background = new me(e), this.signals.backgroundChanged.dispatch();
7622
7627
  }
7623
7628
  setBackgroundColorAlpha(e, t) {
7624
- Pn(this.scene.background), this.scene.background = null, this.renderer.setClearColor(new me(e), t), this.signals.backgroundChanged.dispatch();
7629
+ Tn(this.scene.background), this.scene.background = null, this.renderer.setClearColor(new me(e), t), this.signals.backgroundChanged.dispatch();
7625
7630
  }
7626
7631
  async setBackgroundImage(e) {
7627
7632
  const t = await ln({ file: e });
@@ -7636,7 +7641,7 @@ class ud {
7636
7641
  this.sky || (this.sky = new Pc(), this.scene.add(this.sky)), this.sky.name = "sky", this.sky.position.set(n.x, n.y, n.z), this.sky.scale.setScalar(s);
7637
7642
  const c = this.sky.material.uniforms;
7638
7643
  c.turbidity.value = r, c.rayleigh.value = a, c.mieCoefficient.value = 5e-3, c.mieDirectionalG.value = 0.7;
7639
- const u = new D(), h = Fn(90 - o), d = Fn(l);
7644
+ const u = new D(), h = Ln(90 - o), d = Ln(l);
7640
7645
  return u.setFromSphericalCoords(1, h, d), c.sunPosition.value.copy(u), this.signals.objectAdded.dispatch(), this.sky;
7641
7646
  }
7642
7647
  closeSky() {
@@ -7655,7 +7660,7 @@ class ud {
7655
7660
  async setEnvironment(e) {
7656
7661
  if (e) {
7657
7662
  const { path: t, file: n, background: s } = e, r = await ln({ path: t, file: n });
7658
- this.scene.environment = r instanceof Wl ? this.pmremGenerator.fromCubemap(r).texture : this.pmremGenerator.fromEquirectangular(r).texture, s && (Pn(this.scene.background), this.scene.background = r);
7663
+ this.scene.environment = r instanceof Wl ? this.pmremGenerator.fromCubemap(r).texture : this.pmremGenerator.fromEquirectangular(r).texture, s && (Tn(this.scene.background), this.scene.background = r);
7659
7664
  } else
7660
7665
  this.scene.environment = this.pmremGenerator.fromScene(new Mc(), 0.04).texture;
7661
7666
  return this.signals.sceneChanged.dispatch(), this.scene.environment;
@@ -7709,11 +7714,11 @@ class ud {
7709
7714
  */
7710
7715
  autoRender() {
7711
7716
  if (!(this.state.useFreq <= 0 && !Se.needsUpdate) && (this.state.useFreq > 0 && this.state.useFreq--, Se.needsUpdate && (Se.needsUpdate = !1), !this.state.isPausedRender)) {
7712
- if (qi = performance.now(), this.signals.beforeRender.dispatch(), this._passesObserver(), this.renderer.info.reset(), this.state.enabledPostprocessing ? this.effectComposer.render(this.state.delta) : (this.renderer.clear(), this.renderer.render(this.scene, this.camera)), this.rendererCSS2D && this.rendererManager.internalOptions.enableRenderCss2D && this.rendererCSS2D.render(this.cache.classified.PoiNode, this.camera), this.rendererCSS3D && this.rendererManager.internalOptions.enableRenderCss3D && this.rendererCSS3D.render(this.cache.classified.PoiNode, this.camera), this.options.showViewHelper) {
7717
+ if (Ki = performance.now(), this.signals.beforeRender.dispatch(), this._passesObserver(), this.renderer.info.reset(), this.state.enabledPostprocessing ? this.effectComposer.render(this.state.delta) : (this.renderer.clear(), this.renderer.render(this.scene, this.camera)), this.rendererCSS2D && this.rendererManager.internalOptions.enableRenderCss2D && this.rendererCSS2D.render(this.cache.classified.PoiNode, this.camera), this.rendererCSS3D && this.rendererManager.internalOptions.enableRenderCss3D && this.rendererCSS3D.render(this.cache.classified.PoiNode, this.camera), this.options.showViewHelper) {
7713
7718
  const e = this.renderer.clippingPlanes;
7714
7719
  this.renderer.clippingPlanes = [], this.viewHelper.render(this.renderer), this.renderer.clippingPlanes = e;
7715
7720
  }
7716
- this.postRender.forEach((e) => e()), Ki = performance.now(), this.signals.sceneRendered.dispatch(Ki - qi);
7721
+ this.postRender.forEach((e) => e()), Qi = performance.now(), this.signals.sceneRendered.dispatch(Qi - Ki);
7717
7722
  }
7718
7723
  }
7719
7724
  animate(e) {
@@ -7721,7 +7726,7 @@ class ud {
7721
7726
  this.animate(n);
7722
7727
  }), this.clock.update(e);
7723
7728
  const t = this.clock.getDelta();
7724
- this.state.delta = t, this.clipsSet.size > 0 && (this.mixer.update(t), this.signals.modelAnimation.dispatch()), pr.update(e) && this.signals.tweenUpdate.dispatch(), this.controls.update(t) && this.signals.cameraChange.dispatch(), this.postUpdate.forEach((n) => n(e)), this.autoRender(), this.signals.getSceneInfo.dispatch(this.info.state);
7729
+ this.state.delta = t, this.clipsSet.size > 0 && (this.mixer.update(t), this.signals.modelAnimation.dispatch()), fr.update(e) && this.signals.tweenUpdate.dispatch(), this.controls.update(t) && this.signals.cameraChange.dispatch(), this.postUpdate.forEach((n) => n(e)), this.autoRender(), this.signals.getSceneInfo.dispatch(this.info.state);
7725
7730
  }
7726
7731
  getOffsetByPosition(e) {
7727
7732
  const n = new D(e.x, e.y, e.z).project(this.camera), s = this.renderer.domElement.getBoundingClientRect(), r = s.left + s.width / 2 * (n.x + 1), a = s.top + s.height / 2 * (-n.y + 1);
@@ -7760,27 +7765,50 @@ class ud {
7760
7765
  const h = this.renderer.clippingPlanes.every((p) => p.distanceToPoint(c) > 0);
7761
7766
  let d = !0;
7762
7767
  const f = u;
7763
- return f.material && mn(f.material, (p) => {
7768
+ return f.material && fn(f.material, (p) => {
7764
7769
  d && ke(p.clippingPlanes) && (d = p.clippingPlanes.every((g) => g.distanceToPoint(c) > 0));
7765
7770
  }), h && d;
7766
7771
  }), l;
7767
7772
  }
7768
7773
  rayClash(e = this.camera.position, t = new D(0, -1, 0), n = this.scener.intersectsList.meshOfModelList) {
7769
- const s = new un();
7770
- return s.set(e, t), ke(n) ? s.intersectObjects(n, !0) : s.intersectObject(n, !0);
7774
+ return this.raycaster.set(e, t), ke(n) ? this.raycaster.intersectObjects(n, !0) : this.raycaster.intersectObject(n, !0);
7771
7775
  }
7772
7776
  clearSignals() {
7773
7777
  for (const e in this.signals) this.signals[e].removeAll();
7774
7778
  }
7779
+ /**
7780
+ * 隔离显示对象 - 使用 Layers API 仅显示指定对象,隐藏场景中其他对象
7781
+ * @param objects 需要隔离显示的对象
7782
+ * @param layerChannel 使用的 layer 通道,默认 1(0 为默认通道)
7783
+ */
7784
+ isolate(e, t = 1) {
7785
+ const n = Array.isArray(e) ? e : [e], s = /* @__PURE__ */ new Set();
7786
+ for (const r of n)
7787
+ r.traverse((a) => {
7788
+ s.add(a);
7789
+ });
7790
+ this.scene.traverse((r) => {
7791
+ s.has(r) ? r.layers.enable(t) : r.layers.disable(0);
7792
+ }), this.camera.layers.disable(0), this.camera.layers.enable(t), this.render();
7793
+ }
7794
+ /**
7795
+ * 取消隔离 - 恢复场景中所有对象的可见性
7796
+ * @param layerChannel 之前隔离使用的 layer 通道,默认 1
7797
+ */
7798
+ unisolate(e = 1) {
7799
+ this.scene.traverse((t) => {
7800
+ t.layers.enable(0), t.layers.disable(e);
7801
+ }), this.camera.layers.enable(0), this.camera.layers.disable(e), this.render();
7802
+ }
7775
7803
  dispose() {
7776
7804
  cancelAnimationFrame(this._loop), this.bvh.dispose(), this.mixer.stopAllAction(), this.clipsSet.forEach((e) => {
7777
7805
  this.mixer.uncacheAction(e), this.mixer.uncacheClip(e);
7778
- }), this.mixer.uncacheRoot(this.scene), this.clipsSet.clear(), this.controls.dispose(), this.viewHelper.dispose(), pr.removeAll(), this.clearSignals(), this.scene.clear(), this.pmremGenerator.dispose(), this.effectComposer.dispose(), this.renderer.dispose(), this.rendererCSS2D.domElement.remove(), this.rendererCSS3D.domElement.remove(), this.renderer.forceContextLoss(), this.container.remove(), this.state.isDisposed = !0, this.eventHandler.dispose(), this.resizeObserver.disconnect();
7806
+ }), this.mixer.uncacheRoot(this.scene), this.clipsSet.clear(), this.controls.dispose(), this.viewHelper.dispose(), fr.removeAll(), this.clearSignals(), this.scene.clear(), this.pmremGenerator.dispose(), this.effectComposer.dispose(), this.renderer.dispose(), this.rendererCSS2D.domElement.remove(), this.rendererCSS3D.domElement.remove(), this.renderer.forceContextLoss(), this.container.remove(), this.state.isDisposed = !0, this.eventHandler.dispose(), this.resizeObserver.disconnect();
7779
7807
  }
7780
7808
  _signalsEventListenr() {
7781
7809
  const e = () => {
7782
7810
  const { clientWidth: s, clientHeight: r } = this.container;
7783
- this.effectManager.updateCamera(this.camera), this.viewHelper.camera = this.camera, this.camera instanceof Ps && (this.camera.aspect = s / r), this.camera instanceof Qt && (this.camera.left = s / -2, this.camera.right = s / 2, this.camera.top = r / 2, this.camera.bottom = r / -2), this.camera.updateProjectionMatrix(), this.effectComposer.setSize(s, r), this.rendererCSS3D && this.rendererCSS3D.setSize(s, r), this.rendererCSS2D && this.rendererCSS2D.setSize(s, r), this.triggerRender();
7811
+ this.effectManager.updateCamera(this.camera), this.viewHelper.camera = this.camera, this.camera instanceof Is && (this.camera.aspect = s / r), this.camera instanceof Qt && (this.camera.left = s / -2, this.camera.right = s / 2, this.camera.top = r / 2, this.camera.bottom = r / -2), this.camera.updateProjectionMatrix(), this.effectComposer.setSize(s, r), this.rendererCSS3D && this.rendererCSS3D.setSize(s, r), this.rendererCSS2D && this.rendererCSS2D.setSize(s, r), this.triggerRender();
7784
7812
  };
7785
7813
  requestAnimationFrame(() => {
7786
7814
  e();
@@ -7846,16 +7874,16 @@ class De extends je {
7846
7874
  return wt(this.position, be(e), t, n, s);
7847
7875
  }
7848
7876
  setRotate(e, t, n, s) {
7849
- return wt(this.rotation, zr(e), t, n, s);
7877
+ return wt(this.rotation, Rr(e), t, n, s);
7850
7878
  }
7851
7879
  setScale(e, t, n, s) {
7852
7880
  return wt(this.scale, be(e), t, n, s);
7853
7881
  }
7854
7882
  getBoundingBox() {
7855
- return fn(this);
7883
+ return pn(this);
7856
7884
  }
7857
7885
  getSpaceAttribute(e = !0) {
7858
- return Rr(this, e);
7886
+ return Nr(this, e);
7859
7887
  }
7860
7888
  syncSpaceAttribute(e, t = !0) {
7861
7889
  ba(this, e, t);
@@ -7886,7 +7914,7 @@ class ze extends De {
7886
7914
  });
7887
7915
  }
7888
7916
  updateMaterial(e, t) {
7889
- this.material.color = new me(e), this.material.map = gn(t), this.material.needsUpdate = !0;
7917
+ this.material.color = new me(e), this.material.map?.dispose(), this.material.map = mn(t), this.material.needsUpdate = !0;
7890
7918
  }
7891
7919
  updateMaterialOpacity(e) {
7892
7920
  const t = e < 1;
@@ -7924,13 +7952,13 @@ class ao extends De {
7924
7952
  super(e), this.stype = "PluginObject";
7925
7953
  }
7926
7954
  }
7927
- function ei(i) {
7955
+ function ti(i) {
7928
7956
  return i === "2d" || i === "2D";
7929
7957
  }
7930
- function ti(i) {
7958
+ function ni(i) {
7931
7959
  return i === "2.5d" || i === "2.5D";
7932
7960
  }
7933
- function ni(i) {
7961
+ function si(i) {
7934
7962
  return i === "3D" || i === "3d";
7935
7963
  }
7936
7964
  class Ht extends De {
@@ -7947,7 +7975,7 @@ class Ht extends De {
7947
7975
  this.elementType = t, this.element = n, this.elementAutoDisplay = s, this.occlude = r, this.occludeThrottle = a, this.onChange = o, this.scaleFixed = l, this.create(t);
7948
7976
  }
7949
7977
  create(e) {
7950
- ei(e) ? this._create2D() : ti(e) ? this._create2DHalf() : ni(e) && this._create3D();
7978
+ ti(e) ? this._create2D() : ni(e) ? this._create2DHalf() : si(e) && this._create3D();
7951
7979
  }
7952
7980
  getBoundingBox(e = 50) {
7953
7981
  e = e <= 0 ? 50 : e;
@@ -7955,7 +7983,7 @@ class Ht extends De {
7955
7983
  return t.copy(this.position), n.copy(this.position), t.sub(s), n.add(s), new Wt(t, n);
7956
7984
  }
7957
7985
  _create2D() {
7958
- this.add(new Zr(this.element));
7986
+ this.add(new Jr(this.element));
7959
7987
  }
7960
7988
  _create2DHalf() {
7961
7989
  this.add(new Ja(this.element));
@@ -7985,7 +8013,7 @@ class xt extends De {
7985
8013
  return super.copy(e, t), this.formatType = e.formatType, this;
7986
8014
  }
7987
8015
  }
7988
- class Fs extends De {
8016
+ class Bs extends De {
7989
8017
  icon;
7990
8018
  text;
7991
8019
  iconType;
@@ -8011,7 +8039,7 @@ const pd = {
8011
8039
  position: { x: 0, y: 0, z: 0 },
8012
8040
  scale: { x: 1, y: 1, z: 1 }
8013
8041
  };
8014
- class Mr extends Ut {
8042
+ class Tr extends Ut {
8015
8043
  stype = "Icon";
8016
8044
  constructor(e, t) {
8017
8045
  super(e);
@@ -8019,7 +8047,7 @@ class Mr extends Ut {
8019
8047
  this.position.set(n.x, n.y, n.z), this.scale.set(s.x, s.y, s.z), this.renderOrder = 1;
8020
8048
  }
8021
8049
  }
8022
- class si extends ze {
8050
+ class ri extends ze {
8023
8051
  constructor(e) {
8024
8052
  const {
8025
8053
  radius: t = 10,
@@ -8030,20 +8058,20 @@ class si extends ze {
8030
8058
  super(e), this.params = e, this.updateGeometry(t), this.updateMaterialOpacity(s), this.updateMaterial(n, r), this.stype = "Point";
8031
8059
  }
8032
8060
  updateGeometry(e) {
8033
- this.geometry.dispose(), this.geometry = new ui(e);
8061
+ this.geometry.dispose(), this.geometry = new di(e);
8034
8062
  }
8035
8063
  setOptions(e) {
8036
8064
  const { color: t, opacity: n, radius: s, gradient: r } = e, a = this.material;
8037
- t && (a.color = new me(t)), n !== void 0 && this.updateMaterialOpacity(n), s !== void 0 && (this.geometry = new ui(s, 32, 32)), r && (a.map = gn(r)), this.params && Object.assign(this.params, e), a.needsUpdate = !0, Se.needsUpdate = !0;
8065
+ t && (a.color = new me(t)), n !== void 0 && this.updateMaterialOpacity(n), s !== void 0 && (this.geometry = new di(s, 32, 32)), r && (a.map = mn(r)), this.params && Object.assign(this.params, e), a.needsUpdate = !0, Se.needsUpdate = !0;
8038
8066
  }
8039
8067
  }
8040
- class oo extends si {
8068
+ class oo extends ri {
8041
8069
  graphs = [];
8042
8070
  constructor(e) {
8043
8071
  super(e), this.stype = "Node", e && (this.graphs = e.graphs);
8044
8072
  }
8045
8073
  }
8046
- class ri extends ze {
8074
+ class ii extends ze {
8047
8075
  constructor(e) {
8048
8076
  const {
8049
8077
  radius: t = 50,
@@ -8058,10 +8086,13 @@ class ri extends ze {
8058
8086
  }
8059
8087
  setOptions(e) {
8060
8088
  const { color: t, opacity: n, radius: s, gradient: r } = e, a = this.material;
8061
- t && (a.color = new me(t)), n !== void 0 && this.updateMaterialOpacity(n), s !== void 0 && this.updateGeometry(s), r && (a.map = gn(r)), this.params && Object.assign(this.params, e), a.needsUpdate = !0, Se.needsUpdate = !0;
8089
+ t && (a.color = new me(t)), n !== void 0 && this.updateMaterialOpacity(n), s !== void 0 && this.updateGeometry(s), r && (a.map = mn(r)), this.params && Object.assign(this.params, e), a.needsUpdate = !0, Se.needsUpdate = !0;
8062
8090
  }
8063
8091
  }
8064
- const Qi = /* @__PURE__ */ new Map();
8092
+ const ws = /* @__PURE__ */ new Map();
8093
+ function fd() {
8094
+ ws.forEach((i) => i.dispose()), ws.clear();
8095
+ }
8065
8096
  class lo extends ze {
8066
8097
  constructor(e) {
8067
8098
  const {
@@ -8087,7 +8118,7 @@ class lo extends ze {
8087
8118
  computeVertex() {
8088
8119
  if (!this.params) return;
8089
8120
  const { start: e, end: t, width: n } = this.params, s = be(e), r = be(t), a = new D().addVectors(s, r).divideScalar(2), o = s.distanceTo(r), l = new Q();
8090
- this.geometry.dispose(), this.geometry = new pn(n, o), this.geometry.rotateX(-Math.PI / 2), l.lookAt(s, a, this.up), this.position.copy(a), this.quaternion.setFromRotationMatrix(l);
8121
+ this.geometry.dispose(), this.geometry = new dn(n, o), this.geometry.rotateX(-Math.PI / 2), l.lookAt(s, a, this.up), this.position.copy(a), this.quaternion.setFromRotationMatrix(l);
8091
8122
  }
8092
8123
  computeTextureRepeat(e) {
8093
8124
  if (this.params && e.image) {
@@ -8097,13 +8128,13 @@ class lo extends ze {
8097
8128
  }
8098
8129
  createTexture(e) {
8099
8130
  if (e) {
8100
- const t = Qi.get(e);
8131
+ const t = ws.get(e);
8101
8132
  if (t)
8102
8133
  return t.clone();
8103
8134
  const n = _t.load(
8104
8135
  e,
8105
8136
  () => {
8106
- n.wrapS = ft, n.wrapT = ft, n.anisotropy = 16, this.computeTextureRepeat(n), Qi.set(e, n), Se.needsUpdate = !0;
8137
+ n.wrapS = ft, n.wrapT = ft, n.anisotropy = 16, this.computeTextureRepeat(n), ws.set(e, n), Se.needsUpdate = !0;
8107
8138
  }
8108
8139
  );
8109
8140
  return n;
@@ -8146,7 +8177,7 @@ class ht extends De {
8146
8177
  color: a
8147
8178
  });
8148
8179
  if (r === !1 && d.hide(), this.nodes.push(d), !l && t && !r) {
8149
- const f = er(s, d.graphs[0]?.passable);
8180
+ const f = tr(s, d.graphs[0]?.passable);
8150
8181
  this.createCircle({
8151
8182
  id: `${h.id}_circle`,
8152
8183
  name: `${h.name || h.id}_circle`,
@@ -8160,7 +8191,7 @@ class ht extends De {
8160
8191
  const { linkInfo: p, targetNodeId: g, passable: v } = h.graphs[f], { id: w, name: S } = p, b = this.info.nodes.find((A) => A.id === g);
8161
8192
  if (!u.includes(w) && b) {
8162
8193
  u.push(w);
8163
- const A = er(s, v), I = this.createLink({
8194
+ const A = tr(s, v), I = this.createLink({
8164
8195
  id: w,
8165
8196
  name: S,
8166
8197
  start: h.position,
@@ -8188,7 +8219,7 @@ class ht extends De {
8188
8219
  return this.add(t), t;
8189
8220
  }
8190
8221
  createCircle(e) {
8191
- const t = new ri({
8222
+ const t = new ii({
8192
8223
  ...e,
8193
8224
  rotation: {
8194
8225
  x: Math.PI / 2,
@@ -8212,7 +8243,7 @@ class ht extends De {
8212
8243
  const { imgUrl: t, animation: n } = e;
8213
8244
  if (t && !this.linksImgAnimation) {
8214
8245
  let s = null;
8215
- As(n) && n ? s = { repeat: !0, duration: 500 } : Ne(n) && Xe(n.duration) && n.duration > 0 && (s = { repeat: !0, ...n }), s && wt(
8246
+ Es(n) && n ? s = { repeat: !0, duration: 500 } : Ne(n) && Xe(n.duration) && n.duration > 0 && (s = { repeat: !0, ...n }), s && wt(
8216
8247
  new oe(0, 0),
8217
8248
  new oe(0, -1),
8218
8249
  s,
@@ -8284,7 +8315,7 @@ class ht extends De {
8284
8315
  const { linkInfo: h, targetNodeId: d, passable: f } = c.graphs[u], { id: p, name: g } = h, v = o.get(d);
8285
8316
  if (!a.has(p) && v) {
8286
8317
  a.set(p, p);
8287
- const w = er(n, f), S = {
8318
+ const w = tr(n, f), S = {
8288
8319
  id: p,
8289
8320
  name: g,
8290
8321
  start: c.position,
@@ -8317,7 +8348,7 @@ class ht extends De {
8317
8348
  return e;
8318
8349
  }
8319
8350
  }
8320
- function er(i, e) {
8351
+ function tr(i, e) {
8321
8352
  return ke(i) ? i[e] ? i[e] : i[0] : i;
8322
8353
  }
8323
8354
  class co extends ze {
@@ -8385,7 +8416,7 @@ class co extends ze {
8385
8416
  }
8386
8417
  setOptions(e) {
8387
8418
  const { color: t, opacity: n, points: s, width: r, gradient: a } = e, o = this.material;
8388
- t && (o.color = new me(t)), n !== void 0 && this.updateMaterialOpacity(n), a && (o.map = gn(a)), s && r !== void 0 ? this.updateGeometry(s, r) : s ? this.updateGeometry(s, this.params?.width ?? 20) : r !== void 0 && this.updateGeometry(this.params?.points ?? [], r), this.params && Object.assign(this.params, e), o.needsUpdate = !0, Se.needsUpdate = !0;
8419
+ t && (o.color = new me(t)), n !== void 0 && this.updateMaterialOpacity(n), a && (o.map = mn(a)), s && r !== void 0 ? this.updateGeometry(s, r) : s ? this.updateGeometry(s, this.params?.width ?? 20) : r !== void 0 && this.updateGeometry(this.params?.points ?? [], r), this.params && Object.assign(this.params, e), o.needsUpdate = !0, Se.needsUpdate = !0;
8389
8420
  }
8390
8421
  }
8391
8422
  class ho extends ze {
@@ -8398,7 +8429,7 @@ class ho extends ze {
8398
8429
  opacity: a = 1,
8399
8430
  gradient: o
8400
8431
  } = e ?? {};
8401
- super(e), this.params = e, this.updateGeometry(n, s), this.updateMaterialOpacity(a), this.updateMaterial(r, o), this.stype = "Polygon", this.position.set(0, t, 0), this.rotation.set(-Math.PI / 2, 0, 0);
8432
+ super(e), this.params = e, this.updateGeometry(n, s), this.updateMaterialOpacity(a), this.updateMaterial(r, o), this.stype = "Polygon", this.position.set(0, t, 0), this.rotation.set(-Math.PI / 2, 0, 0), this.scale.setScalar(0.999);
8402
8433
  }
8403
8434
  updateGeometry(e, t) {
8404
8435
  this.geometry.dispose();
@@ -8409,7 +8440,7 @@ class ho extends ze {
8409
8440
  }
8410
8441
  setOptions(e) {
8411
8442
  const { color: t, opacity: n, yHeight: s, points: r, gradient: a, depth: o } = e, l = this.material;
8412
- t && (l.color = new me(t)), n !== void 0 && this.updateMaterialOpacity(n), a && (l.map = gn(a)), s !== void 0 && this.position.set(0, s, 0), r && o !== void 0 ? this.updateGeometry(r, o) : r ? this.updateGeometry(r, this.params?.depth ?? 0) : o !== void 0 && this.updateGeometry(this.params?.points ?? [], o), this.params && Object.assign(this.params, e), l.needsUpdate = !0, Se.needsUpdate = !0;
8443
+ t && (l.color = new me(t)), n !== void 0 && this.updateMaterialOpacity(n), a && (l.map = mn(a)), s !== void 0 && this.position.set(0, s, 0), r && o !== void 0 ? this.updateGeometry(r, o) : r ? this.updateGeometry(r, this.params?.depth ?? 0) : o !== void 0 && this.updateGeometry(this.params?.points ?? [], o), this.params && Object.assign(this.params, e), l.needsUpdate = !0, Se.needsUpdate = !0;
8413
8444
  }
8414
8445
  }
8415
8446
  class ds extends De {
@@ -8429,7 +8460,7 @@ class ds extends De {
8429
8460
  for (let a = 0; a < r.length; a++) this.createCircle(r[a]);
8430
8461
  }
8431
8462
  createPoint(e) {
8432
- const t = new si(e);
8463
+ const t = new ri(e);
8433
8464
  return this.add(t), Se.needsUpdate = !0, t;
8434
8465
  }
8435
8466
  getPoint(e) {
@@ -8462,7 +8493,7 @@ class ds extends De {
8462
8493
  t && this.remove(t), Se.needsUpdate = !0;
8463
8494
  }
8464
8495
  createCircle(e) {
8465
- const t = new ri(e);
8496
+ const t = new ii(e);
8466
8497
  return this.add(t), Se.needsUpdate = !0, t;
8467
8498
  }
8468
8499
  getCircle(e) {
@@ -8483,8 +8514,8 @@ class uo extends ze {
8483
8514
  super(e, t, n), this.stype = "Ground";
8484
8515
  }
8485
8516
  }
8486
- var fd = Object.defineProperty, md = (i, e, t) => e in i ? fd(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, te = (i, e, t) => (md(i, typeof e != "symbol" ? e + "" : e, t), t);
8487
- function gd(i, e, t) {
8517
+ var md = Object.defineProperty, gd = (i, e, t) => e in i ? md(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, te = (i, e, t) => (gd(i, typeof e != "symbol" ? e + "" : e, t), t);
8518
+ function yd(i, e, t) {
8488
8519
  const n = [i];
8489
8520
  for (; n.length; ) {
8490
8521
  const s = n.shift();
@@ -8493,16 +8524,16 @@ function gd(i, e, t) {
8493
8524
  n.push(...s[e]);
8494
8525
  }
8495
8526
  }
8496
- const Tr = [new oe(), new oe(), new oe(), new oe()], bt = [new D(), new D(), new D(), new D()], yd = [new Q(), new Q(), new Q(), new Q()], po = [new he(), new he(), new he(), new he()];
8497
- function vd(i, e, t) {
8527
+ const Pr = [new oe(), new oe(), new oe(), new oe()], bt = [new D(), new D(), new D(), new D()], vd = [new Q(), new Q(), new Q(), new Q()], po = [new he(), new he(), new he(), new he()];
8528
+ function xd(i, e, t) {
8498
8529
  return e.clone().sub(i).lengthSq() <= t ** 2;
8499
8530
  }
8500
- function xd(i, e, t) {
8531
+ function wd(i, e, t) {
8501
8532
  const n = e.clone().sub(i).lengthSq(), s = Math.max(i.lengthSq(), e.length());
8502
8533
  return n <= t ** 2 * s;
8503
8534
  }
8504
- function Nn(i, e) {
8505
- const { epsilon: t = 0, relativeEpsilon: n } = e || {}, s = t === 0 ? (c, u) => c.equals(u) : n ? xd : vd, r = i.length / 3, a = new Array(r), [o, l] = bt;
8535
+ function Rn(i, e) {
8536
+ const { epsilon: t = 0, relativeEpsilon: n } = e || {}, s = t === 0 ? (c, u) => c.equals(u) : n ? wd : xd, r = i.length / 3, a = new Array(r), [o, l] = bt;
8506
8537
  for (let c = 0; c < r; c++) {
8507
8538
  o.fromArray(i, c * 3), a[c] = c;
8508
8539
  for (let u = 0; u < c; u++)
@@ -8551,7 +8582,7 @@ function mo(i, e, t, n = !1) {
8551
8582
  });
8552
8583
  }), s;
8553
8584
  }
8554
- function wd(i, e = {}) {
8585
+ function bd(i, e = {}) {
8555
8586
  const { indexes: t, a: n, b: s, c: r, equalVertexIndexMap: a, faceIndex: o, onlyC: l, maxCount: c = l ? 2 : 3, positions: u, getParentMidpoint: h, isAncestor: d, getDepth: f } = i, p = t.length / 3, g = o ?? Math.trunc(p / 2), v = a ? (L) => a[L] : (L) => L, w = v(n), S = v(s), b = v(r), A = [];
8556
8587
  let I = () => 0, C = 0;
8557
8588
  o != null && f && (C = f(o) + 1, I = (L) => C - f(L));
@@ -8660,7 +8691,7 @@ function go(i) {
8660
8691
  e[t] = t;
8661
8692
  return e;
8662
8693
  }
8663
- function bd(i, e) {
8694
+ function Sd(i, e) {
8664
8695
  const t = i.length, n = t / 3;
8665
8696
  e || (e = go(n));
8666
8697
  const s = e.length, [r, a, o] = bt, l = new Array(n);
@@ -8689,7 +8720,7 @@ function bd(i, e) {
8689
8720
  }
8690
8721
  return c;
8691
8722
  }
8692
- class ws extends je {
8723
+ class bs extends je {
8693
8724
  constructor(e) {
8694
8725
  super(), te(this, "isFaceNode", !0), te(this, "triangle"), te(this, "faceIndex"), te(this, "geometry"), te(this, "a"), te(this, "b"), te(this, "c"), te(this, "d"), te(this, "order"), te(this, "real"), te(this, "branchFace"), te(this, "_root", null), te(this, "depth", 0), te(this, "childrenFaceIndexes"), te(this, "_equalVertexIndexMap"), te(this, "_equalVertexIndexes", null), Object.assign(this, e);
8695
8726
  const { geometry: t, a: n, b: s, c: r, real: a, faceIndex: o } = e, { attributes: { position: l } } = t, c = new D().fromBufferAttribute(l, n), u = new D().fromBufferAttribute(l, s), h = new D().fromBufferAttribute(l, r);
@@ -8733,7 +8764,7 @@ class ws extends je {
8733
8764
  onlyC: o != null,
8734
8765
  equalVertexIndexMap: t
8735
8766
  };
8736
- return e && (d.positions = n.attributes.position.array, d.getParentMidpoint = (f) => e[f].triangle.getMidpoint(h), d.getDepth = (f) => e[f].depth), c.branchFace && (d.maxCount = 1 / 0), wd(d, e);
8767
+ return e && (d.positions = n.attributes.position.array, d.getParentMidpoint = (f) => e[f].triangle.getMidpoint(h), d.getDepth = (f) => e[f].depth), c.branchFace && (d.maxCount = 1 / 0), bd(d, e);
8737
8768
  }
8738
8769
  removeFromParent() {
8739
8770
  return super.removeFromParent(), this.root = null, this;
@@ -8768,15 +8799,15 @@ class ws extends je {
8768
8799
  const { geometry: n } = this;
8769
8800
  return this.removeChildFaces(e), this.getAdjacentFaces(e, t).forEach((s) => {
8770
8801
  s.consumed && this.removeFace(s.faceIndex, e);
8771
- const r = new ws({ geometry: n, ...s });
8802
+ const r = new bs({ geometry: n, ...s });
8772
8803
  e[s.faceIndex] = r, this.add(r);
8773
8804
  }), e;
8774
8805
  }
8775
8806
  updateChildrenDFS(e, t) {
8776
8807
  const { geometry: n } = this;
8777
- return e || (e = this.root.childrenFaceIndexes = { [this.faceIndex]: this }), t || (t = this.equalVertexIndexMap = this.root.equalVertexIndexMap ?? Nn(n.attributes.position.array)), this.getAdjacentFaces(e, t).forEach((s) => {
8808
+ return e || (e = this.root.childrenFaceIndexes = { [this.faceIndex]: this }), t || (t = this.equalVertexIndexMap = this.root.equalVertexIndexMap ?? Rn(n.attributes.position.array)), this.getAdjacentFaces(e, t).forEach((s) => {
8778
8809
  s.consumed && this.removeFace(s.faceIndex, e);
8779
- const r = new ws({ geometry: n, ...s });
8810
+ const r = new bs({ geometry: n, ...s });
8780
8811
  return e[s.faceIndex] = r, this.add(r), r.updateChildrenDFS(e, t), r;
8781
8812
  }), e;
8782
8813
  }
@@ -8797,24 +8828,24 @@ class ws extends je {
8797
8828
  return !e && t && (this._equalVertexIndexes = e = fo(t)), e;
8798
8829
  }
8799
8830
  updateChildrenBFS(e) {
8800
- const t = this.childrenFaceIndexes = { [this.faceIndex]: this }, n = this.equalVertexIndexMap = e?.epsilon == null && this.equalVertexIndexMap ? this.equalVertexIndexMap : Nn(this.geometry.attributes.position.array, e);
8831
+ const t = this.childrenFaceIndexes = { [this.faceIndex]: this }, n = this.equalVertexIndexMap = e?.epsilon == null && this.equalVertexIndexMap ? this.equalVertexIndexMap : Rn(this.geometry.attributes.position.array, e);
8801
8832
  return this.traversalBFS(function(s) {
8802
8833
  s.updateSelfChildren(t, n);
8803
8834
  }), t;
8804
8835
  }
8805
8836
  traversalBFS(e) {
8806
- return gd(this, "children", e);
8837
+ return yd(this, "children", e);
8807
8838
  }
8808
8839
  // makeMeRootNode(){
8809
8840
  // const {parent} = this;
8810
8841
  // if (parent) return;
8811
8842
  // }
8812
8843
  }
8813
- var Sd = Object.defineProperty, Md = (i, e, t) => e in i ? Sd(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, Dn = (i, e, t) => (Md(i, typeof e != "symbol" ? e + "" : e, t), t);
8814
- function Td(i) {
8815
- return i.w !== void 0 ? [Ms, 4] : i.z !== void 0 ? [D, 3] : [oe, 2];
8844
+ var Md = Object.defineProperty, Td = (i, e, t) => e in i ? Md(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, In = (i, e, t) => (Td(i, typeof e != "symbol" ? e + "" : e, t), t);
8845
+ function Pd(i) {
8846
+ return i.w !== void 0 ? [Ts, 4] : i.z !== void 0 ? [D, 3] : [oe, 2];
8816
8847
  }
8817
- function Cn(i, e) {
8848
+ function Dn(i, e) {
8818
8849
  const t = e.toArray(), n = t.findIndex((r) => r !== 0);
8819
8850
  if (n === -1)
8820
8851
  return 0;
@@ -8825,7 +8856,7 @@ function Yi(i, e) {
8825
8856
  const t = i.clone().cross(e);
8826
8857
  return typeof t == "number" ? t === 0 : t.lengthSq() === 0;
8827
8858
  }
8828
- function Pd(i, e, t = 0) {
8859
+ function Id(i, e, t = 0) {
8829
8860
  let n = i.lengthSq() * e.lengthSq();
8830
8861
  if (n === 0)
8831
8862
  return t;
@@ -8833,15 +8864,15 @@ function Pd(i, e, t = 0) {
8833
8864
  let s = i.dot(e) / n;
8834
8865
  return s = Math.max(-1, Math.min(1, s)), Math.acos(s);
8835
8866
  }
8836
- function tr(i, e, t) {
8837
- let n = Pd(i, e);
8867
+ function nr(i, e, t) {
8868
+ let n = Id(i, e);
8838
8869
  return n === 0 ? n : i.clone().cross(e).dot(t) < 0 ? -n : n;
8839
8870
  }
8840
- function Id(i, e, t) {
8841
- const n = e.clone().negate(), s = t.clone().projectOnPlane(e), r = i.clone().projectOnPlane(s), a = tr(e, r, s), o = e.clone().cross(s), l = i.clone().projectOnPlane(o), c = tr(e, l, o), u = i.clone().projectOnPlane(n), h = tr(s, u, n);
8871
+ function Dd(i, e, t) {
8872
+ const n = e.clone().negate(), s = t.clone().projectOnPlane(e), r = i.clone().projectOnPlane(s), a = nr(e, r, s), o = e.clone().cross(s), l = i.clone().projectOnPlane(o), c = nr(e, l, o), u = i.clone().projectOnPlane(n), h = nr(s, u, n);
8842
8873
  return { yaw: a, pitch: c, roll: h };
8843
8874
  }
8844
- const nr = 180 / Math.PI, Pr = {
8875
+ const sr = 180 / Math.PI, Ir = {
8845
8876
  yaw: [
8846
8877
  { name: "前", range: [-15, 15] },
8847
8878
  { name: "左", range: [15, 165] },
@@ -8864,27 +8895,27 @@ const nr = 180 / Math.PI, Pr = {
8864
8895
  { name: "下", range: [165, 180.1] }
8865
8896
  ]
8866
8897
  };
8867
- function Dd(i) {
8898
+ function Cd(i) {
8868
8899
  const e = {};
8869
8900
  for (const [t, n] of Object.entries(i))
8870
8901
  e[t] = Array.isArray(n) ? n : Object.entries(n).map(([s, r]) => ({ name: s, range: r }));
8871
8902
  return e;
8872
8903
  }
8873
- const sr = {
8904
+ const rr = {
8874
8905
  degrees: !0,
8875
- map: Pr,
8906
+ map: Ir,
8876
8907
  front: { x: 0, y: 0, z: 1 },
8877
8908
  up: { x: 0, y: 1, z: 0 }
8878
8909
  };
8879
8910
  class yo {
8880
8911
  constructor(e) {
8881
- Dn(this, "_options"), Dn(this, "_listMap"), Dn(this, "_front"), Dn(this, "_up"), e && (this.options = e);
8912
+ In(this, "_options"), In(this, "_listMap"), In(this, "_front"), In(this, "_up"), e && (this.options = e);
8882
8913
  }
8883
8914
  static get options() {
8884
- return this._options ?? (this.options = sr);
8915
+ return this._options ?? (this.options = rr);
8885
8916
  }
8886
8917
  static set options(e) {
8887
- this._options = Object.assign({}, structuredClone(Pr), e);
8918
+ this._options = Object.assign({}, structuredClone(Ir), e);
8888
8919
  }
8889
8920
  /**
8890
8921
  * 默认选项
@@ -8911,7 +8942,7 @@ class yo {
8911
8942
  return this.options.map || (this.map = this.defaultOptions.map), this.options.map;
8912
8943
  }
8913
8944
  set map(e) {
8914
- const t = structuredClone(this.defaultOptions.map), n = structuredClone(Pr);
8945
+ const t = structuredClone(this.defaultOptions.map), n = structuredClone(Ir);
8915
8946
  e = e ? {
8916
8947
  yaw: e.yaw ?? t.yaw ?? n.yaw,
8917
8948
  pitch: e.pitch ?? t.pitch ?? n.pitch,
@@ -8919,16 +8950,16 @@ class yo {
8919
8950
  } : t, this.options.map = e, this._listMap = null;
8920
8951
  }
8921
8952
  get listMap() {
8922
- return this._listMap ?? (this._listMap = Dd(this.map ?? {}));
8953
+ return this._listMap ?? (this._listMap = Cd(this.map ?? {}));
8923
8954
  }
8924
8955
  get front() {
8925
- return this._front || (this.front = this.options.front ?? this.defaultOptions.front ?? sr.front), this._front;
8956
+ return this._front || (this.front = this.options.front ?? this.defaultOptions.front ?? rr.front), this._front;
8926
8957
  }
8927
8958
  set front(e) {
8928
8959
  this._front = new D().copy(e);
8929
8960
  }
8930
8961
  get up() {
8931
- return this._up || (this.up = this.options.up ?? this.defaultOptions.up ?? sr.up), this._up;
8962
+ return this._up || (this.up = this.options.up ?? this.defaultOptions.up ?? rr.up), this._up;
8932
8963
  }
8933
8964
  set up(e) {
8934
8965
  this._up = new D().copy(e);
@@ -8941,8 +8972,8 @@ class yo {
8941
8972
  */
8942
8973
  computeAzimuth(e, t, n) {
8943
8974
  const s = new D().copy(e), r = new D().copy(t ?? this.front), a = new D().copy(n ?? this.up);
8944
- let { yaw: o, pitch: l, roll: c } = Id(s, r, a);
8945
- return this.degrees && (o *= nr, l *= nr, c *= nr), {
8975
+ let { yaw: o, pitch: l, roll: c } = Dd(s, r, a);
8976
+ return this.degrees && (o *= sr, l *= sr, c *= sr), {
8946
8977
  yaw: {
8947
8978
  angle: o,
8948
8979
  name: this.findAzimuthNames("yaw", o)
@@ -8972,7 +9003,7 @@ class yo {
8972
9003
  return n;
8973
9004
  }
8974
9005
  }
8975
- Dn(yo, "_options");
9006
+ In(yo, "_options");
8976
9007
  new yo();
8977
9008
  new Q(
8978
9009
  1,
@@ -8993,7 +9024,7 @@ new Q(
8993
9024
  1
8994
9025
  );
8995
9026
  var le = /* @__PURE__ */ ((i) => (i[i.ThroughIntersect = 1] = "ThroughIntersect", i[i.JointIntersect = 2] = "JointIntersect", i[i.Intersect = 3] = "Intersect", i[i.Tangency = 4] = "Tangency", i[i.Contain = 8] = "Contain", i[i.Dissociation = 16] = "Dissociation", i))(le || {});
8996
- function Cd(i, e) {
9027
+ function Ad(i, e) {
8997
9028
  const [t, n] = i, s = n.clone().sub(t), [r, a] = e, o = a.clone().sub(r);
8998
9029
  if (Yi(o, s)) {
8999
9030
  const l = r.clone().sub(t);
@@ -9001,33 +9032,33 @@ function Cd(i, e) {
9001
9032
  }
9002
9033
  return le.Intersect;
9003
9034
  }
9004
- function Ad(i, e) {
9005
- const [t, n] = i, s = n.clone().sub(t), [r, a] = e, o = a.clone().sub(r), l = s.clone().cross(o), [c, u] = Td(t);
9035
+ function Ed(i, e) {
9036
+ const [t, n] = i, s = n.clone().sub(t), [r, a] = e, o = a.clone().sub(r), l = s.clone().cross(o), [c, u] = Pd(t);
9006
9037
  if (u === 2 ? l === 0 : l.equals(new c()))
9007
9038
  return null;
9008
- const h = r.clone().sub(t).cross(o), d = u === 2 ? h / l : Cn(l, h);
9039
+ const h = r.clone().sub(t).cross(o), d = u === 2 ? h / l : Dn(l, h);
9009
9040
  return s.clone().multiplyScalar(d).add(t);
9010
9041
  }
9011
- function Ed(i, e) {
9012
- const [t, n] = i, [s, r] = e, a = n.clone().sub(t), o = Cd(i, e);
9042
+ function Od(i, e) {
9043
+ const [t, n] = i, [s, r] = e, a = n.clone().sub(t), o = Ad(i, e);
9013
9044
  if (o === le.Tangency) {
9014
9045
  let d = 0, f = 0;
9015
- const p = Cn(a, s.clone().sub(t));
9046
+ const p = Dn(a, s.clone().sub(t));
9016
9047
  p < 0 ? d++ : p > 1 && f++;
9017
- const g = Cn(a, r.clone().sub(t));
9048
+ const g = Dn(a, r.clone().sub(t));
9018
9049
  return g < 0 ? d++ : g > 1 && f++, d === 2 || f === 2 ? le.Dissociation : d + f === 1 ? le.Tangency : le.Contain;
9019
9050
  }
9020
9051
  if (o !== le.Intersect)
9021
9052
  return o;
9022
- const l = Ad(i, e), c = r.clone().sub(s), u = Cn(c, l.clone().sub(s));
9053
+ const l = Ed(i, e), c = r.clone().sub(s), u = Dn(c, l.clone().sub(s));
9023
9054
  if (u < 0 || u > 1)
9024
9055
  return le.Dissociation;
9025
9056
  if (u === 0 || u === 1)
9026
9057
  return le.JointIntersect;
9027
- const h = Cn(a, l.clone().sub(t));
9058
+ const h = Dn(a, l.clone().sub(t));
9028
9059
  return h < 0 || h > 1 ? le.Dissociation : h === 0 || h === 1 ? le.JointIntersect : le.ThroughIntersect;
9029
9060
  }
9030
- function bs(i, e) {
9061
+ function Ss(i, e) {
9031
9062
  const t = e.length;
9032
9063
  let n, s = !1;
9033
9064
  for (let r = 0; r < t; r++) {
@@ -9048,32 +9079,32 @@ function bs(i, e) {
9048
9079
  }
9049
9080
  return s ? le.Tangency : le.Contain;
9050
9081
  }
9051
- function Od(i, e) {
9082
+ function Ld(i, e) {
9052
9083
  const t = i.length;
9053
9084
  let n = 0;
9054
9085
  for (let o = 0; o < t; o++) {
9055
9086
  const l = i[o];
9056
9087
  let c = o + 1;
9057
9088
  c === t && (c = 0);
9058
- const u = i[c], h = Ed([l, u], e);
9089
+ const u = i[c], h = Od([l, u], e);
9059
9090
  if (h & (le.ThroughIntersect | le.Tangency | le.Contain))
9060
9091
  return h;
9061
9092
  h === le.JointIntersect && n++;
9062
9093
  }
9063
- const s = bs(e[0], i);
9094
+ const s = Ss(e[0], i);
9064
9095
  if (n === 0 || n === 1 && s !== le.Tangency)
9065
9096
  return s;
9066
- const r = bs(e[1], i), a = s | r;
9097
+ const r = Ss(e[1], i), a = s | r;
9067
9098
  return a === le.Tangency ? le.Contain : a & le.Tangency ? a & le.Contain ? le.Contain : le.JointIntersect : s;
9068
9099
  }
9069
- function Ld(i, e) {
9100
+ function Fd(i, e) {
9070
9101
  const t = i.length;
9071
9102
  let n = 0, s = !1;
9072
9103
  for (let a = 0; a < t; a++) {
9073
9104
  const o = i[a];
9074
9105
  let l = a + 1;
9075
9106
  l === t && (l = 0);
9076
- const c = i[l], u = Od(e, [o, c]);
9107
+ const c = i[l], u = Ld(e, [o, c]);
9077
9108
  if (u === le.ThroughIntersect)
9078
9109
  return u;
9079
9110
  u === le.JointIntersect ? n++ : u === le.Tangency && (s = !0);
@@ -9082,12 +9113,12 @@ function Ld(i, e) {
9082
9113
  return le.Tangency;
9083
9114
  if (n)
9084
9115
  return le.JointIntersect;
9085
- let r = bs(i[0], e);
9086
- return r === le.Contain || (r = bs(e[0], i), r === le.Contain) ? le.Contain : le.Dissociation;
9116
+ let r = Ss(i[0], e);
9117
+ return r === le.Contain || (r = Ss(e[0], i), r === le.Contain) ? le.Contain : le.Dissociation;
9087
9118
  }
9088
9119
  new Kt();
9089
- const Fd = le.Contain | le.ThroughIntersect;
9090
- class Ss extends ws {
9120
+ const Bd = le.Contain | le.ThroughIntersect;
9121
+ class Ms extends bs {
9091
9122
  constructor(e, t, n = !0) {
9092
9123
  super(e), te(this, "flatTriangle"), te(this, "matrixInvert", new Q()), te(this, "needUpdateFace", !0), this.matrixAutoUpdate = !1, t && (t.add(this), n && this.updateFace());
9093
9124
  }
@@ -9115,14 +9146,14 @@ class Ss extends ws {
9115
9146
  * @returns
9116
9147
  */
9117
9148
  isOutFlatRange(e) {
9118
- const { flatTriangle: { a: t, b: n, c: s } } = this, [r, a, o] = Tr;
9119
- return r.copy(t), a.copy(n), o.copy(s), !(Ld([r, a, o], e) & Fd);
9149
+ const { flatTriangle: { a: t, b: n, c: s } } = this, [r, a, o] = Pr;
9150
+ return r.copy(t), a.copy(n), o.copy(s), !(Fd([r, a, o], e) & Bd);
9120
9151
  }
9121
9152
  updateSelfChildren(e = {}, t = this.root.equalVertexIndexMap, n) {
9122
9153
  this.updateFace();
9123
9154
  const { geometry: s } = this;
9124
9155
  return this.removeChildFaces(e), this.getAdjacentFaces(e, t).forEach((r) => {
9125
- const a = new Ss({ geometry: s, ...r }, this, !0);
9156
+ const a = new Ms({ geometry: s, ...r }, this, !0);
9126
9157
  if (n && a.isOutFlatRange(n)) {
9127
9158
  this.remove(a);
9128
9159
  return;
@@ -9138,8 +9169,8 @@ class Ss extends ws {
9138
9169
  return this.removeFromParent(), e;
9139
9170
  e[this.faceIndex] = this;
9140
9171
  }
9141
- return t || (t = this.equalVertexIndexMap = this.root.equalVertexIndexMap ?? Nn(s.attributes.position.array)), this.getAdjacentFaces(e, t).forEach((r) => {
9142
- const a = new Ss({ geometry: s, ...r }, this);
9172
+ return t || (t = this.equalVertexIndexMap = this.root.equalVertexIndexMap ?? Rn(s.attributes.position.array)), this.getAdjacentFaces(e, t).forEach((r) => {
9173
+ const a = new Ms({ geometry: s, ...r }, this);
9143
9174
  if (n && a.isOutFlatRange(n)) {
9144
9175
  this.remove(a);
9145
9176
  return;
@@ -9153,7 +9184,7 @@ class Ss extends ws {
9153
9184
  if (t && this.isOutFlatRange(t))
9154
9185
  return this.removeFromParent(), n;
9155
9186
  n[this.faceIndex] = this;
9156
- const s = this.equalVertexIndexMap = e?.epsilon == null && this.equalVertexIndexMap ? this.equalVertexIndexMap : Nn(this.geometry.attributes.position.array, e);
9187
+ const s = this.equalVertexIndexMap = e?.epsilon == null && this.equalVertexIndexMap ? this.equalVertexIndexMap : Rn(this.geometry.attributes.position.array, e);
9157
9188
  return this.traversalBFS(function(r) {
9158
9189
  r.updateSelfChildren(n, s, t);
9159
9190
  }), n;
@@ -9288,7 +9319,7 @@ class Ss extends ws {
9288
9319
  return s;
9289
9320
  }
9290
9321
  }
9291
- class ii extends Ss {
9322
+ class ai extends Ms {
9292
9323
  constructor(e) {
9293
9324
  var t;
9294
9325
  const { geometry: n, faceIndex: s, origin: r, normal: a, angle: o = 0, xyPlane: l = !1, meshMatrix: c, flatRange: u } = e;
@@ -9309,7 +9340,7 @@ class ii extends Ss {
9309
9340
  * @returns
9310
9341
  */
9311
9342
  static createFlatFaceTreeByRay(e) {
9312
- const { object: t, origin: n, direction: s, angle: r, planeNormal: a, ...o } = e, l = new un(n, s), [c] = l.intersectObject(t);
9343
+ const { object: t, origin: n, direction: s, angle: r, planeNormal: a, ...o } = e, l = new Nn(n, s), [c] = l.intersectObject(t);
9313
9344
  if (!c)
9314
9345
  return null;
9315
9346
  const { object: u, instanceId: h, point: d, normal: f, faceIndex: p, face: g } = c;
@@ -9317,7 +9348,7 @@ class ii extends Ss {
9317
9348
  return null;
9318
9349
  const { geometry: v, matrixWorld: w } = u, S = new Q();
9319
9350
  h == null ? S.copy(w) : (u.getMatrixAt(h, S), S.premultiply(w));
9320
- const b = yd[0].copy(S).invert();
9351
+ const b = vd[0].copy(S).invert();
9321
9352
  let A;
9322
9353
  switch (a) {
9323
9354
  case 1: {
@@ -9331,7 +9362,7 @@ class ii extends Ss {
9331
9362
  default:
9332
9363
  A = g.normal;
9333
9364
  }
9334
- return d.applyMatrix4(b), new ii({ ...o, geometry: v, origin: d, faceIndex: p, normal: A, angle: r, meshMatrix: S });
9365
+ return d.applyMatrix4(b), new ai({ ...o, geometry: v, origin: d, faceIndex: p, normal: A, angle: r, meshMatrix: S });
9335
9366
  }
9336
9367
  updateMatrix() {
9337
9368
  if (!this.xyPlane)
@@ -9508,7 +9539,7 @@ class ii extends Ss {
9508
9539
  return t && e.matrix.copy(t), e.matrix.multiply(n), e.matrix.decompose(e.position, e.quaternion, e.scale), e;
9509
9540
  }
9510
9541
  }
9511
- function Bd(i, e, t) {
9542
+ function kd(i, e, t) {
9512
9543
  for (let n = 0; n < t.length; n++) {
9513
9544
  const s = t[n];
9514
9545
  i = _i(i, e, n, s), i = _i(i, e, n, -s);
@@ -9565,7 +9596,7 @@ function Qe(i, e, t, n, s = []) {
9565
9596
  }
9566
9597
  return s;
9567
9598
  }
9568
- function kd(i, e) {
9599
+ function zd(i, e) {
9569
9600
  const t = i.length / e | 0;
9570
9601
  for (let n = 0; n < e; n++) {
9571
9602
  const s = n * t, r = i.slice(s, s + t);
@@ -9577,7 +9608,7 @@ function kd(i, e) {
9577
9608
  return i;
9578
9609
  }
9579
9610
  var Lt = /* @__PURE__ */ ((i) => (i[i.Projection = 0] = "Projection", i[i.Distance = 1] = "Distance", i[i.ContinuousDistance = 2] = "ContinuousDistance", i[i.UVIncrement = 3] = "UVIncrement", i[i.Mapping = 4] = "Mapping", i[i.Original = 5] = "Original", i))(Lt || {});
9580
- class zd extends Ce {
9611
+ class Rd extends Ce {
9581
9612
  constructor() {
9582
9613
  super(...arguments), te(this, "isDecalGeometry", !0), te(this, "originalUVs"), te(this, "uvMap", 1), te(this, "offsetFactor", 0), te(this, "offsetUnits", 0), te(this, "epsilon", 1e-8), te(this, "relativeEpsilon", !1), te(this, "_equalVertexIndexMap", null), te(this, "_equalVertexIndexes", null), te(this, "border", []);
9583
9614
  }
@@ -9588,7 +9619,7 @@ class zd extends Ce {
9588
9619
  let { _equalVertexIndexMap: e } = this;
9589
9620
  if (!e) {
9590
9621
  const { cutPositions: t, epsilon: n, relativeEpsilon: s } = this;
9591
- this._equalVertexIndexMap = e = Nn(t, { epsilon: n, relativeEpsilon: s }), this._equalVertexIndexes = null;
9622
+ this._equalVertexIndexMap = e = Rn(t, { epsilon: n, relativeEpsilon: s }), this._equalVertexIndexes = null;
9592
9623
  }
9593
9624
  return e;
9594
9625
  }
@@ -9615,7 +9646,7 @@ class zd extends Ce {
9615
9646
  * @returns
9616
9647
  */
9617
9648
  clipGeometryData(e, t) {
9618
- return Bd(e, t, this.border);
9649
+ return kd(e, t, this.border);
9619
9650
  }
9620
9651
  /**
9621
9652
  * 生成偏移的顶点
@@ -9631,7 +9662,7 @@ class zd extends Ce {
9631
9662
  t.boundingBox || t.computeBoundingBox();
9632
9663
  let l = o.normal;
9633
9664
  if (!l) {
9634
- const S = bd(e, (n = this.index) == null ? void 0 : n.array);
9665
+ const S = Sd(e, (n = this.index) == null ? void 0 : n.array);
9635
9666
  o.normal = l = new ge(S, 3);
9636
9667
  }
9637
9668
  const { array: c, itemSize: u, count: h } = l, d = mo(c, u, a, !0), [f, p, g, v] = bt;
@@ -9651,7 +9682,7 @@ class zd extends Ce {
9651
9682
  * @returns
9652
9683
  */
9653
9684
  generateDistanceUVs(e) {
9654
- const t = [], n = Tr[0], s = new ur();
9685
+ const t = [], n = Pr[0], s = new dr();
9655
9686
  for (let h = 0; h < e.length; h += 3)
9656
9687
  n.fromArray(e, h), n.toArray(t, t.length), s.expandByPoint(n);
9657
9688
  const { x: r, y: a } = s.getSize(new oe()), { x: o, y: l } = s.min, c = new Kt(
@@ -9689,7 +9720,7 @@ class zd extends Ce {
9689
9720
  const { originalUVs: e } = this;
9690
9721
  if (!e)
9691
9722
  throw "ProjectionDecalGeometry#mesh 缺少 uv; DecalUVMapType.Mapping 类型的 uvMap 需要 uv";
9692
- const t = Tr[0], n = new ur(), s = e.length;
9723
+ const t = Pr[0], n = new dr(), s = e.length;
9693
9724
  for (let h = 0; h < s; h += 2)
9694
9725
  t.fromArray(e, h), n.expandByPoint(t);
9695
9726
  const { x: r, y: a } = n.getSize(t), { x: o, y: l } = n.min, c = new Kt(
@@ -9706,7 +9737,7 @@ class zd extends Ce {
9706
9737
  return u.applyMatrix3(c), u;
9707
9738
  }
9708
9739
  }
9709
- class Rd extends zd {
9740
+ class Nd extends Rd {
9710
9741
  constructor(e) {
9711
9742
  super(), te(this, "isRigidDecalGeometry", !0), te(this, "object"), te(this, "origin", new D()), te(this, "direction", new D()), te(this, "angle", -0), te(this, "_size", new oe()), te(this, "cutPositions", []), te(this, "flatPositions", []), te(this, "averageFlatPositions"), te(this, "faceTree", null), te(this, "branchFace", !1), this.setOptions(e);
9712
9743
  }
@@ -9740,7 +9771,7 @@ class Rd extends zd {
9740
9771
  * 更新几何体
9741
9772
  */
9742
9773
  updateGeometry() {
9743
- const { object: e, origin: t, direction: n, angle: s, border: [r, a], branchFace: o, epsilon: l, relativeEpsilon: c } = this, u = this.faceTree = ii.createFlatFaceTreeByRay({ object: e, origin: t, direction: n, angle: s, flatRange: [new oe(r, a), new oe(-r, a), new oe(-r, -a), new oe(r, -a)], xyPlane: !0, branchFace: o, epsilon: l, relativeEpsilon: c });
9774
+ const { object: e, origin: t, direction: n, angle: s, border: [r, a], branchFace: o, epsilon: l, relativeEpsilon: c } = this, u = this.faceTree = ai.createFlatFaceTreeByRay({ object: e, origin: t, direction: n, angle: s, flatRange: [new oe(r, a), new oe(-r, a), new oe(-r, -a), new oe(r, -a)], xyPlane: !0, branchFace: o, epsilon: l, relativeEpsilon: c });
9744
9775
  if (this._equalVertexIndexMap = this._equalVertexIndexes = null, !u)
9745
9776
  return this.empty();
9746
9777
  const { flatPositions: h, positions: d, normals: f, uvs: p, averagePositions: g } = this.generateDecalGeometryData(this.geometry);
@@ -9776,7 +9807,7 @@ class Rd extends zd {
9776
9807
  };
9777
9808
  return r.forEach((f, p) => {
9778
9809
  d[f] = c[p + 1];
9779
- }), d.normals && kd(d.normals, 3), l && (d.averagePositions = c.at(-1)), d;
9810
+ }), d.normals && zd(d.normals, 3), l && (d.averagePositions = c.at(-1)), d;
9780
9811
  }
9781
9812
  updatePosition() {
9782
9813
  const { cutPositions: e, geometry: t } = this, n = this.generateOffsetPosition(e, t), s = new ge(n, 3);
@@ -9845,7 +9876,7 @@ class Rd extends zd {
9845
9876
  }
9846
9877
  }
9847
9878
  const Xi = /* @__PURE__ */ new Map();
9848
- class Ir extends De {
9879
+ class Dr extends De {
9849
9880
  constructor(e) {
9850
9881
  super(e), this.params = e, this.stype = "Decal";
9851
9882
  const { material: t } = this.decalMesh;
@@ -9860,7 +9891,7 @@ class Ir extends De {
9860
9891
  n.map = t;
9861
9892
  else {
9862
9893
  const r = new qt();
9863
- r.image = await Cs.loadAsync(e), r.colorSpace = dt, r.needsUpdate = !0, n.map = r, Xi.set(e, r);
9894
+ r.image = await As.loadAsync(e), r.colorSpace = dt, r.needsUpdate = !0, n.map = r, Xi.set(e, r);
9864
9895
  }
9865
9896
  n.needsUpdate = !0;
9866
9897
  const { image: s } = n.map;
@@ -9874,20 +9905,20 @@ class Ir extends De {
9874
9905
  s.color.set(t), s.opacity = n;
9875
9906
  }
9876
9907
  }
9877
- function Nd(i) {
9878
- const e = jd(i), t = new Q();
9908
+ function jd(i) {
9909
+ const e = Ud(i), t = new Q();
9879
9910
  t.setFromMatrix3(e);
9880
9911
  const n = i[0], s = t.clone();
9881
9912
  s.setPosition(n);
9882
9913
  const r = s.clone().invert(), a = i.map((d) => {
9883
9914
  const f = d.clone().applyMatrix4(r);
9884
9915
  return new oe(f.x, f.y);
9885
- }), o = new fa(a), l = new Yl(o), c = new ur();
9916
+ }), o = new fa(a), l = new Yl(o), c = new dr();
9886
9917
  c.setFromPoints(a);
9887
- const u = Ud(c);
9918
+ const u = Gd(c);
9888
9919
  return l.getAttribute("uv").applyMatrix3(u), l.applyMatrix4(t), { geometry: l, polygonBox: c, modelMatrix: t, planeMatrix: s, projectionMatrix: r, position: n };
9889
9920
  }
9890
- function jd(i) {
9921
+ function Ud(i) {
9891
9922
  const [e, t, n] = i, s = new _l();
9892
9923
  s.setFromCoplanarPoints(t, e, n);
9893
9924
  const r = s.normal, a = r.clone().cross(new D(0, 0, 1));
@@ -9907,7 +9938,7 @@ function jd(i) {
9907
9938
  r.z
9908
9939
  ], l;
9909
9940
  }
9910
- function Ud(i) {
9941
+ function Gd(i) {
9911
9942
  const e = i.min, t = i.getSize(new oe()), n = new Kt();
9912
9943
  return n.elements = [
9913
9944
  t.x,
@@ -9922,48 +9953,48 @@ function Ud(i) {
9922
9953
  ], n.invert();
9923
9954
  }
9924
9955
  function vo(i, e) {
9925
- const t = fn(e);
9956
+ const t = pn(e);
9926
9957
  return i.intersectsBox(t);
9927
9958
  }
9928
- function ai(i, e, t) {
9959
+ function oi(i, e, t) {
9929
9960
  if (typeof i == "string") {
9930
9961
  let n = e ? t?.get(i) : null;
9931
9962
  return n || (n = _t.load(i, () => {
9932
9963
  Se.needsUpdate = !0;
9933
9964
  }), t?.set(i, n)), n;
9934
9965
  }
9935
- return i instanceof HTMLImageElement ? new qt(i) : i instanceof HTMLCanvasElement ? new Br(i) : new Ql(i);
9966
+ return i instanceof HTMLImageElement ? new qt(i) : i instanceof HTMLCanvasElement ? new kr(i) : new Ql(i);
9936
9967
  }
9937
- function Gd(i, e, t, n) {
9938
- const s = i.map, r = ai(e, t, n);
9968
+ function Vd(i, e, t, n) {
9969
+ const s = i.map, r = oi(e, t, n);
9939
9970
  if (s) {
9940
9971
  const a = r.source;
9941
9972
  r.copy(s), r.source = a;
9942
9973
  }
9943
9974
  return i.map = r, r;
9944
9975
  }
9945
- function Vd(i, e) {
9976
+ function Hd(i, e) {
9946
9977
  const { top: t, left: n, bottom: s, right: r, front: a, back: o } = i, l = new D(r, t, a), c = new D(n, s, o), u = new Wt();
9947
9978
  return function(d) {
9948
9979
  return u.max.addVectors(d, l), u.min.subVectors(d, c), e.filter((f) => vo(u, f));
9949
9980
  };
9950
9981
  }
9951
- function Hd(i, e) {
9952
- const t = new Is(new D(), i);
9982
+ function Wd(i, e) {
9983
+ const t = new Ds(new D(), i);
9953
9984
  return function(s) {
9954
9985
  return t.center.copy(s), e.filter((r) => vo(t, r));
9955
9986
  };
9956
9987
  }
9957
- function Wd(i, e) {
9988
+ function qd(i, e) {
9958
9989
  const t = i.length - 1, n = [];
9959
9990
  for (let r = 0; r < t; r++) {
9960
9991
  const a = i[r], o = i[r + 1], l = new ua(a, o);
9961
9992
  n.push(l);
9962
9993
  }
9963
- const s = new Is(new D(), e);
9994
+ const s = new Ds(new D(), e);
9964
9995
  return function(a) {
9965
9996
  return a.filter((o) => {
9966
- const l = fn(o), c = new D();
9997
+ const l = pn(o), c = new D();
9967
9998
  l.getCenter(c);
9968
9999
  const u = n.filter((f) => {
9969
10000
  const p = f.closestPointToPointParameter(c);
@@ -9987,9 +10018,9 @@ class xo extends ze {
9987
10018
  const w = n ? {
9988
10019
  transparent: !0,
9989
10020
  ...v,
9990
- map: ai(n, g, t)
10021
+ map: oi(n, g, t)
9991
10022
  } : v;
9992
- this.geometry = new pn(r, a), this.material = c ? new Fr(w) : new dn(w), this.material.depthWrite = !this.material.transparent, this.image = n;
10023
+ this.geometry = new dn(r, a), this.material = c ? new Br(w) : new un(w), this.material.depthWrite = !this.material.transparent, this.image = n;
9993
10024
  }
9994
10025
  }
9995
10026
  class wo extends ze {
@@ -9998,8 +10029,8 @@ class wo extends ze {
9998
10029
  const { points: n, image: s, color: r, needLight: a, id: o, name: l, userData: c, level: u, visible: h, cache: d, ...f } = e, p = n.map((A) => new D(A.x, A.y, A.z)), g = s ? {
9999
10030
  transparent: !0,
10000
10031
  ...f,
10001
- map: ai(s, d ?? !0, t)
10002
- } : f, v = a ? new Fr(g) : new dn(g), { geometry: w, position: S } = Nd(p), b = { id: o, name: l, userData: c, level: u, visible: h };
10032
+ map: oi(s, d ?? !0, t)
10033
+ } : f, v = a ? new Br(g) : new un(g), { geometry: w, position: S } = jd(p), b = { id: o, name: l, userData: c, level: u, visible: h };
10003
10034
  super(b, w, v), this.position.copy(S), this.material = v, this.geometry = w, this.image = s;
10004
10035
  }
10005
10036
  }
@@ -10008,27 +10039,28 @@ const Zi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10008
10039
  BaseMesh: ze,
10009
10040
  BaseObject3D: De,
10010
10041
  Canvas3D: ds,
10011
- Circle: ri,
10012
- Decal: Ir,
10042
+ Circle: ii,
10043
+ Decal: Dr,
10013
10044
  DecalUVMapType: Lt,
10014
10045
  Ground: uo,
10015
10046
  Group: Yt,
10016
- Icon: Mr,
10047
+ Icon: Tr,
10017
10048
  Line: co,
10018
10049
  Link: lo,
10019
10050
  Model: xt,
10020
10051
  Node: oo,
10021
10052
  PluginObject: ao,
10022
- Poi: Fs,
10053
+ Poi: Bs,
10023
10054
  PoiMesh: xo,
10024
10055
  PoiNode: Ht,
10025
- Point: si,
10056
+ Point: ri,
10026
10057
  Polygon: ho,
10027
10058
  PolygonPoiMesh: wo,
10028
10059
  Topology: ht,
10029
- isPoiNode25D: ti,
10030
- isPoiNode2D: ei,
10031
- isPoiNode3D: ni
10060
+ clearLinkTextureCache: fd,
10061
+ isPoiNode25D: ni,
10062
+ isPoiNode2D: ti,
10063
+ isPoiNode3D: si
10032
10064
  }, Symbol.toStringTag, { value: "Module" }));
10033
10065
  function bo(i) {
10034
10066
  const e = {};
@@ -10042,23 +10074,23 @@ function bo(i) {
10042
10074
  e.curve = i;
10043
10075
  return e;
10044
10076
  }
10045
- function qd(i, e, t, n) {
10077
+ function Kd(i, e, t, n) {
10046
10078
  const s = n ? cn(n, !1) : null, r = bo(e), { clip: a } = zh({ ...s, ...r, target: i }), o = t.playModelAnimation(i, a), { points: l } = r;
10047
10079
  return l ? (o.enableKeyframeEvent = !1, o.points = l) : o.enablePointEvent = !1, o;
10048
10080
  }
10049
- function Kd(i, e, t, n) {
10081
+ function Qd(i, e, t, n) {
10050
10082
  const s = n ? cn(n, !1) : null, r = bo(e), a = Gh({ ...s, ...r, target: i }), { model: o, clip: l } = a, c = t.playModelAnimation(o, l);
10051
10083
  return { ...a, action: c };
10052
10084
  }
10053
- function Qd(i, e) {
10085
+ function Yd(i, e) {
10054
10086
  const t = Ha({ ...e, target: i }), { model: n, skeleton: s } = t;
10055
10087
  return { skeletalModel: n, skeleton: s };
10056
10088
  }
10057
- function Yd(i, e, t, n) {
10089
+ function _d(i, e, t, n) {
10058
10090
  const s = Ka({ ...n, target: i, skeleton: e });
10059
10091
  return t.playModelAnimation(e, s);
10060
10092
  }
10061
- const _d = () => ({
10093
+ const Xd = () => ({
10062
10094
  // window
10063
10095
  windowResize: new ae.Signal(),
10064
10096
  cameraObjectChange: new ae.Signal(),
@@ -10121,7 +10153,7 @@ const _d = () => ({
10121
10153
  // Properties changed
10122
10154
  propertiesChanged: new ae.Signal()
10123
10155
  });
10124
- class Xd {
10156
+ class Zd {
10125
10157
  objects = /* @__PURE__ */ new Map();
10126
10158
  classified = {
10127
10159
  Group: /* @__PURE__ */ new Set(),
@@ -10170,7 +10202,7 @@ class mt {
10170
10202
  }), this.viewport.signals.objectChanged.dispatch();
10171
10203
  }
10172
10204
  }
10173
- class Zd extends mt {
10205
+ class Jd extends mt {
10174
10206
  constructor(e, t) {
10175
10207
  super(et.Light, e, t.classified.Light), this.viewport = e, this.cache = t, Lc.init();
10176
10208
  }
@@ -10298,7 +10330,7 @@ class Zd extends mt {
10298
10330
  openShadow: l = !1,
10299
10331
  shadowAutoUpdate: c = !1,
10300
10332
  mapSize: u = 4096
10301
- } = e, h = new dr(s, r, a);
10333
+ } = e, h = new pr(s, r, a);
10302
10334
  return h.name = n, h.userData.sid = t, h.userData.stype = "Light", h.position.set(o.x, o.y, o.z), h.castShadow = l, l && (h.shadow.bias = -5e-3, h.shadow.camera.far = a, h.shadow.autoUpdate = c, h.shadow.needsUpdate = !c, h.shadow.mapSize.width = u, h.shadow.mapSize.height = u, h.shadow.camera.updateProjectionMatrix()), this.viewport.scener.addObject(h, this.scene), h;
10303
10335
  }
10304
10336
  setPointLight(e, t) {
@@ -10350,12 +10382,12 @@ class Zd extends mt {
10350
10382
  }
10351
10383
  }
10352
10384
  let de, Pe, Re;
10353
- class Jd extends ms {
10385
+ class $d extends ms {
10354
10386
  constructor(e) {
10355
10387
  super(e);
10356
10388
  }
10357
10389
  load(e, t, n, s) {
10358
- const r = this, a = r.path === "" ? Jl.extractUrlBase(e) : r.path, o = new Er(this.manager);
10390
+ const r = this, a = r.path === "" ? Jl.extractUrlBase(e) : r.path, o = new Or(this.manager);
10359
10391
  o.setPath(r.path), o.setResponseType("arraybuffer"), o.setRequestHeader(r.requestHeader), o.setWithCredentials(r.withCredentials), o.load(e, function(l) {
10360
10392
  try {
10361
10393
  t(r.parse(l, a));
@@ -10365,27 +10397,27 @@ class Jd extends ms {
10365
10397
  }, n, s);
10366
10398
  }
10367
10399
  parse(e, t) {
10368
- if (rp(e))
10369
- de = new sp().parse(e);
10400
+ if (ip(e))
10401
+ de = new rp().parse(e);
10370
10402
  else {
10371
10403
  const s = Po(e);
10372
- if (!ip(s))
10404
+ if (!ap(s))
10373
10405
  throw new Error("THREE.FBXLoader: Unknown format.");
10374
10406
  if ($i(s) < 7e3)
10375
10407
  throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: " + $i(s));
10376
- de = new np().parse(s);
10408
+ de = new sp().parse(s);
10377
10409
  }
10378
10410
  const n = new ha(this.manager).setPath(this.resourcePath || t).setCrossOrigin(this.crossOrigin);
10379
- return new $d(n, this.manager).parse(de);
10411
+ return new ep(n, this.manager).parse(de);
10380
10412
  }
10381
10413
  }
10382
- class $d {
10414
+ class ep {
10383
10415
  constructor(e, t) {
10384
10416
  this.textureLoader = e, this.manager = t;
10385
10417
  }
10386
10418
  parse() {
10387
10419
  Pe = this.parseConnections();
10388
- const e = this.parseImages(), t = this.parseTextures(e), n = this.parseMaterials(t), s = this.parseDeformers(), r = new ep().parse(s);
10420
+ const e = this.parseImages(), t = this.parseTextures(e), n = this.parseMaterials(t), s = this.parseDeformers(), r = new tp().parse(s);
10389
10421
  return this.parseScene(s, r, n), Re;
10390
10422
  }
10391
10423
  // Parses FBXTree.Connections which holds parent-child connections between objects (e.g. material -> texture, model->geometry )
@@ -10482,7 +10514,7 @@ class $d {
10482
10514
  const n = this.loadTexture(e, t);
10483
10515
  n.ID = e.id, n.name = e.attrName;
10484
10516
  const s = e.WrapModeU, r = e.WrapModeV, a = s !== void 0 ? s.value : 0, o = r !== void 0 ? r.value : 0;
10485
- if (n.wrapS = a === 0 ? ft : di, n.wrapT = o === 0 ? ft : di, "Scaling" in e) {
10517
+ if (n.wrapS = a === 0 ? ft : pi, n.wrapT = o === 0 ? ft : pi, "Scaling" in e) {
10486
10518
  const l = e.Scaling.value;
10487
10519
  n.repeat.x = l[0], n.repeat.y = l[1];
10488
10520
  }
@@ -10567,7 +10599,7 @@ class $d {
10567
10599
  s.normalMap = r.getTexture(t, a.ID);
10568
10600
  break;
10569
10601
  case "ReflectionColor":
10570
- s.envMap = r.getTexture(t, a.ID), s.envMap !== void 0 && (s.envMap.mapping = lr, s.envMap.colorSpace = dt);
10602
+ s.envMap = r.getTexture(t, a.ID), s.envMap !== void 0 && (s.envMap.mapping = cr, s.envMap.colorSpace = dt);
10571
10603
  break;
10572
10604
  case "SpecularColor":
10573
10605
  s.specularMap = r.getTexture(t, a.ID), s.specularMap !== void 0 && (s.specularMap.colorSpace = dt);
@@ -10668,7 +10700,7 @@ class $d {
10668
10700
  l.applyMatrix4(c), l.updateWorldMatrix();
10669
10701
  }
10670
10702
  });
10671
- const o = new tp().parse();
10703
+ const o = new np().parse();
10672
10704
  Re.children.length === 1 && Re.children[0].isGroup && (Re.children[0].animations = o, Re = Re.children[0]), Re.animations = o;
10673
10705
  }
10674
10706
  // parse nodes in FBXTree.Objects.Model
@@ -10742,7 +10774,7 @@ class $d {
10742
10774
  const h = n.FocalLength ? n.FocalLength.value : null;
10743
10775
  switch (s) {
10744
10776
  case 0:
10745
- t = new Ps(u, c, r, a), h !== null && t.setFocalLength(h);
10777
+ t = new Is(u, c, r, a), h !== null && t.setFocalLength(h);
10746
10778
  break;
10747
10779
  case 1:
10748
10780
  t = new Qt(-o / 2, o / 2, l / 2, -l / 2, r, a);
@@ -10774,7 +10806,7 @@ class $d {
10774
10806
  const l = 1;
10775
10807
  switch (s) {
10776
10808
  case 0:
10777
- t = new dr(r, a, o, l);
10809
+ t = new pr(r, a, o, l);
10778
10810
  break;
10779
10811
  case 1:
10780
10812
  t = new ya(r, a);
@@ -10786,7 +10818,7 @@ class $d {
10786
10818
  n.OuterAngle !== void 0 && (u = Oe.degToRad(n.OuterAngle.value), u = Math.max(u, 1)), t = new va(r, a, o, c, u, l);
10787
10819
  break;
10788
10820
  default:
10789
- console.warn("THREE.FBXLoader: Unknown light type " + n.LightType.value + ", defaulting to a PointLight."), t = new dr(r, a);
10821
+ console.warn("THREE.FBXLoader: Unknown light type " + n.LightType.value + ", defaulting to a PointLight."), t = new pr(r, a);
10790
10822
  break;
10791
10823
  }
10792
10824
  n.CastShadows !== void 0 && n.CastShadows.value === 1 && (t.castShadow = !0);
@@ -10803,12 +10835,12 @@ class $d {
10803
10835
  color: 13421772
10804
10836
  }), o.push(a)), "color" in r.attributes && o.forEach(function(l) {
10805
10837
  l.vertexColors = !0;
10806
- }), r.FBX_Deformer ? (s = new Lr(r, a), s.normalizeSkinWeights()) : (s = new we(r, a), s.castShadow = !0, s.receiveShadow = !0), s;
10838
+ }), r.FBX_Deformer ? (s = new Fr(r, a), s.normalizeSkinWeights()) : (s = new we(r, a), s.castShadow = !0, s.receiveShadow = !0), s;
10807
10839
  }
10808
10840
  createCurve(e, t) {
10809
10841
  const n = e.children.reduce(function(r, a) {
10810
10842
  return t.has(a.ID) && (r = t.get(a.ID)), r;
10811
- }, null), s = new En({
10843
+ }, null), s = new An({
10812
10844
  name: ms.DEFAULT_MATERIAL_NAME,
10813
10845
  color: 3342591,
10814
10846
  linewidth: 1
@@ -10839,7 +10871,7 @@ class $d {
10839
10871
  if (t.has(l.ID)) {
10840
10872
  const c = l.ID;
10841
10873
  Pe.get(c).parents.forEach(function(h) {
10842
- n.has(h.ID) && n.get(h.ID).bind(new Or(a.bones), s[h.ID]);
10874
+ n.has(h.ID) && n.get(h.ID).bind(new Lr(a.bones), s[h.ID]);
10843
10875
  });
10844
10876
  }
10845
10877
  });
@@ -10870,7 +10902,7 @@ class $d {
10870
10902
  }
10871
10903
  }
10872
10904
  }
10873
- class ep {
10905
+ class tp {
10874
10906
  constructor() {
10875
10907
  this.negativeMaterialIndices = !1;
10876
10908
  }
@@ -11145,7 +11177,7 @@ class ep {
11145
11177
  return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s", e.Order, e.id), new Ce();
11146
11178
  const n = t - 1, s = e.KnotVector.a, r = [], a = e.Points.a;
11147
11179
  for (let h = 0, d = a.length; h < d; h += 4)
11148
- r.push(new Ms().fromArray(a, h));
11180
+ r.push(new Ts().fromArray(a, h));
11149
11181
  let o, l;
11150
11182
  if (e.Form === "Closed")
11151
11183
  r.push(r[0]);
@@ -11158,7 +11190,7 @@ class ep {
11158
11190
  return new Ce().setFromPoints(u);
11159
11191
  }
11160
11192
  }
11161
- class tp {
11193
+ class np {
11162
11194
  // take raw animation clips and turn them into three.js animation clips
11163
11195
  parse() {
11164
11196
  const e = [], t = this.parseClips();
@@ -11202,7 +11234,7 @@ class tp {
11202
11234
  for (const n in t) {
11203
11235
  const s = {
11204
11236
  id: t[n].id,
11205
- times: t[n].KeyTime.a.map(ap),
11237
+ times: t[n].KeyTime.a.map(op),
11206
11238
  values: t[n].KeyValueFloat.a
11207
11239
  }, r = Pe.get(s.id);
11208
11240
  if (r !== void 0) {
@@ -11410,7 +11442,7 @@ class tp {
11410
11442
  return [r, a];
11411
11443
  }
11412
11444
  }
11413
- class np {
11445
+ class sp {
11414
11446
  getPrevNode() {
11415
11447
  return this.nodeStack[this.currentIndent - 2];
11416
11448
  }
@@ -11464,13 +11496,13 @@ class np {
11464
11496
  let h = r.split(",").slice(3);
11465
11497
  h = h.map(function(d) {
11466
11498
  return d.trim().replace(/^"/, "");
11467
- }), s = "connections", r = [c, u], lp(r, h), a[s] === void 0 && (a[s] = []);
11499
+ }), s = "connections", r = [c, u], cp(r, h), a[s] === void 0 && (a[s] = []);
11468
11500
  }
11469
- s === "Node" && (a.id = r), s in a && Array.isArray(a[s]) ? a[s].push(r) : s !== "a" ? a[s] = r : a.a = r, this.setCurrentProp(a, s), s === "a" && r.slice(-1) !== "," && (a.a = ir(r));
11501
+ s === "Node" && (a.id = r), s in a && Array.isArray(a[s]) ? a[s].push(r) : s !== "a" ? a[s] = r : a.a = r, this.setCurrentProp(a, s), s === "a" && r.slice(-1) !== "," && (a.a = ar(r));
11470
11502
  }
11471
11503
  parseNodePropertyContinued(e) {
11472
11504
  const t = this.getCurrentNode();
11473
- t.a += e, e.slice(-1) !== "," && (t.a = ir(t.a));
11505
+ t.a += e, e.slice(-1) !== "," && (t.a = ar(t.a));
11474
11506
  }
11475
11507
  // parse "Property70"
11476
11508
  parseNodeSpecialProperty(e, t, n) {
@@ -11494,7 +11526,7 @@ class np {
11494
11526
  case "Lcl_Translation":
11495
11527
  case "Lcl_Rotation":
11496
11528
  case "Lcl_Scaling":
11497
- c = ir(c);
11529
+ c = ar(c);
11498
11530
  break;
11499
11531
  }
11500
11532
  this.getPrevNode()[r] = {
@@ -11505,7 +11537,7 @@ class np {
11505
11537
  }, this.setCurrentProp(this.getPrevNode(), r);
11506
11538
  }
11507
11539
  }
11508
- class sp {
11540
+ class rp {
11509
11541
  parse(e) {
11510
11542
  const t = new Ji(e);
11511
11543
  t.skip(23);
@@ -11734,11 +11766,11 @@ class So {
11734
11766
  this[e] = t;
11735
11767
  }
11736
11768
  }
11737
- function rp(i) {
11769
+ function ip(i) {
11738
11770
  const e = "Kaydara FBX Binary \0";
11739
11771
  return i.byteLength >= e.length && e === Po(i, 0, e.length);
11740
11772
  }
11741
- function ip(i) {
11773
+ function ap(i) {
11742
11774
  const e = ["K", "a", "y", "d", "a", "r", "a", "\\", "F", "B", "X", "\\", "B", "i", "n", "a", "r", "y", "\\", "\\"];
11743
11775
  let t = 0;
11744
11776
  function n(s) {
@@ -11756,10 +11788,10 @@ function $i(i) {
11756
11788
  return parseInt(t[1]);
11757
11789
  throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.");
11758
11790
  }
11759
- function ap(i) {
11791
+ function op(i) {
11760
11792
  return i / 46186158e3;
11761
11793
  }
11762
- const op = [];
11794
+ const lp = [];
11763
11795
  function as(i, e, t, n) {
11764
11796
  let s;
11765
11797
  switch (n.mappingType) {
@@ -11780,22 +11812,22 @@ function as(i, e, t, n) {
11780
11812
  }
11781
11813
  n.referenceType === "IndexToDirect" && (s = n.indices[s]);
11782
11814
  const r = s * n.dataSize, a = r + n.dataSize;
11783
- return cp(op, n.buffer, r, a);
11815
+ return hp(lp, n.buffer, r, a);
11784
11816
  }
11785
- const rr = new pe(), rn = new D();
11817
+ const ir = new pe(), rn = new D();
11786
11818
  function Mo(i) {
11787
11819
  const e = new Q(), t = new Q(), n = new Q(), s = new Q(), r = new Q(), a = new Q(), o = new Q(), l = new Q(), c = new Q(), u = new Q(), h = new Q(), d = new Q(), f = i.inheritType ? i.inheritType : 0;
11788
11820
  if (i.translation && e.setPosition(rn.fromArray(i.translation)), i.preRotation) {
11789
11821
  const V = i.preRotation.map(Oe.degToRad);
11790
- V.push(i.eulerOrder || pe.DEFAULT_ORDER), t.makeRotationFromEuler(rr.fromArray(V));
11822
+ V.push(i.eulerOrder || pe.DEFAULT_ORDER), t.makeRotationFromEuler(ir.fromArray(V));
11791
11823
  }
11792
11824
  if (i.rotation) {
11793
11825
  const V = i.rotation.map(Oe.degToRad);
11794
- V.push(i.eulerOrder || pe.DEFAULT_ORDER), n.makeRotationFromEuler(rr.fromArray(V));
11826
+ V.push(i.eulerOrder || pe.DEFAULT_ORDER), n.makeRotationFromEuler(ir.fromArray(V));
11795
11827
  }
11796
11828
  if (i.postRotation) {
11797
11829
  const V = i.postRotation.map(Oe.degToRad);
11798
- V.push(i.eulerOrder || pe.DEFAULT_ORDER), s.makeRotationFromEuler(rr.fromArray(V)), s.invert();
11830
+ V.push(i.eulerOrder || pe.DEFAULT_ORDER), s.makeRotationFromEuler(ir.fromArray(V)), s.invert();
11799
11831
  }
11800
11832
  i.scale && r.scale(rn.fromArray(i.scale)), i.scalingOffset && o.setPosition(rn.fromArray(i.scalingOffset)), i.scalingPivot && a.setPosition(rn.fromArray(i.scalingPivot)), i.rotationOffset && l.setPosition(rn.fromArray(i.rotationOffset)), i.rotationPivot && c.setPosition(rn.fromArray(i.rotationPivot)), i.parentMatrixWorld && (h.copy(i.parentMatrix), u.copy(i.parentMatrixWorld));
11801
11833
  const p = t.clone().multiply(n).multiply(s), g = new Q();
@@ -11835,7 +11867,7 @@ function To(i) {
11835
11867
  ];
11836
11868
  return i === 6 ? (console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect."), e[0]) : e[i];
11837
11869
  }
11838
- function ir(i) {
11870
+ function ar(i) {
11839
11871
  return i.split(",").map(function(t) {
11840
11872
  return parseFloat(t);
11841
11873
  });
@@ -11843,17 +11875,17 @@ function ir(i) {
11843
11875
  function Po(i, e, t) {
11844
11876
  return e === void 0 && (e = 0), t === void 0 && (t = i.byteLength), new TextDecoder().decode(new Uint8Array(i, e, t));
11845
11877
  }
11846
- function lp(i, e) {
11878
+ function cp(i, e) {
11847
11879
  for (let t = 0, n = i.length, s = e.length; t < s; t++, n++)
11848
11880
  i[n] = e[t];
11849
11881
  }
11850
- function cp(i, e, t, n) {
11882
+ function hp(i, e, t, n) {
11851
11883
  for (let s = t, r = 0; s < n; s++, r++)
11852
11884
  i[r] = e[s];
11853
11885
  return i;
11854
11886
  }
11855
- const hp = /^[og]\s*(.+)?/, up = /^mtllib /, dp = /^usemtl /, pp = /^usemap /, ea = /\s+/, ta = new D(), ar = new D(), na = new D(), sa = new D(), Ye = new D(), os = new me();
11856
- function fp() {
11887
+ const up = /^[og]\s*(.+)?/, dp = /^mtllib /, pp = /^usemtl /, fp = /^usemap /, ea = /\s+/, ta = new D(), or = new D(), na = new D(), sa = new D(), Ye = new D(), os = new me();
11888
+ function mp() {
11857
11889
  const i = {
11858
11890
  objects: [],
11859
11891
  object: {},
@@ -11962,7 +11994,7 @@ function fp() {
11962
11994
  },
11963
11995
  addFaceNormal: function(e, t, n) {
11964
11996
  const s = this.vertices, r = this.object.geometry.normals;
11965
- ta.fromArray(s, e), ar.fromArray(s, t), na.fromArray(s, n), Ye.subVectors(na, ar), sa.subVectors(ta, ar), Ye.cross(sa), Ye.normalize(), r.push(Ye.x, Ye.y, Ye.z), r.push(Ye.x, Ye.y, Ye.z), r.push(Ye.x, Ye.y, Ye.z);
11997
+ ta.fromArray(s, e), or.fromArray(s, t), na.fromArray(s, n), Ye.subVectors(na, or), sa.subVectors(ta, or), Ye.cross(sa), Ye.normalize(), r.push(Ye.x, Ye.y, Ye.z), r.push(Ye.x, Ye.y, Ye.z), r.push(Ye.x, Ye.y, Ye.z);
11966
11998
  },
11967
11999
  addColor: function(e, t, n) {
11968
12000
  const s = this.colors, r = this.object.geometry.colors;
@@ -12013,12 +12045,12 @@ function fp() {
12013
12045
  };
12014
12046
  return i.startObject("", !1), i;
12015
12047
  }
12016
- class mp extends ms {
12048
+ class gp extends ms {
12017
12049
  constructor(e) {
12018
12050
  super(e), this.materials = null;
12019
12051
  }
12020
12052
  load(e, t, n, s) {
12021
- const r = this, a = new Er(this.manager);
12053
+ const r = this, a = new Or(this.manager);
12022
12054
  a.setPath(this.path), a.setRequestHeader(this.requestHeader), a.setWithCredentials(this.withCredentials), a.load(e, function(o) {
12023
12055
  try {
12024
12056
  t(r.parse(o));
@@ -12031,7 +12063,7 @@ class mp extends ms {
12031
12063
  return this.materials = e, this;
12032
12064
  }
12033
12065
  parse(e) {
12034
- const t = new fp();
12066
+ const t = new mp();
12035
12067
  e.indexOf(`\r
12036
12068
  `) !== -1 && (e = e.replace(/\r\n/g, `
12037
12069
  `)), e.indexOf(`\\
@@ -12111,14 +12143,14 @@ class mp extends ms {
12111
12143
  } else if (u === "p") {
12112
12144
  const d = c.slice(1).trim().split(" ");
12113
12145
  t.addPointGeometry(d);
12114
- } else if ((s = hp.exec(c)) !== null) {
12146
+ } else if ((s = up.exec(c)) !== null) {
12115
12147
  const h = (" " + s[0].slice(1).trim()).slice(1);
12116
12148
  t.startObject(h);
12117
- } else if (dp.test(c))
12149
+ } else if (pp.test(c))
12118
12150
  t.object.startMaterial(c.substring(7).trim(), t.materialLibraries);
12119
- else if (up.test(c))
12151
+ else if (dp.test(c))
12120
12152
  t.materialLibraries.push(c.substring(7).trim());
12121
- else if (pp.test(c))
12153
+ else if (fp.test(c))
12122
12154
  console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');
12123
12155
  else if (u === "s") {
12124
12156
  if (s = c.split(" "), s.length > 1) {
@@ -12147,15 +12179,15 @@ class mp extends ms {
12147
12179
  const A = h[S], I = A.name + "_" + A.smooth + "_" + p;
12148
12180
  let C = t.materials[I];
12149
12181
  if (this.materials !== null) {
12150
- if (C = this.materials.create(A.name), d && C && !(C instanceof En)) {
12151
- const O = new En();
12152
- pi.prototype.copy.call(O, C), O.color.copy(C.color), C = O;
12182
+ if (C = this.materials.create(A.name), d && C && !(C instanceof An)) {
12183
+ const O = new An();
12184
+ fi.prototype.copy.call(O, C), O.color.copy(C.color), C = O;
12153
12185
  } else if (f && C && !(C instanceof Hn)) {
12154
12186
  const O = new Hn({ size: 10, sizeAttenuation: !1 });
12155
- pi.prototype.copy.call(O, C), O.color.copy(C.color), O.map = C.map, C = O;
12187
+ fi.prototype.copy.call(O, C), O.color.copy(C.color), O.map = C.map, C = O;
12156
12188
  }
12157
12189
  }
12158
- C === void 0 && (d ? C = new En() : f ? C = new Hn({ size: 1, sizeAttenuation: !1 }) : C = new Ue(), C.name = A.name, C.flatShading = !A.smooth, C.vertexColors = p, t.materials[I] = C), v.push(C);
12190
+ C === void 0 && (d ? C = new An() : f ? C = new Hn({ size: 1, sizeAttenuation: !1 }) : C = new Ue(), C.name = A.name, C.flatShading = !A.smooth, C.vertexColors = p, t.materials[I] = C), v.push(C);
12159
12191
  }
12160
12192
  let w;
12161
12193
  if (v.length > 1) {
@@ -12163,25 +12195,25 @@ class mp extends ms {
12163
12195
  const A = h[S];
12164
12196
  g.addGroup(A.groupStart, A.groupCount, S);
12165
12197
  }
12166
- d ? w = new cr(g, v) : f ? w = new Ns(g, v) : w = new we(g, v);
12198
+ d ? w = new hr(g, v) : f ? w = new js(g, v) : w = new we(g, v);
12167
12199
  } else
12168
- d ? w = new cr(g, v[0]) : f ? w = new Ns(g, v[0]) : w = new we(g, v[0]);
12200
+ d ? w = new hr(g, v[0]) : f ? w = new js(g, v[0]) : w = new we(g, v[0]);
12169
12201
  w.name = c.name, r.add(w);
12170
12202
  }
12171
12203
  else if (t.vertices.length > 0) {
12172
12204
  const o = new Hn({ size: 1, sizeAttenuation: !1 }), l = new Ce();
12173
12205
  l.setAttribute("position", new ge(t.vertices, 3)), t.colors.length > 0 && t.colors[0] !== void 0 && (l.setAttribute("color", new ge(t.colors, 3)), o.vertexColors = !0);
12174
- const c = new Ns(l, o);
12206
+ const c = new js(l, o);
12175
12207
  r.add(c);
12176
12208
  }
12177
12209
  return r;
12178
12210
  }
12179
12211
  }
12180
- const or = /* @__PURE__ */ new Map(), Dr = (i) => i?.toLowerCase().endsWith(".png") ?? !1, gp = new TextDecoder(), ra = (i, e, t) => {
12212
+ const lr = /* @__PURE__ */ new Map(), Cr = (i) => i?.toLowerCase().endsWith(".png") ?? !1, yp = new TextDecoder(), ra = (i, e, t) => {
12181
12213
  const n = i.buffer.slice(t, t + e);
12182
- return gp.decode(n).replace("\\", "/");
12183
- }, yp = /^\w+:\/\//;
12184
- function vp(i) {
12214
+ return yp.decode(n).replace("\\", "/");
12215
+ }, vp = /^\w+:\/\//;
12216
+ function xp(i) {
12185
12217
  let e = i.match(/(^[./]*)\/(.*)$/);
12186
12218
  return e ? e.shift() : e = [i], e;
12187
12219
  }
@@ -12190,10 +12222,10 @@ const ia = (i, e) => {
12190
12222
  const n = e.lastIndexOf("/");
12191
12223
  n !== -1 && (t = e.substring(n + 1));
12192
12224
  let s = [];
12193
- const r = "http://guo.bin.yong", a = !yp.test(i);
12225
+ const r = "http://guo.bin.yong", a = !vp.test(i);
12194
12226
  let o;
12195
12227
  if (a) {
12196
- s = vp(i);
12228
+ s = xp(i);
12197
12229
  const h = s.pop();
12198
12230
  o = new URL(h, r);
12199
12231
  } else
@@ -12211,16 +12243,16 @@ const ia = (i, e) => {
12211
12243
  u = new URL(`./Maps/${t}`, h).href;
12212
12244
  }
12213
12245
  return a && (u = u.substring(r.length + 1)), u = u.replaceAll("#", "%23"), u.length > 0 && s.push(u), u = s.join("/"), u;
12214
- }, Cr = (i, e) => {
12215
- if (or.has(e)) {
12216
- const n = or.get(e);
12246
+ }, Ar = (i, e) => {
12247
+ if (lr.has(e)) {
12248
+ const n = lr.get(e);
12217
12249
  i.map = n, i.needsUpdate = !0, Se.needsUpdate = !0;
12218
12250
  }
12219
12251
  const t = new qt();
12220
- t.colorSpace = dt, t.wrapS = ft, t.wrapT = ft, t.flipY = !1, t.anisotropy = 16, t.mipmaps = [], t.generateMipmaps = !0, Cs.load(e, (n) => {
12221
- t.image = n, t.needsUpdate = !0, or.set(e, t), i.map = t, i.needsUpdate = !0, Se.needsUpdate = !0;
12252
+ t.colorSpace = dt, t.wrapS = ft, t.wrapT = ft, t.flipY = !1, t.anisotropy = 16, t.mipmaps = [], t.generateMipmaps = !0, As.load(e, (n) => {
12253
+ t.image = n, t.needsUpdate = !0, lr.set(e, t), i.map = t, i.needsUpdate = !0, Se.needsUpdate = !0;
12222
12254
  });
12223
- }, Ar = (i, e, t) => {
12255
+ }, Er = (i, e, t) => {
12224
12256
  const [n, s, r, a, o] = e, l = t || a < 1;
12225
12257
  return new Ue({
12226
12258
  name: i,
@@ -12230,16 +12262,16 @@ const ia = (i, e) => {
12230
12262
  alphaTest: 0.01,
12231
12263
  side: o
12232
12264
  });
12233
- }, xp = 8, wp = 130, aa = 66, bp = "SBK-----", Sp = "SBM-----", Mp = new TextDecoder(), Tp = new TextEncoder();
12234
- function Pp(i) {
12235
- let e = xp;
12265
+ }, wp = 8, bp = 130, aa = 66, Sp = "SBK-----", Mp = "SBM-----", Tp = new TextDecoder(), Pp = new TextEncoder();
12266
+ function Ip(i) {
12267
+ let e = wp;
12236
12268
  const t = new Uint8Array(i, 0, e);
12237
- if (Mp.decode(t) !== bp)
12269
+ if (Tp.decode(t) !== Sp)
12238
12270
  return i;
12239
- e += wp;
12271
+ e += bp;
12240
12272
  const s = new Uint8Array(i, 0, e);
12241
12273
  if (s[40] === 1) {
12242
- const a = Tp.encode(Sp), o = new Uint8Array([s[41]]), l = Ip(s), c = Dp(l);
12274
+ const a = Pp.encode(Mp), o = new Uint8Array([s[41]]), l = Dp(s), c = Cp(l);
12243
12275
  let u = aa % c.length;
12244
12276
  const h = e + aa, d = new Uint8Array(i, h), f = new Uint8Array(d.length);
12245
12277
  for (let g = 0; g < d.length; g++)
@@ -12248,16 +12280,16 @@ function Pp(i) {
12248
12280
  return p.set(a), p.set(o, a.length), p.set(f, a.length + o.length), p.buffer;
12249
12281
  }
12250
12282
  }
12251
- function Ip(i) {
12283
+ function Dp(i) {
12252
12284
  const e = new Uint8Array(128);
12253
12285
  return e.set(i.slice(42, 74), 0), e.set(i.slice(74, 138), 32), e.set(i.slice(8, 40), 96), e;
12254
12286
  }
12255
- function Dp(i) {
12287
+ function Cp(i) {
12256
12288
  const e = new Uint8Array(64);
12257
12289
  return e.set(i.slice(0, 8), 0), e.set(i.slice(24, 32), 8), e.set(i.slice(40, 56), 16), e.set(i.slice(64, 88), 32), e.set(i.slice(96, 104), 56), e;
12258
12290
  }
12259
- const Cp = new TextDecoder();
12260
- class Ap {
12291
+ const Ap = new TextDecoder();
12292
+ class Ep {
12261
12293
  materials;
12262
12294
  sbmInfo;
12263
12295
  isLE;
@@ -12271,7 +12303,7 @@ class Ap {
12271
12303
  * @param onProgress 模型加载进度回填函数
12272
12304
  */
12273
12305
  parseBuffer(e, t, n) {
12274
- const s = Pp(e);
12306
+ const s = Ip(e);
12275
12307
  s && (e = s), this.sbmInfo = t;
12276
12308
  const r = new DataView(e);
12277
12309
  let a = 0;
@@ -12312,17 +12344,17 @@ class Ap {
12312
12344
  const S = e.getFloat32(t, this.isLE);
12313
12345
  t += 4, e.getFloat32(t, this.isLE), t += 4, e.getFloat32(t, this.isLE), t += 4, e.getFloat32(t, this.isLE), t += 4, e.getFloat32(t, this.isLE), t += 4;
12314
12346
  let b = e.getUint8(t);
12315
- t += 1, b === 0 ? b = fi : b === 1 ? b = mi : b === 2 && (b = Tt);
12347
+ t += 1, b === 0 ? b = mi : b === 1 ? b = gi : b === 2 && (b = Tt);
12316
12348
  const A = e.getUint16(t, this.isLE);
12317
12349
  t += 2;
12318
12350
  const I = A > 0 ? ra(e, A, t) : "";
12319
12351
  if (t += A, !this.materials.has(p)) {
12320
- const C = [g, v, w, S, b], O = Ar(p, C, Dr(I));
12352
+ const C = [g, v, w, S, b], O = Er(p, C, Cr(I));
12321
12353
  if (this.materials.set(p, O), u[p].materialInfo = C, I) {
12322
12354
  const {
12323
12355
  url: j
12324
12356
  } = this.sbmInfo, G = ia(j, I);
12325
- u[p].textureUrl = G, Cr(O, G);
12357
+ u[p].textureUrl = G, Ar(O, G);
12326
12358
  }
12327
12359
  }
12328
12360
  }
@@ -12423,17 +12455,17 @@ class Ap {
12423
12455
  const S = e.getFloat32(t, this.isLE);
12424
12456
  t += 4, e.getFloat32(t, this.isLE), t += 4, e.getFloat32(t, this.isLE), t += 4, e.getFloat32(t, this.isLE), t += 4, e.getFloat32(t, this.isLE), t += 4;
12425
12457
  let b = e.getUint8(t);
12426
- t += 1, b === 0 ? b = fi : b === 1 ? b = mi : b === 2 && (b = Tt);
12458
+ t += 1, b === 0 ? b = mi : b === 1 ? b = gi : b === 2 && (b = Tt);
12427
12459
  const A = e.getUint16(t, this.isLE);
12428
12460
  t += 2;
12429
12461
  const I = A > 0 ? ra(e, A, t) : "";
12430
12462
  if (t += A, !this.materials.has(p)) {
12431
- const C = [g, v, w, S, b], O = Ar(p, C, Dr(I));
12463
+ const C = [g, v, w, S, b], O = Er(p, C, Cr(I));
12432
12464
  if (this.materials.set(p, O), u[p].materialInfo = C, I) {
12433
12465
  const {
12434
12466
  url: j
12435
12467
  } = this.sbmInfo, G = ia(j, I);
12436
- u[p].textureUrl = G, Cr(O, G);
12468
+ u[p].textureUrl = G, Ar(O, G);
12437
12469
  }
12438
12470
  }
12439
12471
  }
@@ -12446,7 +12478,7 @@ class Ap {
12446
12478
  let v = "";
12447
12479
  if (g > 0) {
12448
12480
  const K = new Uint8Array(e.buffer, t, g);
12449
- v = Cp.decode(K), t += g;
12481
+ v = Ap.decode(K), t += g;
12450
12482
  }
12451
12483
  const w = e.getUint16(t, this.isLE).toString();
12452
12484
  t += 2, h[p] = {
@@ -12512,8 +12544,8 @@ class Ap {
12512
12544
  return Promise.resolve({ model: a, caches: d });
12513
12545
  }
12514
12546
  }
12515
- const Ep = new TextDecoder();
12516
- class Op {
12547
+ const Op = new TextDecoder();
12548
+ class Lp {
12517
12549
  /**
12518
12550
  * @todo onProgress
12519
12551
  */
@@ -12522,16 +12554,16 @@ class Op {
12522
12554
  * @param sbmInfo
12523
12555
  */
12524
12556
  parseBuffer(e, t) {
12525
- switch (Ep.decode(e.slice(0, 8))) {
12557
+ switch (Op.decode(e.slice(0, 8))) {
12526
12558
  case "SBK-----":
12527
12559
  case "SBM-----":
12528
- return new Ap().parseBuffer(e, t);
12560
+ return new Ep().parseBuffer(e, t);
12529
12561
  default:
12530
12562
  return Promise.reject(`In soonspacejs: sbm 资源模型(${t.url})格式或数据错误!`);
12531
12563
  }
12532
12564
  }
12533
12565
  }
12534
- class Lp {
12566
+ class Fp {
12535
12567
  // material 缓存
12536
12568
  materials = /* @__PURE__ */ new Map();
12537
12569
  constructor() {
@@ -12559,8 +12591,8 @@ class Lp {
12559
12591
  for (const [o, l] of Object.entries(r)) {
12560
12592
  if (this.materials.has(o))
12561
12593
  continue;
12562
- const { textureUrl: c, materialInfo: u } = l, h = Ar(o, u, Dr(c));
12563
- this.materials.set(o, h), c && Cr(h, c);
12594
+ const { textureUrl: c, materialInfo: u } = l, h = Er(o, u, Cr(c));
12595
+ this.materials.set(o, h), c && Ar(h, c);
12564
12596
  }
12565
12597
  for (const [o, l] of Object.entries(a)) {
12566
12598
  const { meshName: c, materialId: u, position: h, uv: d, normal: f } = l, p = this.materials.get(u.toString());
@@ -12573,8 +12605,11 @@ class Lp {
12573
12605
  }
12574
12606
  return n;
12575
12607
  }
12608
+ clearCache() {
12609
+ this.materials.forEach((e) => e.dispose()), this.materials.clear();
12610
+ }
12576
12611
  }
12577
- class Fp extends mt {
12612
+ class Bp extends mt {
12578
12613
  constructor(e, t) {
12579
12614
  super(et.Model, e, t.classified.Model), this.viewport = e, this.cache = t, this.gltfLoader.setMeshoptDecoder(Nc), this._initLoadingManager(this.loadingManager);
12580
12615
  }
@@ -12588,18 +12623,18 @@ class Fp extends mt {
12588
12623
  /**
12589
12624
  * workaround for types
12590
12625
  */
12591
- store = xr.createInstance({
12626
+ store = wr.createInstance({
12592
12627
  name: "soonspace",
12593
12628
  storeName: "modelData"
12594
12629
  });
12595
- cacheStore = xr.createInstance({
12630
+ cacheStore = wr.createInstance({
12596
12631
  name: "soonspace",
12597
12632
  storeName: "modelCache"
12598
12633
  });
12599
12634
  loadingManager = new tc();
12600
12635
  gltfLoader = new Fc(this.loadingManager);
12601
- fbxLoader = new Jd(this.loadingManager);
12602
- objLoader = new mp(this.loadingManager);
12636
+ fbxLoader = new $d(this.loadingManager);
12637
+ objLoader = new gp(this.loadingManager);
12603
12638
  stlLoader = new Bc(this.loadingManager);
12604
12639
  /**
12605
12640
  * 设置 draco path
@@ -12640,7 +12675,7 @@ class Fp extends mt {
12640
12675
  const { url: t, id: n, format: s } = e;
12641
12676
  if (!t)
12642
12677
  return R(`id: ${n} url: ${t} is empty`), null;
12643
- switch (await this._checkDbReady(), (s ?? Vr(t))?.toLocaleUpperCase()) {
12678
+ switch (await this._checkDbReady(), (s ?? Hr(t))?.toLocaleUpperCase()) {
12644
12679
  case "SBM":
12645
12680
  return this._parseSbm(e);
12646
12681
  case "SBMX":
@@ -12655,7 +12690,7 @@ class Fp extends mt {
12655
12690
  case "STL":
12656
12691
  return this._parseStl(e);
12657
12692
  default:
12658
- return kr(`模型资源( id: ${n}, url: ${t} )格式错误,当前格式支持 sbm、sbmx、fbx、gltf、glb !`), null;
12693
+ return zr(`模型资源( id: ${n}, url: ${t} )格式错误,当前格式支持 sbm、sbmx、fbx、gltf、glb !`), null;
12659
12694
  }
12660
12695
  }
12661
12696
  clone(e, t, n) {
@@ -12675,7 +12710,7 @@ class Fp extends mt {
12675
12710
  onLoad: v,
12676
12711
  userData: w,
12677
12712
  extraIds: S
12678
- } = t, b = xi.clone(e);
12713
+ } = t, b = wi.clone(e);
12679
12714
  b.animations = b.animations.map((A) => A.clone()), a && (b.sid = a), o && (b.name = o), l && (b.level = l), c === !1 ? b.hide() : c === !0 && b.show(), u && b.position.set(u.x, u.y, u.z), h && b.rotation.set(h.x, h.y, h.z), d && b.scale.set(d.x, d.y, d.z), f ? b.onClick = f.bind(b) : b.onClick = null, p ? b.onDblClick = p.bind(b) : b.onDblClick = null, g ? b.onRightClick = g.bind(b) : b.onRightClick = null, v ? b.onLoad = v.bind(b) : b.onLoad = null, b.onLoad?.(b), w && (b.userData = w), S && (b.extraIds = S), n !== null && this.viewport.scener.addObject(b, n || this.scene || e.parent), s(b);
12680
12715
  });
12681
12716
  }
@@ -12706,7 +12741,7 @@ class Fp extends mt {
12706
12741
  }
12707
12742
  // 保存模型缓存
12708
12743
  _setModelsMap(e, t) {
12709
- this.modelsMap.has(e) || this.modelsMap.set(e, xi.clone(t));
12744
+ this.modelsMap.has(e) || this.modelsMap.set(e, wi.clone(t));
12710
12745
  }
12711
12746
  /**
12712
12747
  * 解析 sbm 格式
@@ -12715,7 +12750,7 @@ class Fp extends mt {
12715
12750
  */
12716
12751
  async _parseSbm(e) {
12717
12752
  const { useIndexedDB: t } = this.viewport.options, { url: n } = e, s = async (a) => {
12718
- const o = await new Op().parseBuffer(a, e), { model: l, caches: c } = o;
12753
+ const o = await new Lp().parseBuffer(a, e), { model: l, caches: c } = o;
12719
12754
  return c && Oa(() => {
12720
12755
  this.cacheStore.setItem(n, c);
12721
12756
  }), l;
@@ -12725,7 +12760,7 @@ class Fp extends mt {
12725
12760
  if (t) {
12726
12761
  const a = await this.cacheStore.getItem(n);
12727
12762
  if (a) {
12728
- const o = new Lp().parseObject(a, e);
12763
+ const o = new Fp().parseObject(a, e);
12729
12764
  return r(o), o;
12730
12765
  } else {
12731
12766
  const o = await this.store.getItem(n) || await this._fetchBuffer(n), l = await s(o);
@@ -12743,7 +12778,7 @@ class Fp extends mt {
12743
12778
  */
12744
12779
  async _parseSbmx(e) {
12745
12780
  const { url: t } = e, n = await this._getBuffer(t);
12746
- if (mr(n.slice(0, 8)) === "SBMG----") {
12781
+ if (gr(n.slice(0, 8)) === "SBMG----") {
12747
12782
  const r = us(n.slice(8));
12748
12783
  return this._parseGltf(e, r);
12749
12784
  } else
@@ -12756,14 +12791,14 @@ class Fp extends mt {
12756
12791
  * @returns
12757
12792
  */
12758
12793
  async _parseGltf(e, t) {
12759
- const { url: n } = e, s = fr(n), r = t || await this._getBuffer(n), a = new xt({ ...e, format: Ft.gltf });
12794
+ const { url: n } = e, s = mr(n), r = t || await this._getBuffer(n), a = new xt({ ...e, format: Ft.gltf });
12760
12795
  try {
12761
12796
  const o = await this.gltfLoader.parseAsync(r, s), { animations: l } = o;
12762
12797
  l && l.length > 0 && (a.animations = l), o.scene.traverse((c) => {
12763
12798
  (c.type === "AmbientLight" || c.type === "DirectionalLight") && (c.visible = !1), c instanceof nc && (c.frustumCulled = !0), c.castShadow = !0, c.receiveShadow = !0;
12764
12799
  }), a.add(o.scene);
12765
12800
  } catch (o) {
12766
- throw o.message.includes("No DRACOLoader") ? new Error(`${Ln}请使用 setModelDracoDecoderPath 设置 draco 解压库路径`) : o.message.includes("setKTX2Loader") ? new Error(`${Ln}请使用 setModelKtx2DecoderPath 设置 ktx2 解压库路径`) : o;
12801
+ throw o.message.includes("No DRACOLoader") ? new Error(`${On}请使用 setModelDracoDecoderPath 设置 draco 解压库路径`) : o.message.includes("setKTX2Loader") ? new Error(`${On}请使用 setModelKtx2DecoderPath 设置 ktx2 解压库路径`) : o;
12767
12802
  }
12768
12803
  return a;
12769
12804
  }
@@ -12773,8 +12808,8 @@ class Fp extends mt {
12773
12808
  * @returns
12774
12809
  */
12775
12810
  async _parseFbx(e) {
12776
- const { url: t } = e, n = fr(t), s = await this._getBuffer(t);
12777
- if (mr(us(s.slice(0, 3))) === "ssp") {
12811
+ const { url: t } = e, n = mr(t), s = await this._getBuffer(t);
12812
+ if (gr(us(s.slice(0, 3))) === "ssp") {
12778
12813
  const c = us(s.slice(3));
12779
12814
  return this._parseGltf(e, c);
12780
12815
  }
@@ -12804,7 +12839,7 @@ class Fp extends mt {
12804
12839
  return s ? (s.onLoad?.(s), this._setModelsMap(n, s), t !== null && this.viewport.scener.addObject(s, t), s) : null;
12805
12840
  }
12806
12841
  async _fetchBuffer(e) {
12807
- const { useIndexedDB: t } = this.viewport.options, n = await jr(e, "arraybuffer");
12842
+ const { useIndexedDB: t } = this.viewport.options, n = await Ur(e, "arraybuffer");
12808
12843
  return t && this.store.setItem(e, n), n;
12809
12844
  }
12810
12845
  async _getBuffer(e) {
@@ -12816,25 +12851,28 @@ class Fp extends mt {
12816
12851
  return this._fetchBuffer(e);
12817
12852
  }
12818
12853
  }
12819
- const oa = new pn(1, 1);
12820
- class Bp extends mt {
12854
+ const oa = new dn(1, 1);
12855
+ class kp extends mt {
12821
12856
  constructor(e, t) {
12822
12857
  super(et.Poi, e, t.classified.Poi), this.viewport = e, this.cache = t;
12823
12858
  }
12824
12859
  textures = /* @__PURE__ */ new Map();
12860
+ dispose() {
12861
+ this.textures.forEach((e) => e.dispose()), this.textures.clear();
12862
+ }
12825
12863
  _createIcon(e) {
12826
12864
  const t = this._createIconMaterial(e), n = {
12827
12865
  scale: e.iconScale
12828
12866
  };
12829
12867
  let s;
12830
- return ls(e.type) ? (s = new we(), s.renderOrder = 1, s.geometry = oa, s.material = t, e.iconScale && s.scale.set(e.iconScale.x, e.iconScale.y, e.iconScale.z)) : (s = new Mr(t, n), this._computeMaterialSizeAttenuation(t, e.type)), s.name = "icon", s;
12868
+ return ls(e.type) ? (s = new we(), s.renderOrder = 1, s.geometry = oa, s.material = t, e.iconScale && s.scale.set(e.iconScale.x, e.iconScale.y, e.iconScale.z)) : (s = new Tr(t, n), this._computeMaterialSizeAttenuation(t, e.type)), s.name = "icon", s;
12831
12869
  }
12832
12870
  _createIconMaterial({ url: e, type: t }) {
12833
12871
  if (!e) return;
12834
12872
  let n = this.textures.get(e);
12835
12873
  return n || (n = _t.load(e, (s) => {
12836
12874
  this.textures.set(e, s), Se.needsUpdate = !0;
12837
- }), n.colorSpace = dt, n.flipY = !0), ls(t) ? new dn({ map: n, transparent: !0, depthWrite: !1, side: Tt }) : new hr({ map: n, depthWrite: !1 });
12875
+ }), n.colorSpace = dt, n.flipY = !0), ls(t) ? new un({ map: n, transparent: !0, depthWrite: !1, side: Tt }) : new ur({ map: n, depthWrite: !1 });
12838
12876
  }
12839
12877
  _createText(e) {
12840
12878
  const t = this._createTextMaterial(e), n = {
@@ -12842,17 +12880,17 @@ class Bp extends mt {
12842
12880
  scale: e.nameScale
12843
12881
  };
12844
12882
  let s;
12845
- return ls(e.type) ? (s = new we(), s.renderOrder = 1, s.geometry = oa, s.material = t, e.namePosition && s.position.set(e.namePosition.x, e.namePosition.y, e.namePosition.z), e.nameScale && s.scale.set(e.nameScale.x, e.nameScale.y, e.nameScale.z)) : (s = new Mr(t, n), this._computeMaterialSizeAttenuation(t, e.type)), s.name = "text", s;
12883
+ return ls(e.type) ? (s = new we(), s.renderOrder = 1, s.geometry = oa, s.material = t, e.namePosition && s.position.set(e.namePosition.x, e.namePosition.y, e.namePosition.z), e.nameScale && s.scale.set(e.nameScale.x, e.nameScale.y, e.nameScale.z)) : (s = new Tr(t, n), this._computeMaterialSizeAttenuation(t, e.type)), s.name = "text", s;
12846
12884
  }
12847
12885
  _createTextMaterial(e) {
12848
12886
  const t = this._createTextTexture(e);
12849
- return ls(e.type) ? new dn({ map: t, transparent: !0, depthWrite: !1, side: Tt }) : new hr({
12887
+ return ls(e.type) ? new un({ map: t, transparent: !0, depthWrite: !1, side: Tt }) : new ur({
12850
12888
  map: t,
12851
12889
  depthWrite: !1
12852
12890
  });
12853
12891
  }
12854
12892
  _createTextTexture(e) {
12855
- const t = this._createTextCanvas(e.name || "", e.nameCanvasInfo), n = new Br(t);
12893
+ const t = this._createTextCanvas(e.name || "", e.nameCanvasInfo), n = new kr(t);
12856
12894
  return n.colorSpace = dt, n;
12857
12895
  }
12858
12896
  _createTextCanvas(e, t = {}) {
@@ -12883,7 +12921,7 @@ class Bp extends mt {
12883
12921
  iconScale: { x: 16, y: 16, z: 1 },
12884
12922
  ...e
12885
12923
  };
12886
- const t = new Fs(e), n = this._createText(e);
12924
+ const t = new Bs(e), n = this._createText(e);
12887
12925
  if (t.text = n, t.add(n), e.url) {
12888
12926
  const s = this._createIcon(e);
12889
12927
  t.icon = s, t.add(s);
@@ -12915,9 +12953,9 @@ class Bp extends mt {
12915
12953
  } = t, b = e.clone();
12916
12954
  if (r !== b.name && b.text) {
12917
12955
  const A = b.text.material.clone();
12918
- A.map = this._createTextTexture(t), b.text.material = A;
12956
+ A.map?.dispose(), A.map = this._createTextTexture(t), b.text.material = A;
12919
12957
  }
12920
- return o && b.text?.position.set(o.x, o.y, o.z), l && b.text?.scale.set(l.x, l.y, l.z), c && b.icon?.scale.set(c.x, c.y, c.z), s && (b.sid = s), r && (b.name = r), a && (b.level = a), u && (b.scaleFixed = u), As(h) && (b.visible = h), d && b.position.set(d.x, d.y, d.z), f && b.rotation.set(f.x, f.y, f.z), p && b.scale.set(p.x, p.y, p.z), g ? b.onClick = g.bind(b) : b.onClick = null, v ? b.onDblClick = v.bind(b) : b.onDblClick = null, w ? b.onRightClick = w.bind(b) : b.onRightClick = null, S && (b.userData = S), n !== null && this.viewport.scener.addObject(b, n || this.scene || e.parent), b;
12958
+ return o && b.text?.position.set(o.x, o.y, o.z), l && b.text?.scale.set(l.x, l.y, l.z), c && b.icon?.scale.set(c.x, c.y, c.z), s && (b.sid = s), r && (b.name = r), a && (b.level = a), u && (b.scaleFixed = u), Es(h) && (b.visible = h), d && b.position.set(d.x, d.y, d.z), f && b.rotation.set(f.x, f.y, f.z), p && b.scale.set(p.x, p.y, p.z), g ? b.onClick = g.bind(b) : b.onClick = null, v ? b.onDblClick = v.bind(b) : b.onDblClick = null, w ? b.onRightClick = w.bind(b) : b.onRightClick = null, S && (b.userData = S), n !== null && this.viewport.scener.addObject(b, n || this.scene || e.parent), b;
12921
12959
  }
12922
12960
  createToGroup(e, t) {
12923
12961
  const n = this.createGroup(e, null);
@@ -12936,7 +12974,7 @@ class Bp extends mt {
12936
12974
  function ls(i) {
12937
12975
  return i === "3D" || i === "3d";
12938
12976
  }
12939
- class kp extends mt {
12977
+ class zp extends mt {
12940
12978
  constructor(e, t) {
12941
12979
  super(et.PoiNode, e, t.classified.PoiNode), this.viewport = e, this.cache = t;
12942
12980
  }
@@ -12975,7 +13013,7 @@ class kp extends mt {
12975
13013
  }
12976
13014
  }
12977
13015
  }
12978
- class zp extends mt {
13016
+ class Rp extends mt {
12979
13017
  constructor(e, t) {
12980
13018
  super(et.Canvas3D, e, t.classified.Canvas3D), this.viewport = e, this.cache = t;
12981
13019
  }
@@ -12997,7 +13035,7 @@ class zp extends mt {
12997
13035
  }), e;
12998
13036
  }
12999
13037
  }
13000
- class Rp {
13038
+ class Np {
13001
13039
  graph;
13002
13040
  queue;
13003
13041
  previous;
@@ -13060,7 +13098,7 @@ class Rp {
13060
13098
  }
13061
13099
  }
13062
13100
  const Io = '(function(){"use strict";const Vt="srgb-linear";function mt(m){return document.createElementNS("http://www.w3.org/1999/xhtml",m)}function Tt(m){const t=m[0];if(typeof t=="string"&&t.startsWith("TSL:")){const e=m[1];e&&e.isStackTrace?m[0]+=" "+e.getLocation():m[1]=\'Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.\'}return m}function q(...m){m=Tt(m);const t="THREE."+m.shift();{const e=m[0];e&&e.isStackTrace?console.warn(e.getError(t)):console.warn(t,...m)}}function St(...m){m=Tt(m);const t="THREE."+m.shift();{const e=m[0];e&&e.isStackTrace?console.error(e.getError(t)):console.error(t,...m)}}class Et{addEventListener(t,e){this._listeners===void 0&&(this._listeners={});const s=this._listeners;s[t]===void 0&&(s[t]=[]),s[t].indexOf(e)===-1&&s[t].push(e)}hasEventListener(t,e){const s=this._listeners;return s===void 0?!1:s[t]!==void 0&&s[t].indexOf(e)!==-1}removeEventListener(t,e){const s=this._listeners;if(s===void 0)return;const i=s[t];if(i!==void 0){const n=i.indexOf(e);n!==-1&&i.splice(n,1)}}dispatchEvent(t){const e=this._listeners;if(e===void 0)return;const s=e[t.type];if(s!==void 0){t.target=this;const i=s.slice(0);for(let n=0,a=i.length;n<a;n++)i[n].call(this,t);t.target=null}}}const I=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];function ft(){const m=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,s=Math.random()*4294967295|0;return(I[m&255]+I[m>>8&255]+I[m>>16&255]+I[m>>24&255]+"-"+I[t&255]+I[t>>8&255]+"-"+I[t>>16&15|64]+I[t>>24&255]+"-"+I[e&63|128]+I[e>>8&255]+"-"+I[e>>16&255]+I[e>>24&255]+I[s&255]+I[s>>8&255]+I[s>>16&255]+I[s>>24&255]).toLowerCase()}function U(m,t,e){return Math.max(t,Math.min(e,m))}class nt{constructor(t=0,e=0){nt.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,s=this.y,i=t.elements;return this.x=i[0]*e+i[3]*s+i[6],this.y=i[1]*e+i[4]*s+i[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=U(this.x,t.x,e.x),this.y=U(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=U(this.x,t,e),this.y=U(this.y,t,e),this}clampLength(t,e){const s=this.length();return this.divideScalar(s||1).multiplyScalar(U(s,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const s=this.dot(t)/e;return Math.acos(U(s,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,s=this.y-t.y;return e*e+s*s}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,s){return this.x=t.x+(e.x-t.x)*s,this.y=t.y+(e.y-t.y)*s,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const s=Math.cos(e),i=Math.sin(e),n=this.x-t.x,a=this.y-t.y;return this.x=n*s-a*i+t.x,this.y=n*i+a*s+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class rt{constructor(t=0,e=0,s=0,i=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=s,this._w=i}static slerpFlat(t,e,s,i,n,a,o){let h=s[i+0],r=s[i+1],l=s[i+2],c=s[i+3],u=n[a+0],d=n[a+1],p=n[a+2],f=n[a+3];if(c!==f||h!==u||r!==d||l!==p){let M=h*u+r*d+l*p+c*f;M<0&&(u=-u,d=-d,p=-p,f=-f,M=-M);let y=1-o;if(M<.9995){const z=Math.acos(M),C=Math.sin(z);y=Math.sin(y*z)/C,o=Math.sin(o*z)/C,h=h*y+u*o,r=r*y+d*o,l=l*y+p*o,c=c*y+f*o}else{h=h*y+u*o,r=r*y+d*o,l=l*y+p*o,c=c*y+f*o;const z=1/Math.sqrt(h*h+r*r+l*l+c*c);h*=z,r*=z,l*=z,c*=z}}t[e]=h,t[e+1]=r,t[e+2]=l,t[e+3]=c}static multiplyQuaternionsFlat(t,e,s,i,n,a){const o=s[i],h=s[i+1],r=s[i+2],l=s[i+3],c=n[a],u=n[a+1],d=n[a+2],p=n[a+3];return t[e]=o*p+l*c+h*d-r*u,t[e+1]=h*p+l*u+r*c-o*d,t[e+2]=r*p+l*d+o*u-h*c,t[e+3]=l*p-o*c-h*u-r*d,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,s,i){return this._x=t,this._y=e,this._z=s,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const s=t._x,i=t._y,n=t._z,a=t._order,o=Math.cos,h=Math.sin,r=o(s/2),l=o(i/2),c=o(n/2),u=h(s/2),d=h(i/2),p=h(n/2);switch(a){case"XYZ":this._x=u*l*c+r*d*p,this._y=r*d*c-u*l*p,this._z=r*l*p+u*d*c,this._w=r*l*c-u*d*p;break;case"YXZ":this._x=u*l*c+r*d*p,this._y=r*d*c-u*l*p,this._z=r*l*p-u*d*c,this._w=r*l*c+u*d*p;break;case"ZXY":this._x=u*l*c-r*d*p,this._y=r*d*c+u*l*p,this._z=r*l*p+u*d*c,this._w=r*l*c-u*d*p;break;case"ZYX":this._x=u*l*c-r*d*p,this._y=r*d*c+u*l*p,this._z=r*l*p-u*d*c,this._w=r*l*c+u*d*p;break;case"YZX":this._x=u*l*c+r*d*p,this._y=r*d*c+u*l*p,this._z=r*l*p-u*d*c,this._w=r*l*c-u*d*p;break;case"XZY":this._x=u*l*c-r*d*p,this._y=r*d*c-u*l*p,this._z=r*l*p+u*d*c,this._w=r*l*c+u*d*p;break;default:q("Quaternion: .setFromEuler() encountered an unknown order: "+a)}return e===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const s=e/2,i=Math.sin(s);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(s),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,s=e[0],i=e[4],n=e[8],a=e[1],o=e[5],h=e[9],r=e[2],l=e[6],c=e[10],u=s+o+c;if(u>0){const d=.5/Math.sqrt(u+1);this._w=.25/d,this._x=(l-h)*d,this._y=(n-r)*d,this._z=(a-i)*d}else if(s>o&&s>c){const d=2*Math.sqrt(1+s-o-c);this._w=(l-h)/d,this._x=.25*d,this._y=(i+a)/d,this._z=(n+r)/d}else if(o>c){const d=2*Math.sqrt(1+o-s-c);this._w=(n-r)/d,this._x=(i+a)/d,this._y=.25*d,this._z=(h+l)/d}else{const d=2*Math.sqrt(1+c-s-o);this._w=(a-i)/d,this._x=(n+r)/d,this._y=(h+l)/d,this._z=.25*d}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let s=t.dot(e)+1;return s<1e-8?(s=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=s):(this._x=0,this._y=-t.z,this._z=t.y,this._w=s)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=s),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(U(this.dot(t),-1,1)))}rotateTowards(t,e){const s=this.angleTo(t);if(s===0)return this;const i=Math.min(1,e/s);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const s=t._x,i=t._y,n=t._z,a=t._w,o=e._x,h=e._y,r=e._z,l=e._w;return this._x=s*l+a*o+i*r-n*h,this._y=i*l+a*h+n*o-s*r,this._z=n*l+a*r+s*h-i*o,this._w=a*l-s*o-i*h-n*r,this._onChangeCallback(),this}slerp(t,e){let s=t._x,i=t._y,n=t._z,a=t._w,o=this.dot(t);o<0&&(s=-s,i=-i,n=-n,a=-a,o=-o);let h=1-e;if(o<.9995){const r=Math.acos(o),l=Math.sin(r);h=Math.sin(h*r)/l,e=Math.sin(e*r)/l,this._x=this._x*h+s*e,this._y=this._y*h+i*e,this._z=this._z*h+n*e,this._w=this._w*h+a*e,this._onChangeCallback()}else this._x=this._x*h+s*e,this._y=this._y*h+i*e,this._z=this._z*h+n*e,this._w=this._w*h+a*e,this.normalize();return this}slerpQuaternions(t,e,s){return this.copy(t).slerp(e,s)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),s=Math.random(),i=Math.sqrt(1-s),n=Math.sqrt(s);return this.set(i*Math.sin(t),i*Math.cos(t),n*Math.sin(e),n*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class D{constructor(t=0,e=0,s=0){D.prototype.isVector3=!0,this.x=t,this.y=e,this.z=s}set(t,e,s){return s===void 0&&(s=this.z),this.x=t,this.y=e,this.z=s,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(Ct.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(Ct.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,s=this.y,i=this.z,n=t.elements;return this.x=n[0]*e+n[3]*s+n[6]*i,this.y=n[1]*e+n[4]*s+n[7]*i,this.z=n[2]*e+n[5]*s+n[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,s=this.y,i=this.z,n=t.elements,a=1/(n[3]*e+n[7]*s+n[11]*i+n[15]);return this.x=(n[0]*e+n[4]*s+n[8]*i+n[12])*a,this.y=(n[1]*e+n[5]*s+n[9]*i+n[13])*a,this.z=(n[2]*e+n[6]*s+n[10]*i+n[14])*a,this}applyQuaternion(t){const e=this.x,s=this.y,i=this.z,n=t.x,a=t.y,o=t.z,h=t.w,r=2*(a*i-o*s),l=2*(o*e-n*i),c=2*(n*s-a*e);return this.x=e+h*r+a*c-o*l,this.y=s+h*l+o*r-n*c,this.z=i+h*c+n*l-a*r,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,s=this.y,i=this.z,n=t.elements;return this.x=n[0]*e+n[4]*s+n[8]*i,this.y=n[1]*e+n[5]*s+n[9]*i,this.z=n[2]*e+n[6]*s+n[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=U(this.x,t.x,e.x),this.y=U(this.y,t.y,e.y),this.z=U(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=U(this.x,t,e),this.y=U(this.y,t,e),this.z=U(this.z,t,e),this}clampLength(t,e){const s=this.length();return this.divideScalar(s||1).multiplyScalar(U(s,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,s){return this.x=t.x+(e.x-t.x)*s,this.y=t.y+(e.y-t.y)*s,this.z=t.z+(e.z-t.z)*s,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const s=t.x,i=t.y,n=t.z,a=e.x,o=e.y,h=e.z;return this.x=i*h-n*o,this.y=n*a-s*h,this.z=s*o-i*a,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const s=t.dot(this)/e;return this.copy(t).multiplyScalar(s)}projectOnPlane(t){return yt.copy(this).projectOnVector(t),this.sub(yt)}reflect(t){return this.sub(yt.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const s=this.dot(t)/e;return Math.acos(U(s,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,s=this.y-t.y,i=this.z-t.z;return e*e+s*s+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,s){const i=Math.sin(e)*t;return this.x=i*Math.sin(s),this.y=Math.cos(e)*t,this.z=i*Math.cos(s),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,s){return this.x=t*Math.sin(e),this.y=s,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),s=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=s,this.z=i,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,e*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=Math.random()*2-1,s=Math.sqrt(1-e*e);return this.x=s*Math.cos(t),this.y=e,this.z=s*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const yt=new D,Ct=new rt;class at{constructor(t,e,s,i,n,a,o,h,r){at.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,e,s,i,n,a,o,h,r)}set(t,e,s,i,n,a,o,h,r){const l=this.elements;return l[0]=t,l[1]=i,l[2]=o,l[3]=e,l[4]=n,l[5]=h,l[6]=s,l[7]=a,l[8]=r,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,s=t.elements;return e[0]=s[0],e[1]=s[1],e[2]=s[2],e[3]=s[3],e[4]=s[4],e[5]=s[5],e[6]=s[6],e[7]=s[7],e[8]=s[8],this}extractBasis(t,e,s){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),s.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const s=t.elements,i=e.elements,n=this.elements,a=s[0],o=s[3],h=s[6],r=s[1],l=s[4],c=s[7],u=s[2],d=s[5],p=s[8],f=i[0],M=i[3],y=i[6],z=i[1],C=i[4],k=i[7],L=i[2],F=i[5],A=i[8];return n[0]=a*f+o*z+h*L,n[3]=a*M+o*C+h*F,n[6]=a*y+o*k+h*A,n[1]=r*f+l*z+c*L,n[4]=r*M+l*C+c*F,n[7]=r*y+l*k+c*A,n[2]=u*f+d*z+p*L,n[5]=u*M+d*C+p*F,n[8]=u*y+d*k+p*A,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],s=t[1],i=t[2],n=t[3],a=t[4],o=t[5],h=t[6],r=t[7],l=t[8];return e*a*l-e*o*r-s*n*l+s*o*h+i*n*r-i*a*h}invert(){const t=this.elements,e=t[0],s=t[1],i=t[2],n=t[3],a=t[4],o=t[5],h=t[6],r=t[7],l=t[8],c=l*a-o*r,u=o*h-l*n,d=r*n-a*h,p=e*c+s*u+i*d;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const f=1/p;return t[0]=c*f,t[1]=(i*r-l*s)*f,t[2]=(o*s-i*a)*f,t[3]=u*f,t[4]=(l*e-i*h)*f,t[5]=(i*n-o*e)*f,t[6]=d*f,t[7]=(s*h-r*e)*f,t[8]=(a*e-s*n)*f,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,s,i,n,a,o){const h=Math.cos(n),r=Math.sin(n);return this.set(s*h,s*r,-s*(h*a+r*o)+a+t,-i*r,i*h,-i*(-r*a+h*o)+o+e,0,0,1),this}scale(t,e){return this.premultiply(xt.makeScale(t,e)),this}rotate(t){return this.premultiply(xt.makeRotation(-t)),this}translate(t,e){return this.premultiply(xt.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),s=Math.sin(t);return this.set(e,-s,0,s,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){const e=this.elements,s=t.elements;for(let i=0;i<9;i++)if(e[i]!==s[i])return!1;return!0}fromArray(t,e=0){for(let s=0;s<9;s++)this.elements[s]=t[s+e];return this}toArray(t=[],e=0){const s=this.elements;return t[e]=s[0],t[e+1]=s[1],t[e+2]=s[2],t[e+3]=s[3],t[e+4]=s[4],t[e+5]=s[5],t[e+6]=s[6],t[e+7]=s[7],t[e+8]=s[8],t}clone(){return new this.constructor().fromArray(this.elements)}}const xt=new at;function gt(m){return m<.04045?m*.0773993808:Math.pow(m*.9478672986+.0521327014,2.4)}let Q;class qt{static getDataURL(t,e="image/png"){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let s;if(t instanceof HTMLCanvasElement)s=t;else{Q===void 0&&(Q=mt("canvas")),Q.width=t.width,Q.height=t.height;const i=Q.getContext("2d");t instanceof ImageData?i.putImageData(t,0,0):i.drawImage(t,0,0,t.width,t.height),s=Q}return s.toDataURL(e)}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){const e=mt("canvas");e.width=t.width,e.height=t.height;const s=e.getContext("2d");s.drawImage(t,0,0,t.width,t.height);const i=s.getImageData(0,0,t.width,t.height),n=i.data;for(let a=0;a<n.length;a++)n[a]=gt(n[a]/255)*255;return s.putImageData(i,0,0),e}else if(t.data){const e=t.data.slice(0);for(let s=0;s<e.length;s++)e instanceof Uint8Array||e instanceof Uint8ClampedArray?e[s]=Math.floor(gt(e[s]/255)*255):e[s]=gt(e[s]);return{data:e,width:t.width,height:t.height}}else return q("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}}let Ht=0;class Bt{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:Ht++}),this.uuid=ft(),this.data=t,this.dataReady=!0,this.version=0}getSize(t){const e=this.data;return typeof HTMLVideoElement<"u"&&e instanceof HTMLVideoElement?t.set(e.videoWidth,e.videoHeight,0):typeof VideoFrame<"u"&&e instanceof VideoFrame?t.set(e.displayHeight,e.displayWidth,0):e!==null?t.set(e.width,e.height,e.depth||0):t.set(0,0,0),t}set needsUpdate(t){t===!0&&this.version++}toJSON(t){const e=t===void 0||typeof t=="string";if(!e&&t.images[this.uuid]!==void 0)return t.images[this.uuid];const s={uuid:this.uuid,url:""},i=this.data;if(i!==null){let n;if(Array.isArray(i)){n=[];for(let a=0,o=i.length;a<o;a++)i[a].isDataTexture?n.push(_t(i[a].image)):n.push(_t(i[a]))}else n=_t(i);s.url=n}return e||(t.images[this.uuid]=s),s}}function _t(m){return typeof HTMLImageElement<"u"&&m instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&m instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&m instanceof ImageBitmap?qt.getDataURL(m):m.data?{data:Array.from(m.data),width:m.width,height:m.height,type:m.data.constructor.name}:(q("Texture: Unable to serialize Texture."),{})}let vt=0;const Mt=new D;class H extends Et{constructor(t=H.DEFAULT_IMAGE,e=H.DEFAULT_MAPPING,s=1001,i=1001,n=1006,a=1008,o=1023,h=1009,r=H.DEFAULT_ANISOTROPY,l=""){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:vt++}),this.uuid=ft(),this.name="",this.source=new Bt(t),this.mipmaps=[],this.mapping=e,this.channel=0,this.wrapS=s,this.wrapT=i,this.magFilter=n,this.minFilter=a,this.anisotropy=r,this.format=o,this.internalFormat=null,this.type=h,this.offset=new nt(0,0),this.repeat=new nt(1,1),this.center=new nt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new at,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=l,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(Mt).x}get height(){return this.source.getSize(Mt).y}get depth(){return this.source.getSize(Mt).z}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.isArrayTexture=t.isArrayTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}setValues(t){for(const e in t){const s=t[e];if(s===void 0){q(`Texture.setValues(): parameter \'${e}\' has value of undefined.`);continue}const i=this[e];if(i===void 0){q(`Texture.setValues(): property \'${e}\' does not exist.`);continue}i&&s&&i.isVector2&&s.isVector2||i&&s&&i.isVector3&&s.isVector3||i&&s&&i.isMatrix3&&s.isMatrix3?i.copy(s):this[e]=s}}toJSON(t){const e=t===void 0||typeof t=="string";if(!e&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];const s={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(s.userData=this.userData),e||(t.textures[this.uuid]=s),s}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==300)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case 1e3:t.x=t.x-Math.floor(t.x);break;case 1001:t.x=t.x<0?0:1;break;case 1002:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case 1e3:t.y=t.y-Math.floor(t.y);break;case 1001:t.y=t.y<0?0:1;break;case 1002:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}}H.DEFAULT_IMAGE=null,H.DEFAULT_MAPPING=300,H.DEFAULT_ANISOTROPY=1;class B{constructor(t,e,s,i,n,a,o,h,r,l,c,u,d,p,f,M){B.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,e,s,i,n,a,o,h,r,l,c,u,d,p,f,M)}set(t,e,s,i,n,a,o,h,r,l,c,u,d,p,f,M){const y=this.elements;return y[0]=t,y[4]=e,y[8]=s,y[12]=i,y[1]=n,y[5]=a,y[9]=o,y[13]=h,y[2]=r,y[6]=l,y[10]=c,y[14]=u,y[3]=d,y[7]=p,y[11]=f,y[15]=M,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new B().fromArray(this.elements)}copy(t){const e=this.elements,s=t.elements;return e[0]=s[0],e[1]=s[1],e[2]=s[2],e[3]=s[3],e[4]=s[4],e[5]=s[5],e[6]=s[6],e[7]=s[7],e[8]=s[8],e[9]=s[9],e[10]=s[10],e[11]=s[11],e[12]=s[12],e[13]=s[13],e[14]=s[14],e[15]=s[15],this}copyPosition(t){const e=this.elements,s=t.elements;return e[12]=s[12],e[13]=s[13],e[14]=s[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,s){return this.determinant()===0?(t.set(1,0,0),e.set(0,1,0),s.set(0,0,1),this):(t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),s.setFromMatrixColumn(this,2),this)}makeBasis(t,e,s){return this.set(t.x,e.x,s.x,0,t.y,e.y,s.y,0,t.z,e.z,s.z,0,0,0,0,1),this}extractRotation(t){if(t.determinant()===0)return this.identity();const e=this.elements,s=t.elements,i=1/K.setFromMatrixColumn(t,0).length(),n=1/K.setFromMatrixColumn(t,1).length(),a=1/K.setFromMatrixColumn(t,2).length();return e[0]=s[0]*i,e[1]=s[1]*i,e[2]=s[2]*i,e[3]=0,e[4]=s[4]*n,e[5]=s[5]*n,e[6]=s[6]*n,e[7]=0,e[8]=s[8]*a,e[9]=s[9]*a,e[10]=s[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.elements,s=t.x,i=t.y,n=t.z,a=Math.cos(s),o=Math.sin(s),h=Math.cos(i),r=Math.sin(i),l=Math.cos(n),c=Math.sin(n);if(t.order==="XYZ"){const u=a*l,d=a*c,p=o*l,f=o*c;e[0]=h*l,e[4]=-h*c,e[8]=r,e[1]=d+p*r,e[5]=u-f*r,e[9]=-o*h,e[2]=f-u*r,e[6]=p+d*r,e[10]=a*h}else if(t.order==="YXZ"){const u=h*l,d=h*c,p=r*l,f=r*c;e[0]=u+f*o,e[4]=p*o-d,e[8]=a*r,e[1]=a*c,e[5]=a*l,e[9]=-o,e[2]=d*o-p,e[6]=f+u*o,e[10]=a*h}else if(t.order==="ZXY"){const u=h*l,d=h*c,p=r*l,f=r*c;e[0]=u-f*o,e[4]=-a*c,e[8]=p+d*o,e[1]=d+p*o,e[5]=a*l,e[9]=f-u*o,e[2]=-a*r,e[6]=o,e[10]=a*h}else if(t.order==="ZYX"){const u=a*l,d=a*c,p=o*l,f=o*c;e[0]=h*l,e[4]=p*r-d,e[8]=u*r+f,e[1]=h*c,e[5]=f*r+u,e[9]=d*r-p,e[2]=-r,e[6]=o*h,e[10]=a*h}else if(t.order==="YZX"){const u=a*h,d=a*r,p=o*h,f=o*r;e[0]=h*l,e[4]=f-u*c,e[8]=p*c+d,e[1]=c,e[5]=a*l,e[9]=-o*l,e[2]=-r*l,e[6]=d*c+p,e[10]=u-f*c}else if(t.order==="XZY"){const u=a*h,d=a*r,p=o*h,f=o*r;e[0]=h*l,e[4]=-c,e[8]=r*l,e[1]=u*c+f,e[5]=a*l,e[9]=d*c-p,e[2]=p*c-d,e[6]=o*l,e[10]=f*c+u}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(Yt,t,Gt)}lookAt(t,e,s){const i=this.elements;return W.subVectors(t,e),W.lengthSq()===0&&(W.z=1),W.normalize(),Z.crossVectors(s,W),Z.lengthSq()===0&&(Math.abs(s.z)===1?W.x+=1e-4:W.z+=1e-4,W.normalize(),Z.crossVectors(s,W)),Z.normalize(),ct.crossVectors(W,Z),i[0]=Z.x,i[4]=ct.x,i[8]=W.x,i[1]=Z.y,i[5]=ct.y,i[9]=W.y,i[2]=Z.z,i[6]=ct.z,i[10]=W.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const s=t.elements,i=e.elements,n=this.elements,a=s[0],o=s[4],h=s[8],r=s[12],l=s[1],c=s[5],u=s[9],d=s[13],p=s[2],f=s[6],M=s[10],y=s[14],z=s[3],C=s[7],k=s[11],L=s[15],F=i[0],A=i[4],x=i[8],b=i[12],w=i[1],T=i[5],R=i[9],S=i[13],g=i[2],_=i[6],E=i[10],P=i[14],$=i[3],V=i[7],O=i[11],it=i[15];return n[0]=a*F+o*w+h*g+r*$,n[4]=a*A+o*T+h*_+r*V,n[8]=a*x+o*R+h*E+r*O,n[12]=a*b+o*S+h*P+r*it,n[1]=l*F+c*w+u*g+d*$,n[5]=l*A+c*T+u*_+d*V,n[9]=l*x+c*R+u*E+d*O,n[13]=l*b+c*S+u*P+d*it,n[2]=p*F+f*w+M*g+y*$,n[6]=p*A+f*T+M*_+y*V,n[10]=p*x+f*R+M*E+y*O,n[14]=p*b+f*S+M*P+y*it,n[3]=z*F+C*w+k*g+L*$,n[7]=z*A+C*T+k*_+L*V,n[11]=z*x+C*R+k*E+L*O,n[15]=z*b+C*S+k*P+L*it,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],s=t[4],i=t[8],n=t[12],a=t[1],o=t[5],h=t[9],r=t[13],l=t[2],c=t[6],u=t[10],d=t[14],p=t[3],f=t[7],M=t[11],y=t[15],z=h*d-r*u,C=o*d-r*c,k=o*u-h*c,L=a*d-r*l,F=a*u-h*l,A=a*c-o*l;return e*(f*z-M*C+y*k)-s*(p*z-M*L+y*F)+i*(p*C-f*L+y*A)-n*(p*k-f*F+M*A)}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,s){const i=this.elements;return t.isVector3?(i[12]=t.x,i[13]=t.y,i[14]=t.z):(i[12]=t,i[13]=e,i[14]=s),this}invert(){const t=this.elements,e=t[0],s=t[1],i=t[2],n=t[3],a=t[4],o=t[5],h=t[6],r=t[7],l=t[8],c=t[9],u=t[10],d=t[11],p=t[12],f=t[13],M=t[14],y=t[15],z=e*o-s*a,C=e*h-i*a,k=e*r-n*a,L=s*h-i*o,F=s*r-n*o,A=i*r-n*h,x=l*f-c*p,b=l*M-u*p,w=l*y-d*p,T=c*M-u*f,R=c*y-d*f,S=u*y-d*M,g=z*S-C*R+k*T+L*w-F*b+A*x;if(g===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const _=1/g;return t[0]=(o*S-h*R+r*T)*_,t[1]=(i*R-s*S-n*T)*_,t[2]=(f*A-M*F+y*L)*_,t[3]=(u*F-c*A-d*L)*_,t[4]=(h*w-a*S-r*b)*_,t[5]=(e*S-i*w+n*b)*_,t[6]=(M*k-p*A-y*C)*_,t[7]=(l*A-u*k+d*C)*_,t[8]=(a*R-o*w+r*x)*_,t[9]=(s*w-e*R-n*x)*_,t[10]=(p*F-f*k+y*z)*_,t[11]=(c*k-l*F-d*z)*_,t[12]=(o*b-a*T-h*x)*_,t[13]=(e*T-s*b+i*x)*_,t[14]=(f*C-p*L-M*z)*_,t[15]=(l*L-c*C+u*z)*_,this}scale(t){const e=this.elements,s=t.x,i=t.y,n=t.z;return e[0]*=s,e[4]*=i,e[8]*=n,e[1]*=s,e[5]*=i,e[9]*=n,e[2]*=s,e[6]*=i,e[10]*=n,e[3]*=s,e[7]*=i,e[11]*=n,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],s=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,s,i))}makeTranslation(t,e,s){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,s,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),s=Math.sin(t);return this.set(1,0,0,0,0,e,-s,0,0,s,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),s=Math.sin(t);return this.set(e,0,s,0,0,1,0,0,-s,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),s=Math.sin(t);return this.set(e,-s,0,0,s,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const s=Math.cos(e),i=Math.sin(e),n=1-s,a=t.x,o=t.y,h=t.z,r=n*a,l=n*o;return this.set(r*a+s,r*o-i*h,r*h+i*o,0,r*o+i*h,l*o+s,l*h-i*a,0,r*h-i*o,l*h+i*a,n*h*h+s,0,0,0,0,1),this}makeScale(t,e,s){return this.set(t,0,0,0,0,e,0,0,0,0,s,0,0,0,0,1),this}makeShear(t,e,s,i,n,a){return this.set(1,s,n,0,t,1,a,0,e,i,1,0,0,0,0,1),this}compose(t,e,s){const i=this.elements,n=e._x,a=e._y,o=e._z,h=e._w,r=n+n,l=a+a,c=o+o,u=n*r,d=n*l,p=n*c,f=a*l,M=a*c,y=o*c,z=h*r,C=h*l,k=h*c,L=s.x,F=s.y,A=s.z;return i[0]=(1-(f+y))*L,i[1]=(d+k)*L,i[2]=(p-C)*L,i[3]=0,i[4]=(d-k)*F,i[5]=(1-(u+y))*F,i[6]=(M+z)*F,i[7]=0,i[8]=(p+C)*A,i[9]=(M-z)*A,i[10]=(1-(u+f))*A,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,s){const i=this.elements;t.x=i[12],t.y=i[13],t.z=i[14];const n=this.determinant();if(n===0)return s.set(1,1,1),e.identity(),this;let a=K.set(i[0],i[1],i[2]).length();const o=K.set(i[4],i[5],i[6]).length(),h=K.set(i[8],i[9],i[10]).length();n<0&&(a=-a),N.copy(this);const r=1/a,l=1/o,c=1/h;return N.elements[0]*=r,N.elements[1]*=r,N.elements[2]*=r,N.elements[4]*=l,N.elements[5]*=l,N.elements[6]*=l,N.elements[8]*=c,N.elements[9]*=c,N.elements[10]*=c,e.setFromRotationMatrix(N),s.x=a,s.y=o,s.z=h,this}makePerspective(t,e,s,i,n,a,o=2e3,h=!1){const r=this.elements,l=2*n/(e-t),c=2*n/(s-i),u=(e+t)/(e-t),d=(s+i)/(s-i);let p,f;if(h)p=n/(a-n),f=a*n/(a-n);else if(o===2e3)p=-(a+n)/(a-n),f=-2*a*n/(a-n);else if(o===2001)p=-a/(a-n),f=-a*n/(a-n);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);return r[0]=l,r[4]=0,r[8]=u,r[12]=0,r[1]=0,r[5]=c,r[9]=d,r[13]=0,r[2]=0,r[6]=0,r[10]=p,r[14]=f,r[3]=0,r[7]=0,r[11]=-1,r[15]=0,this}makeOrthographic(t,e,s,i,n,a,o=2e3,h=!1){const r=this.elements,l=2/(e-t),c=2/(s-i),u=-(e+t)/(e-t),d=-(s+i)/(s-i);let p,f;if(h)p=1/(a-n),f=a/(a-n);else if(o===2e3)p=-2/(a-n),f=-(a+n)/(a-n);else if(o===2001)p=-1/(a-n),f=-n/(a-n);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);return r[0]=l,r[4]=0,r[8]=0,r[12]=u,r[1]=0,r[5]=c,r[9]=0,r[13]=d,r[2]=0,r[6]=0,r[10]=p,r[14]=f,r[3]=0,r[7]=0,r[11]=0,r[15]=1,this}equals(t){const e=this.elements,s=t.elements;for(let i=0;i<16;i++)if(e[i]!==s[i])return!1;return!0}fromArray(t,e=0){for(let s=0;s<16;s++)this.elements[s]=t[s+e];return this}toArray(t=[],e=0){const s=this.elements;return t[e]=s[0],t[e+1]=s[1],t[e+2]=s[2],t[e+3]=s[3],t[e+4]=s[4],t[e+5]=s[5],t[e+6]=s[6],t[e+7]=s[7],t[e+8]=s[8],t[e+9]=s[9],t[e+10]=s[10],t[e+11]=s[11],t[e+12]=s[12],t[e+13]=s[13],t[e+14]=s[14],t[e+15]=s[15],t}}const K=new D,N=new B,Yt=new D(0,0,0),Gt=new D(1,1,1),Z=new D,ct=new D,W=new D,At=new B,Rt=new rt;class dt{constructor(t=0,e=0,s=0,i=dt.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=s,this._order=i}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,s,i=this._order){return this._x=t,this._y=e,this._z=s,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,s=!0){const i=t.elements,n=i[0],a=i[4],o=i[8],h=i[1],r=i[5],l=i[9],c=i[2],u=i[6],d=i[10];switch(e){case"XYZ":this._y=Math.asin(U(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-a,n)):(this._x=Math.atan2(u,r),this._z=0);break;case"YXZ":this._x=Math.asin(-U(l,-1,1)),Math.abs(l)<.9999999?(this._y=Math.atan2(o,d),this._z=Math.atan2(h,r)):(this._y=Math.atan2(-c,n),this._z=0);break;case"ZXY":this._x=Math.asin(U(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-c,d),this._z=Math.atan2(-a,r)):(this._y=0,this._z=Math.atan2(h,n));break;case"ZYX":this._y=Math.asin(-U(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(u,d),this._z=Math.atan2(h,n)):(this._x=0,this._z=Math.atan2(-a,r));break;case"YZX":this._z=Math.asin(U(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(-l,r),this._y=Math.atan2(-c,n)):(this._x=0,this._y=Math.atan2(o,d));break;case"XZY":this._z=Math.asin(-U(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(u,r),this._y=Math.atan2(o,n)):(this._x=Math.atan2(-l,d),this._y=0);break;default:q("Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,s===!0&&this._onChangeCallback(),this}setFromQuaternion(t,e,s){return At.makeRotationFromQuaternion(t),this.setFromRotationMatrix(At,e,s)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return Rt.setFromEuler(this),this.setFromQuaternion(Rt,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}dt.DEFAULT_ORDER="XYZ";class Xt{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return(this.mask&t.mask)!==0}isEnabled(t){return(this.mask&(1<<t|0))!==0}}let jt=0;const Ft=new D,tt=new rt,v=new B,ut=new D,ht=new D,Zt=new D,Jt=new rt,kt=new D(1,0,0),Lt=new D(0,1,0),Dt=new D(0,0,1),Ut={type:"added"},$t={type:"removed"},et={type:"childadded",child:null},bt={type:"childremoved",child:null};class J extends Et{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:jt++}),this.uuid=ft(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=J.DEFAULT_UP.clone();const t=new D,e=new dt,s=new rt,i=new D(1,1,1);function n(){s.setFromEuler(e,!1)}function a(){e.setFromQuaternion(s,void 0,!1)}e._onChange(n),s._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:s},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new B},normalMatrix:{value:new at}}),this.matrix=new B,this.matrixWorld=new B,this.matrixAutoUpdate=J.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=J.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Xt,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.static=!1,this.userData={},this.pivot=null}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,e){return tt.setFromAxisAngle(t,e),this.quaternion.multiply(tt),this}rotateOnWorldAxis(t,e){return tt.setFromAxisAngle(t,e),this.quaternion.premultiply(tt),this}rotateX(t){return this.rotateOnAxis(kt,t)}rotateY(t){return this.rotateOnAxis(Lt,t)}rotateZ(t){return this.rotateOnAxis(Dt,t)}translateOnAxis(t,e){return Ft.copy(t).applyQuaternion(this.quaternion),this.position.add(Ft.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(kt,t)}translateY(t){return this.translateOnAxis(Lt,t)}translateZ(t){return this.translateOnAxis(Dt,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(v.copy(this.matrixWorld).invert())}lookAt(t,e,s){t.isVector3?ut.copy(t):ut.set(t,e,s);const i=this.parent;this.updateWorldMatrix(!0,!1),ht.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?v.lookAt(ht,ut,this.up):v.lookAt(ut,ht,this.up),this.quaternion.setFromRotationMatrix(v),i&&(v.extractRotation(i.matrixWorld),tt.setFromRotationMatrix(v),this.quaternion.premultiply(tt.invert()))}add(t){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(St("Object3D.add: object can\'t be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(Ut),et.child=t,this.dispatchEvent(et),et.child=null):St("Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let s=0;s<arguments.length;s++)this.remove(arguments[s]);return this}const e=this.children.indexOf(t);return e!==-1&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent($t),bt.child=t,this.dispatchEvent(bt),bt.child=null),this}removeFromParent(){const t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),v.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),v.multiply(t.parent.matrixWorld)),t.applyMatrix4(v),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(Ut),et.child=t,this.dispatchEvent(et),et.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let s=0,i=this.children.length;s<i;s++){const a=this.children[s].getObjectByProperty(t,e);if(a!==void 0)return a}}getObjectsByProperty(t,e,s=[]){this[t]===e&&s.push(this);const i=this.children;for(let n=0,a=i.length;n<a;n++)i[n].getObjectsByProperty(t,e,s);return s}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ht,t,Zt),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ht,Jt,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);const e=this.children;for(let s=0,i=e.length;s<i;s++)e[s].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);const e=this.children;for(let s=0,i=e.length;s<i;s++)e[s].traverseVisible(t)}traverseAncestors(t){const e=this.parent;e!==null&&(t(e),e.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale);const t=this.pivot;if(t!==null){const e=t.x,s=t.y,i=t.z,n=this.matrix.elements;n[12]+=e-n[0]*e-n[4]*s-n[8]*i,n[13]+=s-n[1]*e-n[5]*s-n[9]*i,n[14]+=i-n[2]*e-n[6]*s-n[10]*i}this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);const e=this.children;for(let s=0,i=e.length;s<i;s++)e[s].updateMatrixWorld(t)}updateWorldMatrix(t,e){const s=this.parent;if(t===!0&&s!==null&&s.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),e===!0){const i=this.children;for(let n=0,a=i.length;n<a;n++)i[n].updateWorldMatrix(!1,!0)}}toJSON(t){const e=t===void 0||typeof t=="string",s={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},s.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const i={};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),this.static!==!1&&(i.static=this.static),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.pivot!==null&&(i.pivot=this.pivot.toArray()),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.morphTargetDictionary!==void 0&&(i.morphTargetDictionary=Object.assign({},this.morphTargetDictionary)),this.morphTargetInfluences!==void 0&&(i.morphTargetInfluences=this.morphTargetInfluences.slice()),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.geometryInfo=this._geometryInfo.map(o=>({...o,boundingBox:o.boundingBox?o.boundingBox.toJSON():void 0,boundingSphere:o.boundingSphere?o.boundingSphere.toJSON():void 0})),i.instanceInfo=this._instanceInfo.map(o=>({...o})),i.availableInstanceIds=this._availableInstanceIds.slice(),i.availableGeometryIds=this._availableGeometryIds.slice(),i.nextIndexStart=this._nextIndexStart,i.nextVertexStart=this._nextVertexStart,i.geometryCount=this._geometryCount,i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.matricesTexture=this._matricesTexture.toJSON(t),i.indirectTexture=this._indirectTexture.toJSON(t),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(i.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(i.boundingBox=this.boundingBox.toJSON()));function n(o,h){return o[h.uuid]===void 0&&(o[h.uuid]=h.toJSON(t)),h.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=n(t.geometries,this.geometry);const o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){const h=o.shapes;if(Array.isArray(h))for(let r=0,l=h.length;r<l;r++){const c=h[r];n(t.shapes,c)}else n(t.shapes,h)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(n(t.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const o=[];for(let h=0,r=this.material.length;h<r;h++)o.push(n(t.materials,this.material[h]));i.material=o}else i.material=n(t.materials,this.material);if(this.children.length>0){i.children=[];for(let o=0;o<this.children.length;o++)i.children.push(this.children[o].toJSON(t).object)}if(this.animations.length>0){i.animations=[];for(let o=0;o<this.animations.length;o++){const h=this.animations[o];i.animations.push(n(t.animations,h))}}if(e){const o=a(t.geometries),h=a(t.materials),r=a(t.textures),l=a(t.images),c=a(t.shapes),u=a(t.skeletons),d=a(t.animations),p=a(t.nodes);o.length>0&&(s.geometries=o),h.length>0&&(s.materials=h),r.length>0&&(s.textures=r),l.length>0&&(s.images=l),c.length>0&&(s.shapes=c),u.length>0&&(s.skeletons=u),d.length>0&&(s.animations=d),p.length>0&&(s.nodes=p)}return s.object=i,s;function a(o){const h=[];for(const r in o){const l=o[r];delete l.metadata,h.push(l)}return h}}clone(t){return new this.constructor().copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),t.pivot!==null&&(this.pivot=t.pivot.clone()),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.static=t.static,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(let s=0;s<t.children.length;s++){const i=t.children[s];this.add(i.clone())}return this}}J.DEFAULT_UP=new D(0,1,0),J.DEFAULT_MATRIX_AUTO_UPDATE=!0,J.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Y=Qt();function Qt(){const m=new ArrayBuffer(4),t=new Float32Array(m),e=new Uint32Array(m),s=new Uint32Array(512),i=new Uint32Array(512);for(let h=0;h<256;++h){const r=h-127;r<-27?(s[h]=0,s[h|256]=32768,i[h]=24,i[h|256]=24):r<-14?(s[h]=1024>>-r-14,s[h|256]=1024>>-r-14|32768,i[h]=-r-1,i[h|256]=-r-1):r<=15?(s[h]=r+15<<10,s[h|256]=r+15<<10|32768,i[h]=13,i[h|256]=13):r<128?(s[h]=31744,s[h|256]=64512,i[h]=24,i[h|256]=24):(s[h]=31744,s[h|256]=64512,i[h]=13,i[h|256]=13)}const n=new Uint32Array(2048),a=new Uint32Array(64),o=new Uint32Array(64);for(let h=1;h<1024;++h){let r=h<<13,l=0;for(;(r&8388608)===0;)r<<=1,l-=8388608;r&=-8388609,l+=947912704,n[h]=r|l}for(let h=1024;h<2048;++h)n[h]=939524096+(h-1024<<13);for(let h=1;h<31;++h)a[h]=h<<23;a[31]=1199570944,a[32]=2147483648;for(let h=33;h<63;++h)a[h]=2147483648+(h-32<<23);a[63]=3347054592;for(let h=1;h<64;++h)h!==32&&(o[h]=1024);return{floatView:t,uint32View:e,baseTable:s,shiftTable:i,mantissaTable:n,exponentTable:a,offsetTable:o}}function Kt(m){Math.abs(m)>65504&&q("DataUtils.toHalfFloat(): Value out of range."),m=U(m,-65504,65504),Y.floatView[0]=m;const t=Y.uint32View[0],e=t>>23&511;return Y.baseTable[e]+((t&8388607)>>Y.shiftTable[e])}function te(m){const t=m>>10;return Y.uint32View[0]=Y.mantissaTable[Y.offsetTable[t]+(m&1023)]+Y.exponentTable[t],Y.floatView[0]}class pt{static toHalfFloat(t){return Kt(t)}static fromHalfFloat(t){return te(t)}}class ee extends H{constructor(t=null,e=1,s=1,i,n,a,o,h,r=1003,l=1003,c,u){super(null,a,o,h,r,l,i,n,c,u),this.isDataTexture=!0,this.image={data:t,width:e,height:s},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const ot={enabled:!1,files:{},add:function(m,t){this.enabled!==!1&&(It(m)||(this.files[m]=t))},get:function(m){if(this.enabled!==!1&&!It(m))return this.files[m]},remove:function(m){delete this.files[m]},clear:function(){this.files={}}};function It(m){try{const t=m.slice(m.indexOf(":")+1);return new URL(t).protocol==="blob:"}catch{return!1}}class se{constructor(t,e,s){const i=this;let n=!1,a=0,o=0,h;const r=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=s,this._abortController=null,this.itemStart=function(l){o++,n===!1&&i.onStart!==void 0&&i.onStart(l,a,o),n=!0},this.itemEnd=function(l){a++,i.onProgress!==void 0&&i.onProgress(l,a,o),a===o&&(n=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(l){i.onError!==void 0&&i.onError(l)},this.resolveURL=function(l){return h?h(l):l},this.setURLModifier=function(l){return h=l,this},this.addHandler=function(l,c){return r.push(l,c),this},this.removeHandler=function(l){const c=r.indexOf(l);return c!==-1&&r.splice(c,2),this},this.getHandler=function(l){for(let c=0,u=r.length;c<u;c+=2){const d=r[c],p=r[c+1];if(d.global&&(d.lastIndex=0),d.test(l))return p}return null},this.abort=function(){return this.abortController.abort(),this._abortController=null,this}}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}}const ie=new se;class lt{constructor(t){this.manager=t!==void 0?t:ie,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}load(){}loadAsync(t,e){const s=this;return new Promise(function(i,n){s.load(t,i,e,n)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}abort(){return this}}lt.DEFAULT_MATERIAL_NAME="__DEFAULT";const G={};class ne extends Error{constructor(t,e){super(t),this.response=e}}class Ot extends lt{constructor(t){super(t),this.mimeType="",this.responseType="",this._abortController=new AbortController}load(t,e,s,i){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const n=ot.get(`file:${t}`);if(n!==void 0)return this.manager.itemStart(t),setTimeout(()=>{e&&e(n),this.manager.itemEnd(t)},0),n;if(G[t]!==void 0){G[t].push({onLoad:e,onProgress:s,onError:i});return}G[t]=[],G[t].push({onLoad:e,onProgress:s,onError:i});const a=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),o=this.mimeType,h=this.responseType;fetch(a).then(r=>{if(r.status===200||r.status===0){if(r.status===0&&q("FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||r.body===void 0||r.body.getReader===void 0)return r;const l=G[t],c=r.body.getReader(),u=r.headers.get("X-File-Size")||r.headers.get("Content-Length"),d=u?parseInt(u):0,p=d!==0;let f=0;const M=new ReadableStream({start(y){z();function z(){c.read().then(({done:C,value:k})=>{if(C)y.close();else{f+=k.byteLength;const L=new ProgressEvent("progress",{lengthComputable:p,loaded:f,total:d});for(let F=0,A=l.length;F<A;F++){const x=l[F];x.onProgress&&x.onProgress(L)}y.enqueue(k),z()}},C=>{y.error(C)})}}});return new Response(M)}else throw new ne(`fetch for "${r.url}" responded with ${r.status}: ${r.statusText}`,r)}).then(r=>{switch(h){case"arraybuffer":return r.arrayBuffer();case"blob":return r.blob();case"document":return r.text().then(l=>new DOMParser().parseFromString(l,o));case"json":return r.json();default:if(o==="")return r.text();{const c=/charset="?([^;"\\s]*)"?/i.exec(o),u=c&&c[1]?c[1].toLowerCase():void 0,d=new TextDecoder(u);return r.arrayBuffer().then(p=>d.decode(p))}}}).then(r=>{ot.add(`file:${t}`,r);const l=G[t];delete G[t];for(let c=0,u=l.length;c<u;c++){const d=l[c];d.onLoad&&d.onLoad(r)}}).catch(r=>{const l=G[t];if(l===void 0)throw this.manager.itemError(t),r;delete G[t];for(let c=0,u=l.length;c<u;c++){const d=l[c];d.onError&&d.onError(r)}this.manager.itemError(t)}).finally(()=>{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}const st=new WeakMap;class Wt extends lt{constructor(t){super(t)}load(t,e,s,i){this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const n=this,a=ot.get(`image:${t}`);if(a!==void 0){if(a.complete===!0)n.manager.itemStart(t),setTimeout(function(){e&&e(a),n.manager.itemEnd(t)},0);else{let c=st.get(a);c===void 0&&(c=[],st.set(a,c)),c.push({onLoad:e,onError:i})}return a}const o=mt("img");function h(){l(),e&&e(this);const c=st.get(this)||[];for(let u=0;u<c.length;u++){const d=c[u];d.onLoad&&d.onLoad(this)}st.delete(this),n.manager.itemEnd(t)}function r(c){l(),i&&i(c),ot.remove(`image:${t}`);const u=st.get(this)||[];for(let d=0;d<u.length;d++){const p=u[d];p.onError&&p.onError(c)}st.delete(this),n.manager.itemError(t),n.manager.itemEnd(t)}function l(){o.removeEventListener("load",h,!1),o.removeEventListener("error",r,!1)}return o.addEventListener("load",h,!1),o.addEventListener("error",r,!1),t.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(o.crossOrigin=this.crossOrigin),ot.add(`image:${t}`,o),n.manager.itemStart(t),o.src=t,o}}class re extends lt{constructor(t){super(t)}load(t,e,s,i){const n=this,a=new ee,o=new Ot(this.manager);return o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setPath(this.path),o.setWithCredentials(n.withCredentials),o.load(t,function(h){let r;try{r=n.parse(h)}catch(l){if(i!==void 0)i(l);else{l(l);return}}r.image!==void 0?a.image=r.image:r.data!==void 0&&(a.image.width=r.width,a.image.height=r.height,a.image.data=r.data),a.wrapS=r.wrapS!==void 0?r.wrapS:1001,a.wrapT=r.wrapT!==void 0?r.wrapT:1001,a.magFilter=r.magFilter!==void 0?r.magFilter:1006,a.minFilter=r.minFilter!==void 0?r.minFilter:1006,a.anisotropy=r.anisotropy!==void 0?r.anisotropy:1,r.colorSpace!==void 0&&(a.colorSpace=r.colorSpace),r.flipY!==void 0&&(a.flipY=r.flipY),r.format!==void 0&&(a.format=r.format),r.type!==void 0&&(a.type=r.type),r.mipmaps!==void 0&&(a.mipmaps=r.mipmaps,a.minFilter=1008),r.mipmapCount===1&&(a.minFilter=1006),r.generateMipmaps!==void 0&&(a.generateMipmaps=r.generateMipmaps),a.needsUpdate=!0,e&&e(a,r)},s,i),a}}class ae extends lt{constructor(t){super(t)}load(t,e,s,i){const n=new H,a=new Wt(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(t,function(o){n.image=o,n.needsUpdate=!0,e!==void 0&&e(n)},s,i),n}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"183"}})),typeof window<"u"&&(window.__THREE__?q("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="183"),new D,new D,new D;class he{min;roots;nodes;constructor(){this.min=null,this.roots=[],this.nodes=new Map}shift(){const t=this.min;if(t===null||this.roots.length<1)return this.min=null,t;this.remove(t),this.roots.length>50&&this.consolidate();let e=1/0;const s=this.roots.length;for(let i=0;i<s;i++){const n=this.roots[i],a=this.getDistance(n);a<e&&(e=a,this.min=n)}return t}consolidate(){const t=[[],[],[],[],[],[],[]],e=t.length-1,s=this.roots.length;for(let i=0;i<s;i++){const n=this.roots[i],a=this.nodes.get(n);a&&a.depth<e&&t[a.depth].push(n)}for(let i=0;i<=e;i++)for(;t[i].length>1;){const n=t[i].shift(),a=t[i].shift(),o=i+1;let h=-1;if(n!==void 0&&a!==void 0){const r=this.nodes.get(n),l=this.nodes.get(a);r&&l&&(r.distance<l.distance?(r.depth=o,r.children.push(a),l.parent=n,o<=e&&t[o].push(n),h=this.roots.indexOf(a)):(l.depth=o,l.children.push(n),r.parent=a,o<=e&&t[o].push(a),h=this.roots.indexOf(n)))}h>-1&&this.roots.splice(h,1)}}add(t,e){if(this.nodes.set(t,{nodeIndex:t,distance:e,depth:0,parent:null,children:[]}),this.min===null)this.min=t;else{const s=this.nodes.get(this.min);s&&e<s.distance&&(this.min=t)}this.roots.push(t)}update(t,e){this.remove(t),this.add(t,e)}remove(t){if(!this.nodes.has(t))return;const e=this.nodes.get(t)?.children;if(e&&e.length>0)for(let i=0;i<e.length;i++){const n=e[i],a=this.nodes.get(n),o=this.nodes.get(t);a&&o&&(a.parent=o.parent),a&&a.parent===null&&this.roots.push(n)}let s=this.nodes.get(t)?.parent;if(s===null){const i=this.roots.indexOf(t);i>-1&&this.roots.splice(i,1)}else for(;s;){const i=this.nodes.get(s);i&&(i.depth--,s=i.parent)}}getDistance(t){const e=this.nodes.get(t);return e?e.distance:1/0}}const wt={};class oe extends re{constructor(t){super(t),this.type=1016}parse(t){const a=function(x,b){switch(x){case 1:throw new Error("THREE.HDRLoader: Read Error: "+(b||""));case 2:throw new Error("THREE.HDRLoader: Write Error: "+(b||""));case 3:throw new Error("THREE.HDRLoader: Bad File Format: "+(b||""));default:case 4:throw new Error("THREE.HDRLoader: Memory Error: "+(b||""))}},c=function(x,b,w){b=b||1024;let R=x.pos,S=-1,g=0,_="",E=String.fromCharCode.apply(null,new Uint16Array(x.subarray(R,R+128)));for(;0>(S=E.indexOf(`\n`))&&g<b&&R<x.byteLength;)_+=E,g+=E.length,R+=128,E+=String.fromCharCode.apply(null,new Uint16Array(x.subarray(R,R+128)));return-1<S?(x.pos+=g+S+1,_+E.slice(0,S)):!1},u=function(x){const b=/^#\\?(\\S+)/,w=/^\\s*GAMMA\\s*=\\s*(\\d+(\\.\\d+)?)\\s*$/,T=/^\\s*EXPOSURE\\s*=\\s*(\\d+(\\.\\d+)?)\\s*$/,R=/^\\s*FORMAT=(\\S+)\\s*$/,S=/^\\s*\\-Y\\s+(\\d+)\\s+\\+X\\s+(\\d+)\\s*$/,g={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let _,E;for((x.pos>=x.byteLength||!(_=c(x)))&&a(1,"no header found"),(E=_.match(b))||a(3,"bad initial token"),g.valid|=1,g.programtype=E[1],g.string+=_+`\n`;_=c(x),_!==!1;){if(g.string+=_+`\n`,_.charAt(0)==="#"){g.comments+=_+`\n`;continue}if((E=_.match(w))&&(g.gamma=parseFloat(E[1])),(E=_.match(T))&&(g.exposure=parseFloat(E[1])),(E=_.match(R))&&(g.valid|=2,g.format=E[1]),(E=_.match(S))&&(g.valid|=4,g.height=parseInt(E[1],10),g.width=parseInt(E[2],10)),g.valid&2&&g.valid&4)break}return g.valid&2||a(3,"missing format specifier"),g.valid&4||a(3,"missing image size specifier"),g},d=function(x,b,w){const T=b;if(T<8||T>32767||x[0]!==2||x[1]!==2||x[2]&128)return new Uint8Array(x);T!==(x[2]<<8|x[3])&&a(3,"wrong scanline width");const R=new Uint8Array(4*b*w);R.length||a(4,"unable to allocate buffer space");let S=0,g=0;const _=4*T,E=new Uint8Array(4),P=new Uint8Array(_);let $=w;for(;$>0&&g<x.byteLength;){g+4>x.byteLength&&a(1),E[0]=x[g++],E[1]=x[g++],E[2]=x[g++],E[3]=x[g++],(E[0]!=2||E[1]!=2||(E[2]<<8|E[3])!=T)&&a(3,"bad rgbe scanline format");let V=0,O;for(;V<_&&g<x.byteLength;){O=x[g++];const X=O>128;if(X&&(O-=128),(O===0||V+O>_)&&a(3,"bad scanline data"),X){const j=x[g++];for(let Pt=0;Pt<O;Pt++)P[V++]=j}else P.set(x.subarray(g,g+O),V),V+=O,g+=O}const it=T;for(let X=0;X<it;X++){let j=0;R[S]=P[X+j],j+=T,R[S+1]=P[X+j],j+=T,R[S+2]=P[X+j],j+=T,R[S+3]=P[X+j],S+=4}$--}return R},p=function(x,b,w,T){const R=x[b+3],S=Math.pow(2,R-128)/255;w[T+0]=x[b+0]*S,w[T+1]=x[b+1]*S,w[T+2]=x[b+2]*S,w[T+3]=1},f=function(x,b,w,T){const R=x[b+3],S=Math.pow(2,R-128)/255;w[T+0]=pt.toHalfFloat(Math.min(x[b+0]*S,65504)),w[T+1]=pt.toHalfFloat(Math.min(x[b+1]*S,65504)),w[T+2]=pt.toHalfFloat(Math.min(x[b+2]*S,65504)),w[T+3]=pt.toHalfFloat(1)},M=new Uint8Array(t);M.pos=0;const y=u(M),z=y.width,C=y.height,k=d(M.subarray(M.pos),z,C);let L,F,A;switch(this.type){case 1015:A=k.length/4;const x=new Float32Array(A*4);for(let w=0;w<A;w++)p(k,w*4,x,w*4);L=x,F=1015;break;case 1016:A=k.length/4;const b=new Uint16Array(A*4);for(let w=0;w<A;w++)f(k,w*4,b,w*4);L=b,F=1016;break;default:throw new Error("THREE.HDRLoader: Unsupported type: "+this.type)}return{width:z,height:C,data:L,header:y.string,gamma:y.gamma,exposure:y.exposure,type:F}}setDataType(t){return this.type=t,this}load(t,e,s,i){function n(a,o){switch(a.type){case 1015:case 1016:a.colorSpace=Vt,a.minFilter=1006,a.magFilter=1006,a.generateMipmaps=!1,a.flipY=!0;break}e&&e(a,o)}return super.load(t,n,s,i)}}const zt=new Ot;zt.setRequestHeader(wt);const le=new Wt;le.load=(m,t,e,s)=>{const i=new Image;return zt.setResponseType("blob"),zt.load(m,function(n){i.src=URL.createObjectURL(n),i.onload=()=>{URL.revokeObjectURL(i.src),t?.(i)}},e,s),i},new ae().setRequestHeader(wt),new oe().setRequestHeader(wt),new D,new D,new D;class ce{graph;queue;previous;constructor(){this.graph=new Map,this.queue=null,this.previous=new Map}setGraph(t){if(!(t.length<1))for(const e of t){const[s,i]=e;this.graph.set(s,new Map);for(const n of i){const[a,o]=n;this.graph.get(s)?.set(a,o)}}}getPath(t,e){if(t===e)return[];const s=this.queue=new he;s.add(t,0),this.previous.set(t,null);let i=null;for(;i=s.shift();){if(i===e){const o=[];for(;i!==null&&this.previous.get(i)!==null;)o.unshift(i),i=this.previous.get(i)??null;return o}const n=s.getDistance(i);if(n===1/0)return[];const a=this.graph.get(i);a&&a.forEach((o,h)=>{const r=s.getDistance(h),l=n+o;l<r&&(s.update(h,l),this.previous.set(h,i))})}return[]}}const Nt=new ce;onmessage=function({data:m}){const{type:t}=m;switch(t){case"setGraph":{Nt.graph=m.graph,postMessage({type:"done"});break}case"getPath":{const e=Nt.getPath(...m.st);postMessage({type:"done",pathIds:e});break}}}})();\n', la = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", Io], { type: "text/javascript;charset=utf-8" });
13063
- function Np(i) {
13101
+ function jp(i) {
13064
13102
  let e;
13065
13103
  try {
13066
13104
  if (e = la && (self.URL || self.webkitURL).createObjectURL(la), !e) throw "";
@@ -13079,9 +13117,9 @@ function Np(i) {
13079
13117
  );
13080
13118
  }
13081
13119
  }
13082
- class jp {
13120
+ class Up {
13083
13121
  constructor(e) {
13084
- this.dijkstra = e, this.workerPool.setWorkerCreator(() => new Np());
13122
+ this.dijkstra = e, this.workerPool.setWorkerCreator(() => new jp());
13085
13123
  }
13086
13124
  workerPool = new xa(4);
13087
13125
  _mainThreadGraph = [];
@@ -13095,12 +13133,12 @@ class jp {
13095
13133
  this.workerPool.dispose();
13096
13134
  }
13097
13135
  }
13098
- class Up extends mt {
13136
+ class Gp extends mt {
13099
13137
  constructor(e, t) {
13100
13138
  super(et.Topology, e, t.classified.Topology), this.viewport = e, this.cache = t;
13101
13139
  }
13102
- dijkstra = new Rp();
13103
- dijkstraWorker = new jp(this.dijkstra);
13140
+ dijkstra = new Np();
13141
+ dijkstraWorker = new Up(this.dijkstra);
13104
13142
  async createFromGml(e) {
13105
13143
  const { url: t, linkWidth: n = 20, linkColor: s = 65280, renderNode: r = !0, nodeColor: a = 255 } = e;
13106
13144
  return La(t).then((o) => {
@@ -13162,10 +13200,10 @@ class Up extends mt {
13162
13200
  */
13163
13201
  setPassable(e, t) {
13164
13202
  if (e.topologyType === "line") {
13165
- kr("只支持 network 类型");
13203
+ zr("只支持 network 类型");
13166
13204
  return;
13167
13205
  }
13168
- const n = Ds(e.info.nodes), s = n.reduce((a, o) => (a.set(o.id, o), a), /* @__PURE__ */ new Map()), r = e.nodes.reduce((a, o) => (a.set(o.sid, o), a), /* @__PURE__ */ new Map());
13206
+ const n = Cs(e.info.nodes), s = n.reduce((a, o) => (a.set(o.id, o), a), /* @__PURE__ */ new Map()), r = e.nodes.reduce((a, o) => (a.set(o.sid, o), a), /* @__PURE__ */ new Map());
13169
13207
  t.forEach(({ sourceNodeId: a, targetNodeId: o, passable: l }) => {
13170
13208
  const c = s.get(a), u = s.get(o);
13171
13209
  if (!c || !u) {
@@ -13457,7 +13495,7 @@ class Up extends mt {
13457
13495
  this.dijkstraWorker.dispose();
13458
13496
  }
13459
13497
  }
13460
- class Gp extends mt {
13498
+ class Vp extends mt {
13461
13499
  constructor(e, t) {
13462
13500
  super(et.Helper, e, t.classified.Helper), this.viewport = e, this.cache = t;
13463
13501
  }
@@ -13505,8 +13543,8 @@ class Gp extends mt {
13505
13543
  rotation: l,
13506
13544
  scale: c
13507
13545
  },
13508
- new pn(n, s),
13509
- new dn({
13546
+ new dn(n, s),
13547
+ new un({
13510
13548
  color: r,
13511
13549
  opacity: a,
13512
13550
  transparent: u,
@@ -13527,7 +13565,7 @@ class Gp extends mt {
13527
13565
  rotation: l = { x: 0, y: 0, z: 0 },
13528
13566
  scale: c = { x: 1, y: 1, z: 1 },
13529
13567
  repeat: u = { x: 10, y: 10 }
13530
- } = e, h = await _t.loadAsync(t), d = new pn(s, r);
13568
+ } = e, h = await _t.loadAsync(t), d = new dn(s, r);
13531
13569
  d.computeBoundingBox();
13532
13570
  const f = new Ue({
13533
13571
  side: Tt,
@@ -13561,7 +13599,7 @@ class Gp extends mt {
13561
13599
  return r.userData.sid = t, r.userData.stype = "Helper", this.viewport.scener.addObject(r, this.scene), r;
13562
13600
  }
13563
13601
  }
13564
- class Vp extends mt {
13602
+ class Hp extends mt {
13565
13603
  constructor(e, t) {
13566
13604
  super(et.PluginObject, e, t.classified.PluginObject), this.viewport = e, this.cache = t;
13567
13605
  }
@@ -13573,13 +13611,13 @@ class Vp extends mt {
13573
13611
  return e ? (this.viewport.scener.addObject(t, e), e) : null;
13574
13612
  }
13575
13613
  }
13576
- class Hp extends mt {
13614
+ class Wp extends mt {
13577
13615
  constructor(e, t) {
13578
13616
  super(et.Group, e, t.classified.Group), this.viewport = e, this.cache = t;
13579
13617
  }
13580
13618
  }
13581
- const cs = new un();
13582
- class Wp extends mt {
13619
+ const cs = new Nn();
13620
+ class qp extends mt {
13583
13621
  constructor(e, t) {
13584
13622
  super(et.Decal, e, t.classified.Decal), this.viewport = e, this.cache = t;
13585
13623
  }
@@ -13587,7 +13625,7 @@ class Wp extends mt {
13587
13625
  * 创建贴花
13588
13626
  */
13589
13627
  async create(e, t) {
13590
- const n = new Ir(e);
13628
+ const n = new Dr(e);
13591
13629
  return t !== null && this.viewport.scener.addObject(n, t), await n.updateTexture(e.url), n.updateMaterial(e), this.updateGeometry(n, e), n;
13592
13630
  }
13593
13631
  updateAllGeometry(e = {}) {
@@ -13613,9 +13651,9 @@ class Wp extends mt {
13613
13651
  scale: new D()
13614
13652
  };
13615
13653
  l.matrixWorld.decompose(p.position, p.quaternion, p.scale), p.scale.multiply(e.textureAspect), l.getWorldPosition(h), d.set(-f[8], -f[9], -f[10]).normalize(), cs.set(h, d), cs.near = 0, cs.far = r;
13616
- const [g] = cs.intersectObjects(a).filter(({ object: v }) => !(v instanceof Ir));
13654
+ const [g] = cs.intersectObjects(a).filter(({ object: v }) => !(v instanceof Dr));
13617
13655
  if (g) {
13618
- const { object: v } = g, w = new pe().setFromRotationMatrix(l.matrixWorld, "XYZ"), S = new Rd({
13656
+ const { object: v } = g, w = new pe().setFromRotationMatrix(l.matrixWorld, "XYZ"), S = new Nd({
13619
13657
  offsetUnits: o,
13620
13658
  ...t,
13621
13659
  object: v,
@@ -13628,26 +13666,26 @@ class Wp extends mt {
13628
13666
  }
13629
13667
  }
13630
13668
  const { x: c, y: u } = e.textureAspect;
13631
- return l.geometry = new pn(c, u), e;
13669
+ return l.geometry = new dn(c, u), e;
13632
13670
  }
13633
13671
  }
13634
- class qp {
13672
+ class Kp {
13635
13673
  viewport;
13636
13674
  cache;
13637
13675
  scene;
13638
13676
  store;
13639
13677
  constructor(e, t) {
13640
13678
  this.viewport = e, this.cache = t, this.scene = e.scene, this.store = {
13641
- groupManager: new Hp(this.viewport, this.cache),
13642
- lightManager: new Zd(this.viewport, this.cache),
13643
- modelManager: new Fp(this.viewport, this.cache),
13644
- poiManager: new Bp(this.viewport, this.cache),
13645
- poiNodeManager: new kp(this.viewport, this.cache),
13646
- canvas3DManager: new zp(this.viewport, this.cache),
13647
- topologyManager: new Up(this.viewport, this.cache),
13648
- helperManager: new Gp(this.viewport, this.cache),
13649
- decalManager: new Wp(this.viewport, this.cache),
13650
- pluginObjectManager: new Vp(this.viewport, this.cache)
13679
+ groupManager: new Wp(this.viewport, this.cache),
13680
+ lightManager: new Jd(this.viewport, this.cache),
13681
+ modelManager: new Bp(this.viewport, this.cache),
13682
+ poiManager: new kp(this.viewport, this.cache),
13683
+ poiNodeManager: new zp(this.viewport, this.cache),
13684
+ canvas3DManager: new Rp(this.viewport, this.cache),
13685
+ topologyManager: new Gp(this.viewport, this.cache),
13686
+ helperManager: new Vp(this.viewport, this.cache),
13687
+ decalManager: new qp(this.viewport, this.cache),
13688
+ pluginObjectManager: new Hp(this.viewport, this.cache)
13651
13689
  }, e.signals.beforeRender.add(this.update.bind(this)), e.signals.objectAdded.add(this.setObjectCache.bind(this)), e.signals.objectRemoved.add(this.deleteObjectCache.bind(this));
13652
13690
  }
13653
13691
  /**
@@ -13677,7 +13715,7 @@ class qp {
13677
13715
  */
13678
13716
  scaleFixedUpdate() {
13679
13717
  this.cache.objects.forEach((e) => {
13680
- if (e instanceof Fs || e instanceof Ht) {
13718
+ if (e instanceof Bs || e instanceof Ht) {
13681
13719
  const { scaleFixed: t } = e;
13682
13720
  if (t) {
13683
13721
  const n = new D();
@@ -13793,21 +13831,21 @@ class qp {
13793
13831
  this.clearObject(), this.store.lightManager.clear();
13794
13832
  }
13795
13833
  dispose() {
13796
- this.store.modelManager.dispose(), this.store.topologyManager.dispose(), this.store.lightManager.dispose(), this.clear();
13834
+ this.store.modelManager.dispose(), this.store.topologyManager.dispose(), this.store.lightManager.dispose(), this.store.poiManager.dispose(), this.clear();
13797
13835
  }
13798
13836
  }
13799
13837
  Ce.prototype.computeBoundsTree = Ac;
13800
13838
  Ce.prototype.disposeBoundsTree = Ec;
13801
13839
  we.prototype.raycast = Oc;
13802
- un.prototype.firstHitOnly = !0;
13803
- An.ColorManagement.enabled = !0;
13804
- class Pf {
13805
- static THREE = An;
13806
- THREE = An;
13807
- static TWEEN = gi;
13808
- TWEEN = gi;
13809
- static utils = bi;
13810
- utils = bi;
13840
+ Nn.prototype.firstHitOnly = !0;
13841
+ Cn.ColorManagement.enabled = !0;
13842
+ class If {
13843
+ static THREE = Cn;
13844
+ THREE = Cn;
13845
+ static TWEEN = yi;
13846
+ TWEEN = yi;
13847
+ static utils = Si;
13848
+ utils = Si;
13811
13849
  //
13812
13850
  static animation = wt;
13813
13851
  animation = wt;
@@ -13815,9 +13853,9 @@ class Pf {
13815
13853
  static library = Zi;
13816
13854
  library = Zi;
13817
13855
  // controls action
13818
- static ACTION = On.ACTION;
13856
+ static ACTION = En.ACTION;
13819
13857
  //
13820
- version = wi.version;
13858
+ version = bi.version;
13821
13859
  //
13822
13860
  options;
13823
13861
  //
@@ -13852,7 +13890,7 @@ class Pf {
13852
13890
  if (this.options = {
13853
13891
  ...t,
13854
13892
  ...s
13855
- }, this.signals = _d(), this.objectsCache = new Xd(), this.viewport = new ud(this.options, this.signals, this.objectsCache), this.controls = this.viewport.controls, this.manager = new qp(this.viewport, this.objectsCache), n && (this.domElement = n instanceof HTMLElement ? n : document.querySelector(n), this.domElement?.appendChild(this.viewport.container)), !this.domElement) throw new Error("In SoonSpace: Can't find container!");
13893
+ }, this.signals = Xd(), this.objectsCache = new Zd(), this.viewport = new ud(this.options, this.signals, this.objectsCache), this.controls = this.viewport.controls, this.manager = new Kp(this.viewport, this.objectsCache), n && (this.domElement = n instanceof HTMLElement ? n : document.querySelector(n), this.domElement?.appendChild(this.viewport.container)), !this.domElement) throw new Error("In SoonSpace: Can't find container!");
13856
13894
  this._init(), this._initEvents(r), this._initDefaultSettings();
13857
13895
  }
13858
13896
  /******/
@@ -13877,7 +13915,7 @@ class Pf {
13877
13915
  ___) | (_) | (_) | | | |___) | |_) | (_| | (_| __/_ | \\__ \\
13878
13916
  |____/ \\___/ \\___/|_| |_|____/| .__/ \\__,_|\\___\\___(_)/ |___/
13879
13917
  |_| |__/
13880
- `, { color: "#3eaf7c" }), Gt(wi.name, { color: "#3eaf7c", "font-size": "24px" }), Gt(`当前版本: ${this.version}`, {
13918
+ `, { color: "#3eaf7c" }), Gt(bi.name, { color: "#3eaf7c", "font-size": "24px" }), Gt(`当前版本: ${this.version}`, {
13881
13919
  color: "#3eaf7c",
13882
13920
  "font-size": "12px"
13883
13921
  }), Gt("文档: https://www.xwbuilders.com/soonspacejs/", {
@@ -13916,7 +13954,7 @@ class Pf {
13916
13954
  this.options.scaleFixedEnabled = e;
13917
13955
  }
13918
13956
  setFileCacheEnabled(e) {
13919
- An.Cache.enabled = e;
13957
+ Cn.Cache.enabled = e;
13920
13958
  }
13921
13959
  registerPlugin(e, t, n) {
13922
13960
  const s = new e(this, n);
@@ -14106,7 +14144,11 @@ class Pf {
14106
14144
  * 销毁场景
14107
14145
  */
14108
14146
  dispose() {
14109
- this.manager.dispose(), this.viewport.dispose(), this.objectsCache.dispose();
14147
+ for (const e of Object.values(this.plugins))
14148
+ e?.dispose && e.dispose();
14149
+ this.manager.dispose(), this.viewport.dispose(), this.objectsCache.dispose(), this.textureCache.forEach((e) => e.dispose()), this.textureCache.clear();
14150
+ for (const e in this.signals)
14151
+ this.signals[e].removeAll();
14110
14152
  }
14111
14153
  /******/
14112
14154
  /******/
@@ -14344,6 +14386,21 @@ class Pf {
14344
14386
  unEmissiveShow(e) {
14345
14387
  return this.viewport.scener.unEmissiveShow(e);
14346
14388
  }
14389
+ /**
14390
+ * 隔离显示对象 - 使用 Layers API 仅显示指定对象,隐藏场景中其他对象
14391
+ * @param objects 需要隔离显示的对象
14392
+ * @param layerChannel 使用的 layer 通道,默认 1(0 为默认通道)
14393
+ */
14394
+ isolate(e, t = 1) {
14395
+ this.viewport.isolate(e, t);
14396
+ }
14397
+ /**
14398
+ * 取消隔离 - 恢复场景中所有对象的可见性
14399
+ * @param layerChannel 之前隔离使用的 layer 通道,默认 1
14400
+ */
14401
+ unisolate(e = 1) {
14402
+ this.viewport.unisolate(e);
14403
+ }
14347
14404
  /******/
14348
14405
  /******/
14349
14406
  /******* Manager methods */
@@ -15076,7 +15133,7 @@ class Pf {
15076
15133
  let a = e.material;
15077
15134
  if (r && (a = a.clone(), e.material = a), t === null)
15078
15135
  return a.map = null, this.render(), null;
15079
- const o = Gd(
15136
+ const o = Vd(
15080
15137
  a,
15081
15138
  t,
15082
15139
  s,
@@ -15599,7 +15656,7 @@ class Pf {
15599
15656
  * @returns 用于查找的函数
15600
15657
  */
15601
15658
  createFindObjectsInBoxNearPosition(e, t) {
15602
- return Vd(e, t);
15659
+ return Hd(e, t);
15603
15660
  }
15604
15661
  /**
15605
15662
  * 创建用于 查找位置附近的球形区域范围内的物体 的查找器
@@ -15609,7 +15666,7 @@ class Pf {
15609
15666
  * @returns 用于查找的函数
15610
15667
  */
15611
15668
  createFindObjectsInSphereNearPosition(e, t) {
15612
- return Hd(e, t);
15669
+ return Wd(e, t);
15613
15670
  }
15614
15671
  /**
15615
15672
  * 创建用于 查找路径附近的范围内的物体 的查找器
@@ -15619,7 +15676,7 @@ class Pf {
15619
15676
  * @returns 用于查找的函数
15620
15677
  */
15621
15678
  createFindObjectsNearPath(e, t) {
15622
- return Wd(e, t);
15679
+ return qd(e, t);
15623
15680
  }
15624
15681
  /**
15625
15682
  * 创建路径动画
@@ -15629,7 +15686,7 @@ class Pf {
15629
15686
  * @returns
15630
15687
  */
15631
15688
  createPathAnimation(e, t, n) {
15632
- return new Si(e, t, n);
15689
+ return new Mi(e, t, n);
15633
15690
  }
15634
15691
  /**
15635
15692
  * 创建沿拓扑路径运动的动画
@@ -15640,7 +15697,7 @@ class Pf {
15640
15697
  */
15641
15698
  createTopologyAnimation(e, t, n) {
15642
15699
  const s = t.nodes.map((r) => r.getWorldPosition(new D()));
15643
- return new Si(e, s, n);
15700
+ return new Mi(e, s, n);
15644
15701
  }
15645
15702
  /**
15646
15703
  * 创建沿路径运动的动画 action
@@ -15651,7 +15708,7 @@ class Pf {
15651
15708
  * @returns 返回 AnimationOperate,它是对 AnimationAction 的扩展
15652
15709
  */
15653
15710
  createPathAnimationAction(e, t, n) {
15654
- return qd(e, t, this, n);
15711
+ return Kd(e, t, this, n);
15655
15712
  }
15656
15713
  /**
15657
15714
  * 创建相机动画
@@ -15668,7 +15725,7 @@ class Pf {
15668
15725
  * @returns
15669
15726
  */
15670
15727
  createBonePathAnimation(e, t, n) {
15671
- return Kd(e, t, this, n);
15728
+ return Qd(e, t, this, n);
15672
15729
  }
15673
15730
  /**
15674
15731
  * 为指定的 模型 创建其对应的链式骨骼模型
@@ -15677,7 +15734,7 @@ class Pf {
15677
15734
  * @returns
15678
15735
  */
15679
15736
  createChainSkeletalModel(e, t) {
15680
- return Qd(e, t);
15737
+ return Yd(e, t);
15681
15738
  }
15682
15739
  /**
15683
15740
  * 创建骨骼沿曲线路径运动的动画
@@ -15687,12 +15744,12 @@ class Pf {
15687
15744
  * @returns
15688
15745
  */
15689
15746
  createPathAnimationForBones(e, t, n) {
15690
- return Yd(e, t, this, n);
15747
+ return _d(e, t, this, n);
15691
15748
  }
15692
15749
  }
15693
15750
  export {
15694
15751
  Zh as AnimationActionController,
15695
- Mf as AnimationActionCreator,
15752
+ Tf as AnimationActionCreator,
15696
15753
  _h as AnimationActionKeyframe,
15697
15754
  Xh as AnimationActionOperate,
15698
15755
  Xa as AnimationClipCreator,
@@ -15701,15 +15758,15 @@ export {
15701
15758
  ze as BaseMesh,
15702
15759
  De as BaseObject3D,
15703
15760
  ds as Canvas3D,
15704
- ri as Circle,
15705
- Ir as Decal,
15761
+ ii as Circle,
15762
+ Dr as Decal,
15706
15763
  Lt as DecalUVMapType,
15707
- Nr as FileRequestHeaders,
15764
+ jr as FileRequestHeaders,
15708
15765
  uo as Ground,
15709
15766
  Yt as Group,
15710
15767
  _a as GuiAnimationActionController,
15711
15768
  wa as INNER_ID,
15712
- Mr as Icon,
15769
+ Tr as Icon,
15713
15770
  co as Line,
15714
15771
  lo as Link,
15715
15772
  xt as Model,
@@ -15717,61 +15774,62 @@ export {
15717
15774
  oo as Node,
15718
15775
  et as ObjecType,
15719
15776
  ao as PluginObject,
15720
- Fs as Poi,
15777
+ Bs as Poi,
15721
15778
  xo as PoiMesh,
15722
15779
  Ht as PoiNode,
15723
- si as Point,
15780
+ ri as Point,
15724
15781
  ho as Polygon,
15725
15782
  wo as PolygonPoiMesh,
15726
15783
  ht as Topology,
15727
15784
  ut as TrackProperty_Common,
15728
15785
  $h as ValueTypeNames,
15729
15786
  vo as boundingIsIntersected,
15787
+ fd as clearLinkTextureCache,
15730
15788
  Bh as configVertexWeightByEquallyDivided,
15731
15789
  Ga as configVertexWeightForChainBones,
15732
- gf as configVertexWeightForEqualChainBones,
15790
+ yf as configVertexWeightForEqualChainBones,
15733
15791
  Qa as createAnimationOperate,
15734
15792
  Gh as createBonePathAnimation,
15735
15793
  Ua as createChainBones,
15736
- Qr as createChainBonesByAxials,
15794
+ Yr as createChainBonesByAxials,
15737
15795
  Lh as createChainBonesByJoints,
15738
15796
  Ha as createChainSkeletalModel,
15739
- yf as createChainSkinnedMesh,
15740
- vf as createChainSkinnedMeshForMesh,
15797
+ vf as createChainSkinnedMesh,
15798
+ xf as createChainSkinnedMeshForMesh,
15741
15799
  zh as createCurveAnimationClip,
15742
15800
  Rh as createCurveAnimationClipByCurve,
15743
15801
  Nh as createCurveAnimationClipByPolyline,
15744
15802
  Ka as createCurveAnimationClipForBones,
15745
15803
  Wh as createCurveAnimationClipForBonesTarget,
15746
15804
  Fh as createEqualChainBones,
15747
- Vd as createFindObjectsInBoxNearPosition,
15748
- Hd as createFindObjectsInSphereNearPosition,
15749
- Wd as createFindObjectsNearPath,
15750
- Sf as createGuiAnimationController,
15805
+ Hd as createFindObjectsInBoxNearPosition,
15806
+ Wd as createFindObjectsInSphereNearPosition,
15807
+ qd as createFindObjectsNearPath,
15808
+ Mf as createGuiAnimationController,
15751
15809
  Vh as createKeyframeTracksForBones,
15752
15810
  qh as createKeyframeTracksForBonesTarget,
15753
15811
  qa as createKeyframeTracksOfCurveAnimation,
15754
15812
  jh as createKeyframeTracksOfCurveAnimationByPolyline,
15755
- jd as createPlaneMatrix,
15756
- ai as createTexture,
15757
- Ud as createUVMatrix,
15758
- Pf as default,
15759
- xf as getAllRootBones,
15760
- Tf as getClosestContinuousIndexes,
15813
+ Ud as createPlaneMatrix,
15814
+ oi as createTexture,
15815
+ Gd as createUVMatrix,
15816
+ If as default,
15817
+ wf as getAllRootBones,
15818
+ Pf as getClosestContinuousIndexes,
15761
15819
  nu as getContinuousNumsList,
15762
- Es as getDurationOfPathAnimationOptions,
15820
+ Os as getDurationOfPathAnimationOptions,
15763
15821
  kh as getFirstRootBone,
15764
- Yr as getKeyframeTransformDatas,
15822
+ _r as getKeyframeTransformDatas,
15765
15823
  Uh as getKeyframeTransformDatasByPolyline,
15766
- Nd as getPolygonGeometryInfo,
15767
- wf as getRootBone,
15824
+ jd as getPolygonGeometryInfo,
15825
+ bf as getRootBone,
15768
15826
  Hh as getSampleDataForBones,
15769
15827
  Kh as getSampleDataForBonesTarget,
15770
- _r as getTS,
15771
- Xr as getTimes,
15772
- ti as isPoiNode25D,
15773
- ei as isPoiNode2D,
15774
- ni as isPoiNode3D,
15775
- Vs as renderLoop,
15776
- Gd as setTexture
15828
+ Xr as getTS,
15829
+ Zr as getTimes,
15830
+ ni as isPoiNode25D,
15831
+ ti as isPoiNode2D,
15832
+ si as isPoiNode3D,
15833
+ Hs as renderLoop,
15834
+ Vd as setTexture
15777
15835
  };