@vincentt-xr/sdk 2.0.0-alpha.4 → 2.0.0-alpha.6

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.
Files changed (67) hide show
  1. package/GROUNDING.md +11 -4
  2. package/README.md +85 -52
  3. package/dist/{DebuggerUI-DhKTXTY2.js → DebuggerUI-C_rbLdkh.js} +1 -1
  4. package/dist/{DebuggerUI-bnGHSSOb.cjs → DebuggerUI-DYT_dk1E.cjs} +1 -1
  5. package/dist/FaceMeshRenderer-D1WsrTLA.cjs +155 -0
  6. package/dist/FaceMeshRenderer-DSCd1H55.js +1264 -0
  7. package/dist/{FaceRetouch-Bg-OBU4n.js → FaceRetouch-CMJbGThL.js} +30 -30
  8. package/dist/{FaceRetouch-TZeBGIqW.cjs → FaceRetouch-DsE0Dbw-.cjs} +1 -1
  9. package/dist/components/FaceMesh/canonical/CanonicalFaceMeshRenderer.d.ts +11 -1
  10. package/dist/components/FaceMesh/canonical/geometryGroups.d.ts +1 -1
  11. package/dist/components/FaceMesh/canonical/parseCanonicalFaceModel.d.ts +1 -0
  12. package/dist/components/LipEffect/LipEffect.d.ts +2 -0
  13. package/dist/components/LipEffect/LipEffectMaterial.d.ts +10 -0
  14. package/dist/components/LipEffect/defaults.d.ts +9 -0
  15. package/dist/components/LipEffect/index.d.ts +4 -0
  16. package/dist/components/LipEffect/types.d.ts +22 -0
  17. package/dist/{contexts-B2_NsTnk.js → contexts-DvQI4PqI.js} +6 -3
  18. package/dist/contexts-h-9TRH0r.cjs +1 -0
  19. package/dist/debug-ui/media-source.cjs +1 -1
  20. package/dist/debug-ui/media-source.js +1 -1
  21. package/dist/debug-ui.cjs +1 -1
  22. package/dist/debug-ui.js +10 -10
  23. package/dist/entries/face-effects.d.ts +2 -0
  24. package/dist/face-effects.cjs +1 -1
  25. package/dist/face-effects.js +621 -508
  26. package/dist/{getFaceInfo-4DhcPZDJ.js → getFaceInfo-B43Cwq4n.js} +1 -1
  27. package/dist/{getFaceInfo-QOQ_dc-W.cjs → getFaceInfo-DEzcL_Ub.cjs} +1 -1
  28. package/dist/{index-D1kj6uc-.js → index-B-s4YbWu.js} +1 -1
  29. package/dist/index-C0-fg1Hk.cjs +1 -0
  30. package/dist/{index-C9yQVzAh.cjs → index-CY7Z8cHV.cjs} +1 -1
  31. package/dist/{index-ZaDEzDtR.cjs → index-CxMEeCRP.cjs} +1 -1
  32. package/dist/{index-WPPnlFO1.cjs → index-D67hHm44.cjs} +1 -1
  33. package/dist/{index-CNGzE49z.cjs → index-DPPpU5By.cjs} +1 -1
  34. package/dist/{index-g250Tqme.js → index-DYfY9ljy.js} +1 -1
  35. package/dist/{index-Cj3fGDtZ.js → index-G_5h_FJQ.js} +8 -8
  36. package/dist/{index-BMeBJ0dV.js → index-I4eF5TKT.js} +227 -191
  37. package/dist/{index-72Wb15Ca.js → index-uE3sKczj.js} +1 -1
  38. package/dist/{internal-Dtvo4WYo.cjs → internal-MvKrz0Nt.cjs} +1 -1
  39. package/dist/{internal-34pb7djs.js → internal-ldPYiUF0.js} +3 -3
  40. package/dist/internal.cjs +1 -1
  41. package/dist/internal.js +1 -1
  42. package/dist/low-level.cjs +1 -1
  43. package/dist/low-level.js +11 -11
  44. package/dist/main.cjs +1 -1
  45. package/dist/main.js +12 -12
  46. package/dist/{renderGroups-jSUOY1Oq.cjs → renderGroups-BJsx32q5.cjs} +1 -1
  47. package/dist/{renderGroups-CPWUX6z9.js → renderGroups-CFt1yYLB.js} +1 -1
  48. package/dist/{renderPasses-CLlYRdMk.js → renderPasses-C72MbZ-a.js} +4 -4
  49. package/dist/{renderPasses-KUJUSevp.cjs → renderPasses-D-Krl6D0.cjs} +1 -1
  50. package/dist/scene-object.cjs +1 -1
  51. package/dist/scene-object.js +2 -2
  52. package/dist/{selectors-DLxL8Q66.js → selectors-ByKNTXeA.js} +1 -1
  53. package/dist/{selectors-S8g25ke9.cjs → selectors-CAwmL9VW.cjs} +1 -1
  54. package/dist/{session-DP8AF7Rg.cjs → session-CANvoLD6.cjs} +1 -1
  55. package/dist/{session-CbtvwiaD.js → session-Dhi0OqZo.js} +1 -1
  56. package/dist/tracking.cjs +1 -1
  57. package/dist/tracking.js +9 -9
  58. package/dist/{useFaceInfo-BvZeUBsL.cjs → useFaceInfo-BSZq7AO1.cjs} +1 -1
  59. package/dist/{useFaceInfo-C06EyScd.js → useFaceInfo-FVQBBNdY.js} +3 -3
  60. package/dist/{useFaceResults-CCNiH7VZ.cjs → useFaceResults-C3oZkn2Z.cjs} +1 -1
  61. package/dist/{useFaceResults-C1Ppc8rS.js → useFaceResults-D62STzT1.js} +1 -1
  62. package/dist/utils/visionWasm.d.ts +18 -0
  63. package/package.json +2 -2
  64. package/dist/FaceMeshRenderer-B2i2NW71.js +0 -1195
  65. package/dist/FaceMeshRenderer-BSOq1OnG.cjs +0 -155
  66. package/dist/contexts-BgWfyxre.cjs +0 -1
  67. package/dist/index-Da7uycur.cjs +0 -1
@@ -1,16 +1,126 @@
1
- import { jsx as R, jsxs as S, Fragment as Me } from "react/jsx-runtime";
2
- import { useState as tt, useEffect as we, useMemo as Ae } from "react";
3
- import * as K from "three";
4
- import { TrianglesDrawMode as nt, TriangleFanDrawMode as de, TriangleStripDrawMode as He, Loader as st, LoaderUtils as q, FileLoader as Be, MeshPhysicalMaterial as N, Vector2 as ke, Color as v, LinearSRGBColorSpace as D, SRGBColorSpace as Z, SpotLight as rt, PointLight as it, DirectionalLight as ot, Matrix4 as ee, Vector3 as G, Quaternion as Ge, InstancedMesh as at, InstancedBufferAttribute as ct, Object3D as Ue, TextureLoader as lt, ImageBitmapLoader as ut, BufferAttribute as se, InterleavedBuffer as ht, InterleavedBufferAttribute as dt, LinearMipmapLinearFilter as ve, NearestMipmapLinearFilter as ft, LinearMipmapNearestFilter as pt, NearestMipmapNearestFilter as mt, LinearFilter as fe, NearestFilter as je, RepeatWrapping as pe, MirroredRepeatWrapping as gt, ClampToEdgeWrapping as At, PointsMaterial as Tt, Material as re, LineBasicMaterial as Et, MeshStandardMaterial as Ke, DoubleSide as J, MeshBasicMaterial as W, PropertyBinding as xt, BufferGeometry as Rt, SkinnedMesh as _t, Mesh as Mt, LineSegments as wt, Line as St, LineLoop as yt, Points as Lt, Group as ie, PerspectiveCamera as bt, MathUtils as It, OrthographicCamera as Nt, Skeleton as Ct, AnimationClip as Pt, Bone as Ft, InterpolateDiscrete as Ot, InterpolateLinear as Xe, Texture as Se, VectorKeyframeTrack as ye, NumberKeyframeTrack as Le, QuaternionKeyframeTrack as be, ColorManagement as Ie, FrontSide as Dt, Interpolant as Ht, Box3 as Bt, Sphere as kt, Euler as Gt } from "three";
5
- import { b as Ut, c as vt } from "./index-D1kj6uc-.js";
6
- import { l as Ne, f as jt } from "./index-BMeBJ0dV.js";
7
- import { Text as oe } from "@react-three/drei";
8
- import { q as Qn, C as Jn, D as $n, a as es, c as ts, d as ns, F as ss, e as rs, f as is, g as os, h as as, i as cs, j as ls, l as us, m as hs, b as ds, n as fs, o as ps, p as ms, r as gs, v as As, t as Ts, k as Es, s as xs, u as Rs } from "./FaceMeshRenderer-B2i2NW71.js";
9
- import { D as Ms, d as ws, e as Ss, F as ys, f as Ls, b as bs, c as Is, m as Ns, p as Cs, r as Ps, s as Fs, a as Os, t as Ds } from "./FaceRetouch-Bg-OBU4n.js";
10
- function Ce(l, t) {
11
- if (t === nt)
1
+ import { jsx as T, jsxs as w, Fragment as ye } from "react/jsx-runtime";
2
+ import { useState as rt, useEffect as we, useMemo as Te } from "react";
3
+ import * as b from "three";
4
+ import { TrianglesDrawMode as it, TriangleFanDrawMode as fe, TriangleStripDrawMode as He, Loader as ot, LoaderUtils as Z, FileLoader as ke, MeshPhysicalMaterial as C, Vector2 as Be, Color as j, LinearSRGBColorSpace as v, SRGBColorSpace as Q, SpotLight as at, PointLight as ct, DirectionalLight as lt, Matrix4 as te, Vector3 as U, Quaternion as Ue, InstancedMesh as ut, InstancedBufferAttribute as ht, Object3D as Ge, TextureLoader as dt, ImageBitmapLoader as ft, BufferAttribute as re, InterleavedBuffer as pt, InterleavedBufferAttribute as mt, LinearMipmapLinearFilter as je, NearestMipmapLinearFilter as gt, LinearMipmapNearestFilter as At, NearestMipmapNearestFilter as Tt, LinearFilter as pe, NearestFilter as Ke, RepeatWrapping as me, MirroredRepeatWrapping as Et, ClampToEdgeWrapping as xt, PointsMaterial as Rt, Material as ie, LineBasicMaterial as Mt, MeshStandardMaterial as Xe, DoubleSide as $, MeshBasicMaterial as q, PropertyBinding as _t, BufferGeometry as yt, SkinnedMesh as wt, Mesh as St, LineSegments as Lt, Line as bt, LineLoop as It, Points as Nt, Group as oe, PerspectiveCamera as Ct, MathUtils as Pt, OrthographicCamera as Ft, Skeleton as Ot, AnimationClip as Dt, Bone as vt, InterpolateDiscrete as Ht, InterpolateLinear as Ye, Texture as Se, VectorKeyframeTrack as Le, NumberKeyframeTrack as be, QuaternionKeyframeTrack as Ie, ColorManagement as Ne, FrontSide as kt, Interpolant as Bt, Box3 as Ut, Sphere as Gt, Euler as jt } from "three";
5
+ import { b as Kt, c as Xt } from "./index-B-s4YbWu.js";
6
+ import { l as Ce, f as Yt } from "./index-I4eF5TKT.js";
7
+ import { Text as ae } from "@react-three/drei";
8
+ import { T as Ve, C as Vt } from "./FaceMeshRenderer-DSCd1H55.js";
9
+ import { q as is, D as os, h as as, i as cs, j as ls, d as us, e as hs, f as ds, F as fs, a as ps, b as ms, c as gs, l as As, m as Ts, g as Es, n as xs, o as Rs, p as Ms, r as _s, v as ys, t as ws, k as Ss, s as Ls, u as bs } from "./FaceMeshRenderer-DSCd1H55.js";
10
+ import { D as Ns, d as Cs, e as Ps, F as Fs, f as Os, b as Ds, c as vs, m as Hs, p as ks, r as Bs, s as Us, a as Gs, t as js } from "./FaceRetouch-CMJbGThL.js";
11
+ import { useLoader as We } from "@react-three/fiber";
12
+ const X = {
13
+ color: "#e85d75",
14
+ opacity: 0.8,
15
+ intensity: 1,
16
+ maskMode: "outer-and-inner-lips",
17
+ shading: !0,
18
+ renderOrder: 30
19
+ }, Wt = ({
20
+ context: l,
21
+ color: t,
22
+ opacity: e,
23
+ intensity: r,
24
+ shading: n,
25
+ subtractMouth: i = !1
26
+ }) => {
27
+ const s = We(b.TextureLoader, Ve), a = l.designTexture ?? s, o = {
28
+ cameraTexture: { value: l.cameraTexture },
29
+ designTexture: { value: a },
30
+ tint: { value: new b.Color(t) },
31
+ opacity: { value: e },
32
+ intensity: { value: r },
33
+ shading: { value: n ? 1 : 0 }
34
+ };
35
+ return /* @__PURE__ */ T(
36
+ "shaderMaterial",
37
+ {
38
+ uniforms: o,
39
+ vertexShader: "attribute vec2 faceUv; varying vec2 vFaceUv; varying vec2 vUv; void main() { vUv = uv; vFaceUv = faceUv; gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); }",
40
+ fragmentShader: "uniform sampler2D cameraTexture; uniform sampler2D designTexture; uniform vec3 tint; uniform float opacity; uniform float intensity; uniform float shading; varying vec2 vFaceUv; varying vec2 vUv; void main() { vec3 base = texture2D(cameraTexture, vFaceUv).rgb; vec4 design = texture2D(designTexture, vUv); vec3 painted = mix(design.rgb, design.rgb * tint, intensity); vec3 color = mix(base, painted, design.a * opacity); gl_FragColor = vec4(color, opacity * design.a); }",
41
+ transparent: !0,
42
+ side: b.DoubleSide,
43
+ stencilWrite: !1,
44
+ stencilRef: 1,
45
+ stencilFunc: i ? b.NotEqualStencilFunc : b.AlwaysStencilFunc,
46
+ depthWrite: !1,
47
+ toneMapped: !1
48
+ }
49
+ );
50
+ }, zn = ({
51
+ faceIndex: l = 0,
52
+ designTexture: t,
53
+ color: e = X.color,
54
+ opacity: r = X.opacity,
55
+ intensity: n = X.intensity,
56
+ maskMode: i = X.maskMode,
57
+ shading: s = X.shading,
58
+ material: a,
59
+ renderOrder: o = X.renderOrder
60
+ }) => {
61
+ const c = We(
62
+ b.TextureLoader,
63
+ typeof t == "string" ? t : Ve
64
+ ), h = typeof t == "string" ? c : t ?? null;
65
+ return /* @__PURE__ */ T(
66
+ Vt,
67
+ {
68
+ faceIndex: l,
69
+ showMouthGeometry: !0,
70
+ showLipsGeometry: !0,
71
+ showBaseGeometry: !1,
72
+ showMouthMask: i === "outer-lips",
73
+ showEyeGeometry: !1,
74
+ showNoseGeometry: !1,
75
+ showLeftEyeGeometry: !1,
76
+ showRightEyeGeometry: !1,
77
+ showEyeMask: !1,
78
+ showNoseMask: !1,
79
+ renderOrder: o,
80
+ materialOverride: ({
81
+ cameraTexture: d,
82
+ geometryKey: p
83
+ }) => {
84
+ if (p === "mouth")
85
+ return /* @__PURE__ */ T(
86
+ "meshBasicMaterial",
87
+ {
88
+ color: "#ffffff",
89
+ colorWrite: !1,
90
+ depthWrite: !1,
91
+ depthTest: !1,
92
+ stencilWrite: !0,
93
+ stencilRef: 1,
94
+ stencilFunc: b.AlwaysStencilFunc,
95
+ stencilZPass: b.ReplaceStencilOp
96
+ }
97
+ );
98
+ const g = {
99
+ cameraTexture: d,
100
+ designTexture: h,
101
+ lipMask: null,
102
+ faceUv: null,
103
+ faceIndex: l
104
+ };
105
+ return a ? typeof a == "function" ? a(g) : a : /* @__PURE__ */ T(
106
+ Wt,
107
+ {
108
+ context: g,
109
+ color: e,
110
+ opacity: r,
111
+ intensity: n,
112
+ shading: s,
113
+ subtractMouth: !0
114
+ }
115
+ );
116
+ }
117
+ }
118
+ );
119
+ };
120
+ function Pe(l, t) {
121
+ if (t === it)
12
122
  return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), l;
13
- if (t === de || t === He) {
123
+ if (t === fe || t === He) {
14
124
  let e = l.getIndex();
15
125
  if (e === null) {
16
126
  const s = [], a = l.getAttribute("position");
@@ -22,7 +132,7 @@ function Ce(l, t) {
22
132
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), l;
23
133
  }
24
134
  const r = e.count - 2, n = [];
25
- if (t === de)
135
+ if (t === fe)
26
136
  for (let s = 1; s <= r; s++)
27
137
  n.push(e.getX(0)), n.push(e.getX(s)), n.push(e.getX(s + 1));
28
138
  else
@@ -34,42 +144,42 @@ function Ce(l, t) {
34
144
  } else
35
145
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", t), l;
36
146
  }
37
- class Kt extends st {
147
+ class zt extends ot {
38
148
  constructor(t) {
39
149
  super(t), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(e) {
40
- return new Wt(e);
150
+ return new $t(e);
41
151
  }), this.register(function(e) {
42
- return new qt(e);
152
+ return new en(e);
43
153
  }), this.register(function(e) {
44
- return new rn(e);
154
+ return new un(e);
45
155
  }), this.register(function(e) {
46
- return new on(e);
156
+ return new hn(e);
47
157
  }), this.register(function(e) {
48
- return new an(e);
158
+ return new dn(e);
49
159
  }), this.register(function(e) {
50
- return new Qt(e);
160
+ return new nn(e);
51
161
  }), this.register(function(e) {
52
- return new Jt(e);
162
+ return new sn(e);
53
163
  }), this.register(function(e) {
54
- return new $t(e);
164
+ return new rn(e);
55
165
  }), this.register(function(e) {
56
- return new en(e);
166
+ return new on(e);
167
+ }), this.register(function(e) {
168
+ return new Jt(e);
57
169
  }), this.register(function(e) {
58
- return new zt(e);
170
+ return new an(e);
59
171
  }), this.register(function(e) {
60
172
  return new tn(e);
61
173
  }), this.register(function(e) {
62
- return new Zt(e);
63
- }), this.register(function(e) {
64
- return new sn(e);
174
+ return new ln(e);
65
175
  }), this.register(function(e) {
66
- return new nn(e);
176
+ return new cn(e);
67
177
  }), this.register(function(e) {
68
- return new Yt(e);
178
+ return new Zt(e);
69
179
  }), this.register(function(e) {
70
- return new cn(e);
180
+ return new fn(e);
71
181
  }), this.register(function(e) {
72
- return new ln(e);
182
+ return new pn(e);
73
183
  });
74
184
  }
75
185
  load(t, e, r, n) {
@@ -78,14 +188,14 @@ class Kt extends st {
78
188
  if (this.resourcePath !== "")
79
189
  s = this.resourcePath;
80
190
  else if (this.path !== "") {
81
- const c = q.extractUrlBase(t);
82
- s = q.resolveURL(c, this.path);
191
+ const c = Z.extractUrlBase(t);
192
+ s = Z.resolveURL(c, this.path);
83
193
  } else
84
- s = q.extractUrlBase(t);
194
+ s = Z.extractUrlBase(t);
85
195
  this.manager.itemStart(t);
86
196
  const a = function(c) {
87
197
  n ? n(c) : console.error(c), i.manager.itemError(t), i.manager.itemEnd(t);
88
- }, o = new Be(this.manager);
198
+ }, o = new ke(this.manager);
89
199
  o.setPath(this.path), o.setResponseType("arraybuffer"), o.setRequestHeader(this.requestHeader), o.setWithCredentials(this.withCredentials), o.load(t, function(c) {
90
200
  try {
91
201
  i.parse(c, s, function(h) {
@@ -117,14 +227,14 @@ class Kt extends st {
117
227
  if (typeof t == "string")
118
228
  i = JSON.parse(t);
119
229
  else if (t instanceof ArrayBuffer)
120
- if (o.decode(new Uint8Array(t, 0, 4)) === Ye) {
230
+ if (o.decode(new Uint8Array(t, 0, 4)) === ze) {
121
231
  try {
122
- s[T.KHR_BINARY_GLTF] = new un(t);
232
+ s[E.KHR_BINARY_GLTF] = new mn(t);
123
233
  } catch (u) {
124
234
  n && n(u);
125
235
  return;
126
236
  }
127
- i = JSON.parse(s[T.KHR_BINARY_GLTF].content);
237
+ i = JSON.parse(s[E.KHR_BINARY_GLTF].content);
128
238
  } else
129
239
  i = JSON.parse(o.decode(t));
130
240
  else
@@ -133,7 +243,7 @@ class Kt extends st {
133
243
  n && n(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
134
244
  return;
135
245
  }
136
- const c = new Mn(i, {
246
+ const c = new bn(i, {
137
247
  path: e || this.resourcePath || "",
138
248
  crossOrigin: this.crossOrigin,
139
249
  requestHeader: this.requestHeader,
@@ -150,17 +260,17 @@ class Kt extends st {
150
260
  for (let h = 0; h < i.extensionsUsed.length; ++h) {
151
261
  const u = i.extensionsUsed[h], d = i.extensionsRequired || [];
152
262
  switch (u) {
153
- case T.KHR_MATERIALS_UNLIT:
154
- s[u] = new Vt();
263
+ case E.KHR_MATERIALS_UNLIT:
264
+ s[u] = new Qt();
155
265
  break;
156
- case T.KHR_DRACO_MESH_COMPRESSION:
157
- s[u] = new hn(i, this.dracoLoader);
266
+ case E.KHR_DRACO_MESH_COMPRESSION:
267
+ s[u] = new gn(i, this.dracoLoader);
158
268
  break;
159
- case T.KHR_TEXTURE_TRANSFORM:
160
- s[u] = new dn();
269
+ case E.KHR_TEXTURE_TRANSFORM:
270
+ s[u] = new An();
161
271
  break;
162
- case T.KHR_MESH_QUANTIZATION:
163
- s[u] = new fn();
272
+ case E.KHR_MESH_QUANTIZATION:
273
+ s[u] = new Tn();
164
274
  break;
165
275
  default:
166
276
  d.indexOf(u) >= 0 && a[u] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + u + '".');
@@ -175,7 +285,7 @@ class Kt extends st {
175
285
  });
176
286
  }
177
287
  }
178
- function Xt() {
288
+ function qt() {
179
289
  let l = {};
180
290
  return {
181
291
  get: function(t) {
@@ -192,7 +302,7 @@ function Xt() {
192
302
  }
193
303
  };
194
304
  }
195
- const T = {
305
+ const E = {
196
306
  KHR_BINARY_GLTF: "KHR_binary_glTF",
197
307
  KHR_DRACO_MESH_COMPRESSION: "KHR_draco_mesh_compression",
198
308
  KHR_LIGHTS_PUNCTUAL: "KHR_lights_punctual",
@@ -216,9 +326,9 @@ const T = {
216
326
  EXT_MESHOPT_COMPRESSION: "EXT_meshopt_compression",
217
327
  EXT_MESH_GPU_INSTANCING: "EXT_mesh_gpu_instancing"
218
328
  };
219
- class Yt {
329
+ class Zt {
220
330
  constructor(t) {
221
- this.parser = t, this.name = T.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
331
+ this.parser = t, this.name = E.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
222
332
  }
223
333
  _markDefs() {
224
334
  const t = this.parser, e = this.parser.json.nodes || [];
@@ -233,23 +343,23 @@ class Yt {
233
343
  if (n) return n;
234
344
  const i = e.json, o = ((i.extensions && i.extensions[this.name] || {}).lights || [])[t];
235
345
  let c;
236
- const h = new v(16777215);
237
- o.color !== void 0 && h.setRGB(o.color[0], o.color[1], o.color[2], D);
346
+ const h = new j(16777215);
347
+ o.color !== void 0 && h.setRGB(o.color[0], o.color[1], o.color[2], v);
238
348
  const u = o.range !== void 0 ? o.range : 0;
239
349
  switch (o.type) {
240
350
  case "directional":
241
- c = new ot(h), c.target.position.set(0, 0, -1), c.add(c.target);
351
+ c = new lt(h), c.target.position.set(0, 0, -1), c.add(c.target);
242
352
  break;
243
353
  case "point":
244
- c = new it(h), c.distance = u;
354
+ c = new ct(h), c.distance = u;
245
355
  break;
246
356
  case "spot":
247
- c = new rt(h), c.distance = u, o.spot = o.spot || {}, o.spot.innerConeAngle = o.spot.innerConeAngle !== void 0 ? o.spot.innerConeAngle : 0, o.spot.outerConeAngle = o.spot.outerConeAngle !== void 0 ? o.spot.outerConeAngle : Math.PI / 4, c.angle = o.spot.outerConeAngle, c.penumbra = 1 - o.spot.innerConeAngle / o.spot.outerConeAngle, c.target.position.set(0, 0, -1), c.add(c.target);
357
+ c = new at(h), c.distance = u, o.spot = o.spot || {}, o.spot.innerConeAngle = o.spot.innerConeAngle !== void 0 ? o.spot.innerConeAngle : 0, o.spot.outerConeAngle = o.spot.outerConeAngle !== void 0 ? o.spot.outerConeAngle : Math.PI / 4, c.angle = o.spot.outerConeAngle, c.penumbra = 1 - o.spot.innerConeAngle / o.spot.outerConeAngle, c.target.position.set(0, 0, -1), c.add(c.target);
248
358
  break;
249
359
  default:
250
360
  throw new Error("THREE.GLTFLoader: Unexpected light type: " + o.type);
251
361
  }
252
- return c.position.set(0, 0, 0), F(c, o), o.intensity !== void 0 && (c.intensity = o.intensity), c.name = e.createUniqueName(o.name || "light_" + t), n = Promise.resolve(c), e.cache.add(r, n), n;
362
+ return c.position.set(0, 0, 0), O(c, o), o.intensity !== void 0 && (c.intensity = o.intensity), c.name = e.createUniqueName(o.name || "light_" + t), n = Promise.resolve(c), e.cache.add(r, n), n;
253
363
  }
254
364
  getDependency(t, e) {
255
365
  if (t === "light")
@@ -262,30 +372,30 @@ class Yt {
262
372
  });
263
373
  }
264
374
  }
265
- class Vt {
375
+ class Qt {
266
376
  constructor() {
267
- this.name = T.KHR_MATERIALS_UNLIT;
377
+ this.name = E.KHR_MATERIALS_UNLIT;
268
378
  }
269
379
  getMaterialType() {
270
- return W;
380
+ return q;
271
381
  }
272
382
  extendParams(t, e, r) {
273
383
  const n = [];
274
- t.color = new v(1, 1, 1), t.opacity = 1;
384
+ t.color = new j(1, 1, 1), t.opacity = 1;
275
385
  const i = e.pbrMetallicRoughness;
276
386
  if (i) {
277
387
  if (Array.isArray(i.baseColorFactor)) {
278
388
  const s = i.baseColorFactor;
279
- t.color.setRGB(s[0], s[1], s[2], D), t.opacity = s[3];
389
+ t.color.setRGB(s[0], s[1], s[2], v), t.opacity = s[3];
280
390
  }
281
- i.baseColorTexture !== void 0 && n.push(r.assignTexture(t, "map", i.baseColorTexture, Z));
391
+ i.baseColorTexture !== void 0 && n.push(r.assignTexture(t, "map", i.baseColorTexture, Q));
282
392
  }
283
393
  return Promise.all(n);
284
394
  }
285
395
  }
286
- class zt {
396
+ class Jt {
287
397
  constructor(t) {
288
- this.parser = t, this.name = T.KHR_MATERIALS_EMISSIVE_STRENGTH;
398
+ this.parser = t, this.name = E.KHR_MATERIALS_EMISSIVE_STRENGTH;
289
399
  }
290
400
  extendMaterialParams(t, e) {
291
401
  const n = this.parser.json.materials[t];
@@ -295,13 +405,13 @@ class zt {
295
405
  return i !== void 0 && (e.emissiveIntensity = i), Promise.resolve();
296
406
  }
297
407
  }
298
- class Wt {
408
+ class $t {
299
409
  constructor(t) {
300
- this.parser = t, this.name = T.KHR_MATERIALS_CLEARCOAT;
410
+ this.parser = t, this.name = E.KHR_MATERIALS_CLEARCOAT;
301
411
  }
302
412
  getMaterialType(t) {
303
413
  const r = this.parser.json.materials[t];
304
- return !r.extensions || !r.extensions[this.name] ? null : N;
414
+ return !r.extensions || !r.extensions[this.name] ? null : C;
305
415
  }
306
416
  extendMaterialParams(t, e) {
307
417
  const r = this.parser, n = r.json.materials[t];
@@ -310,18 +420,18 @@ class Wt {
310
420
  const i = [], s = n.extensions[this.name];
311
421
  if (s.clearcoatFactor !== void 0 && (e.clearcoat = s.clearcoatFactor), s.clearcoatTexture !== void 0 && i.push(r.assignTexture(e, "clearcoatMap", s.clearcoatTexture)), s.clearcoatRoughnessFactor !== void 0 && (e.clearcoatRoughness = s.clearcoatRoughnessFactor), s.clearcoatRoughnessTexture !== void 0 && i.push(r.assignTexture(e, "clearcoatRoughnessMap", s.clearcoatRoughnessTexture)), s.clearcoatNormalTexture !== void 0 && (i.push(r.assignTexture(e, "clearcoatNormalMap", s.clearcoatNormalTexture)), s.clearcoatNormalTexture.scale !== void 0)) {
312
422
  const a = s.clearcoatNormalTexture.scale;
313
- e.clearcoatNormalScale = new ke(a, a);
423
+ e.clearcoatNormalScale = new Be(a, a);
314
424
  }
315
425
  return Promise.all(i);
316
426
  }
317
427
  }
318
- class qt {
428
+ class en {
319
429
  constructor(t) {
320
- this.parser = t, this.name = T.KHR_MATERIALS_DISPERSION;
430
+ this.parser = t, this.name = E.KHR_MATERIALS_DISPERSION;
321
431
  }
322
432
  getMaterialType(t) {
323
433
  const r = this.parser.json.materials[t];
324
- return !r.extensions || !r.extensions[this.name] ? null : N;
434
+ return !r.extensions || !r.extensions[this.name] ? null : C;
325
435
  }
326
436
  extendMaterialParams(t, e) {
327
437
  const n = this.parser.json.materials[t];
@@ -331,13 +441,13 @@ class qt {
331
441
  return e.dispersion = i.dispersion !== void 0 ? i.dispersion : 0, Promise.resolve();
332
442
  }
333
443
  }
334
- class Zt {
444
+ class tn {
335
445
  constructor(t) {
336
- this.parser = t, this.name = T.KHR_MATERIALS_IRIDESCENCE;
446
+ this.parser = t, this.name = E.KHR_MATERIALS_IRIDESCENCE;
337
447
  }
338
448
  getMaterialType(t) {
339
449
  const r = this.parser.json.materials[t];
340
- return !r.extensions || !r.extensions[this.name] ? null : N;
450
+ return !r.extensions || !r.extensions[this.name] ? null : C;
341
451
  }
342
452
  extendMaterialParams(t, e) {
343
453
  const r = this.parser, n = r.json.materials[t];
@@ -347,35 +457,35 @@ class Zt {
347
457
  return s.iridescenceFactor !== void 0 && (e.iridescence = s.iridescenceFactor), s.iridescenceTexture !== void 0 && i.push(r.assignTexture(e, "iridescenceMap", s.iridescenceTexture)), s.iridescenceIor !== void 0 && (e.iridescenceIOR = s.iridescenceIor), e.iridescenceThicknessRange === void 0 && (e.iridescenceThicknessRange = [100, 400]), s.iridescenceThicknessMinimum !== void 0 && (e.iridescenceThicknessRange[0] = s.iridescenceThicknessMinimum), s.iridescenceThicknessMaximum !== void 0 && (e.iridescenceThicknessRange[1] = s.iridescenceThicknessMaximum), s.iridescenceThicknessTexture !== void 0 && i.push(r.assignTexture(e, "iridescenceThicknessMap", s.iridescenceThicknessTexture)), Promise.all(i);
348
458
  }
349
459
  }
350
- class Qt {
460
+ class nn {
351
461
  constructor(t) {
352
- this.parser = t, this.name = T.KHR_MATERIALS_SHEEN;
462
+ this.parser = t, this.name = E.KHR_MATERIALS_SHEEN;
353
463
  }
354
464
  getMaterialType(t) {
355
465
  const r = this.parser.json.materials[t];
356
- return !r.extensions || !r.extensions[this.name] ? null : N;
466
+ return !r.extensions || !r.extensions[this.name] ? null : C;
357
467
  }
358
468
  extendMaterialParams(t, e) {
359
469
  const r = this.parser, n = r.json.materials[t];
360
470
  if (!n.extensions || !n.extensions[this.name])
361
471
  return Promise.resolve();
362
472
  const i = [];
363
- e.sheenColor = new v(0, 0, 0), e.sheenRoughness = 0, e.sheen = 1;
473
+ e.sheenColor = new j(0, 0, 0), e.sheenRoughness = 0, e.sheen = 1;
364
474
  const s = n.extensions[this.name];
365
475
  if (s.sheenColorFactor !== void 0) {
366
476
  const a = s.sheenColorFactor;
367
- e.sheenColor.setRGB(a[0], a[1], a[2], D);
477
+ e.sheenColor.setRGB(a[0], a[1], a[2], v);
368
478
  }
369
- return s.sheenRoughnessFactor !== void 0 && (e.sheenRoughness = s.sheenRoughnessFactor), s.sheenColorTexture !== void 0 && i.push(r.assignTexture(e, "sheenColorMap", s.sheenColorTexture, Z)), s.sheenRoughnessTexture !== void 0 && i.push(r.assignTexture(e, "sheenRoughnessMap", s.sheenRoughnessTexture)), Promise.all(i);
479
+ return s.sheenRoughnessFactor !== void 0 && (e.sheenRoughness = s.sheenRoughnessFactor), s.sheenColorTexture !== void 0 && i.push(r.assignTexture(e, "sheenColorMap", s.sheenColorTexture, Q)), s.sheenRoughnessTexture !== void 0 && i.push(r.assignTexture(e, "sheenRoughnessMap", s.sheenRoughnessTexture)), Promise.all(i);
370
480
  }
371
481
  }
372
- class Jt {
482
+ class sn {
373
483
  constructor(t) {
374
- this.parser = t, this.name = T.KHR_MATERIALS_TRANSMISSION;
484
+ this.parser = t, this.name = E.KHR_MATERIALS_TRANSMISSION;
375
485
  }
376
486
  getMaterialType(t) {
377
487
  const r = this.parser.json.materials[t];
378
- return !r.extensions || !r.extensions[this.name] ? null : N;
488
+ return !r.extensions || !r.extensions[this.name] ? null : C;
379
489
  }
380
490
  extendMaterialParams(t, e) {
381
491
  const r = this.parser, n = r.json.materials[t];
@@ -385,13 +495,13 @@ class Jt {
385
495
  return s.transmissionFactor !== void 0 && (e.transmission = s.transmissionFactor), s.transmissionTexture !== void 0 && i.push(r.assignTexture(e, "transmissionMap", s.transmissionTexture)), Promise.all(i);
386
496
  }
387
497
  }
388
- class $t {
498
+ class rn {
389
499
  constructor(t) {
390
- this.parser = t, this.name = T.KHR_MATERIALS_VOLUME;
500
+ this.parser = t, this.name = E.KHR_MATERIALS_VOLUME;
391
501
  }
392
502
  getMaterialType(t) {
393
503
  const r = this.parser.json.materials[t];
394
- return !r.extensions || !r.extensions[this.name] ? null : N;
504
+ return !r.extensions || !r.extensions[this.name] ? null : C;
395
505
  }
396
506
  extendMaterialParams(t, e) {
397
507
  const r = this.parser, n = r.json.materials[t];
@@ -400,16 +510,16 @@ class $t {
400
510
  const i = [], s = n.extensions[this.name];
401
511
  e.thickness = s.thicknessFactor !== void 0 ? s.thicknessFactor : 0, s.thicknessTexture !== void 0 && i.push(r.assignTexture(e, "thicknessMap", s.thicknessTexture)), e.attenuationDistance = s.attenuationDistance || 1 / 0;
402
512
  const a = s.attenuationColor || [1, 1, 1];
403
- return e.attenuationColor = new v().setRGB(a[0], a[1], a[2], D), Promise.all(i);
513
+ return e.attenuationColor = new j().setRGB(a[0], a[1], a[2], v), Promise.all(i);
404
514
  }
405
515
  }
406
- class en {
516
+ class on {
407
517
  constructor(t) {
408
- this.parser = t, this.name = T.KHR_MATERIALS_IOR;
518
+ this.parser = t, this.name = E.KHR_MATERIALS_IOR;
409
519
  }
410
520
  getMaterialType(t) {
411
521
  const r = this.parser.json.materials[t];
412
- return !r.extensions || !r.extensions[this.name] ? null : N;
522
+ return !r.extensions || !r.extensions[this.name] ? null : C;
413
523
  }
414
524
  extendMaterialParams(t, e) {
415
525
  const n = this.parser.json.materials[t];
@@ -419,13 +529,13 @@ class en {
419
529
  return e.ior = i.ior !== void 0 ? i.ior : 1.5, Promise.resolve();
420
530
  }
421
531
  }
422
- class tn {
532
+ class an {
423
533
  constructor(t) {
424
- this.parser = t, this.name = T.KHR_MATERIALS_SPECULAR;
534
+ this.parser = t, this.name = E.KHR_MATERIALS_SPECULAR;
425
535
  }
426
536
  getMaterialType(t) {
427
537
  const r = this.parser.json.materials[t];
428
- return !r.extensions || !r.extensions[this.name] ? null : N;
538
+ return !r.extensions || !r.extensions[this.name] ? null : C;
429
539
  }
430
540
  extendMaterialParams(t, e) {
431
541
  const r = this.parser, n = r.json.materials[t];
@@ -434,16 +544,16 @@ class tn {
434
544
  const i = [], s = n.extensions[this.name];
435
545
  e.specularIntensity = s.specularFactor !== void 0 ? s.specularFactor : 1, s.specularTexture !== void 0 && i.push(r.assignTexture(e, "specularIntensityMap", s.specularTexture));
436
546
  const a = s.specularColorFactor || [1, 1, 1];
437
- return e.specularColor = new v().setRGB(a[0], a[1], a[2], D), s.specularColorTexture !== void 0 && i.push(r.assignTexture(e, "specularColorMap", s.specularColorTexture, Z)), Promise.all(i);
547
+ return e.specularColor = new j().setRGB(a[0], a[1], a[2], v), s.specularColorTexture !== void 0 && i.push(r.assignTexture(e, "specularColorMap", s.specularColorTexture, Q)), Promise.all(i);
438
548
  }
439
549
  }
440
- class nn {
550
+ class cn {
441
551
  constructor(t) {
442
- this.parser = t, this.name = T.EXT_MATERIALS_BUMP;
552
+ this.parser = t, this.name = E.EXT_MATERIALS_BUMP;
443
553
  }
444
554
  getMaterialType(t) {
445
555
  const r = this.parser.json.materials[t];
446
- return !r.extensions || !r.extensions[this.name] ? null : N;
556
+ return !r.extensions || !r.extensions[this.name] ? null : C;
447
557
  }
448
558
  extendMaterialParams(t, e) {
449
559
  const r = this.parser, n = r.json.materials[t];
@@ -453,13 +563,13 @@ class nn {
453
563
  return e.bumpScale = s.bumpFactor !== void 0 ? s.bumpFactor : 1, s.bumpTexture !== void 0 && i.push(r.assignTexture(e, "bumpMap", s.bumpTexture)), Promise.all(i);
454
564
  }
455
565
  }
456
- class sn {
566
+ class ln {
457
567
  constructor(t) {
458
- this.parser = t, this.name = T.KHR_MATERIALS_ANISOTROPY;
568
+ this.parser = t, this.name = E.KHR_MATERIALS_ANISOTROPY;
459
569
  }
460
570
  getMaterialType(t) {
461
571
  const r = this.parser.json.materials[t];
462
- return !r.extensions || !r.extensions[this.name] ? null : N;
572
+ return !r.extensions || !r.extensions[this.name] ? null : C;
463
573
  }
464
574
  extendMaterialParams(t, e) {
465
575
  const r = this.parser, n = r.json.materials[t];
@@ -469,9 +579,9 @@ class sn {
469
579
  return s.anisotropyStrength !== void 0 && (e.anisotropy = s.anisotropyStrength), s.anisotropyRotation !== void 0 && (e.anisotropyRotation = s.anisotropyRotation), s.anisotropyTexture !== void 0 && i.push(r.assignTexture(e, "anisotropyMap", s.anisotropyTexture)), Promise.all(i);
470
580
  }
471
581
  }
472
- class rn {
582
+ class un {
473
583
  constructor(t) {
474
- this.parser = t, this.name = T.KHR_TEXTURE_BASISU;
584
+ this.parser = t, this.name = E.KHR_TEXTURE_BASISU;
475
585
  }
476
586
  loadTexture(t) {
477
587
  const e = this.parser, r = e.json, n = r.textures[t];
@@ -486,9 +596,9 @@ class rn {
486
596
  return e.loadTextureImage(t, i.source, s);
487
597
  }
488
598
  }
489
- class on {
599
+ class hn {
490
600
  constructor(t) {
491
- this.parser = t, this.name = T.EXT_TEXTURE_WEBP, this.isSupported = null;
601
+ this.parser = t, this.name = E.EXT_TEXTURE_WEBP, this.isSupported = null;
492
602
  }
493
603
  loadTexture(t) {
494
604
  const e = this.name, r = this.parser, n = r.json, i = n.textures[t];
@@ -516,9 +626,9 @@ class on {
516
626
  })), this.isSupported;
517
627
  }
518
628
  }
519
- class an {
629
+ class dn {
520
630
  constructor(t) {
521
- this.parser = t, this.name = T.EXT_TEXTURE_AVIF, this.isSupported = null;
631
+ this.parser = t, this.name = E.EXT_TEXTURE_AVIF, this.isSupported = null;
522
632
  }
523
633
  loadTexture(t) {
524
634
  const e = this.name, r = this.parser, n = r.json, i = n.textures[t];
@@ -546,9 +656,9 @@ class an {
546
656
  })), this.isSupported;
547
657
  }
548
658
  }
549
- class cn {
659
+ class fn {
550
660
  constructor(t) {
551
- this.name = T.EXT_MESHOPT_COMPRESSION, this.parser = t;
661
+ this.name = E.EXT_MESHOPT_COMPRESSION, this.parser = t;
552
662
  }
553
663
  loadBufferView(t) {
554
664
  const e = this.parser.json, r = e.bufferViews[t];
@@ -572,9 +682,9 @@ class cn {
572
682
  return null;
573
683
  }
574
684
  }
575
- class ln {
685
+ class pn {
576
686
  constructor(t) {
577
- this.name = T.EXT_MESH_GPU_INSTANCING, this.parser = t;
687
+ this.name = E.EXT_MESH_GPU_INSTANCING, this.parser = t;
578
688
  }
579
689
  createNodeMesh(t) {
580
690
  const e = this.parser.json, r = e.nodes[t];
@@ -582,7 +692,7 @@ class ln {
582
692
  return null;
583
693
  const n = e.meshes[r.mesh];
584
694
  for (const c of n.primitives)
585
- if (c.mode !== I.TRIANGLES && c.mode !== I.TRIANGLE_STRIP && c.mode !== I.TRIANGLE_FAN && c.mode !== void 0)
695
+ if (c.mode !== N.TRIANGLES && c.mode !== N.TRIANGLE_STRIP && c.mode !== N.TRIANGLE_FAN && c.mode !== void 0)
586
696
  return null;
587
697
  const s = r.extensions[this.name].attributes, a = [], o = {};
588
698
  for (const c in s)
@@ -590,30 +700,30 @@ class ln {
590
700
  return a.length < 1 ? null : (a.push(this.parser.createNodeMesh(t)), Promise.all(a).then((c) => {
591
701
  const h = c.pop(), u = h.isGroup ? h.children : [h], d = c[0].count, p = [];
592
702
  for (const g of u) {
593
- const A = new ee(), m = new G(), f = new Ge(), E = new G(1, 1, 1), _ = new at(g.geometry, g.material, d);
594
- for (let x = 0; x < d; x++)
595
- o.TRANSLATION && m.fromBufferAttribute(o.TRANSLATION, x), o.ROTATION && f.fromBufferAttribute(o.ROTATION, x), o.SCALE && E.fromBufferAttribute(o.SCALE, x), _.setMatrixAt(x, A.compose(m, f, E));
596
- for (const x in o)
597
- if (x === "_COLOR_0") {
598
- const w = o[x];
599
- _.instanceColor = new ct(w.array, w.itemSize, w.normalized);
600
- } else x !== "TRANSLATION" && x !== "ROTATION" && x !== "SCALE" && g.geometry.setAttribute(x, o[x]);
601
- Ue.prototype.copy.call(_, g), this.parser.assignFinalMaterial(_), p.push(_);
703
+ const A = new te(), m = new U(), f = new Ue(), x = new U(1, 1, 1), M = new ut(g.geometry, g.material, d);
704
+ for (let R = 0; R < d; R++)
705
+ o.TRANSLATION && m.fromBufferAttribute(o.TRANSLATION, R), o.ROTATION && f.fromBufferAttribute(o.ROTATION, R), o.SCALE && x.fromBufferAttribute(o.SCALE, R), M.setMatrixAt(R, A.compose(m, f, x));
706
+ for (const R in o)
707
+ if (R === "_COLOR_0") {
708
+ const y = o[R];
709
+ M.instanceColor = new ht(y.array, y.itemSize, y.normalized);
710
+ } else R !== "TRANSLATION" && R !== "ROTATION" && R !== "SCALE" && g.geometry.setAttribute(R, o[R]);
711
+ Ge.prototype.copy.call(M, g), this.parser.assignFinalMaterial(M), p.push(M);
602
712
  }
603
713
  return h.isGroup ? (h.clear(), h.add(...p), h) : p[0];
604
714
  }));
605
715
  }
606
716
  }
607
- const Ye = "glTF", z = 12, Pe = { JSON: 1313821514, BIN: 5130562 };
608
- class un {
717
+ const ze = "glTF", z = 12, Fe = { JSON: 1313821514, BIN: 5130562 };
718
+ class mn {
609
719
  constructor(t) {
610
- this.name = T.KHR_BINARY_GLTF, this.content = null, this.body = null;
720
+ this.name = E.KHR_BINARY_GLTF, this.content = null, this.body = null;
611
721
  const e = new DataView(t, 0, z), r = new TextDecoder();
612
722
  if (this.header = {
613
723
  magic: r.decode(new Uint8Array(t.slice(0, 4))),
614
724
  version: e.getUint32(4, !0),
615
725
  length: e.getUint32(8, !0)
616
- }, this.header.magic !== Ye)
726
+ }, this.header.magic !== ze)
617
727
  throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
618
728
  if (this.header.version < 2)
619
729
  throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
@@ -623,10 +733,10 @@ class un {
623
733
  const a = i.getUint32(s, !0);
624
734
  s += 4;
625
735
  const o = i.getUint32(s, !0);
626
- if (s += 4, o === Pe.JSON) {
736
+ if (s += 4, o === Fe.JSON) {
627
737
  const c = new Uint8Array(t, z + s, a);
628
738
  this.content = r.decode(c);
629
- } else if (o === Pe.BIN) {
739
+ } else if (o === Fe.BIN) {
630
740
  const c = z + s;
631
741
  this.body = t.slice(c, c + a);
632
742
  }
@@ -636,22 +746,22 @@ class un {
636
746
  throw new Error("THREE.GLTFLoader: JSON content not found.");
637
747
  }
638
748
  }
639
- class hn {
749
+ class gn {
640
750
  constructor(t, e) {
641
751
  if (!e)
642
752
  throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
643
- this.name = T.KHR_DRACO_MESH_COMPRESSION, this.json = t, this.dracoLoader = e, this.dracoLoader.preload();
753
+ this.name = E.KHR_DRACO_MESH_COMPRESSION, this.json = t, this.dracoLoader = e, this.dracoLoader.preload();
644
754
  }
645
755
  decodePrimitive(t, e) {
646
756
  const r = this.json, n = this.dracoLoader, i = t.extensions[this.name].bufferView, s = t.extensions[this.name].attributes, a = {}, o = {}, c = {};
647
757
  for (const h in s) {
648
- const u = me[h] || h.toLowerCase();
758
+ const u = ge[h] || h.toLowerCase();
649
759
  a[u] = s[h];
650
760
  }
651
761
  for (const h in t.attributes) {
652
- const u = me[h] || h.toLowerCase();
762
+ const u = ge[h] || h.toLowerCase();
653
763
  if (s[h] !== void 0) {
654
- const d = r.accessors[t.attributes[h]], p = X[d.componentType];
764
+ const d = r.accessors[t.attributes[h]], p = Y[d.componentType];
655
765
  c[u] = p.name, o[u] = d.normalized === !0;
656
766
  }
657
767
  }
@@ -663,25 +773,25 @@ class hn {
663
773
  m !== void 0 && (A.normalized = m);
664
774
  }
665
775
  u(p);
666
- }, a, c, D, d);
776
+ }, a, c, v, d);
667
777
  });
668
778
  });
669
779
  }
670
780
  }
671
- class dn {
781
+ class An {
672
782
  constructor() {
673
- this.name = T.KHR_TEXTURE_TRANSFORM;
783
+ this.name = E.KHR_TEXTURE_TRANSFORM;
674
784
  }
675
785
  extendTexture(t, e) {
676
786
  return (e.texCoord === void 0 || e.texCoord === t.channel) && e.offset === void 0 && e.rotation === void 0 && e.scale === void 0 || (t = t.clone(), e.texCoord !== void 0 && (t.channel = e.texCoord), e.offset !== void 0 && t.offset.fromArray(e.offset), e.rotation !== void 0 && (t.rotation = e.rotation), e.scale !== void 0 && t.repeat.fromArray(e.scale), t.needsUpdate = !0), t;
677
787
  }
678
788
  }
679
- class fn {
789
+ class Tn {
680
790
  constructor() {
681
- this.name = T.KHR_MESH_QUANTIZATION;
791
+ this.name = E.KHR_MESH_QUANTIZATION;
682
792
  }
683
793
  }
684
- class Ve extends Ht {
794
+ class qe extends Bt {
685
795
  constructor(t, e, r, n) {
686
796
  super(t, e, r, n);
687
797
  }
@@ -692,22 +802,22 @@ class Ve extends Ht {
692
802
  return e;
693
803
  }
694
804
  interpolate_(t, e, r, n) {
695
- const i = this.resultBuffer, s = this.sampleValues, a = this.valueSize, o = a * 2, c = a * 3, h = n - e, u = (r - e) / h, d = u * u, p = d * u, g = t * c, A = g - c, m = -2 * p + 3 * d, f = p - d, E = 1 - m, _ = f - d + u;
696
- for (let x = 0; x !== a; x++) {
697
- const w = s[A + x + a], b = s[A + x + o] * h, y = s[g + x + a], C = s[g + x] * h;
698
- i[x] = E * w + _ * b + m * y + f * C;
805
+ const i = this.resultBuffer, s = this.sampleValues, a = this.valueSize, o = a * 2, c = a * 3, h = n - e, u = (r - e) / h, d = u * u, p = d * u, g = t * c, A = g - c, m = -2 * p + 3 * d, f = p - d, x = 1 - m, M = f - d + u;
806
+ for (let R = 0; R !== a; R++) {
807
+ const y = s[A + R + a], I = s[A + R + o] * h, S = s[g + R + a], P = s[g + R] * h;
808
+ i[R] = x * y + M * I + m * S + f * P;
699
809
  }
700
810
  return i;
701
811
  }
702
812
  }
703
- const pn = new Ge();
704
- class mn extends Ve {
813
+ const En = new Ue();
814
+ class xn extends qe {
705
815
  interpolate_(t, e, r, n) {
706
816
  const i = super.interpolate_(t, e, r, n);
707
- return pn.fromArray(i).normalize().toArray(i), i;
817
+ return En.fromArray(i).normalize().toArray(i), i;
708
818
  }
709
819
  }
710
- const I = {
820
+ const N = {
711
821
  POINTS: 0,
712
822
  LINES: 1,
713
823
  LINE_LOOP: 2,
@@ -715,25 +825,25 @@ const I = {
715
825
  TRIANGLES: 4,
716
826
  TRIANGLE_STRIP: 5,
717
827
  TRIANGLE_FAN: 6
718
- }, X = {
828
+ }, Y = {
719
829
  5120: Int8Array,
720
830
  5121: Uint8Array,
721
831
  5122: Int16Array,
722
832
  5123: Uint16Array,
723
833
  5125: Uint32Array,
724
834
  5126: Float32Array
725
- }, Fe = {
726
- 9728: je,
727
- 9729: fe,
728
- 9984: mt,
729
- 9985: pt,
730
- 9986: ft,
731
- 9987: ve
732
835
  }, Oe = {
733
- 33071: At,
734
- 33648: gt,
735
- 10497: pe
736
- }, ae = {
836
+ 9728: Ke,
837
+ 9729: pe,
838
+ 9984: Tt,
839
+ 9985: At,
840
+ 9986: gt,
841
+ 9987: je
842
+ }, De = {
843
+ 33071: xt,
844
+ 33648: Et,
845
+ 10497: me
846
+ }, ce = {
737
847
  SCALAR: 1,
738
848
  VEC2: 2,
739
849
  VEC3: 3,
@@ -741,7 +851,7 @@ const I = {
741
851
  MAT2: 4,
742
852
  MAT3: 9,
743
853
  MAT4: 16
744
- }, me = {
854
+ }, ge = {
745
855
  POSITION: "position",
746
856
  NORMAL: "normal",
747
857
  TANGENT: "tangent",
@@ -752,41 +862,41 @@ const I = {
752
862
  COLOR_0: "color",
753
863
  WEIGHTS_0: "skinWeight",
754
864
  JOINTS_0: "skinIndex"
755
- }, B = {
865
+ }, k = {
756
866
  scale: "scale",
757
867
  translation: "position",
758
868
  rotation: "quaternion",
759
869
  weights: "morphTargetInfluences"
760
- }, gn = {
870
+ }, Rn = {
761
871
  CUBICSPLINE: void 0,
762
872
  // We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
763
873
  // keyframe track will be initialized with a default interpolation type, then modified.
764
- LINEAR: Xe,
765
- STEP: Ot
766
- }, ce = {
874
+ LINEAR: Ye,
875
+ STEP: Ht
876
+ }, le = {
767
877
  OPAQUE: "OPAQUE",
768
878
  MASK: "MASK",
769
879
  BLEND: "BLEND"
770
880
  };
771
- function An(l) {
772
- return l.DefaultMaterial === void 0 && (l.DefaultMaterial = new Ke({
881
+ function Mn(l) {
882
+ return l.DefaultMaterial === void 0 && (l.DefaultMaterial = new Xe({
773
883
  color: 16777215,
774
884
  emissive: 0,
775
885
  metalness: 1,
776
886
  roughness: 1,
777
887
  transparent: !1,
778
888
  depthTest: !0,
779
- side: Dt
889
+ side: kt
780
890
  })), l.DefaultMaterial;
781
891
  }
782
- function k(l, t, e) {
892
+ function B(l, t, e) {
783
893
  for (const r in e.extensions)
784
894
  l[r] === void 0 && (t.userData.gltfExtensions = t.userData.gltfExtensions || {}, t.userData.gltfExtensions[r] = e.extensions[r]);
785
895
  }
786
- function F(l, t) {
896
+ function O(l, t) {
787
897
  t.extras !== void 0 && (typeof t.extras == "object" ? Object.assign(l.userData, t.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + t.extras));
788
898
  }
789
- function Tn(l, t, e) {
899
+ function _n(l, t, e) {
790
900
  let r = !1, n = !1, i = !1;
791
901
  for (let c = 0, h = t.length; c < h; c++) {
792
902
  const u = t[c];
@@ -818,7 +928,7 @@ function Tn(l, t, e) {
818
928
  return r && (l.morphAttributes.position = h), n && (l.morphAttributes.normal = u), i && (l.morphAttributes.color = d), l.morphTargetsRelative = !0, l;
819
929
  });
820
930
  }
821
- function En(l, t) {
931
+ function yn(l, t) {
822
932
  if (l.updateMorphTargets(), t.weights !== void 0)
823
933
  for (let e = 0, r = t.weights.length; e < r; e++)
824
934
  l.morphTargetInfluences[e] = t.weights[e];
@@ -832,22 +942,22 @@ function En(l, t) {
832
942
  console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.");
833
943
  }
834
944
  }
835
- function xn(l) {
945
+ function wn(l) {
836
946
  let t;
837
- const e = l.extensions && l.extensions[T.KHR_DRACO_MESH_COMPRESSION];
838
- if (e ? t = "draco:" + e.bufferView + ":" + e.indices + ":" + le(e.attributes) : t = l.indices + ":" + le(l.attributes) + ":" + l.mode, l.targets !== void 0)
947
+ const e = l.extensions && l.extensions[E.KHR_DRACO_MESH_COMPRESSION];
948
+ if (e ? t = "draco:" + e.bufferView + ":" + e.indices + ":" + ue(e.attributes) : t = l.indices + ":" + ue(l.attributes) + ":" + l.mode, l.targets !== void 0)
839
949
  for (let r = 0, n = l.targets.length; r < n; r++)
840
- t += ":" + le(l.targets[r]);
950
+ t += ":" + ue(l.targets[r]);
841
951
  return t;
842
952
  }
843
- function le(l) {
953
+ function ue(l) {
844
954
  let t = "";
845
955
  const e = Object.keys(l).sort();
846
956
  for (let r = 0, n = e.length; r < n; r++)
847
957
  t += e[r] + ":" + l[e[r]] + ";";
848
958
  return t;
849
959
  }
850
- function ge(l) {
960
+ function Ae(l) {
851
961
  switch (l) {
852
962
  case Int8Array:
853
963
  return 1 / 127;
@@ -861,13 +971,13 @@ function ge(l) {
861
971
  throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.");
862
972
  }
863
973
  }
864
- function Rn(l) {
974
+ function Sn(l) {
865
975
  return l.search(/\.jpe?g($|\?)/i) > 0 || l.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : l.search(/\.webp($|\?)/i) > 0 || l.search(/^data\:image\/webp/) === 0 ? "image/webp" : l.search(/\.ktx2($|\?)/i) > 0 || l.search(/^data\:image\/ktx2/) === 0 ? "image/ktx2" : "image/png";
866
976
  }
867
- const _n = new ee();
868
- class Mn {
977
+ const Ln = new te();
978
+ class bn {
869
979
  constructor(t = {}, e = {}) {
870
- this.json = t, this.extensions = {}, this.plugins = {}, this.options = e, this.cache = new Xt(), this.associations = /* @__PURE__ */ new Map(), this.primitiveCache = {}, this.nodeCache = {}, this.meshCache = { refs: {}, uses: {} }, this.cameraCache = { refs: {}, uses: {} }, this.lightCache = { refs: {}, uses: {} }, this.sourceCache = {}, this.textureCache = {}, this.nodeNamesUsed = {};
980
+ this.json = t, this.extensions = {}, this.plugins = {}, this.options = e, this.cache = new qt(), this.associations = /* @__PURE__ */ new Map(), this.primitiveCache = {}, this.nodeCache = {}, this.meshCache = { refs: {}, uses: {} }, this.cameraCache = { refs: {}, uses: {} }, this.lightCache = { refs: {}, uses: {} }, this.sourceCache = {}, this.textureCache = {}, this.nodeNamesUsed = {};
871
981
  let r = !1, n = -1, i = !1, s = -1;
872
982
  if (typeof navigator < "u") {
873
983
  const a = navigator.userAgent;
@@ -875,7 +985,7 @@ class Mn {
875
985
  const o = a.match(/Version\/(\d+)/);
876
986
  n = r && o ? parseInt(o[1], 10) : -1, i = a.indexOf("Firefox") > -1, s = i ? a.match(/Firefox\/([0-9]+)\./)[1] : -1;
877
987
  }
878
- typeof createImageBitmap > "u" || r && n < 17 || i && s < 98 ? this.textureLoader = new lt(this.options.manager) : this.textureLoader = new ut(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new Be(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
988
+ typeof createImageBitmap > "u" || r && n < 17 || i && s < 98 ? this.textureLoader = new dt(this.options.manager) : this.textureLoader = new ft(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new ke(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
879
989
  }
880
990
  setExtensions(t) {
881
991
  this.extensions = t;
@@ -905,7 +1015,7 @@ class Mn {
905
1015
  parser: r,
906
1016
  userData: {}
907
1017
  };
908
- return k(i, a, n), F(a, n), Promise.all(r._invokeAll(function(o) {
1018
+ return B(i, a, n), O(a, n), Promise.all(r._invokeAll(function(o) {
909
1019
  return o.afterRoot && o.afterRoot(a);
910
1020
  })).then(function() {
911
1021
  for (const o of a.scenes)
@@ -1073,10 +1183,10 @@ class Mn {
1073
1183
  if (e.type && e.type !== "arraybuffer")
1074
1184
  throw new Error("THREE.GLTFLoader: " + e.type + " buffer type is not supported.");
1075
1185
  if (e.uri === void 0 && t === 0)
1076
- return Promise.resolve(this.extensions[T.KHR_BINARY_GLTF].body);
1186
+ return Promise.resolve(this.extensions[E.KHR_BINARY_GLTF].body);
1077
1187
  const n = this.options;
1078
1188
  return new Promise(function(i, s) {
1079
- r.load(q.resolveURL(e.uri, n.path), i, void 0, function() {
1189
+ r.load(Z.resolveURL(e.uri, n.path), i, void 0, function() {
1080
1190
  s(new Error('THREE.GLTFLoader: Failed to load buffer "' + e.uri + '".'));
1081
1191
  });
1082
1192
  });
@@ -1101,25 +1211,25 @@ class Mn {
1101
1211
  loadAccessor(t) {
1102
1212
  const e = this, r = this.json, n = this.json.accessors[t];
1103
1213
  if (n.bufferView === void 0 && n.sparse === void 0) {
1104
- const s = ae[n.type], a = X[n.componentType], o = n.normalized === !0, c = new a(n.count * s);
1105
- return Promise.resolve(new se(c, s, o));
1214
+ const s = ce[n.type], a = Y[n.componentType], o = n.normalized === !0, c = new a(n.count * s);
1215
+ return Promise.resolve(new re(c, s, o));
1106
1216
  }
1107
1217
  const i = [];
1108
1218
  return n.bufferView !== void 0 ? i.push(this.getDependency("bufferView", n.bufferView)) : i.push(null), n.sparse !== void 0 && (i.push(this.getDependency("bufferView", n.sparse.indices.bufferView)), i.push(this.getDependency("bufferView", n.sparse.values.bufferView))), Promise.all(i).then(function(s) {
1109
- const a = s[0], o = ae[n.type], c = X[n.componentType], h = c.BYTES_PER_ELEMENT, u = h * o, d = n.byteOffset || 0, p = n.bufferView !== void 0 ? r.bufferViews[n.bufferView].byteStride : void 0, g = n.normalized === !0;
1219
+ const a = s[0], o = ce[n.type], c = Y[n.componentType], h = c.BYTES_PER_ELEMENT, u = h * o, d = n.byteOffset || 0, p = n.bufferView !== void 0 ? r.bufferViews[n.bufferView].byteStride : void 0, g = n.normalized === !0;
1110
1220
  let A, m;
1111
1221
  if (p && p !== u) {
1112
- const f = Math.floor(d / p), E = "InterleavedBuffer:" + n.bufferView + ":" + n.componentType + ":" + f + ":" + n.count;
1113
- let _ = e.cache.get(E);
1114
- _ || (A = new c(a, f * p, n.count * p / h), _ = new ht(A, p / h), e.cache.add(E, _)), m = new dt(_, o, d % p / h, g);
1222
+ const f = Math.floor(d / p), x = "InterleavedBuffer:" + n.bufferView + ":" + n.componentType + ":" + f + ":" + n.count;
1223
+ let M = e.cache.get(x);
1224
+ M || (A = new c(a, f * p, n.count * p / h), M = new pt(A, p / h), e.cache.add(x, M)), m = new mt(M, o, d % p / h, g);
1115
1225
  } else
1116
- a === null ? A = new c(n.count * o) : A = new c(a, d, n.count * o), m = new se(A, o, g);
1226
+ a === null ? A = new c(n.count * o) : A = new c(a, d, n.count * o), m = new re(A, o, g);
1117
1227
  if (n.sparse !== void 0) {
1118
- const f = ae.SCALAR, E = X[n.sparse.indices.componentType], _ = n.sparse.indices.byteOffset || 0, x = n.sparse.values.byteOffset || 0, w = new E(s[1], _, n.sparse.count * f), b = new c(s[2], x, n.sparse.count * o);
1119
- a !== null && (m = new se(m.array.slice(), m.itemSize, m.normalized)), m.normalized = !1;
1120
- for (let y = 0, C = w.length; y < C; y++) {
1121
- const L = w[y];
1122
- if (m.setX(L, b[y * o]), o >= 2 && m.setY(L, b[y * o + 1]), o >= 3 && m.setZ(L, b[y * o + 2]), o >= 4 && m.setW(L, b[y * o + 3]), o >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
1228
+ const f = ce.SCALAR, x = Y[n.sparse.indices.componentType], M = n.sparse.indices.byteOffset || 0, R = n.sparse.values.byteOffset || 0, y = new x(s[1], M, n.sparse.count * f), I = new c(s[2], R, n.sparse.count * o);
1229
+ a !== null && (m = new re(m.array.slice(), m.itemSize, m.normalized)), m.normalized = !1;
1230
+ for (let S = 0, P = y.length; S < P; S++) {
1231
+ const L = y[S];
1232
+ if (m.setX(L, I[S * o]), o >= 2 && m.setY(L, I[S * o + 1]), o >= 3 && m.setZ(L, I[S * o + 2]), o >= 4 && m.setW(L, I[S * o + 3]), o >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
1123
1233
  }
1124
1234
  m.normalized = g;
1125
1235
  }
@@ -1147,7 +1257,7 @@ class Mn {
1147
1257
  const c = this.loadImageSource(e, r).then(function(h) {
1148
1258
  h.flipY = !1, h.name = s.name || a.name || "", h.name === "" && typeof a.uri == "string" && a.uri.startsWith("data:image/") === !1 && (h.name = a.uri);
1149
1259
  const d = (i.samplers || {})[s.sampler] || {};
1150
- return h.magFilter = Fe[d.magFilter] || fe, h.minFilter = Fe[d.minFilter] || ve, h.wrapS = Oe[d.wrapS] || pe, h.wrapT = Oe[d.wrapT] || pe, h.generateMipmaps = !h.isCompressedTexture && h.minFilter !== je && h.minFilter !== fe, n.associations.set(h, { textures: t }), h;
1260
+ return h.magFilter = Oe[d.magFilter] || pe, h.minFilter = Oe[d.minFilter] || je, h.wrapS = De[d.wrapS] || me, h.wrapT = De[d.wrapT] || me, h.generateMipmaps = !h.isCompressedTexture && h.minFilter !== Ke && h.minFilter !== pe, n.associations.set(h, { textures: t }), h;
1151
1261
  }).catch(function() {
1152
1262
  return null;
1153
1263
  });
@@ -1173,10 +1283,10 @@ class Mn {
1173
1283
  e.isImageBitmapLoader === !0 && (g = function(A) {
1174
1284
  const m = new Se(A);
1175
1285
  m.needsUpdate = !0, d(m);
1176
- }), e.load(q.resolveURL(u, i.path), g, void 0, p);
1286
+ }), e.load(Z.resolveURL(u, i.path), g, void 0, p);
1177
1287
  });
1178
1288
  }).then(function(u) {
1179
- return c === !0 && a.revokeObjectURL(o), F(u, s), u.userData.mimeType = s.mimeType || Rn(s.uri), u;
1289
+ return c === !0 && a.revokeObjectURL(o), O(u, s), u.userData.mimeType = s.mimeType || Sn(s.uri), u;
1180
1290
  }).catch(function(u) {
1181
1291
  throw console.error("THREE.GLTFLoader: Couldn't load texture", o), u;
1182
1292
  });
@@ -1195,11 +1305,11 @@ class Mn {
1195
1305
  const i = this;
1196
1306
  return this.getDependency("texture", r.index).then(function(s) {
1197
1307
  if (!s) return null;
1198
- if (r.texCoord !== void 0 && r.texCoord > 0 && (s = s.clone(), s.channel = r.texCoord), i.extensions[T.KHR_TEXTURE_TRANSFORM]) {
1199
- const a = r.extensions !== void 0 ? r.extensions[T.KHR_TEXTURE_TRANSFORM] : void 0;
1308
+ if (r.texCoord !== void 0 && r.texCoord > 0 && (s = s.clone(), s.channel = r.texCoord), i.extensions[E.KHR_TEXTURE_TRANSFORM]) {
1309
+ const a = r.extensions !== void 0 ? r.extensions[E.KHR_TEXTURE_TRANSFORM] : void 0;
1200
1310
  if (a) {
1201
1311
  const o = i.associations.get(s);
1202
- s = i.extensions[T.KHR_TEXTURE_TRANSFORM].extendTexture(s, a), i.associations.set(s, o);
1312
+ s = i.extensions[E.KHR_TEXTURE_TRANSFORM].extendTexture(s, a), i.associations.set(s, o);
1203
1313
  }
1204
1314
  }
1205
1315
  return n !== void 0 && (s.colorSpace = n), t[e] = s, s;
@@ -1220,11 +1330,11 @@ class Mn {
1220
1330
  if (t.isPoints) {
1221
1331
  const a = "PointsMaterial:" + r.uuid;
1222
1332
  let o = this.cache.get(a);
1223
- o || (o = new Tt(), re.prototype.copy.call(o, r), o.color.copy(r.color), o.map = r.map, o.sizeAttenuation = !1, this.cache.add(a, o)), r = o;
1333
+ o || (o = new Rt(), ie.prototype.copy.call(o, r), o.color.copy(r.color), o.map = r.map, o.sizeAttenuation = !1, this.cache.add(a, o)), r = o;
1224
1334
  } else if (t.isLine) {
1225
1335
  const a = "LineBasicMaterial:" + r.uuid;
1226
1336
  let o = this.cache.get(a);
1227
- o || (o = new Et(), re.prototype.copy.call(o, r), o.color.copy(r.color), o.map = r.map, this.cache.add(a, o)), r = o;
1337
+ o || (o = new Mt(), ie.prototype.copy.call(o, r), o.color.copy(r.color), o.map = r.map, this.cache.add(a, o)), r = o;
1228
1338
  }
1229
1339
  if (n || i || s) {
1230
1340
  let a = "ClonedMaterial:" + r.uuid + ":";
@@ -1235,7 +1345,7 @@ class Mn {
1235
1345
  t.material = r;
1236
1346
  }
1237
1347
  getMaterialType() {
1238
- return Ke;
1348
+ return Xe;
1239
1349
  }
1240
1350
  /**
1241
1351
  * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials
@@ -1246,34 +1356,34 @@ class Mn {
1246
1356
  const e = this, r = this.json, n = this.extensions, i = r.materials[t];
1247
1357
  let s;
1248
1358
  const a = {}, o = i.extensions || {}, c = [];
1249
- if (o[T.KHR_MATERIALS_UNLIT]) {
1250
- const u = n[T.KHR_MATERIALS_UNLIT];
1359
+ if (o[E.KHR_MATERIALS_UNLIT]) {
1360
+ const u = n[E.KHR_MATERIALS_UNLIT];
1251
1361
  s = u.getMaterialType(), c.push(u.extendParams(a, i, e));
1252
1362
  } else {
1253
1363
  const u = i.pbrMetallicRoughness || {};
1254
- if (a.color = new v(1, 1, 1), a.opacity = 1, Array.isArray(u.baseColorFactor)) {
1364
+ if (a.color = new j(1, 1, 1), a.opacity = 1, Array.isArray(u.baseColorFactor)) {
1255
1365
  const d = u.baseColorFactor;
1256
- a.color.setRGB(d[0], d[1], d[2], D), a.opacity = d[3];
1366
+ a.color.setRGB(d[0], d[1], d[2], v), a.opacity = d[3];
1257
1367
  }
1258
- u.baseColorTexture !== void 0 && c.push(e.assignTexture(a, "map", u.baseColorTexture, Z)), a.metalness = u.metallicFactor !== void 0 ? u.metallicFactor : 1, a.roughness = u.roughnessFactor !== void 0 ? u.roughnessFactor : 1, u.metallicRoughnessTexture !== void 0 && (c.push(e.assignTexture(a, "metalnessMap", u.metallicRoughnessTexture)), c.push(e.assignTexture(a, "roughnessMap", u.metallicRoughnessTexture))), s = this._invokeOne(function(d) {
1368
+ u.baseColorTexture !== void 0 && c.push(e.assignTexture(a, "map", u.baseColorTexture, Q)), a.metalness = u.metallicFactor !== void 0 ? u.metallicFactor : 1, a.roughness = u.roughnessFactor !== void 0 ? u.roughnessFactor : 1, u.metallicRoughnessTexture !== void 0 && (c.push(e.assignTexture(a, "metalnessMap", u.metallicRoughnessTexture)), c.push(e.assignTexture(a, "roughnessMap", u.metallicRoughnessTexture))), s = this._invokeOne(function(d) {
1259
1369
  return d.getMaterialType && d.getMaterialType(t);
1260
1370
  }), c.push(Promise.all(this._invokeAll(function(d) {
1261
1371
  return d.extendMaterialParams && d.extendMaterialParams(t, a);
1262
1372
  })));
1263
1373
  }
1264
- i.doubleSided === !0 && (a.side = J);
1265
- const h = i.alphaMode || ce.OPAQUE;
1266
- if (h === ce.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, h === ce.MASK && (a.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && s !== W && (c.push(e.assignTexture(a, "normalMap", i.normalTexture)), a.normalScale = new ke(1, 1), i.normalTexture.scale !== void 0)) {
1374
+ i.doubleSided === !0 && (a.side = $);
1375
+ const h = i.alphaMode || le.OPAQUE;
1376
+ if (h === le.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, h === le.MASK && (a.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && s !== q && (c.push(e.assignTexture(a, "normalMap", i.normalTexture)), a.normalScale = new Be(1, 1), i.normalTexture.scale !== void 0)) {
1267
1377
  const u = i.normalTexture.scale;
1268
1378
  a.normalScale.set(u, u);
1269
1379
  }
1270
- if (i.occlusionTexture !== void 0 && s !== W && (c.push(e.assignTexture(a, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (a.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && s !== W) {
1380
+ if (i.occlusionTexture !== void 0 && s !== q && (c.push(e.assignTexture(a, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (a.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && s !== q) {
1271
1381
  const u = i.emissiveFactor;
1272
- a.emissive = new v().setRGB(u[0], u[1], u[2], D);
1382
+ a.emissive = new j().setRGB(u[0], u[1], u[2], v);
1273
1383
  }
1274
- return i.emissiveTexture !== void 0 && s !== W && c.push(e.assignTexture(a, "emissiveMap", i.emissiveTexture, Z)), Promise.all(c).then(function() {
1384
+ return i.emissiveTexture !== void 0 && s !== q && c.push(e.assignTexture(a, "emissiveMap", i.emissiveTexture, Q)), Promise.all(c).then(function() {
1275
1385
  const u = new s(a);
1276
- return i.name && (u.name = i.name), F(u, i), e.associations.set(u, { materials: t }), i.extensions && k(n, u, i), u;
1386
+ return i.name && (u.name = i.name), O(u, i), e.associations.set(u, { materials: t }), i.extensions && B(n, u, i), u;
1277
1387
  });
1278
1388
  }
1279
1389
  /**
@@ -1283,7 +1393,7 @@ class Mn {
1283
1393
  * @return {String}
1284
1394
  */
1285
1395
  createUniqueName(t) {
1286
- const e = xt.sanitizeNodeName(t || "");
1396
+ const e = _t.sanitizeNodeName(t || "");
1287
1397
  return e in this.nodeNamesUsed ? e + "_" + ++this.nodeNamesUsed[e] : (this.nodeNamesUsed[e] = 0, e);
1288
1398
  }
1289
1399
  /**
@@ -1297,18 +1407,18 @@ class Mn {
1297
1407
  loadGeometries(t) {
1298
1408
  const e = this, r = this.extensions, n = this.primitiveCache;
1299
1409
  function i(a) {
1300
- return r[T.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a, e).then(function(o) {
1301
- return De(o, a, e);
1410
+ return r[E.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a, e).then(function(o) {
1411
+ return ve(o, a, e);
1302
1412
  });
1303
1413
  }
1304
1414
  const s = [];
1305
1415
  for (let a = 0, o = t.length; a < o; a++) {
1306
- const c = t[a], h = xn(c), u = n[h];
1416
+ const c = t[a], h = wn(c), u = n[h];
1307
1417
  if (u)
1308
1418
  s.push(u.promise);
1309
1419
  else {
1310
1420
  let d;
1311
- c.extensions && c.extensions[T.KHR_DRACO_MESH_COMPRESSION] ? d = i(c) : d = De(new Rt(), c, e), n[h] = { primitive: c, promise: d }, s.push(d);
1421
+ c.extensions && c.extensions[E.KHR_DRACO_MESH_COMPRESSION] ? d = i(c) : d = ve(new yt(), c, e), n[h] = { primitive: c, promise: d }, s.push(d);
1312
1422
  }
1313
1423
  }
1314
1424
  return Promise.all(s);
@@ -1321,7 +1431,7 @@ class Mn {
1321
1431
  loadMesh(t) {
1322
1432
  const e = this, r = this.json, n = this.extensions, i = r.meshes[t], s = i.primitives, a = [];
1323
1433
  for (let o = 0, c = s.length; o < c; o++) {
1324
- const h = s[o].material === void 0 ? An(this.cache) : this.getDependency("material", s[o].material);
1434
+ const h = s[o].material === void 0 ? Mn(this.cache) : this.getDependency("material", s[o].material);
1325
1435
  a.push(h);
1326
1436
  }
1327
1437
  return a.push(e.loadGeometries(s)), Promise.all(a).then(function(o) {
@@ -1329,20 +1439,20 @@ class Mn {
1329
1439
  for (let p = 0, g = h.length; p < g; p++) {
1330
1440
  const A = h[p], m = s[p];
1331
1441
  let f;
1332
- const E = c[p];
1333
- if (m.mode === I.TRIANGLES || m.mode === I.TRIANGLE_STRIP || m.mode === I.TRIANGLE_FAN || m.mode === void 0)
1334
- f = i.isSkinnedMesh === !0 ? new _t(A, E) : new Mt(A, E), f.isSkinnedMesh === !0 && f.normalizeSkinWeights(), m.mode === I.TRIANGLE_STRIP ? f.geometry = Ce(f.geometry, He) : m.mode === I.TRIANGLE_FAN && (f.geometry = Ce(f.geometry, de));
1335
- else if (m.mode === I.LINES)
1336
- f = new wt(A, E);
1337
- else if (m.mode === I.LINE_STRIP)
1338
- f = new St(A, E);
1339
- else if (m.mode === I.LINE_LOOP)
1340
- f = new yt(A, E);
1341
- else if (m.mode === I.POINTS)
1342
- f = new Lt(A, E);
1442
+ const x = c[p];
1443
+ if (m.mode === N.TRIANGLES || m.mode === N.TRIANGLE_STRIP || m.mode === N.TRIANGLE_FAN || m.mode === void 0)
1444
+ f = i.isSkinnedMesh === !0 ? new wt(A, x) : new St(A, x), f.isSkinnedMesh === !0 && f.normalizeSkinWeights(), m.mode === N.TRIANGLE_STRIP ? f.geometry = Pe(f.geometry, He) : m.mode === N.TRIANGLE_FAN && (f.geometry = Pe(f.geometry, fe));
1445
+ else if (m.mode === N.LINES)
1446
+ f = new Lt(A, x);
1447
+ else if (m.mode === N.LINE_STRIP)
1448
+ f = new bt(A, x);
1449
+ else if (m.mode === N.LINE_LOOP)
1450
+ f = new It(A, x);
1451
+ else if (m.mode === N.POINTS)
1452
+ f = new Nt(A, x);
1343
1453
  else
1344
1454
  throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + m.mode);
1345
- Object.keys(f.geometry.morphAttributes).length > 0 && En(f, i), f.name = e.createUniqueName(i.name || "mesh_" + t), F(f, i), m.extensions && k(n, f, m), e.assignFinalMaterial(f), u.push(f);
1455
+ Object.keys(f.geometry.morphAttributes).length > 0 && yn(f, i), f.name = e.createUniqueName(i.name || "mesh_" + t), O(f, i), m.extensions && B(n, f, m), e.assignFinalMaterial(f), u.push(f);
1346
1456
  }
1347
1457
  for (let p = 0, g = u.length; p < g; p++)
1348
1458
  e.associations.set(u[p], {
@@ -1350,9 +1460,9 @@ class Mn {
1350
1460
  primitives: p
1351
1461
  });
1352
1462
  if (u.length === 1)
1353
- return i.extensions && k(n, u[0], i), u[0];
1354
- const d = new ie();
1355
- i.extensions && k(n, d, i), e.associations.set(d, { meshes: t });
1463
+ return i.extensions && B(n, u[0], i), u[0];
1464
+ const d = new oe();
1465
+ i.extensions && B(n, d, i), e.associations.set(d, { meshes: t });
1356
1466
  for (let p = 0, g = u.length; p < g; p++)
1357
1467
  d.add(u[p]);
1358
1468
  return d;
@@ -1370,7 +1480,7 @@ class Mn {
1370
1480
  console.warn("THREE.GLTFLoader: Missing camera parameters.");
1371
1481
  return;
1372
1482
  }
1373
- return r.type === "perspective" ? e = new bt(It.radToDeg(n.yfov), n.aspectRatio || 1, n.znear || 1, n.zfar || 2e6) : r.type === "orthographic" && (e = new Nt(-n.xmag, n.xmag, n.ymag, -n.ymag, n.znear, n.zfar)), r.name && (e.name = this.createUniqueName(r.name)), F(e, r), Promise.resolve(e);
1483
+ return r.type === "perspective" ? e = new Ct(Pt.radToDeg(n.yfov), n.aspectRatio || 1, n.znear || 1, n.zfar || 2e6) : r.type === "orthographic" && (e = new Ft(-n.xmag, n.xmag, n.ymag, -n.ymag, n.znear, n.zfar)), r.name && (e.name = this.createUniqueName(r.name)), O(e, r), Promise.resolve(e);
1374
1484
  }
1375
1485
  /**
1376
1486
  * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
@@ -1387,12 +1497,12 @@ class Mn {
1387
1497
  const u = s[c];
1388
1498
  if (u) {
1389
1499
  a.push(u);
1390
- const d = new ee();
1500
+ const d = new te();
1391
1501
  i !== null && d.fromArray(i.array, c * 16), o.push(d);
1392
1502
  } else
1393
1503
  console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', e.joints[c]);
1394
1504
  }
1395
- return new Ct(a, o);
1505
+ return new Ot(a, o);
1396
1506
  });
1397
1507
  }
1398
1508
  /**
@@ -1403,8 +1513,8 @@ class Mn {
1403
1513
  loadAnimation(t) {
1404
1514
  const e = this.json, r = this, n = e.animations[t], i = n.name ? n.name : "animation_" + t, s = [], a = [], o = [], c = [], h = [];
1405
1515
  for (let u = 0, d = n.channels.length; u < d; u++) {
1406
- const p = n.channels[u], g = n.samplers[p.sampler], A = p.target, m = A.node, f = n.parameters !== void 0 ? n.parameters[g.input] : g.input, E = n.parameters !== void 0 ? n.parameters[g.output] : g.output;
1407
- A.node !== void 0 && (s.push(this.getDependency("node", m)), a.push(this.getDependency("accessor", f)), o.push(this.getDependency("accessor", E)), c.push(g), h.push(A));
1516
+ const p = n.channels[u], g = n.samplers[p.sampler], A = p.target, m = A.node, f = n.parameters !== void 0 ? n.parameters[g.input] : g.input, x = n.parameters !== void 0 ? n.parameters[g.output] : g.output;
1517
+ A.node !== void 0 && (s.push(this.getDependency("node", m)), a.push(this.getDependency("accessor", f)), o.push(this.getDependency("accessor", x)), c.push(g), h.push(A));
1408
1518
  }
1409
1519
  return Promise.all([
1410
1520
  Promise.all(s),
@@ -1414,16 +1524,16 @@ class Mn {
1414
1524
  Promise.all(h)
1415
1525
  ]).then(function(u) {
1416
1526
  const d = u[0], p = u[1], g = u[2], A = u[3], m = u[4], f = [];
1417
- for (let E = 0, _ = d.length; E < _; E++) {
1418
- const x = d[E], w = p[E], b = g[E], y = A[E], C = m[E];
1419
- if (x === void 0) continue;
1420
- x.updateMatrix && x.updateMatrix();
1421
- const L = r._createAnimationTracks(x, w, b, y, C);
1527
+ for (let x = 0, M = d.length; x < M; x++) {
1528
+ const R = d[x], y = p[x], I = g[x], S = A[x], P = m[x];
1529
+ if (R === void 0) continue;
1530
+ R.updateMatrix && R.updateMatrix();
1531
+ const L = r._createAnimationTracks(R, y, I, S, P);
1422
1532
  if (L)
1423
- for (let P = 0; P < L.length; P++)
1424
- f.push(L[P]);
1533
+ for (let F = 0; F < L.length; F++)
1534
+ f.push(L[F]);
1425
1535
  }
1426
- return new Pt(i, void 0, f);
1536
+ return new Dt(i, void 0, f);
1427
1537
  });
1428
1538
  }
1429
1539
  createNodeMesh(t) {
@@ -1454,7 +1564,7 @@ class Mn {
1454
1564
  ]).then(function(c) {
1455
1565
  const h = c[0], u = c[1], d = c[2];
1456
1566
  d !== null && h.traverse(function(p) {
1457
- p.isSkinnedMesh && p.bind(d, _n);
1567
+ p.isSkinnedMesh && p.bind(d, Ln);
1458
1568
  });
1459
1569
  for (let p = 0, g = u.length; p < g; p++)
1460
1570
  h.add(u[p]);
@@ -1478,11 +1588,11 @@ class Mn {
1478
1588
  a.push(c);
1479
1589
  }), this.nodeCache[t] = Promise.all(a).then(function(c) {
1480
1590
  let h;
1481
- if (i.isBone === !0 ? h = new Ft() : c.length > 1 ? h = new ie() : c.length === 1 ? h = c[0] : h = new Ue(), h !== c[0])
1591
+ if (i.isBone === !0 ? h = new vt() : c.length > 1 ? h = new oe() : c.length === 1 ? h = c[0] : h = new Ge(), h !== c[0])
1482
1592
  for (let u = 0, d = c.length; u < d; u++)
1483
1593
  h.add(c[u]);
1484
- if (i.name && (h.userData.name = i.name, h.name = s), F(h, i), i.extensions && k(r, h, i), i.matrix !== void 0) {
1485
- const u = new ee();
1594
+ if (i.name && (h.userData.name = i.name, h.name = s), O(h, i), i.extensions && B(r, h, i), i.matrix !== void 0) {
1595
+ const u = new te();
1486
1596
  u.fromArray(i.matrix), h.applyMatrix4(u);
1487
1597
  } else
1488
1598
  i.translation !== void 0 && h.position.fromArray(i.translation), i.rotation !== void 0 && h.quaternion.fromArray(i.rotation), i.scale !== void 0 && h.scale.fromArray(i.scale);
@@ -1495,8 +1605,8 @@ class Mn {
1495
1605
  * @return {Promise<Group>}
1496
1606
  */
1497
1607
  loadScene(t) {
1498
- const e = this.extensions, r = this.json.scenes[t], n = this, i = new ie();
1499
- r.name && (i.name = n.createUniqueName(r.name)), F(i, r), r.extensions && k(e, i, r);
1608
+ const e = this.extensions, r = this.json.scenes[t], n = this, i = new oe();
1609
+ r.name && (i.name = n.createUniqueName(r.name)), O(i, r), r.extensions && B(e, i, r);
1500
1610
  const s = r.nodes || [], a = [];
1501
1611
  for (let o = 0, c = s.length; o < c; o++)
1502
1612
  a.push(n.getDependency("node", s[o]));
@@ -1506,7 +1616,7 @@ class Mn {
1506
1616
  const c = (h) => {
1507
1617
  const u = /* @__PURE__ */ new Map();
1508
1618
  for (const [d, p] of n.associations)
1509
- (d instanceof re || d instanceof Se) && u.set(d, p);
1619
+ (d instanceof ie || d instanceof Se) && u.set(d, p);
1510
1620
  return h.traverse((d) => {
1511
1621
  const p = n.associations.get(d);
1512
1622
  p != null && u.set(d, p);
@@ -1517,38 +1627,38 @@ class Mn {
1517
1627
  }
1518
1628
  _createAnimationTracks(t, e, r, n, i) {
1519
1629
  const s = [], a = t.name ? t.name : t.uuid, o = [];
1520
- B[i.path] === B.weights ? t.traverse(function(d) {
1630
+ k[i.path] === k.weights ? t.traverse(function(d) {
1521
1631
  d.morphTargetInfluences && o.push(d.name ? d.name : d.uuid);
1522
1632
  }) : o.push(a);
1523
1633
  let c;
1524
- switch (B[i.path]) {
1525
- case B.weights:
1526
- c = Le;
1527
- break;
1528
- case B.rotation:
1634
+ switch (k[i.path]) {
1635
+ case k.weights:
1529
1636
  c = be;
1530
1637
  break;
1531
- case B.position:
1532
- case B.scale:
1533
- c = ye;
1638
+ case k.rotation:
1639
+ c = Ie;
1640
+ break;
1641
+ case k.position:
1642
+ case k.scale:
1643
+ c = Le;
1534
1644
  break;
1535
1645
  default:
1536
1646
  switch (r.itemSize) {
1537
1647
  case 1:
1538
- c = Le;
1648
+ c = be;
1539
1649
  break;
1540
1650
  case 2:
1541
1651
  case 3:
1542
1652
  default:
1543
- c = ye;
1653
+ c = Le;
1544
1654
  break;
1545
1655
  }
1546
1656
  break;
1547
1657
  }
1548
- const h = n.interpolation !== void 0 ? gn[n.interpolation] : Xe, u = this._getArrayFromAccessor(r);
1658
+ const h = n.interpolation !== void 0 ? Rn[n.interpolation] : Ye, u = this._getArrayFromAccessor(r);
1549
1659
  for (let d = 0, p = o.length; d < p; d++) {
1550
1660
  const g = new c(
1551
- o[d] + "." + B[i.path],
1661
+ o[d] + "." + k[i.path],
1552
1662
  e.array,
1553
1663
  u,
1554
1664
  h
@@ -1560,7 +1670,7 @@ class Mn {
1560
1670
  _getArrayFromAccessor(t) {
1561
1671
  let e = t.array;
1562
1672
  if (t.normalized) {
1563
- const r = ge(e.constructor), n = new Float32Array(e.length);
1673
+ const r = Ae(e.constructor), n = new Float32Array(e.length);
1564
1674
  for (let i = 0, s = e.length; i < s; i++)
1565
1675
  n[i] = e[i] * r;
1566
1676
  e = n;
@@ -1569,21 +1679,21 @@ class Mn {
1569
1679
  }
1570
1680
  _createCubicSplineTrackInterpolant(t) {
1571
1681
  t.createInterpolant = function(r) {
1572
- const n = this instanceof be ? mn : Ve;
1682
+ const n = this instanceof Ie ? xn : qe;
1573
1683
  return new n(this.times, this.values, this.getValueSize() / 3, r);
1574
1684
  }, t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
1575
1685
  }
1576
1686
  }
1577
- function wn(l, t, e) {
1578
- const r = t.attributes, n = new Bt();
1687
+ function In(l, t, e) {
1688
+ const r = t.attributes, n = new Ut();
1579
1689
  if (r.POSITION !== void 0) {
1580
1690
  const a = e.json.accessors[r.POSITION], o = a.min, c = a.max;
1581
1691
  if (o !== void 0 && c !== void 0) {
1582
1692
  if (n.set(
1583
- new G(o[0], o[1], o[2]),
1584
- new G(c[0], c[1], c[2])
1693
+ new U(o[0], o[1], o[2]),
1694
+ new U(c[0], c[1], c[2])
1585
1695
  ), a.normalized) {
1586
- const h = ge(X[a.componentType]);
1696
+ const h = Ae(Y[a.componentType]);
1587
1697
  n.min.multiplyScalar(h), n.max.multiplyScalar(h);
1588
1698
  }
1589
1699
  } else {
@@ -1594,14 +1704,14 @@ function wn(l, t, e) {
1594
1704
  return;
1595
1705
  const i = t.targets;
1596
1706
  if (i !== void 0) {
1597
- const a = new G(), o = new G();
1707
+ const a = new U(), o = new U();
1598
1708
  for (let c = 0, h = i.length; c < h; c++) {
1599
1709
  const u = i[c];
1600
1710
  if (u.POSITION !== void 0) {
1601
1711
  const d = e.json.accessors[u.POSITION], p = d.min, g = d.max;
1602
1712
  if (p !== void 0 && g !== void 0) {
1603
1713
  if (o.setX(Math.max(Math.abs(p[0]), Math.abs(g[0]))), o.setY(Math.max(Math.abs(p[1]), Math.abs(g[1]))), o.setZ(Math.max(Math.abs(p[2]), Math.abs(g[2]))), d.normalized) {
1604
- const A = ge(X[d.componentType]);
1714
+ const A = Ae(Y[d.componentType]);
1605
1715
  o.multiplyScalar(A);
1606
1716
  }
1607
1717
  a.max(o);
@@ -1612,10 +1722,10 @@ function wn(l, t, e) {
1612
1722
  n.expandByVector(a);
1613
1723
  }
1614
1724
  l.boundingBox = n;
1615
- const s = new kt();
1725
+ const s = new Gt();
1616
1726
  n.getCenter(s.center), s.radius = n.min.distanceTo(n.max) / 2, l.boundingSphere = s;
1617
1727
  }
1618
- function De(l, t, e) {
1728
+ function ve(l, t, e) {
1619
1729
  const r = t.attributes, n = [];
1620
1730
  function i(s, a) {
1621
1731
  return e.getDependency("accessor", s).then(function(o) {
@@ -1623,7 +1733,7 @@ function De(l, t, e) {
1623
1733
  });
1624
1734
  }
1625
1735
  for (const s in r) {
1626
- const a = me[s] || s.toLowerCase();
1736
+ const a = ge[s] || s.toLowerCase();
1627
1737
  a in l.attributes || n.push(i(r[s], a));
1628
1738
  }
1629
1739
  if (t.indices !== void 0 && !l.index) {
@@ -1632,50 +1742,50 @@ function De(l, t, e) {
1632
1742
  });
1633
1743
  n.push(s);
1634
1744
  }
1635
- return Ie.workingColorSpace !== D && "COLOR_0" in r && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Ie.workingColorSpace}" not supported.`), F(l, t), wn(l, t, e), Promise.all(n).then(function() {
1636
- return t.targets !== void 0 ? Tn(l, t.targets, e) : l;
1745
+ return Ne.workingColorSpace !== v && "COLOR_0" in r && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Ne.workingColorSpace}" not supported.`), O(l, t), In(l, t, e), Promise.all(n).then(function() {
1746
+ return t.targets !== void 0 ? _n(l, t.targets, e) : l;
1637
1747
  });
1638
1748
  }
1639
- const $ = [0, 0, -10], U = [0.5, 0.5, 0.5], ze = 1, ue = /* @__PURE__ */ new Map(), Sn = (l) => {
1640
- const t = ue.get(l);
1749
+ const ee = [0, 0, -10], G = [0.5, 0.5, 0.5], Ze = 1, he = /* @__PURE__ */ new Map(), Nn = (l) => {
1750
+ const t = he.get(l);
1641
1751
  if (t) return t;
1642
- const e = new Kt(), r = jt(l).then(
1752
+ const e = new zt(), r = Yt(l).then(
1643
1753
  (n) => new Promise((i, s) => {
1644
1754
  e.parse(n, "", i, s);
1645
1755
  })
1646
1756
  ).catch((n) => {
1647
- throw ue.delete(l), n;
1757
+ throw he.delete(l), n;
1648
1758
  });
1649
- return ue.set(l, r), r;
1650
- }, We = ({
1759
+ return he.set(l, r), r;
1760
+ }, Qe = ({
1651
1761
  position: l,
1652
1762
  rotation: t,
1653
1763
  scale: e,
1654
1764
  url: r,
1655
1765
  showDebugMaterial: n = !1,
1656
- opacity: i = ze
1766
+ opacity: i = Ze
1657
1767
  }) => {
1658
- const s = r ?? new URL("/assets/xr/3d-models/head-occluder-v2.glb", Ne.assetStorageEndpoint).toString(), [a, o] = tt(null);
1768
+ const s = r ?? new URL("/assets/xr/3d-models/head-occluder-v2.glb", Ce.assetStorageEndpoint).toString(), [a, o] = rt(null);
1659
1769
  we(() => {
1660
1770
  let h = !1;
1661
- return Sn(s).then((u) => {
1771
+ return Nn(s).then((u) => {
1662
1772
  h || o(u.scene);
1663
1773
  }).catch((u) => {
1664
- h || console.error(`${Ne.loggerPrefix} head occluder load failed`, u);
1774
+ h || console.error(`${Ce.loggerPrefix} head occluder load failed`, u);
1665
1775
  }), () => {
1666
1776
  h = !0;
1667
1777
  };
1668
1778
  }, [s]);
1669
- const c = Ae(() => {
1779
+ const c = Te(() => {
1670
1780
  if (!a) return null;
1671
1781
  const h = a.clone();
1672
1782
  return h.traverse((u) => {
1673
- u instanceof K.Mesh && (u.material = new K.MeshStandardMaterial({
1783
+ u instanceof b.Mesh && (u.material = new b.MeshStandardMaterial({
1674
1784
  color: 15132390,
1675
1785
  colorWrite: n,
1676
1786
  depthWrite: !0,
1677
1787
  opacity: n ? i : 1,
1678
- side: K.DoubleSide,
1788
+ side: b.DoubleSide,
1679
1789
  transparent: n
1680
1790
  }));
1681
1791
  }), h;
@@ -1684,52 +1794,52 @@ const $ = [0, 0, -10], U = [0.5, 0.5, 0.5], ze = 1, ue = /* @__PURE__ */ new Map
1684
1794
  if (c)
1685
1795
  return () => {
1686
1796
  c.traverse((h) => {
1687
- h instanceof K.Mesh && h.material.dispose();
1797
+ h instanceof b.Mesh && h.material.dispose();
1688
1798
  });
1689
1799
  };
1690
1800
  }, [c]), c ? (l ? c.position.set(l[0], l[1], l[2]) : c.position.set(
1691
- $[0],
1692
- $[1],
1693
- $[2]
1801
+ ee[0],
1802
+ ee[1],
1803
+ ee[2]
1694
1804
  ), t && c.rotation.set(t[0], t[1], t[2]), e ? c.scale.set(e[0], e[1], e[2]) : c.scale.set(
1695
- U[0],
1696
- U[1],
1697
- U[2]
1698
- ), c.renderOrder = -1, /* @__PURE__ */ R("primitive", { object: c })) : null;
1699
- }, yn = 4, vn = ({
1805
+ G[0],
1806
+ G[1],
1807
+ G[2]
1808
+ ), c.renderOrder = -1, /* @__PURE__ */ T("primitive", { object: c })) : null;
1809
+ }, Cn = 4, qn = ({
1700
1810
  children: l,
1701
1811
  faceIndex: t = 0,
1702
- numFaces: e = yn,
1812
+ numFaces: e = Cn,
1703
1813
  scaleWithFace: r = !0,
1704
1814
  occluder: n = !0,
1705
1815
  showFaceMesh: i = !1,
1706
1816
  faceMeshMaterial: s
1707
1817
  }) => {
1708
- const a = Ae(
1709
- () => new K.MeshBasicMaterial({
1818
+ const a = Te(
1819
+ () => new b.MeshBasicMaterial({
1710
1820
  color: "#22c55e",
1711
- side: K.BackSide,
1821
+ side: b.BackSide,
1712
1822
  transparent: !0,
1713
1823
  opacity: 0.35,
1714
1824
  depthWrite: !1
1715
1825
  }),
1716
1826
  []
1717
1827
  ), o = n === !1 ? null : n === !0 ? {} : n;
1718
- return /* @__PURE__ */ S(Ut, { faceIndex: t, numFaces: e, scaleWithFace: r, children: [
1719
- o && /* @__PURE__ */ R(
1720
- We,
1828
+ return /* @__PURE__ */ w(Kt, { faceIndex: t, numFaces: e, scaleWithFace: r, children: [
1829
+ o && /* @__PURE__ */ T(
1830
+ Qe,
1721
1831
  {
1722
- position: o.position ?? $,
1832
+ position: o.position ?? ee,
1723
1833
  rotation: o.rotation,
1724
- scale: o.scale ?? U,
1834
+ scale: o.scale ?? G,
1725
1835
  url: o.url,
1726
1836
  showDebugMaterial: o.showDebugMaterial,
1727
- opacity: o.opacity ?? ze
1837
+ opacity: o.opacity ?? Ze
1728
1838
  }
1729
1839
  ),
1730
1840
  l,
1731
- i && /* @__PURE__ */ R(
1732
- vt,
1841
+ i && /* @__PURE__ */ T(
1842
+ Xt,
1733
1843
  {
1734
1844
  faceIndex: t,
1735
1845
  numFaces: e,
@@ -1737,36 +1847,36 @@ const $ = [0, 0, -10], U = [0.5, 0.5, 0.5], ze = 1, ue = /* @__PURE__ */ new Map
1737
1847
  }
1738
1848
  )
1739
1849
  ] });
1740
- }, Ln = 57, bn = 15.5, he = Ln / Math.PI / bn, In = -0.134, Nn = -0.024, O = (l, t, e) => Math.min(e, Math.max(t, l)), qe = (l, t) => l * t - t / 2, Ze = (l, t) => -(l * t - t / 2), Cn = ({
1850
+ }, Pn = 57, Fn = 15.5, de = Pn / Math.PI / Fn, On = -0.134, Dn = -0.024, D = (l, t, e) => Math.min(e, Math.max(t, l)), Je = (l, t) => l * t - t / 2, $e = (l, t) => -(l * t - t / 2), vn = ({
1741
1851
  eyeMidX: l,
1742
1852
  noseX: t,
1743
1853
  offsetX: e,
1744
1854
  rawYaw: r,
1745
1855
  sideMidX: n
1746
1856
  }) => {
1747
- const i = O((Math.abs(r) - 0.18) / 0.42, 0, 1), s = n * 0.75 + l * 0.25, a = l * 0.7 + t * 0.3;
1857
+ const i = D((Math.abs(r) - 0.18) / 0.42, 0, 1), s = n * 0.75 + l * 0.25, a = l * 0.7 + t * 0.3;
1748
1858
  return s * (1 - i) + a * i + e;
1749
- }, jn = ({
1859
+ }, Zn = ({
1750
1860
  baseScale: l,
1751
1861
  pitchRadians: t
1752
1862
  }) => {
1753
- const e = t * 180 / Math.PI, n = 1 + O((e - 6) / 22, 0, 1) * 0.22;
1863
+ const e = t * 180 / Math.PI, n = 1 + D((e - 6) / 22, 0, 1) * 0.22;
1754
1864
  return [l[0] * n, l[1] * n, l[2] * n];
1755
- }, Kn = ({ yawRadians: l }) => {
1756
- const t = Math.abs(l * 180 / Math.PI), r = 0.066 * O((t - 8) / 12, 0, 1);
1865
+ }, Qn = ({ yawRadians: l }) => {
1866
+ const t = Math.abs(l * 180 / Math.PI), r = 0.066 * D((t - 8) / 12, 0, 1);
1757
1867
  return Math.sign(l) * r;
1758
- }, Xn = ({
1868
+ }, Jn = ({
1759
1869
  pitchRadians: l
1760
1870
  }) => {
1761
1871
  const t = l * 180 / Math.PI;
1762
- return -0.026 * O((-t - 6) / 18, 0, 1);
1763
- }, Yn = ({
1872
+ return -0.026 * D((-t - 6) / 18, 0, 1);
1873
+ }, $n = ({
1764
1874
  baseOffset: l,
1765
1875
  yawRadians: t
1766
1876
  }) => {
1767
- const e = Math.abs(t * 180 / Math.PI), r = O((e - 8) / 24, 0, 1);
1877
+ const e = Math.abs(t * 180 / Math.PI), r = D((e - 8) / 24, 0, 1);
1768
1878
  return l + r * 0.25;
1769
- }, Vn = ({
1879
+ }, es = ({
1770
1880
  baseOffsetY: l,
1771
1881
  baseScaleY: t,
1772
1882
  face: e
@@ -1778,14 +1888,14 @@ const $ = [0, 0, -10], U = [0.5, 0.5, 0.5], ze = 1, ue = /* @__PURE__ */ new Map
1778
1888
  scaleY: t,
1779
1889
  offsetY: l
1780
1890
  };
1781
- const r = e.bounds.height / e.bounds.width, n = O((r - 1.55) / 0.35, -1, 1);
1891
+ const r = e.bounds.height / e.bounds.width, n = D((r - 1.55) / 0.35, -1, 1);
1782
1892
  return {
1783
1893
  aspectRatio: r,
1784
1894
  normalizedAspect: n,
1785
1895
  scaleY: t + n * 0.06,
1786
1896
  offsetY: l + n * 5e-3
1787
1897
  };
1788
- }, Pn = ({
1898
+ }, Hn = ({
1789
1899
  face: l,
1790
1900
  offsetX: t,
1791
1901
  offsetY: e,
@@ -1801,7 +1911,7 @@ const $ = [0, 0, -10], U = [0.5, 0.5, 0.5], ze = 1, ue = /* @__PURE__ */ new Map
1801
1911
  centerX: a,
1802
1912
  centerY: o
1803
1913
  };
1804
- }, Fn = ({
1914
+ }, kn = ({
1805
1915
  face: l,
1806
1916
  height: t,
1807
1917
  lockDepth: e,
@@ -1814,43 +1924,43 @@ const $ = [0, 0, -10], U = [0.5, 0.5, 0.5], ze = 1, ue = /* @__PURE__ */ new Map
1814
1924
  scaleZ: c,
1815
1925
  width: h
1816
1926
  }) => {
1817
- const u = Pn({
1927
+ const u = Hn({
1818
1928
  face: l,
1819
1929
  offsetX: i,
1820
1930
  offsetY: s,
1821
1931
  scaleX: a,
1822
1932
  scaleY: o
1823
- }), d = l.landmarks[33], p = l.landmarks[263], g = l.landmarks[234], A = l.landmarks[454], m = l.landmarks[1], f = l.landmarks[10], E = l.landmarks[152], _ = u.width * h, x = u.height * t, w = d && p ? (d.x + p.x) * 0.5 : l.bounds.centerX, b = d && p ? (d.y + p.y) * 0.5 : l.bounds.centerY - l.bounds.height * 0.15, y = g && A ? (g.x + A.x) * 0.5 : w, C = (f == null ? void 0 : f.y) ?? l.bounds.minY, L = (E == null ? void 0 : E.y) ?? l.bounds.maxY, P = (C + L) * 0.5, Q = d && p ? Math.atan2(p.y - d.y, p.x - d.x) : 0, H = m && l.bounds.width > 0 ? O((m.x - l.bounds.centerX) / (l.bounds.width * 0.5), -1, 1) * 0.75 : 0, j = Cn({
1824
- eyeMidX: w,
1825
- noseX: (m == null ? void 0 : m.x) ?? w,
1933
+ }), d = l.landmarks[33], p = l.landmarks[263], g = l.landmarks[234], A = l.landmarks[454], m = l.landmarks[1], f = l.landmarks[10], x = l.landmarks[152], M = u.width * h, R = u.height * t, y = d && p ? (d.x + p.x) * 0.5 : l.bounds.centerX, I = d && p ? (d.y + p.y) * 0.5 : l.bounds.centerY - l.bounds.height * 0.15, S = g && A ? (g.x + A.x) * 0.5 : y, P = (f == null ? void 0 : f.y) ?? l.bounds.minY, L = (x == null ? void 0 : x.y) ?? l.bounds.maxY, F = (P + L) * 0.5, J = d && p ? Math.atan2(p.y - d.y, p.x - d.x) : 0, H = m && l.bounds.width > 0 ? D((m.x - l.bounds.centerX) / (l.bounds.width * 0.5), -1, 1) * 0.75 : 0, K = vn({
1934
+ eyeMidX: y,
1935
+ noseX: (m == null ? void 0 : m.x) ?? y,
1826
1936
  offsetX: i,
1827
1937
  rawYaw: H,
1828
- sideMidX: y
1829
- }), M = P * 0.75 + b * 0.25 + s, te = n === "v2" ? qe(j, h) : u.centerX * h - h / 2, Y = n === "v2" ? Ze(l.bounds.centerY + s * 0.75, t) : -(u.centerY * t - t / 2), V = f && m ? Math.max(1e-4, m.y - f.y) : l.bounds.height * 0.42, Te = m && E ? Math.max(1e-4, E.y - m.y) : l.bounds.height * 0.58, Ee = (Te - V) / (Te + V), xe = O((Ee - In) / 0.28, -1, 1) * 0.58, Re = m && l.bounds.height > 0 ? O(
1830
- (l.bounds.centerY - m.y) / (l.bounds.height * 0.5) - Nn,
1938
+ sideMidX: S
1939
+ }), _ = F * 0.75 + I * 0.25 + s, ne = n === "v2" ? Je(K, h) : u.centerX * h - h / 2, V = n === "v2" ? $e(l.bounds.centerY + s * 0.75, t) : -(u.centerY * t - t / 2), W = f && m ? Math.max(1e-4, m.y - f.y) : l.bounds.height * 0.42, Ee = m && x ? Math.max(1e-4, x.y - m.y) : l.bounds.height * 0.58, xe = (Ee - W) / (Ee + W), Re = D((xe - On) / 0.28, -1, 1) * 0.58, Me = m && l.bounds.height > 0 ? D(
1940
+ (l.bounds.centerY - m.y) / (l.bounds.height * 0.5) - Dn,
1831
1941
  -1,
1832
1942
  1
1833
- ) * 0.18 : 0, ne = xe * 0.82 + Re * 0.18, _e = r ? 0 : n === "v2" ? H * 0.72 : H, Je = r ? 0 : n === "v2" ? -ne * 0.78 : -ne, $e = r ? 0 : -Q, et = e ? _ * he : n === "v2" ? _ * (he + Math.abs(_e) * 0.18) : _ * he;
1943
+ ) * 0.18 : 0, se = Re * 0.82 + Me * 0.18, _e = r ? 0 : n === "v2" ? H * 0.72 : H, tt = r ? 0 : n === "v2" ? -se * 0.78 : -se, nt = r ? 0 : -J, st = e ? M * de : n === "v2" ? M * (de + Math.abs(_e) * 0.18) : M * de;
1834
1944
  return {
1835
- centerXPx: te,
1836
- centerYPx: Y,
1837
- depthPx: et * c,
1838
- heightPx: x,
1839
- pitch: Je,
1840
- rawPitch: ne,
1841
- rawPitchFromBalance: xe,
1842
- rawPitchFromCenter: Re,
1945
+ centerXPx: ne,
1946
+ centerYPx: V,
1947
+ depthPx: st * c,
1948
+ heightPx: R,
1949
+ pitch: tt,
1950
+ rawPitch: se,
1951
+ rawPitchFromBalance: Re,
1952
+ rawPitchFromCenter: Me,
1843
1953
  rawYaw: H,
1844
- rotationZ: $e,
1845
- roll: Q,
1954
+ rotationZ: nt,
1955
+ roll: J,
1846
1956
  shape: u,
1847
- skullAnchorX: j,
1848
- skullAnchorY: M,
1849
- verticalBalance: Ee,
1850
- widthPx: _,
1957
+ skullAnchorX: K,
1958
+ skullAnchorY: _,
1959
+ verticalBalance: xe,
1960
+ widthPx: M,
1851
1961
  yaw: _e
1852
1962
  };
1853
- }, On = ({
1963
+ }, Bn = ({
1854
1964
  lockDepth: l,
1855
1965
  lockRotation: t,
1856
1966
  model: e,
@@ -1868,7 +1978,7 @@ const $ = [0, 0, -10], U = [0.5, 0.5, 0.5], ze = 1, ue = /* @__PURE__ */ new Map
1868
1978
  skullCenterMode: g,
1869
1979
  skullVerticalBias: A,
1870
1980
  width: m
1871
- }) => Qe({
1981
+ }) => et({
1872
1982
  lockDepth: l,
1873
1983
  lockRotation: t,
1874
1984
  model: e,
@@ -1886,7 +1996,7 @@ const $ = [0, 0, -10], U = [0.5, 0.5, 0.5], ze = 1, ue = /* @__PURE__ */ new Map
1886
1996
  skullCenterMode: g,
1887
1997
  skullVerticalBias: A,
1888
1998
  width: m
1889
- }).pose, Qe = ({
1999
+ }).pose, et = ({
1890
2000
  lockDepth: l,
1891
2001
  lockRotation: t,
1892
2002
  model: e,
@@ -1905,7 +2015,7 @@ const $ = [0, 0, -10], U = [0.5, 0.5, 0.5], ze = 1, ue = /* @__PURE__ */ new Map
1905
2015
  skullVerticalBias: A,
1906
2016
  width: m
1907
2017
  }) => {
1908
- const f = Fn({
2018
+ const f = kn({
1909
2019
  face: r,
1910
2020
  height: n,
1911
2021
  lockDepth: l,
@@ -1919,18 +2029,18 @@ const $ = [0, 0, -10], U = [0.5, 0.5, 0.5], ze = 1, ue = /* @__PURE__ */ new Map
1919
2029
  width: m
1920
2030
  });
1921
2031
  if (g) {
1922
- const _ = new G(
2032
+ const M = new U(
1923
2033
  0,
1924
2034
  f.heightPx * A,
1925
2035
  -f.depthPx * i
1926
2036
  ).applyEuler(
1927
- new Gt(f.pitch, f.yaw, f.rotationZ, "XYZ")
1928
- ), x = qe(f.skullAnchorX, m), w = Ze(f.skullAnchorY, n);
2037
+ new jt(f.pitch, f.yaw, f.rotationZ, "XYZ")
2038
+ ), R = Je(f.skullAnchorX, m), y = $e(f.skullAnchorY, n);
1929
2039
  return {
1930
2040
  pose: {
1931
- boxCenterZ: _.z,
1932
- centerX: x + _.x,
1933
- centerY: w + _.y,
2041
+ boxCenterZ: M.z,
2042
+ centerX: R + M.x,
2043
+ centerY: y + M.y,
1934
2044
  width: f.widthPx,
1935
2045
  height: f.heightPx,
1936
2046
  depth: f.depthPx,
@@ -1965,9 +2075,9 @@ const $ = [0, 0, -10], U = [0.5, 0.5, 0.5], ze = 1, ue = /* @__PURE__ */ new Map
1965
2075
  y: f.skullAnchorY
1966
2076
  },
1967
2077
  center: {
1968
- x: x + _.x,
1969
- y: w + _.y,
1970
- z: _.z
2078
+ x: R + M.x,
2079
+ y: y + M.y,
2080
+ z: M.z
1971
2081
  },
1972
2082
  depthPx: f.depthPx,
1973
2083
  screen: {
@@ -2027,7 +2137,7 @@ const $ = [0, 0, -10], U = [0.5, 0.5, 0.5], ze = 1, ue = /* @__PURE__ */ new Map
2027
2137
  }
2028
2138
  }
2029
2139
  };
2030
- }, zn = ({
2140
+ }, ts = ({
2031
2141
  lockDepth: l,
2032
2142
  lockRotation: t,
2033
2143
  model: e,
@@ -2045,7 +2155,7 @@ const $ = [0, 0, -10], U = [0.5, 0.5, 0.5], ze = 1, ue = /* @__PURE__ */ new Map
2045
2155
  skullCenterMode: g,
2046
2156
  skullVerticalBias: A,
2047
2157
  width: m
2048
- }) => Qe({
2158
+ }) => et({
2049
2159
  lockDepth: l,
2050
2160
  lockRotation: t,
2051
2161
  model: e,
@@ -2063,7 +2173,7 @@ const $ = [0, 0, -10], U = [0.5, 0.5, 0.5], ze = 1, ue = /* @__PURE__ */ new Map
2063
2173
  skullCenterMode: g,
2064
2174
  skullVerticalBias: A,
2065
2175
  width: m
2066
- }).debugMetrics, Wn = ({
2176
+ }).debugMetrics, ns = ({
2067
2177
  boxColor: l,
2068
2178
  boxOpacity: t,
2069
2179
  face: e,
@@ -2082,22 +2192,22 @@ const $ = [0, 0, -10], U = [0.5, 0.5, 0.5], ze = 1, ue = /* @__PURE__ */ new Map
2082
2192
  rotationOffsetY: A,
2083
2193
  rotationOffsetZ: m,
2084
2194
  scaleX: f,
2085
- scaleY: E,
2086
- scaleZ: _,
2087
- show: x,
2088
- showCenterDot: w,
2089
- showFacePlaneReference: b,
2090
- showGizmo: y,
2091
- showHeadOccluder: C,
2195
+ scaleY: x,
2196
+ scaleZ: M,
2197
+ show: R,
2198
+ showCenterDot: y,
2199
+ showFacePlaneReference: I,
2200
+ showGizmo: S,
2201
+ showHeadOccluder: P,
2092
2202
  skullCenterMode: L,
2093
- skullVerticalBias: P,
2094
- url: Q,
2203
+ skullVerticalBias: F,
2204
+ url: J,
2095
2205
  viewportHeight: H,
2096
- viewportWidth: j
2206
+ viewportWidth: K
2097
2207
  }) => {
2098
- const M = Ae(() => p || (!e || j <= 0 || H <= 0 ? null : On({
2208
+ const _ = Te(() => p || (!e || K <= 0 || H <= 0 ? null : Bn({
2099
2209
  face: e,
2100
- width: j,
2210
+ width: K,
2101
2211
  height: H,
2102
2212
  headDepthOffset: r,
2103
2213
  lockDepth: n,
@@ -2109,10 +2219,10 @@ const $ = [0, 0, -10], U = [0.5, 0.5, 0.5], ze = 1, ue = /* @__PURE__ */ new Map
2109
2219
  rotationOffsetY: A,
2110
2220
  rotationOffsetZ: m,
2111
2221
  scaleX: f,
2112
- scaleY: E,
2113
- scaleZ: _,
2222
+ scaleY: x,
2223
+ scaleZ: M,
2114
2224
  skullCenterMode: L,
2115
- skullVerticalBias: P
2225
+ skullVerticalBias: F
2116
2226
  })), [
2117
2227
  e,
2118
2228
  r,
@@ -2125,53 +2235,53 @@ const $ = [0, 0, -10], U = [0.5, 0.5, 0.5], ze = 1, ue = /* @__PURE__ */ new Map
2125
2235
  A,
2126
2236
  m,
2127
2237
  f,
2128
- E,
2129
- _,
2238
+ x,
2239
+ M,
2130
2240
  L,
2131
- P,
2241
+ F,
2132
2242
  p,
2133
2243
  H,
2134
- j
2244
+ K
2135
2245
  ]);
2136
- if (!x || !M) return null;
2137
- const te = L ? [0, -M.height * P, M.depth * r] : [0, 0, 0], Y = M.height, V = [
2138
- U[0] * c[0] * Y,
2139
- U[1] * c[1] * Y,
2140
- U[2] * c[2] * Y
2246
+ if (!R || !_) return null;
2247
+ const ne = L ? [0, -_.height * F, _.depth * r] : [0, 0, 0], V = _.height, W = [
2248
+ G[0] * c[0] * V,
2249
+ G[1] * c[1] * V,
2250
+ G[2] * c[2] * V
2141
2251
  ];
2142
- return /* @__PURE__ */ S(Me, { children: [
2143
- /* @__PURE__ */ S(
2252
+ return /* @__PURE__ */ w(ye, { children: [
2253
+ /* @__PURE__ */ w(
2144
2254
  "group",
2145
2255
  {
2146
- position: [M.centerX, M.centerY, M.boxCenterZ],
2147
- rotation: [M.rotationX, M.rotationY, M.rotationZ],
2256
+ position: [_.centerX, _.centerY, _.boxCenterZ],
2257
+ rotation: [_.rotationX, _.rotationY, _.rotationZ],
2148
2258
  children: [
2149
- /* @__PURE__ */ R("group", { scale: [M.width, M.height, M.depth], children: t > 0 && /* @__PURE__ */ S("mesh", { children: [
2150
- /* @__PURE__ */ R("boxGeometry", { args: [1, 1, 1] }),
2151
- /* @__PURE__ */ R("meshBasicMaterial", { color: l, wireframe: !0, transparent: !0, opacity: t })
2259
+ /* @__PURE__ */ T("group", { scale: [_.width, _.height, _.depth], children: t > 0 && /* @__PURE__ */ w("mesh", { children: [
2260
+ /* @__PURE__ */ T("boxGeometry", { args: [1, 1, 1] }),
2261
+ /* @__PURE__ */ T("meshBasicMaterial", { color: l, wireframe: !0, transparent: !0, opacity: t })
2152
2262
  ] }) }),
2153
- w && /* @__PURE__ */ S("mesh", { children: [
2154
- /* @__PURE__ */ R("sphereGeometry", { args: [6, 20, 20] }),
2155
- /* @__PURE__ */ R("meshBasicMaterial", { color: l })
2263
+ y && /* @__PURE__ */ w("mesh", { children: [
2264
+ /* @__PURE__ */ T("sphereGeometry", { args: [6, 20, 20] }),
2265
+ /* @__PURE__ */ T("meshBasicMaterial", { color: l })
2156
2266
  ] }),
2157
- b && /* @__PURE__ */ S("group", { position: te, children: [
2158
- /* @__PURE__ */ S("mesh", { rotation: [0, 0, Math.PI / 4], children: [
2159
- /* @__PURE__ */ R("ringGeometry", { args: [6, 8, 24] }),
2160
- /* @__PURE__ */ R("meshBasicMaterial", { color: "#f8fafc", side: J })
2267
+ I && /* @__PURE__ */ w("group", { position: ne, children: [
2268
+ /* @__PURE__ */ w("mesh", { rotation: [0, 0, Math.PI / 4], children: [
2269
+ /* @__PURE__ */ T("ringGeometry", { args: [6, 8, 24] }),
2270
+ /* @__PURE__ */ T("meshBasicMaterial", { color: "#f8fafc", side: $ })
2161
2271
  ] }),
2162
- /* @__PURE__ */ S("mesh", { rotation: [0, 0, Math.PI / 2], children: [
2163
- /* @__PURE__ */ R("planeGeometry", { args: [3, 16] }),
2164
- /* @__PURE__ */ R("meshBasicMaterial", { color: "#f8fafc", transparent: !0, opacity: 0.9, side: J })
2272
+ /* @__PURE__ */ w("mesh", { rotation: [0, 0, Math.PI / 2], children: [
2273
+ /* @__PURE__ */ T("planeGeometry", { args: [3, 16] }),
2274
+ /* @__PURE__ */ T("meshBasicMaterial", { color: "#f8fafc", transparent: !0, opacity: 0.9, side: $ })
2165
2275
  ] }),
2166
- /* @__PURE__ */ S("mesh", { children: [
2167
- /* @__PURE__ */ R("planeGeometry", { args: [16, 3] }),
2168
- /* @__PURE__ */ R("meshBasicMaterial", { color: "#f8fafc", transparent: !0, opacity: 0.9, side: J })
2276
+ /* @__PURE__ */ w("mesh", { children: [
2277
+ /* @__PURE__ */ T("planeGeometry", { args: [16, 3] }),
2278
+ /* @__PURE__ */ T("meshBasicMaterial", { color: "#f8fafc", transparent: !0, opacity: 0.9, side: $ })
2169
2279
  ] })
2170
2280
  ] }),
2171
- C && /* @__PURE__ */ S(Me, { children: [
2172
- h && /* @__PURE__ */ S("mesh", { position: a, scale: V, renderOrder: 20, children: [
2173
- /* @__PURE__ */ R("sphereGeometry", { args: [1, 24, 16] }),
2174
- /* @__PURE__ */ R(
2281
+ P && /* @__PURE__ */ w(ye, { children: [
2282
+ h && /* @__PURE__ */ w("mesh", { position: a, scale: W, renderOrder: 20, children: [
2283
+ /* @__PURE__ */ T("sphereGeometry", { args: [1, 24, 16] }),
2284
+ /* @__PURE__ */ T(
2175
2285
  "meshBasicMaterial",
2176
2286
  {
2177
2287
  color: "#facc15",
@@ -2183,57 +2293,57 @@ const $ = [0, 0, -10], U = [0.5, 0.5, 0.5], ze = 1, ue = /* @__PURE__ */ new Map
2183
2293
  }
2184
2294
  )
2185
2295
  ] }),
2186
- /* @__PURE__ */ R(
2187
- We,
2296
+ /* @__PURE__ */ T(
2297
+ Qe,
2188
2298
  {
2189
2299
  opacity: o,
2190
2300
  position: a,
2191
- scale: V,
2301
+ scale: W,
2192
2302
  showDebugMaterial: !0,
2193
- url: Q
2303
+ url: J
2194
2304
  }
2195
2305
  )
2196
2306
  ] })
2197
2307
  ]
2198
2308
  }
2199
2309
  ),
2200
- y && /* @__PURE__ */ R(
2310
+ S && /* @__PURE__ */ T(
2201
2311
  "group",
2202
2312
  {
2203
- position: [M.centerX, M.centerY, M.boxCenterZ],
2204
- rotation: [M.rotationX, M.rotationY, M.rotationZ],
2313
+ position: [_.centerX, _.centerY, _.boxCenterZ],
2314
+ rotation: [_.rotationX, _.rotationY, _.rotationZ],
2205
2315
  renderOrder: 10,
2206
- children: /* @__PURE__ */ S("group", { children: [
2207
- /* @__PURE__ */ S("mesh", { children: [
2208
- /* @__PURE__ */ R("sphereGeometry", { args: [6, 20, 20] }),
2209
- /* @__PURE__ */ R("meshBasicMaterial", { color: "#e2e8f0", depthTest: !1, depthWrite: !1 })
2316
+ children: /* @__PURE__ */ w("group", { children: [
2317
+ /* @__PURE__ */ w("mesh", { children: [
2318
+ /* @__PURE__ */ T("sphereGeometry", { args: [6, 20, 20] }),
2319
+ /* @__PURE__ */ T("meshBasicMaterial", { color: "#e2e8f0", depthTest: !1, depthWrite: !1 })
2210
2320
  ] }),
2211
- /* @__PURE__ */ S("mesh", { position: [18, 0, 0], rotation: [0, 0, -Math.PI / 2], children: [
2212
- /* @__PURE__ */ R("cylinderGeometry", { args: [1.6, 1.6, 24, 12] }),
2213
- /* @__PURE__ */ R("meshBasicMaterial", { color: "#ef4444", depthTest: !1, depthWrite: !1 })
2321
+ /* @__PURE__ */ w("mesh", { position: [18, 0, 0], rotation: [0, 0, -Math.PI / 2], children: [
2322
+ /* @__PURE__ */ T("cylinderGeometry", { args: [1.6, 1.6, 24, 12] }),
2323
+ /* @__PURE__ */ T("meshBasicMaterial", { color: "#ef4444", depthTest: !1, depthWrite: !1 })
2214
2324
  ] }),
2215
- /* @__PURE__ */ S("mesh", { position: [34, 0, 0], rotation: [0, 0, -Math.PI / 2], children: [
2216
- /* @__PURE__ */ R("coneGeometry", { args: [4.2, 12, 16] }),
2217
- /* @__PURE__ */ R("meshBasicMaterial", { color: "#ef4444", depthTest: !1, depthWrite: !1 })
2325
+ /* @__PURE__ */ w("mesh", { position: [34, 0, 0], rotation: [0, 0, -Math.PI / 2], children: [
2326
+ /* @__PURE__ */ T("coneGeometry", { args: [4.2, 12, 16] }),
2327
+ /* @__PURE__ */ T("meshBasicMaterial", { color: "#ef4444", depthTest: !1, depthWrite: !1 })
2218
2328
  ] }),
2219
- /* @__PURE__ */ S("mesh", { position: [0, 18, 0], children: [
2220
- /* @__PURE__ */ R("cylinderGeometry", { args: [1.6, 1.6, 24, 12] }),
2221
- /* @__PURE__ */ R("meshBasicMaterial", { color: "#22c55e", depthTest: !1, depthWrite: !1 })
2329
+ /* @__PURE__ */ w("mesh", { position: [0, 18, 0], children: [
2330
+ /* @__PURE__ */ T("cylinderGeometry", { args: [1.6, 1.6, 24, 12] }),
2331
+ /* @__PURE__ */ T("meshBasicMaterial", { color: "#22c55e", depthTest: !1, depthWrite: !1 })
2222
2332
  ] }),
2223
- /* @__PURE__ */ S("mesh", { position: [0, 34, 0], children: [
2224
- /* @__PURE__ */ R("coneGeometry", { args: [4.2, 12, 16] }),
2225
- /* @__PURE__ */ R("meshBasicMaterial", { color: "#22c55e", depthTest: !1, depthWrite: !1 })
2333
+ /* @__PURE__ */ w("mesh", { position: [0, 34, 0], children: [
2334
+ /* @__PURE__ */ T("coneGeometry", { args: [4.2, 12, 16] }),
2335
+ /* @__PURE__ */ T("meshBasicMaterial", { color: "#22c55e", depthTest: !1, depthWrite: !1 })
2226
2336
  ] }),
2227
- /* @__PURE__ */ S("mesh", { position: [0, 0, 18], rotation: [Math.PI / 2, 0, 0], children: [
2228
- /* @__PURE__ */ R("cylinderGeometry", { args: [1.6, 1.6, 24, 12] }),
2229
- /* @__PURE__ */ R("meshBasicMaterial", { color: "#3b82f6", depthTest: !1, depthWrite: !1 })
2337
+ /* @__PURE__ */ w("mesh", { position: [0, 0, 18], rotation: [Math.PI / 2, 0, 0], children: [
2338
+ /* @__PURE__ */ T("cylinderGeometry", { args: [1.6, 1.6, 24, 12] }),
2339
+ /* @__PURE__ */ T("meshBasicMaterial", { color: "#3b82f6", depthTest: !1, depthWrite: !1 })
2230
2340
  ] }),
2231
- /* @__PURE__ */ S("mesh", { position: [0, 0, 34], rotation: [Math.PI / 2, 0, 0], children: [
2232
- /* @__PURE__ */ R("coneGeometry", { args: [4.2, 12, 16] }),
2233
- /* @__PURE__ */ R("meshBasicMaterial", { color: "#3b82f6", depthTest: !1, depthWrite: !1 })
2341
+ /* @__PURE__ */ w("mesh", { position: [0, 0, 34], rotation: [Math.PI / 2, 0, 0], children: [
2342
+ /* @__PURE__ */ T("coneGeometry", { args: [4.2, 12, 16] }),
2343
+ /* @__PURE__ */ T("meshBasicMaterial", { color: "#3b82f6", depthTest: !1, depthWrite: !1 })
2234
2344
  ] }),
2235
- /* @__PURE__ */ R(
2236
- oe,
2345
+ /* @__PURE__ */ T(
2346
+ ae,
2237
2347
  {
2238
2348
  position: [42, 0, 0],
2239
2349
  fontSize: 10,
@@ -2245,8 +2355,8 @@ const $ = [0, 0, -10], U = [0.5, 0.5, 0.5], ze = 1, ue = /* @__PURE__ */ new Map
2245
2355
  children: "X"
2246
2356
  }
2247
2357
  ),
2248
- /* @__PURE__ */ R(
2249
- oe,
2358
+ /* @__PURE__ */ T(
2359
+ ae,
2250
2360
  {
2251
2361
  position: [0, 42, 0],
2252
2362
  fontSize: 10,
@@ -2258,8 +2368,8 @@ const $ = [0, 0, -10], U = [0.5, 0.5, 0.5], ze = 1, ue = /* @__PURE__ */ new Map
2258
2368
  children: "Y"
2259
2369
  }
2260
2370
  ),
2261
- /* @__PURE__ */ R(
2262
- oe,
2371
+ /* @__PURE__ */ T(
2372
+ ae,
2263
2373
  {
2264
2374
  position: [0, 0, 42],
2265
2375
  fontSize: 10,
@@ -2277,57 +2387,60 @@ const $ = [0, 0, -10], U = [0.5, 0.5, 0.5], ze = 1, ue = /* @__PURE__ */ new Map
2277
2387
  ] });
2278
2388
  };
2279
2389
  export {
2280
- Qn as CANONICAL_FACE_MESH_GEOMETRY_SPECS,
2281
- Jn as CanonicalFaceMeshRenderer,
2282
- $n as DEFAULT_APPEARANCE,
2283
- es as DEFAULT_FACE_MESH_RENDERER,
2284
- ts as DEFAULT_FACE_MESH_TRANSFORM,
2285
- Ms as DEFAULT_FACE_WARP_3D_SETTINGS,
2286
- ns as DEFAULT_MASKING,
2287
- ss as FACE_MESH_ALPHA_MAPS,
2288
- rs as FACE_MESH_BLEND_MODES,
2289
- is as FACE_MESH_MASK_TEXTURE_SOURCES,
2290
- os as FACE_MESH_MATERIAL_TYPES,
2291
- as as FACE_MESH_SHADER_PRESETS,
2292
- cs as FACE_MESH_SIDES,
2293
- ls as FACE_MESH_TEXTURE_MAPS,
2294
- ws as FACE_RETOUCH_DEFAULT_CONTROLS,
2295
- Ss as FACE_RETOUCH_SETTINGS_FIELDS,
2296
- ys as FACE_WARP_3D_PRESET,
2297
- us as FaceMeshMaterial,
2298
- hs as FaceMeshRenderer,
2299
- Ls as FaceRetouch,
2300
- ze as HEAD_OCCLUDER_DEFAULT_OPACITY,
2301
- $ as HEAD_OCCLUDER_DEFAULT_POSITION,
2302
- U as HEAD_OCCLUDER_DEFAULT_SCALE,
2303
- vn as HeadBinding,
2304
- Wn as HeadBindingOccluder,
2305
- We as HeadOccluder,
2306
- bs as alphaMapOptions,
2307
- ds as blendModeIndices,
2308
- Is as blendModeOptions,
2309
- fs as canonicalFaceAlphaMaskUrl,
2310
- ps as canonicalFaceTextureStyle2Url,
2311
- ms as canonicalFaceTextureUrl,
2312
- Vn as computeAdaptiveVerticalFit,
2313
- On as computeHeadBindingCubePose,
2314
- zn as computeHeadBindingDebugMetrics,
2315
- Pn as computeHeadBindingShape,
2316
- Yn as computeUniversalHeadDepthOffset,
2317
- jn as computeUniversalOccluderScale,
2318
- Xn as computeUniversalPitchOffsetY,
2319
- Kn as computeUniversalYawOffsetX,
2320
- gs as mapFaceMeshRendererSettingsToProps,
2321
- Ns as materialTypeOptions,
2322
- As as parseCanonicalFaceModel,
2323
- Cs as patchFaceRetouchControls,
2324
- Ts as resolveFaceMeshRendererSettings,
2325
- Ps as resolveFaceRetouchControls,
2326
- Fs as shaderPresetOptions,
2327
- Os as sideOptions,
2328
- Qe as solveHeadBinding,
2329
- Es as supportsBlendMode,
2330
- xs as supportsTexturePanel,
2331
- Ds as textureMapOptions,
2332
- Rs as useCanonicalFaceMesh
2390
+ is as CANONICAL_FACE_MESH_GEOMETRY_SPECS,
2391
+ Vt as CanonicalFaceMeshRenderer,
2392
+ os as DEFAULT_APPEARANCE,
2393
+ as as DEFAULT_FACE_MESH_RENDERER,
2394
+ cs as DEFAULT_FACE_MESH_TRANSFORM,
2395
+ Ns as DEFAULT_FACE_WARP_3D_SETTINGS,
2396
+ X as DEFAULT_LIP_EFFECT,
2397
+ ls as DEFAULT_MASKING,
2398
+ us as FACE_MESH_ALPHA_MAPS,
2399
+ hs as FACE_MESH_BLEND_MODES,
2400
+ ds as FACE_MESH_MASK_TEXTURE_SOURCES,
2401
+ fs as FACE_MESH_MATERIAL_TYPES,
2402
+ ps as FACE_MESH_SHADER_PRESETS,
2403
+ ms as FACE_MESH_SIDES,
2404
+ gs as FACE_MESH_TEXTURE_MAPS,
2405
+ Cs as FACE_RETOUCH_DEFAULT_CONTROLS,
2406
+ Ps as FACE_RETOUCH_SETTINGS_FIELDS,
2407
+ Fs as FACE_WARP_3D_PRESET,
2408
+ As as FaceMeshMaterial,
2409
+ Ts as FaceMeshRenderer,
2410
+ Os as FaceRetouch,
2411
+ Ze as HEAD_OCCLUDER_DEFAULT_OPACITY,
2412
+ ee as HEAD_OCCLUDER_DEFAULT_POSITION,
2413
+ G as HEAD_OCCLUDER_DEFAULT_SCALE,
2414
+ qn as HeadBinding,
2415
+ ns as HeadBindingOccluder,
2416
+ Qe as HeadOccluder,
2417
+ zn as LipEffect,
2418
+ Wt as LipEffectMaterial,
2419
+ Ds as alphaMapOptions,
2420
+ Es as blendModeIndices,
2421
+ vs as blendModeOptions,
2422
+ xs as canonicalFaceAlphaMaskUrl,
2423
+ Rs as canonicalFaceTextureStyle2Url,
2424
+ Ms as canonicalFaceTextureUrl,
2425
+ es as computeAdaptiveVerticalFit,
2426
+ Bn as computeHeadBindingCubePose,
2427
+ ts as computeHeadBindingDebugMetrics,
2428
+ Hn as computeHeadBindingShape,
2429
+ $n as computeUniversalHeadDepthOffset,
2430
+ Zn as computeUniversalOccluderScale,
2431
+ Jn as computeUniversalPitchOffsetY,
2432
+ Qn as computeUniversalYawOffsetX,
2433
+ _s as mapFaceMeshRendererSettingsToProps,
2434
+ Hs as materialTypeOptions,
2435
+ ys as parseCanonicalFaceModel,
2436
+ ks as patchFaceRetouchControls,
2437
+ ws as resolveFaceMeshRendererSettings,
2438
+ Bs as resolveFaceRetouchControls,
2439
+ Us as shaderPresetOptions,
2440
+ Gs as sideOptions,
2441
+ et as solveHeadBinding,
2442
+ Ss as supportsBlendMode,
2443
+ Ls as supportsTexturePanel,
2444
+ js as textureMapOptions,
2445
+ bs as useCanonicalFaceMesh
2333
2446
  };