mbt-3d 0.3.7 → 0.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mbt-3d.js CHANGED
@@ -1,21 +1,21 @@
1
- import { Suspense as G, useMemo as B, useRef as A, useEffect as L, useCallback as I, createContext as ce, useContext as ue, forwardRef as te, useImperativeHandle as re, useState as me } from "react";
2
- import { ContactShadows as pe, Environment as fe, OrbitControls as de, useTexture as ge, useGLTF as U, useAnimations as he } from "@react-three/drei";
3
- import * as E from "three";
4
- import * as oe from "three/examples/jsm/utils/SkeletonUtils.js";
5
- import { Canvas as Me, useThree as ne, useFrame as V, createPortal as ye } from "@react-three/fiber";
1
+ import { useState as Y, useRef as v, useCallback as C, useEffect as L, Suspense as V, useMemo as D, createContext as ue, useContext as me, forwardRef as oe, useImperativeHandle as ne } from "react";
2
+ import { ContactShadows as pe, Environment as de, OrbitControls as fe, useProgress as ge, useTexture as he, useGLTF as U, useAnimations as Me } from "@react-three/drei";
3
+ import * as R from "three";
4
+ import * as se from "three/examples/jsm/utils/SkeletonUtils.js";
5
+ import { Canvas as ye, useThree as ae, useFrame as Z, createPortal as be } from "@react-three/fiber";
6
6
  import { KTX2Loader as Te } from "three/examples/jsm/loaders/KTX2Loader.js";
7
- import { jsx as x, jsxs as se } from "react/jsx-runtime";
8
- function be({
7
+ import { jsxs as _, jsx as b } from "react/jsx-runtime";
8
+ function Se({
9
9
  position: t,
10
10
  controlsConfig: e
11
11
  }) {
12
- const { camera: n } = ne(), a = A(null);
12
+ const { camera: r } = ae(), i = v(null);
13
13
  return L(() => {
14
- t && n && (n.position.set(t[0], t[1], t[2]), n.updateProjectionMatrix(), a.current && (a.current.target.set(0, 0, 0), a.current.update()));
15
- }, [t, n]), /* @__PURE__ */ x(
16
- de,
14
+ t && r && (r.position.set(t[0], t[1], t[2]), r.updateProjectionMatrix(), i.current && (i.current.target.set(0, 0, 0), i.current.update()));
15
+ }, [t, r]), /* @__PURE__ */ b(
16
+ fe,
17
17
  {
18
- ref: a,
18
+ ref: i,
19
19
  makeDefault: !0,
20
20
  enabled: e.enabled,
21
21
  enablePan: e.enablePan,
@@ -30,48 +30,48 @@ function be({
30
30
  }
31
31
  );
32
32
  }
33
- function Se({ background: t }) {
33
+ function $e({ background: t }) {
34
34
  const e = t == null ? void 0 : t.startsWith("#");
35
- return t ? e ? /* @__PURE__ */ x("color", { attach: "background", args: [t] }) : /* @__PURE__ */ x($e, { url: t }) : null;
35
+ return t ? e ? /* @__PURE__ */ b("color", { attach: "background", args: [t] }) : /* @__PURE__ */ b(xe, { url: t }) : null;
36
36
  }
37
- function $e({ url: t }) {
38
- const e = ge(t);
39
- return B(() => {
40
- e.colorSpace = E.SRGBColorSpace;
41
- }, [e]), /* @__PURE__ */ x("primitive", { attach: "background", object: e });
37
+ function xe({ url: t }) {
38
+ const e = he(t);
39
+ return D(() => {
40
+ e.colorSpace = R.SRGBColorSpace;
41
+ }, [e]), /* @__PURE__ */ b("primitive", { attach: "background", object: e });
42
42
  }
43
- function xe({ config: t }) {
44
- return /* @__PURE__ */ x(
45
- fe,
43
+ function we({ config: t }) {
44
+ return /* @__PURE__ */ b(
45
+ de,
46
46
  {
47
47
  files: t.files,
48
48
  background: t.background ?? !1,
49
49
  blur: t.blur ?? 0,
50
- children: /* @__PURE__ */ x("group", { scale: t.intensity ?? 1, children: /* @__PURE__ */ x("ambientLight", { intensity: 0 }) })
50
+ children: /* @__PURE__ */ b("group", { scale: t.intensity ?? 1, children: /* @__PURE__ */ b("ambientLight", { intensity: 0 }) })
51
51
  }
52
52
  );
53
53
  }
54
- function we({ config: t }) {
54
+ function Ae({ config: t }) {
55
55
  switch (t.type) {
56
56
  case "spot": {
57
57
  const {
58
58
  position: e = [5, 10, 5],
59
- intensity: n = 50,
60
- castShadow: a = !0,
59
+ intensity: r = 50,
60
+ castShadow: i = !0,
61
61
  angle: l = Math.PI / 6,
62
- penumbra: d = 0.5,
62
+ penumbra: f = 0.5,
63
63
  decay: M = 2,
64
64
  distance: T = 0,
65
65
  color: g = "#ffffff"
66
66
  } = t;
67
- return /* @__PURE__ */ x(
67
+ return /* @__PURE__ */ b(
68
68
  "spotLight",
69
69
  {
70
70
  position: e,
71
- intensity: n,
72
- castShadow: a,
71
+ intensity: r,
72
+ castShadow: i,
73
73
  angle: l,
74
- penumbra: d,
74
+ penumbra: f,
75
75
  decay: M,
76
76
  distance: T,
77
77
  color: g
@@ -81,20 +81,20 @@ function we({ config: t }) {
81
81
  case "point": {
82
82
  const {
83
83
  position: e = [0, 5, 0],
84
- intensity: n = 20,
85
- color: a = "#ffffff",
84
+ intensity: r = 20,
85
+ color: i = "#ffffff",
86
86
  distance: l = 0,
87
- decay: d = 2,
87
+ decay: f = 2,
88
88
  castShadow: M = !1
89
89
  } = t;
90
- return /* @__PURE__ */ x(
90
+ return /* @__PURE__ */ b(
91
91
  "pointLight",
92
92
  {
93
93
  position: e,
94
- intensity: n,
95
- color: a,
94
+ intensity: r,
95
+ color: i,
96
96
  distance: l,
97
- decay: d,
97
+ decay: f,
98
98
  castShadow: M
99
99
  }
100
100
  );
@@ -102,16 +102,16 @@ function we({ config: t }) {
102
102
  case "directional": {
103
103
  const {
104
104
  position: e = [10, 20, 10],
105
- intensity: n = 40,
106
- color: a = "#ffffff",
105
+ intensity: r = 40,
106
+ color: i = "#ffffff",
107
107
  castShadow: l = !0
108
108
  } = t;
109
- return /* @__PURE__ */ x(
109
+ return /* @__PURE__ */ b(
110
110
  "directionalLight",
111
111
  {
112
112
  position: e,
113
- intensity: n,
114
- color: a,
113
+ intensity: r,
114
+ color: i,
115
115
  castShadow: l
116
116
  }
117
117
  );
@@ -119,14 +119,14 @@ function we({ config: t }) {
119
119
  case "hemisphere": {
120
120
  const {
121
121
  skyColor: e = "#ffffff",
122
- groundColor: n = "#444444",
123
- intensity: a = 0.5,
122
+ groundColor: r = "#444444",
123
+ intensity: i = 0.5,
124
124
  position: l = [0, 10, 0]
125
- } = t, d = B(() => new E.Color(e), [e]), M = B(() => new E.Color(n), [n]);
126
- return /* @__PURE__ */ x(
125
+ } = t, f = D(() => new R.Color(e), [e]), M = D(() => new R.Color(r), [r]);
126
+ return /* @__PURE__ */ b(
127
127
  "hemisphereLight",
128
128
  {
129
- args: [d, M, a],
129
+ args: [f, M, i],
130
130
  position: l
131
131
  }
132
132
  );
@@ -134,13 +134,13 @@ function we({ config: t }) {
134
134
  case "ambient": {
135
135
  const {
136
136
  intensity: e = 0.5,
137
- color: n = "#ffffff"
137
+ color: r = "#ffffff"
138
138
  } = t;
139
- return /* @__PURE__ */ x(
139
+ return /* @__PURE__ */ b(
140
140
  "ambientLight",
141
141
  {
142
142
  intensity: e,
143
- color: n
143
+ color: r
144
144
  }
145
145
  );
146
146
  }
@@ -148,678 +148,763 @@ function we({ config: t }) {
148
148
  return null;
149
149
  }
150
150
  }
151
+ function ve({
152
+ onChange: t
153
+ }) {
154
+ const { active: e, progress: r } = ge();
155
+ return L(() => {
156
+ t(e, r);
157
+ }, [e, r, t]), null;
158
+ }
151
159
  function Xe({
152
160
  children: t,
153
161
  camera: e = {},
154
- controls: n = {},
155
- background: a,
162
+ controls: r = {},
163
+ background: i,
156
164
  shadows: l = !0,
157
- lights: d = [
165
+ lights: f = [
158
166
  { type: "ambient", intensity: 0.5 },
159
167
  { type: "spot", position: [5, 10, 5], intensity: 50, castShadow: !0 }
160
168
  ],
161
169
  environment: M,
162
170
  contactShadows: T = !0,
163
- style: g,
171
+ showLoadingOverlay: g = !0,
172
+ style: n,
164
173
  className: s
165
174
  }) {
166
- const r = {
175
+ const [c, d] = Y(!1), [h, o] = Y(0), a = v(null), u = C((E, p) => {
176
+ if (E) {
177
+ a.current !== null && (window.clearTimeout(a.current), a.current = null), d(!0), o(Math.max(0, Math.min(100, Math.round(p))));
178
+ return;
179
+ }
180
+ o(100), a.current = window.setTimeout(() => {
181
+ d(!1), o(0), a.current = null;
182
+ }, 200);
183
+ }, []);
184
+ L(() => () => {
185
+ a.current !== null && window.clearTimeout(a.current);
186
+ }, []);
187
+ const S = {
167
188
  position: e.position || [0, 2, 5],
168
189
  fov: e.fov || 45
169
- }, c = {
170
- enabled: n.enabled ?? !0,
171
- enablePan: n.enablePan ?? !0,
172
- enableZoom: n.enableZoom ?? !0,
173
- enableRotate: n.enableRotate ?? !0,
174
- minDistance: n.minDistance,
175
- maxDistance: n.maxDistance,
176
- minPolarAngle: n.minPolarAngle,
177
- maxPolarAngle: n.maxPolarAngle,
178
- autoRotate: n.autoRotate ?? !1,
179
- autoRotateSpeed: n.autoRotateSpeed ?? 2
180
- }, u = typeof T == "object" ? {
190
+ }, m = {
191
+ enabled: r.enabled ?? !0,
192
+ enablePan: r.enablePan ?? !0,
193
+ enableZoom: r.enableZoom ?? !0,
194
+ enableRotate: r.enableRotate ?? !0,
195
+ minDistance: r.minDistance,
196
+ maxDistance: r.maxDistance,
197
+ minPolarAngle: r.minPolarAngle,
198
+ maxPolarAngle: r.maxPolarAngle,
199
+ autoRotate: r.autoRotate ?? !1,
200
+ autoRotateSpeed: r.autoRotateSpeed ?? 2
201
+ }, w = typeof T == "object" ? {
181
202
  position: T.position || [0, -1, 0],
182
203
  opacity: T.opacity ?? 0.5,
183
204
  blur: T.blur ?? 2
184
205
  } : T ? { position: [0, -1, 0], opacity: 0.5, blur: 2 } : null;
185
- return /* @__PURE__ */ x("div", { style: g, className: s, children: /* @__PURE__ */ se(
186
- Me,
187
- {
188
- shadows: l,
189
- camera: {
190
- position: r.position,
191
- fov: r.fov
192
- },
193
- style: { width: "100%", height: "100%" },
194
- children: [
195
- /* @__PURE__ */ x(G, { fallback: null, children: /* @__PURE__ */ x(Se, { background: a }) }),
196
- M && /* @__PURE__ */ x(G, { fallback: null, children: /* @__PURE__ */ x(xe, { config: M }) }),
197
- d.map((h, o) => /* @__PURE__ */ x(we, { config: h }, `${h.type}-${o}`)),
198
- /* @__PURE__ */ x(G, { fallback: null, children: t }),
199
- /* @__PURE__ */ x(
200
- be,
201
- {
202
- position: r.position,
203
- controlsConfig: c
204
- }
205
- ),
206
- u && /* @__PURE__ */ x(
207
- pe,
206
+ return /* @__PURE__ */ _("div", { style: { ...n || {}, position: (n == null ? void 0 : n.position) ?? "relative" }, className: s, children: [
207
+ /* @__PURE__ */ _(
208
+ ye,
209
+ {
210
+ shadows: l,
211
+ camera: {
212
+ position: S.position,
213
+ fov: S.fov
214
+ },
215
+ style: { width: "100%", height: "100%" },
216
+ children: [
217
+ /* @__PURE__ */ b(V, { fallback: null, children: /* @__PURE__ */ b($e, { background: i }) }),
218
+ M && /* @__PURE__ */ b(V, { fallback: null, children: /* @__PURE__ */ b(we, { config: M }) }),
219
+ f.map((E, p) => /* @__PURE__ */ b(Ae, { config: E }, `${E.type}-${p}`)),
220
+ /* @__PURE__ */ b(V, { fallback: null, children: t }),
221
+ /* @__PURE__ */ b(
222
+ Se,
223
+ {
224
+ position: S.position,
225
+ controlsConfig: m
226
+ }
227
+ ),
228
+ w && /* @__PURE__ */ b(
229
+ pe,
230
+ {
231
+ position: w.position,
232
+ opacity: w.opacity,
233
+ blur: w.blur
234
+ }
235
+ ),
236
+ /* @__PURE__ */ b(ve, { onChange: u })
237
+ ]
238
+ }
239
+ ),
240
+ g && c && /* @__PURE__ */ b(
241
+ "div",
242
+ {
243
+ style: {
244
+ position: "absolute",
245
+ inset: 0,
246
+ background: "rgba(8, 10, 16, 0.46)",
247
+ display: "flex",
248
+ alignItems: "center",
249
+ justifyContent: "center",
250
+ pointerEvents: "none",
251
+ zIndex: 10
252
+ },
253
+ children: /* @__PURE__ */ _(
254
+ "div",
208
255
  {
209
- position: u.position,
210
- opacity: u.opacity,
211
- blur: u.blur
256
+ style: {
257
+ minWidth: 220,
258
+ padding: "16px 18px",
259
+ borderRadius: 14,
260
+ border: "1px solid rgba(255,255,255,0.2)",
261
+ background: "linear-gradient(180deg, rgba(18,24,36,0.9), rgba(13,17,27,0.9))",
262
+ color: "#eef3ff",
263
+ boxShadow: "0 10px 30px rgba(0,0,0,0.35)",
264
+ fontFamily: "system-ui, -apple-system, Segoe UI, sans-serif",
265
+ textAlign: "center"
266
+ },
267
+ children: [
268
+ /* @__PURE__ */ b("div", { style: { display: "flex", justifyContent: "center", marginBottom: 10 }, children: /* @__PURE__ */ _("svg", { width: "34", height: "34", viewBox: "0 0 34 34", "aria-hidden": "true", children: [
269
+ /* @__PURE__ */ b("circle", { cx: "17", cy: "17", r: "14", fill: "none", stroke: "rgba(255,255,255,0.2)", strokeWidth: "4" }),
270
+ /* @__PURE__ */ b(
271
+ "path",
272
+ {
273
+ d: "M31 17a14 14 0 0 1-14 14",
274
+ fill: "none",
275
+ stroke: "#67b4ff",
276
+ strokeWidth: "4",
277
+ strokeLinecap: "round",
278
+ children: /* @__PURE__ */ b(
279
+ "animateTransform",
280
+ {
281
+ attributeName: "transform",
282
+ type: "rotate",
283
+ from: "0 17 17",
284
+ to: "360 17 17",
285
+ dur: "0.9s",
286
+ repeatCount: "indefinite"
287
+ }
288
+ )
289
+ }
290
+ )
291
+ ] }) }),
292
+ /* @__PURE__ */ _("div", { style: { fontSize: 12, opacity: 0.82, marginTop: 4 }, children: [
293
+ h,
294
+ "%"
295
+ ] })
296
+ ]
212
297
  }
213
298
  )
214
- ]
215
- }
216
- ) });
299
+ }
300
+ )
301
+ ] });
217
302
  }
218
- function Y(t, e) {
219
- const n = A(/* @__PURE__ */ new Map()), a = A({}), l = A({});
303
+ function q(t, e) {
304
+ const r = v(/* @__PURE__ */ new Map()), i = v({}), l = v({});
220
305
  L(() => {
221
- e && (a.current = { ...e });
306
+ e && (i.current = { ...e });
222
307
  }, [e]), L(() => {
223
308
  if (!t) return;
224
309
  const g = /* @__PURE__ */ new Map();
225
- t.traverse((s) => {
226
- if (s.isMesh) {
227
- const r = s;
228
- r.name && g.set(r.name, r);
310
+ t.traverse((n) => {
311
+ if (n.isMesh) {
312
+ const s = n;
313
+ s.name && g.set(s.name, s);
229
314
  }
230
- }), n.current = g;
231
- }, [t]), V(() => {
232
- const g = n.current;
315
+ }), r.current = g;
316
+ }, [t]), Z(() => {
317
+ const g = r.current;
233
318
  if (g.size === 0) return;
234
- const s = { ...a.current, ...l.current };
235
- for (const [r, c] of Object.entries(s)) {
236
- const u = g.get(r);
237
- u && u.visible !== c && (u.visible = c);
319
+ const n = { ...i.current, ...l.current };
320
+ for (const [s, c] of Object.entries(n)) {
321
+ const d = g.get(s);
322
+ d && d.visible !== c && (d.visible = c);
238
323
  }
239
324
  });
240
- const d = I((g, s) => {
241
- l.current[g] = s;
242
- const r = n.current.get(g);
243
- r && (r.visible = s);
244
- }, []), M = I(() => Array.from(n.current.keys()).sort(), []), T = I(() => {
325
+ const f = C((g, n) => {
326
+ l.current[g] = n;
327
+ const s = r.current.get(g);
328
+ s && (s.visible = n);
329
+ }, []), M = C(() => Array.from(r.current.keys()).sort(), []), T = C(() => {
245
330
  const g = {};
246
- return n.current.forEach((s, r) => {
247
- g[r] = s.visible;
331
+ return r.current.forEach((n, s) => {
332
+ g[s] = n.visible;
248
333
  }), g;
249
334
  }, []);
250
335
  return {
251
- setMeshVisibility: d,
336
+ setMeshVisibility: f,
252
337
  getMeshNames: M,
253
338
  getMeshVisibility: T
254
339
  };
255
340
  }
256
- function Z(t, e) {
257
- const n = A(/* @__PURE__ */ new Map()), a = A(/* @__PURE__ */ new Map());
341
+ function J(t, e) {
342
+ const r = v(/* @__PURE__ */ new Map()), i = v(/* @__PURE__ */ new Map());
258
343
  L(() => {
259
344
  if (!t) return;
260
- const s = /* @__PURE__ */ new Map();
261
- t.traverse((r) => {
262
- if (r.isMesh) {
263
- const c = r;
345
+ const n = /* @__PURE__ */ new Map();
346
+ t.traverse((s) => {
347
+ if (s.isMesh) {
348
+ const c = s;
264
349
  (Array.isArray(c.material) ? c.material : [c.material]).forEach((h) => {
265
- h.name && !s.has(h.name) && s.set(h.name, h);
350
+ h.name && !n.has(h.name) && n.set(h.name, h);
266
351
  });
267
352
  }
268
- }), n.current = s, e && Object.entries(e).forEach(([r, c]) => {
269
- const u = s.get(r);
270
- if (u && !Array.isArray(u)) {
353
+ }), r.current = n, e && Object.entries(e).forEach(([s, c]) => {
354
+ const d = n.get(s);
355
+ if (d && !Array.isArray(d)) {
271
356
  const h = l(c);
272
- u.color && u.color.copy(h), a.current.set(r, h);
357
+ d.color && d.color.copy(h), i.current.set(s, h);
273
358
  }
274
359
  });
275
- }, [t, e]), V(() => {
276
- a.current.forEach((s, r) => {
277
- const c = n.current.get(r);
360
+ }, [t, e]), Z(() => {
361
+ i.current.forEach((n, s) => {
362
+ const c = r.current.get(s);
278
363
  if (c && !Array.isArray(c)) {
279
- const u = c;
280
- u.color && !u.color.equals(s) && (u.color.copy(s), u.needsUpdate = !0);
364
+ const d = c;
365
+ d.color && !d.color.equals(n) && (d.color.copy(n), d.needsUpdate = !0);
281
366
  }
282
367
  });
283
368
  });
284
- const l = (s) => typeof s == "string" ? new E.Color(s) : new E.Color(s[0], s[1], s[2]), d = I((s, r) => {
285
- const c = l(r);
286
- a.current.set(s, c);
287
- const u = n.current.get(s);
288
- if (u && !Array.isArray(u)) {
289
- const h = u;
369
+ const l = (n) => typeof n == "string" ? new R.Color(n) : new R.Color(n[0], n[1], n[2]), f = C((n, s) => {
370
+ const c = l(s);
371
+ i.current.set(n, c);
372
+ const d = r.current.get(n);
373
+ if (d && !Array.isArray(d)) {
374
+ const h = d;
290
375
  h.color && (h.color.copy(c), h.needsUpdate = !0);
291
376
  }
292
- }, []), M = I(() => Array.from(n.current.keys()).sort(), []), T = I((s) => {
293
- const r = n.current.get(s);
294
- if (r && !Array.isArray(r)) {
295
- const c = r;
377
+ }, []), M = C(() => Array.from(r.current.keys()).sort(), []), T = C((n) => {
378
+ const s = r.current.get(n);
379
+ if (s && !Array.isArray(s)) {
380
+ const c = s;
296
381
  if (c.color)
297
382
  return "#" + c.color.getHexString();
298
383
  }
299
384
  return null;
300
- }, []), g = I(() => {
301
- const s = {};
302
- return n.current.forEach((r, c) => {
303
- if (!Array.isArray(r)) {
304
- const u = r;
305
- u.color && (s[c] = "#" + u.color.getHexString());
385
+ }, []), g = C(() => {
386
+ const n = {};
387
+ return r.current.forEach((s, c) => {
388
+ if (!Array.isArray(s)) {
389
+ const d = s;
390
+ d.color && (n[c] = "#" + d.color.getHexString());
306
391
  }
307
- }), s;
392
+ }), n;
308
393
  }, []);
309
394
  return {
310
- setMaterialColor: d,
395
+ setMaterialColor: f,
311
396
  getMaterialNames: M,
312
397
  getMaterialColor: T,
313
398
  getAllMaterialColors: g
314
399
  };
315
400
  }
316
- function z(t) {
401
+ function G(t) {
317
402
  const e = t.toLowerCase();
318
403
  if (e.endsWith(".ktx2")) return !0;
319
404
  try {
320
- const n = new URL(t, window.location.origin), a = decodeURIComponent(n.hash.replace(/^#/, "")).toLowerCase(), l = decodeURIComponent(n.search).toLowerCase(), d = decodeURIComponent(n.pathname).toLowerCase();
321
- return a.endsWith(".ktx2") || l.includes(".ktx2") || d.endsWith(".ktx2");
405
+ const r = new URL(t, window.location.origin), i = decodeURIComponent(r.hash.replace(/^#/, "")).toLowerCase(), l = decodeURIComponent(r.search).toLowerCase(), f = decodeURIComponent(r.pathname).toLowerCase();
406
+ return i.endsWith(".ktx2") || l.includes(".ktx2") || f.endsWith(".ktx2");
322
407
  } catch {
323
408
  return e.includes(".ktx2");
324
409
  }
325
410
  }
326
- function q(t, e) {
327
- const { gl: n } = ne(), a = A(/* @__PURE__ */ new Map()), l = A(new E.TextureLoader()), d = A(null), M = A(/* @__PURE__ */ new Map()), T = A(/* @__PURE__ */ new Set()), g = A("");
411
+ function Q(t, e) {
412
+ const { gl: r } = ae(), i = v(/* @__PURE__ */ new Map()), l = v(new R.TextureLoader()), f = v(null), M = v(/* @__PURE__ */ new Map()), T = v(/* @__PURE__ */ new Set()), g = v("");
328
413
  L(() => {
329
- if (!d.current)
414
+ if (!f.current)
330
415
  try {
331
416
  const o = typeof WebAssembly == "object" && typeof WebAssembly.validate == "function";
332
- console.log("[useMaterialTexture] Browser features:"), console.log(` WebAssembly supported: ${o}`), console.log(` WebGL2: ${n.capabilities.isWebGL2}`);
333
- const i = new Te();
334
- i.setTranscoderPath("/basis/"), i.detectSupport(n), d.current = i, console.log("[useMaterialTexture] ✅ KTX2Loader initialized"), console.log("[useMaterialTexture] Transcoder path: /basis/"), fetch("/basis/basis_transcoder.wasm").then((m) => {
335
- m.ok ? console.log("[useMaterialTexture] ✅ basis_transcoder.wasm is accessible") : console.error("[useMaterialTexture] ❌ basis_transcoder.wasm returned", m.status);
336
- }).catch((m) => {
337
- console.error("[useMaterialTexture] ❌ Failed to check basis_transcoder.wasm:", m);
417
+ console.log("[useMaterialTexture] Browser features:"), console.log(` WebAssembly supported: ${o}`), console.log(` WebGL2: ${r.capabilities.isWebGL2}`);
418
+ const a = new Te();
419
+ a.setTranscoderPath("/basis/"), a.detectSupport(r), f.current = a, console.log("[useMaterialTexture] ✅ KTX2Loader initialized"), console.log("[useMaterialTexture] Transcoder path: /basis/"), fetch("/basis/basis_transcoder.wasm").then((u) => {
420
+ u.ok ? console.log("[useMaterialTexture] ✅ basis_transcoder.wasm is accessible") : console.error("[useMaterialTexture] ❌ basis_transcoder.wasm returned", u.status);
421
+ }).catch((u) => {
422
+ console.error("[useMaterialTexture] ❌ Failed to check basis_transcoder.wasm:", u);
338
423
  }), o || (console.warn("[useMaterialTexture] ⚠️ WebAssembly not supported! KTX2 will fallback to CPU decoding (slow)"), console.warn("[useMaterialTexture] ⚠️ Recommend using WebP instead of KTX2 for this browser"));
339
424
  } catch (o) {
340
425
  console.error("[useMaterialTexture] ❌ Failed to initialize KTX2Loader:", o);
341
426
  }
342
427
  return () => {
343
- d.current && (d.current.dispose(), d.current = null);
428
+ f.current && (f.current.dispose(), f.current = null);
344
429
  };
345
- }, [n]), L(() => {
430
+ }, [r]), L(() => {
346
431
  if (!t) return;
347
432
  const o = /* @__PURE__ */ new Map();
348
- t.traverse((i) => {
349
- if (i.isMesh) {
350
- const m = i;
351
- (Array.isArray(m.material) ? m.material : [m.material]).forEach((p) => {
352
- p.name && !o.has(p.name) && o.set(p.name, p);
433
+ t.traverse((a) => {
434
+ if (a.isMesh) {
435
+ const u = a;
436
+ (Array.isArray(u.material) ? u.material : [u.material]).forEach((m) => {
437
+ m.name && !o.has(m.name) && o.set(m.name, m);
353
438
  });
354
439
  }
355
- }), a.current = o;
440
+ }), i.current = o;
356
441
  }, [t]);
357
- const s = I((o) => z(o) ? d.current ? d.current : (console.warn("[useMaterialTexture] KTX2Loader not initialized, falling back to TextureLoader"), l.current) : l.current, []);
442
+ const n = C((o) => G(o) ? f.current ? f.current : (console.warn("[useMaterialTexture] KTX2Loader not initialized, falling back to TextureLoader"), l.current) : l.current, []);
358
443
  L(() => {
359
444
  if (!e || !t) return;
360
- const o = a.current;
445
+ const o = i.current;
361
446
  if (o.size === 0) return;
362
- const i = JSON.stringify(e);
363
- if (g.current === i) {
447
+ const a = JSON.stringify(e);
448
+ if (g.current === a) {
364
449
  console.log("[useMaterialTexture] Textures unchanged, skipping reload");
365
450
  return;
366
451
  }
367
- g.current = i;
368
- let m = !1;
369
- const $ = /* @__PURE__ */ new Map();
370
- Object.entries(e).forEach(([f, S]) => {
371
- $.set(f, typeof S == "string" ? { map: S } : S);
372
- }), console.log("[useMaterialTexture] Starting texture load for", $.size, "materials");
373
- const p = [];
374
- $.forEach((f, S) => {
375
- var w, j;
376
- const D = o.get(S);
377
- if (!D || !D.isMeshStandardMaterial) {
378
- console.warn(`[useMaterialTexture] Material "${S}" not found or not MeshStandardMaterial`);
452
+ g.current = a;
453
+ let u = !1;
454
+ const S = /* @__PURE__ */ new Map();
455
+ Object.entries(e).forEach(([p, x]) => {
456
+ S.set(p, typeof x == "string" ? { map: x } : x);
457
+ }), console.log("[useMaterialTexture] Starting texture load for", S.size, "materials");
458
+ const m = [];
459
+ S.forEach((p, x) => {
460
+ var A, O;
461
+ const X = o.get(x);
462
+ if (!X || !X.isMeshStandardMaterial) {
463
+ console.warn(`[useMaterialTexture] Material "${x}" not found or not MeshStandardMaterial`);
379
464
  return;
380
465
  }
381
- const y = D;
382
- console.log(`[useMaterialTexture] 📋 Material "${S}" BEFORE reset:`), console.log(` - map: ${y.map ? "EXISTS" : "null"} ${y.map ? `(uuid: ${y.map.uuid})` : ""}`), console.log(` - normalMap: ${y.normalMap ? "EXISTS" : "null"}`), console.log(` - roughnessMap: ${y.roughnessMap ? "EXISTS" : "null"}`), console.log(` - metalnessMap: ${y.metalnessMap ? "EXISTS" : "null"}`), console.log(` - emissiveMap: ${y.emissiveMap ? "EXISTS" : "null"}`), console.log(` - aoMap: ${y.aoMap ? "EXISTS" : "null"}`), console.log(` - color: ${(w = y.color) == null ? void 0 : w.getHexString()}`), console.log(` - emissive: ${(j = y.emissive) == null ? void 0 : j.getHexString()}`), console.log(` - material uuid: ${y.uuid}`), Object.entries(f).forEach(([b, C]) => {
383
- if (!C) return;
384
- const k = b, O = y[k];
385
- O && (console.log(`[useMaterialTexture] 🗑️ Disposing old ${k} (uuid: ${O.uuid})`), O.dispose(), y[k] = null);
386
- }), f.emissiveMap && (y.emissive = new E.Color(0), y.emissiveIntensity = 0), y.needsUpdate = !0, y.color = new E.Color(16777215), console.log(`[useMaterialTexture] ✅ Material "${S}" AFTER reset: only specified maps cleared`), Object.entries(f).forEach(([b, C]) => {
387
- if (!C) return;
388
- const k = `${S}_${b}_${C}`, O = M.current.get(k);
389
- if (O) {
390
- console.log(`[useMaterialTexture] Using cached texture: ${S}.${b}`), m || r(y, b, O);
466
+ const y = X;
467
+ console.log(`[useMaterialTexture] 📋 Material "${x}" BEFORE reset:`), console.log(` - map: ${y.map ? "EXISTS" : "null"} ${y.map ? `(uuid: ${y.map.uuid})` : ""}`), console.log(` - normalMap: ${y.normalMap ? "EXISTS" : "null"}`), console.log(` - roughnessMap: ${y.roughnessMap ? "EXISTS" : "null"}`), console.log(` - metalnessMap: ${y.metalnessMap ? "EXISTS" : "null"}`), console.log(` - emissiveMap: ${y.emissiveMap ? "EXISTS" : "null"}`), console.log(` - aoMap: ${y.aoMap ? "EXISTS" : "null"}`), console.log(` - color: ${(A = y.color) == null ? void 0 : A.getHexString()}`), console.log(` - emissive: ${(O = y.emissive) == null ? void 0 : O.getHexString()}`), console.log(` - material uuid: ${y.uuid}`), Object.entries(p).forEach(([$, k]) => {
468
+ if (!k) return;
469
+ const I = $, j = y[I];
470
+ j && (console.log(`[useMaterialTexture] 🗑️ Disposing old ${I} (uuid: ${j.uuid})`), j.dispose(), y[I] = null);
471
+ }), p.emissiveMap && (y.emissive = new R.Color(0), y.emissiveIntensity = 0), y.needsUpdate = !0, y.color = new R.Color(16777215), console.log(`[useMaterialTexture] ✅ Material "${x}" AFTER reset: only specified maps cleared`), Object.entries(p).forEach(([$, k]) => {
472
+ if (!k) return;
473
+ const I = `${x}_${$}_${k}`, j = M.current.get(I);
474
+ if (j) {
475
+ console.log(`[useMaterialTexture] Using cached texture: ${x}.${$}`), u || s(y, $, j);
391
476
  return;
392
477
  }
393
- if (T.current.has(k)) {
394
- console.log(`[useMaterialTexture] Skipping already loading: ${S}.${b}`);
478
+ if (T.current.has(I)) {
479
+ console.log(`[useMaterialTexture] Skipping already loading: ${x}.${$}`);
395
480
  return;
396
481
  }
397
- p.push({ materialName: S, textureType: b, url: C, material: y });
482
+ m.push({ materialName: x, textureType: $, url: k, material: y });
398
483
  });
399
- }), console.log(`[useMaterialTexture] Queued ${p.length} textures to load`);
400
- let v = 0;
401
- const R = () => {
402
- if (m || v >= p.length) {
403
- console.log("[useMaterialTexture] ✅ All textures loaded"), console.log("[useMaterialTexture] 📊 FINAL material states:"), o.forEach((w, j) => {
404
- var C, k;
405
- const b = w;
406
- console.log(` Material "${j}":`), console.log(` - map: ${b.map ? "EXISTS" : "null"} ${b.map ? `(colorSpace: ${b.map.colorSpace})` : ""}`), console.log(` - normalMap: ${b.normalMap ? "EXISTS" : "null"}`), console.log(` - roughnessMap: ${b.roughnessMap ? "EXISTS" : "null"}`), console.log(` - metalnessMap: ${b.metalnessMap ? "EXISTS" : "null"}`), console.log(` - emissiveMap: ${b.emissiveMap ? "EXISTS" : "null"}`), console.log(` - color: ${(C = b.color) == null ? void 0 : C.getHexString()}`), console.log(` - emissive: ${(k = b.emissive) == null ? void 0 : k.getHexString()}`), console.log(` - emissiveIntensity: ${b.emissiveIntensity}`), console.log(` - roughness: ${b.roughness}`), console.log(` - metalness: ${b.metalness}`);
484
+ }), console.log(`[useMaterialTexture] Queued ${m.length} textures to load`);
485
+ let w = 0;
486
+ const E = () => {
487
+ if (u || w >= m.length) {
488
+ console.log("[useMaterialTexture] ✅ All textures loaded"), console.log("[useMaterialTexture] 📊 FINAL material states:"), o.forEach((A, O) => {
489
+ var k, I;
490
+ const $ = A;
491
+ console.log(` Material "${O}":`), console.log(` - map: ${$.map ? "EXISTS" : "null"} ${$.map ? `(colorSpace: ${$.map.colorSpace})` : ""}`), console.log(` - normalMap: ${$.normalMap ? "EXISTS" : "null"}`), console.log(` - roughnessMap: ${$.roughnessMap ? "EXISTS" : "null"}`), console.log(` - metalnessMap: ${$.metalnessMap ? "EXISTS" : "null"}`), console.log(` - emissiveMap: ${$.emissiveMap ? "EXISTS" : "null"}`), console.log(` - color: ${(k = $.color) == null ? void 0 : k.getHexString()}`), console.log(` - emissive: ${(I = $.emissive) == null ? void 0 : I.getHexString()}`), console.log(` - emissiveIntensity: ${$.emissiveIntensity}`), console.log(` - roughness: ${$.roughness}`), console.log(` - metalness: ${$.metalness}`);
407
492
  });
408
493
  return;
409
494
  }
410
- const f = p[v++], S = `${f.materialName}_${f.textureType}_${f.url}`;
411
- console.log(`[useMaterialTexture] Loading (${v}/${p.length}): ${f.materialName}.${f.textureType} from ${f.url}`), T.current.add(S);
412
- const D = s(f.url), y = z(f.url) ? "KTX2Loader" : "TextureLoader";
413
- console.log(`[useMaterialTexture] Using ${y} for ${f.url}`), D.load(
414
- f.url,
415
- (w) => {
416
- var k, O, W, N, X, H;
417
- if (T.current.delete(S), m) {
418
- console.log(`[useMaterialTexture] Disposed, cleaning up texture: ${f.materialName}.${f.textureType}`), w.dispose();
495
+ const p = m[w++], x = `${p.materialName}_${p.textureType}_${p.url}`;
496
+ console.log(`[useMaterialTexture] Loading (${w}/${m.length}): ${p.materialName}.${p.textureType} from ${p.url}`), T.current.add(x);
497
+ const X = n(p.url), y = G(p.url) ? "KTX2Loader" : "TextureLoader";
498
+ console.log(`[useMaterialTexture] Using ${y} for ${p.url}`), X.load(
499
+ p.url,
500
+ (A) => {
501
+ var I, j, W, P, N, H;
502
+ if (T.current.delete(x), u) {
503
+ console.log(`[useMaterialTexture] Disposed, cleaning up texture: ${p.materialName}.${p.textureType}`), A.dispose();
419
504
  return;
420
505
  }
421
- const j = ((k = w.image) == null ? void 0 : k.width) || ((W = (O = w.source) == null ? void 0 : O.data) == null ? void 0 : W.width) || "unknown", b = ((N = w.image) == null ? void 0 : N.height) || ((H = (X = w.source) == null ? void 0 : X.data) == null ? void 0 : H.height) || "unknown";
422
- console.log(`[useMaterialTexture] ✅ Loaded: ${f.materialName}.${f.textureType} (${j}x${b})`), w.colorSpace = f.textureType === "map" || f.textureType === "emissiveMap" ? E.SRGBColorSpace : E.NoColorSpace, w.wrapS = E.RepeatWrapping, w.wrapT = E.RepeatWrapping, w.flipY = !1, M.current.set(S, w), r(f.material, f.textureType, w);
423
- const C = z(f.url) ? 500 : 150;
424
- console.log(`[useMaterialTexture] Waiting111111 ${C}ms before next texture...`), setTimeout(R, 0);
506
+ const O = ((I = A.image) == null ? void 0 : I.width) || ((W = (j = A.source) == null ? void 0 : j.data) == null ? void 0 : W.width) || "unknown", $ = ((P = A.image) == null ? void 0 : P.height) || ((H = (N = A.source) == null ? void 0 : N.data) == null ? void 0 : H.height) || "unknown";
507
+ console.log(`[useMaterialTexture] ✅ Loaded: ${p.materialName}.${p.textureType} (${O}x${$})`), A.colorSpace = p.textureType === "map" || p.textureType === "emissiveMap" ? R.SRGBColorSpace : R.NoColorSpace, A.wrapS = R.RepeatWrapping, A.wrapT = R.RepeatWrapping, A.flipY = !1, M.current.set(x, A), s(p.material, p.textureType, A);
508
+ const k = G(p.url) ? 500 : 150;
509
+ console.log(`[useMaterialTexture] Waiting111111 ${k}ms before next texture...`), setTimeout(E, 0);
425
510
  },
426
- (w) => {
427
- if (w.lengthComputable) {
428
- const j = Math.round(w.loaded / w.total * 100);
429
- j % 25 === 0 && console.log(`[useMaterialTexture] Progress ${f.materialName}.${f.textureType}: ${j}%`);
511
+ (A) => {
512
+ if (A.lengthComputable) {
513
+ const O = Math.round(A.loaded / A.total * 100);
514
+ O % 25 === 0 && console.log(`[useMaterialTexture] Progress ${p.materialName}.${p.textureType}: ${O}%`);
430
515
  }
431
516
  },
432
- (w) => {
433
- T.current.delete(S), m || (console.error(`[useMaterialTexture] ❌ Failed to load ${f.materialName}.${f.textureType} from ${f.url}`), console.error("[useMaterialTexture] Error details:", w), console.error("[useMaterialTexture] Loader type:", y), z(f.url) && (console.error("[useMaterialTexture] KTX2 error - file may not be in Basis Universal format!"), console.error("[useMaterialTexture] Make sure files are created with: gltf-transform etc1s input.png output.ktx2"))), setTimeout(R, 100);
517
+ (A) => {
518
+ T.current.delete(x), u || (console.error(`[useMaterialTexture] ❌ Failed to load ${p.materialName}.${p.textureType} from ${p.url}`), console.error("[useMaterialTexture] Error details:", A), console.error("[useMaterialTexture] Loader type:", y), G(p.url) && (console.error("[useMaterialTexture] KTX2 error - file may not be in Basis Universal format!"), console.error("[useMaterialTexture] Make sure files are created with: gltf-transform etc1s input.png output.ktx2"))), setTimeout(E, 100);
434
519
  }
435
520
  );
436
521
  };
437
- return R(), () => {
438
- console.log("[useMaterialTexture] Cleanup: disposed"), m = !0;
522
+ return E(), () => {
523
+ console.log("[useMaterialTexture] Cleanup: disposed"), u = !0;
439
524
  };
440
- }, [t, e, s]);
441
- const r = (o, i, m) => {
442
- var $, p;
443
- switch (console.log(`[useMaterialTexture] 🎨 Applying texture: ${o.name}.${i} (texture uuid: ${m.uuid})`), i) {
525
+ }, [t, e, n]);
526
+ const s = (o, a, u) => {
527
+ var S, m;
528
+ switch (console.log(`[useMaterialTexture] 🎨 Applying texture: ${o.name}.${a} (texture uuid: ${u.uuid})`), a) {
444
529
  case "map":
445
- o.map = m;
530
+ o.map = u;
446
531
  break;
447
532
  case "normalMap":
448
- o.normalMap = m;
533
+ o.normalMap = u;
449
534
  break;
450
535
  case "roughnessMap":
451
- o.roughnessMap = m;
536
+ o.roughnessMap = u;
452
537
  break;
453
538
  case "metalnessMap":
454
- o.metalnessMap = m;
539
+ o.metalnessMap = u;
455
540
  break;
456
541
  case "emissiveMap":
457
- o.emissiveMap = m, o.emissive = new E.Color(16777215), o.emissiveIntensity = 1;
542
+ o.emissiveMap = u, o.emissive = new R.Color(16777215), o.emissiveIntensity = 1;
458
543
  break;
459
544
  case "alphaMap":
460
545
  console.log(`[useMaterialTexture] Skipping alphaMap for "${o.name}" to prevent disappearing`);
461
546
  break;
462
547
  case "aoMap":
463
- o.aoMap = m;
548
+ o.aoMap = u;
464
549
  break;
465
550
  }
466
- o.needsUpdate = !0, console.log(`[useMaterialTexture] ✅ Applied ${i} to ${o.name}, needsUpdate=true`), console.log(`[useMaterialTexture] 📊 Material "${o.name}" FINAL state:`), console.log(` - map: ${o.map ? "EXISTS" : "null"} ${o.map ? `(uuid: ${o.map.uuid}, colorSpace: ${o.map.colorSpace})` : ""}`), console.log(` - normalMap: ${o.normalMap ? "EXISTS" : "null"}`), console.log(` - roughnessMap: ${o.roughnessMap ? "EXISTS" : "null"}`), console.log(` - metalnessMap: ${o.metalnessMap ? "EXISTS" : "null"}`), console.log(` - emissiveMap: ${o.emissiveMap ? "EXISTS" : "null"}`), console.log(` - aoMap: ${o.aoMap ? "EXISTS" : "null"}`), console.log(` - color: ${($ = o.color) == null ? void 0 : $.getHexString()}`), console.log(` - emissive: ${(p = o.emissive) == null ? void 0 : p.getHexString()}`), console.log(` - emissiveIntensity: ${o.emissiveIntensity}`), console.log(` - roughness: ${o.roughness}`), console.log(` - metalness: ${o.metalness}`);
467
- }, c = I((o, i) => {
468
- const m = typeof i == "string" ? { map: i } : i, $ = a.current.get(o);
469
- if (!$ || !$.isMeshStandardMaterial) {
551
+ o.needsUpdate = !0, console.log(`[useMaterialTexture] ✅ Applied ${a} to ${o.name}, needsUpdate=true`), console.log(`[useMaterialTexture] 📊 Material "${o.name}" FINAL state:`), console.log(` - map: ${o.map ? "EXISTS" : "null"} ${o.map ? `(uuid: ${o.map.uuid}, colorSpace: ${o.map.colorSpace})` : ""}`), console.log(` - normalMap: ${o.normalMap ? "EXISTS" : "null"}`), console.log(` - roughnessMap: ${o.roughnessMap ? "EXISTS" : "null"}`), console.log(` - metalnessMap: ${o.metalnessMap ? "EXISTS" : "null"}`), console.log(` - emissiveMap: ${o.emissiveMap ? "EXISTS" : "null"}`), console.log(` - aoMap: ${o.aoMap ? "EXISTS" : "null"}`), console.log(` - color: ${(S = o.color) == null ? void 0 : S.getHexString()}`), console.log(` - emissive: ${(m = o.emissive) == null ? void 0 : m.getHexString()}`), console.log(` - emissiveIntensity: ${o.emissiveIntensity}`), console.log(` - roughness: ${o.roughness}`), console.log(` - metalness: ${o.metalness}`);
552
+ }, c = C((o, a) => {
553
+ const u = typeof a == "string" ? { map: a } : a, S = i.current.get(o);
554
+ if (!S || !S.isMeshStandardMaterial) {
470
555
  console.warn(`Material "${o}" not found or not MeshStandardMaterial`);
471
556
  return;
472
557
  }
473
- const p = $;
474
- Object.entries(m).forEach(([v, R]) => {
475
- if (!R) return;
476
- const f = `${o}_${v}_${R}`, S = M.current.get(f);
477
- if (S) {
478
- r(p, v, S);
558
+ const m = S;
559
+ Object.entries(u).forEach(([w, E]) => {
560
+ if (!E) return;
561
+ const p = `${o}_${w}_${E}`, x = M.current.get(p);
562
+ if (x) {
563
+ s(m, w, x);
479
564
  return;
480
565
  }
481
- s(R).load(
482
- R,
566
+ n(E).load(
567
+ E,
483
568
  (y) => {
484
- y.colorSpace = v === "map" || v === "emissiveMap" ? E.SRGBColorSpace : E.NoColorSpace, y.wrapS = E.RepeatWrapping, y.wrapT = E.RepeatWrapping, M.current.set(f, y), r(p, v, y);
569
+ y.colorSpace = w === "map" || w === "emissiveMap" ? R.SRGBColorSpace : R.NoColorSpace, y.wrapS = R.RepeatWrapping, y.wrapT = R.RepeatWrapping, M.current.set(p, y), s(m, w, y);
485
570
  },
486
571
  void 0,
487
572
  (y) => {
488
- console.error(`Failed to load texture ${R}:`, y);
573
+ console.error(`Failed to load texture ${E}:`, y);
489
574
  }
490
575
  );
491
576
  });
492
- }, [s]), u = I(() => Array.from(a.current.keys()).sort(), []), h = I((o) => {
493
- const i = a.current.get(o);
494
- if (!i || !i.isMeshStandardMaterial) return;
495
- const m = i;
496
- m.map = null, m.normalMap = null, m.roughnessMap = null, m.metalnessMap = null, m.emissiveMap = null, m.alphaMap = null, m.aoMap = null, m.needsUpdate = !0;
577
+ }, [n]), d = C(() => Array.from(i.current.keys()).sort(), []), h = C((o) => {
578
+ const a = i.current.get(o);
579
+ if (!a || !a.isMeshStandardMaterial) return;
580
+ const u = a;
581
+ u.map = null, u.normalMap = null, u.roughnessMap = null, u.metalnessMap = null, u.emissiveMap = null, u.alphaMap = null, u.aoMap = null, u.needsUpdate = !0;
497
582
  }, []);
498
583
  return {
499
584
  setMaterialTextures: c,
500
- getMaterialNames: u,
585
+ getMaterialNames: d,
501
586
  clearMaterialTextures: h
502
587
  };
503
588
  }
504
- function Ae({
589
+ function Ee({
505
590
  url: t,
506
591
  position: e = [0, 0, 0],
507
- rotation: n = [0, 0, 0],
508
- scale: a = 1,
592
+ rotation: r = [0, 0, 0],
593
+ scale: i = 1,
509
594
  meshVisibility: l,
510
- materialColors: d,
595
+ materialColors: f,
511
596
  materialTextures: M,
512
597
  onLoad: T,
513
598
  onError: g
514
599
  }) {
515
- const { scene: s } = U(t), r = A(T);
516
- r.current = T;
517
- const c = B(() => {
518
- const h = s.clone();
600
+ const { scene: n } = U(t), s = v(T);
601
+ s.current = T;
602
+ const c = D(() => {
603
+ const h = n.clone();
519
604
  console.log("[Model] 🔍 Scene clone created, checking materials...");
520
- const o = [], i = /* @__PURE__ */ new Set(), m = [];
521
- let $ = 0;
522
- return h.traverse((p) => {
523
- if ($++, p.type === "Bone" && m.push(p.name), p.isMesh) {
524
- const v = p;
525
- o.push(v.name), v.castShadow = !0, v.receiveShadow = !0, (Array.isArray(v.material) ? v.material : [v.material]).forEach((f) => {
526
- i.add(f.name), console.log(`[Model] 📦 Material found: "${f.name}" (uuid: ${f.uuid})`);
527
- const S = f;
528
- console.log(` - Has map: ${S.map ? "YES" : "NO"}`), console.log(` - Has normalMap: ${S.normalMap ? "YES" : "NO"}`), console.log(` - Has roughnessMap: ${S.roughnessMap ? "YES" : "NO"}`), console.log(` - Has metalnessMap: ${S.metalnessMap ? "YES" : "NO"}`);
605
+ const o = [], a = /* @__PURE__ */ new Set(), u = [];
606
+ let S = 0;
607
+ return h.traverse((m) => {
608
+ if (S++, m.type === "Bone" && u.push(m.name), m.isMesh) {
609
+ const w = m;
610
+ o.push(w.name), w.castShadow = !0, w.receiveShadow = !0, (Array.isArray(w.material) ? w.material : [w.material]).forEach((p) => {
611
+ a.add(p.name), console.log(`[Model] 📦 Material found: "${p.name}" (uuid: ${p.uuid})`);
612
+ const x = p;
613
+ console.log(` - Has map: ${x.map ? "YES" : "NO"}`), console.log(` - Has normalMap: ${x.normalMap ? "YES" : "NO"}`), console.log(` - Has roughnessMap: ${x.roughnessMap ? "YES" : "NO"}`), console.log(` - Has metalnessMap: ${x.metalnessMap ? "YES" : "NO"}`);
529
614
  });
530
615
  }
531
- }), console.log(`[Model] 📊 Clone summary: ${o.length} meshes, ${i.size} materials`), setTimeout(() => {
532
- var p;
533
- (p = r.current) == null || p.call(r, {
616
+ }), console.log(`[Model] 📊 Clone summary: ${o.length} meshes, ${a.size} materials`), setTimeout(() => {
617
+ var m;
618
+ (m = s.current) == null || m.call(s, {
534
619
  meshes: o.sort(),
535
- materials: Array.from(i).sort(),
536
- bones: m.sort(),
537
- nodeCount: $
620
+ materials: Array.from(a).sort(),
621
+ bones: u.sort(),
622
+ nodeCount: S
538
623
  });
539
624
  }, 0), h;
540
- }, [s]);
541
- return Y(c, l), Z(c, d), q(c, M), /* @__PURE__ */ x("group", { position: e, rotation: n, scale: typeof a == "number" ? [a, a, a] : a, children: /* @__PURE__ */ x("primitive", { object: c }) });
625
+ }, [n]);
626
+ return q(c, l), J(c, f), Q(c, M), /* @__PURE__ */ b("group", { position: e, rotation: r, scale: typeof i == "number" ? [i, i, i] : i, children: /* @__PURE__ */ b("primitive", { object: c }) });
542
627
  }
543
- Ae.preload = (t) => {
628
+ Ee.preload = (t) => {
544
629
  U.preload(t);
545
630
  };
546
- function ve(t, e, n) {
547
- const { actions: a, names: l } = he(t, e), d = A(null), M = A(n == null ? void 0 : n.defaultAnimation);
631
+ function Re(t, e, r) {
632
+ const { actions: i, names: l } = Me(t, e), f = v(null), M = v(r == null ? void 0 : r.defaultAnimation);
548
633
  L(() => {
549
634
  if (l.length === 0) return;
550
- const r = M.current;
635
+ const s = M.current;
551
636
  let c = l[0];
552
- if (r) {
553
- const h = l.find((o) => o === r || o.includes(r));
637
+ if (s) {
638
+ const h = l.find((o) => o === s || o.includes(s));
554
639
  h && (c = h);
555
640
  }
556
- const u = a[c];
557
- u && (u.reset().fadeIn(0.5).play(), d.current = u);
558
- }, [a, l]);
559
- const T = I(
560
- (r, c) => {
641
+ const d = i[c];
642
+ d && (d.reset().fadeIn(0.5).play(), f.current = d);
643
+ }, [i, l]);
644
+ const T = C(
645
+ (s, c) => {
561
646
  const {
562
- loop: u = !1,
647
+ loop: d = !1,
563
648
  crossFadeDuration: h = 0.2,
564
649
  restoreDefault: o = !0
565
650
  } = c || {};
566
- let i = a[r];
567
- if (!i) {
568
- const $ = Object.keys(a).find(
569
- (p) => p.toLowerCase().includes(r.toLowerCase()) || r.toLowerCase().includes(p.toLowerCase())
651
+ let a = i[s];
652
+ if (!a) {
653
+ const S = Object.keys(i).find(
654
+ (m) => m.toLowerCase().includes(s.toLowerCase()) || s.toLowerCase().includes(m.toLowerCase())
570
655
  );
571
- $ && (i = a[$]);
656
+ S && (a = i[S]);
572
657
  }
573
- if (!i) {
574
- console.warn(`Animation "${r}" not found. Available: ${l.join(", ")}`);
658
+ if (!a) {
659
+ console.warn(`Animation "${s}" not found. Available: ${l.join(", ")}`);
575
660
  return;
576
661
  }
577
- const m = d.current;
578
- if (!(m === i && i.isRunning()) && (m && m !== i && m.fadeOut(h), i.reset(), i.fadeIn(h), i.setLoop(
579
- u ? E.LoopRepeat : E.LoopOnce,
580
- u ? 1 / 0 : 1
581
- ), i.clampWhenFinished = !u, i.play(), u || i.getMixer().update(0), d.current = i, o && !u && M.current)) {
582
- const $ = i.getMixer(), p = (v) => {
583
- if (v.action === i) {
584
- $.removeEventListener("finished", p);
585
- const R = a[M.current];
586
- R && (i.fadeOut(h), R.reset().fadeIn(h).play(), d.current = R);
662
+ const u = f.current;
663
+ if (!(u === a && a.isRunning()) && (u && u !== a && u.fadeOut(h), a.reset(), a.fadeIn(h), a.setLoop(
664
+ d ? R.LoopRepeat : R.LoopOnce,
665
+ d ? 1 / 0 : 1
666
+ ), a.clampWhenFinished = !d, a.play(), d || a.getMixer().update(0), f.current = a, o && !d && M.current)) {
667
+ const S = a.getMixer(), m = (w) => {
668
+ if (w.action === a) {
669
+ S.removeEventListener("finished", m);
670
+ const E = i[M.current];
671
+ E && (a.fadeOut(h), E.reset().fadeIn(h).play(), f.current = E);
587
672
  }
588
673
  };
589
- $.addEventListener("finished", p);
674
+ S.addEventListener("finished", m);
590
675
  }
591
676
  },
592
- [a, l]
593
- ), g = I(() => {
594
- var r;
595
- (r = d.current) == null || r.fadeOut(0.2), d.current = null;
596
- }, []), s = I(() => l, [l]);
677
+ [i, l]
678
+ ), g = C(() => {
679
+ var s;
680
+ (s = f.current) == null || s.fadeOut(0.2), f.current = null;
681
+ }, []), n = C(() => l, [l]);
597
682
  return {
598
683
  playAnimation: T,
599
684
  stopAnimation: g,
600
- getAnimationNames: s,
601
- actions: a
685
+ getAnimationNames: n,
686
+ actions: i
602
687
  };
603
688
  }
604
- function ae(t, e) {
605
- const n = A(e || {}), a = A([]), l = A([]);
689
+ function ie(t, e) {
690
+ const r = v(e || {}), i = v([]), l = v([]);
606
691
  L(() => {
607
- const g = /* @__PURE__ */ new Set(), s = [];
608
- t.traverse((r) => {
609
- r instanceof E.Mesh && r.morphTargetDictionary && r.morphTargetInfluences && (s.push(r), Object.keys(r.morphTargetDictionary).forEach((c) => {
692
+ const g = /* @__PURE__ */ new Set(), n = [];
693
+ t.traverse((s) => {
694
+ s instanceof R.Mesh && s.morphTargetDictionary && s.morphTargetInfluences && (n.push(s), Object.keys(s.morphTargetDictionary).forEach((c) => {
610
695
  g.add(c);
611
696
  }));
612
- }), a.current = Array.from(g).sort(), l.current = s;
613
- }, [t]), V(() => {
614
- const g = n.current;
615
- l.current.forEach((s) => {
616
- !s.morphTargetDictionary || !s.morphTargetInfluences || Object.entries(g).forEach(([r, c]) => {
617
- const u = s.morphTargetDictionary[r];
618
- u !== void 0 && (s.morphTargetInfluences[u] = c);
697
+ }), i.current = Array.from(g).sort(), l.current = n;
698
+ }, [t]), Z(() => {
699
+ const g = r.current;
700
+ l.current.forEach((n) => {
701
+ !n.morphTargetDictionary || !n.morphTargetInfluences || Object.entries(g).forEach(([s, c]) => {
702
+ const d = n.morphTargetDictionary[s];
703
+ d !== void 0 && (n.morphTargetInfluences[d] = c);
619
704
  });
620
705
  });
621
706
  }), L(() => {
622
- e && (n.current = { ...e });
707
+ e && (r.current = { ...e });
623
708
  }, [e]);
624
- const d = I((g, s) => {
625
- n.current[g] = Math.max(0, Math.min(1, s));
626
- }, []), M = I(() => a.current, []), T = I(() => ({ ...n.current }), []);
709
+ const f = C((g, n) => {
710
+ r.current[g] = Math.max(0, Math.min(1, n));
711
+ }, []), M = C(() => i.current, []), T = C(() => ({ ...r.current }), []);
627
712
  return {
628
- setMorphTarget: d,
713
+ setMorphTarget: f,
629
714
  getMorphTargetNames: M,
630
715
  getMorphTargetValues: T
631
716
  };
632
717
  }
633
- const ie = ce(null);
634
- function Ee() {
635
- const t = ue(ie);
718
+ const le = ue(null);
719
+ function ke() {
720
+ const t = me(le);
636
721
  if (!t)
637
722
  throw new Error("BoneAttachment must be used within an AnimatedModel");
638
723
  return t;
639
724
  }
640
- const le = te(
725
+ const ce = oe(
641
726
  ({
642
727
  url: t,
643
728
  position: e = [0, 0, 0],
644
- rotation: n = [0, 0, 0],
645
- scale: a = 1,
729
+ rotation: r = [0, 0, 0],
730
+ scale: i = 1,
646
731
  defaultAnimation: l,
647
- morphTargets: d,
732
+ morphTargets: f,
648
733
  meshVisibility: M,
649
734
  materialColors: T,
650
735
  materialTextures: g,
651
- onLoad: s,
652
- onError: r,
736
+ onLoad: n,
737
+ onError: s,
653
738
  children: c
654
- }, u) => {
655
- const h = A(null), o = A([]), i = A(s);
656
- i.current = s;
657
- const { scene: m, animations: $ } = U(t), p = B(() => oe.clone(m), [m]), { playAnimation: v, stopAnimation: R, getAnimationNames: f } = ve(
658
- $,
659
- p,
739
+ }, d) => {
740
+ const h = v(null), o = v([]), a = v(n);
741
+ a.current = n;
742
+ const { scene: u, animations: S } = U(t), m = D(() => se.clone(u), [u]), { playAnimation: w, stopAnimation: E, getAnimationNames: p } = Re(
743
+ S,
744
+ m,
660
745
  { defaultAnimation: l }
661
- ), { setMorphTarget: S } = ae(
662
- p,
663
- d
664
- ), { setMeshVisibility: D, getMeshNames: y } = Y(
665
- p,
746
+ ), { setMorphTarget: x } = ie(
747
+ m,
748
+ f
749
+ ), { setMeshVisibility: X, getMeshNames: y } = q(
750
+ m,
666
751
  M
667
- ), { setMaterialColor: w, getMaterialNames: j, getMaterialColor: b } = Z(
668
- p,
752
+ ), { setMaterialColor: A, getMaterialNames: O, getMaterialColor: $ } = J(
753
+ m,
669
754
  T
670
- ), { setMaterialTextures: C, clearMaterialTextures: k } = q(
671
- p,
755
+ ), { setMaterialTextures: k, clearMaterialTextures: I } = Q(
756
+ m,
672
757
  g
673
758
  );
674
759
  L(() => {
675
- if (!p) return;
676
- const N = setTimeout(() => {
677
- var ee;
678
- const X = [], H = [], _ = /* @__PURE__ */ new Set(), J = /* @__PURE__ */ new Set();
679
- let Q = 0;
680
- p.traverse((K) => {
681
- if (Q++, K.type === "Bone" && X.push(K.name), K.isMesh) {
682
- const P = K;
683
- H.push(P.name), P.castShadow = !0, P.receiveShadow = !0, (Array.isArray(P.material) ? P.material : [P.material]).forEach((F) => {
684
- _.add(F.name), F.shadowSide = E.DoubleSide;
685
- }), P.morphTargetDictionary && Object.keys(P.morphTargetDictionary).forEach((F) => {
686
- J.add(F);
760
+ if (!m) return;
761
+ const P = setTimeout(() => {
762
+ var re;
763
+ const N = [], H = [], F = /* @__PURE__ */ new Set(), ee = /* @__PURE__ */ new Set();
764
+ let te = 0;
765
+ m.traverse((K) => {
766
+ if (te++, K.type === "Bone" && N.push(K.name), K.isMesh) {
767
+ const B = K;
768
+ H.push(B.name), B.castShadow = !0, B.receiveShadow = !0, (Array.isArray(B.material) ? B.material : [B.material]).forEach((z) => {
769
+ F.add(z.name), z.shadowSide = R.DoubleSide;
770
+ }), B.morphTargetDictionary && Object.keys(B.morphTargetDictionary).forEach((z) => {
771
+ ee.add(z);
687
772
  });
688
773
  }
689
- }), o.current = Array.from(J).sort(), (ee = i.current) == null || ee.call(i, {
774
+ }), o.current = Array.from(ee).sort(), (re = a.current) == null || re.call(a, {
690
775
  meshes: H.sort(),
691
- materials: Array.from(_).sort(),
692
- bones: X.sort(),
693
- nodeCount: Q,
694
- animations: $.map((K) => K.name),
776
+ materials: Array.from(F).sort(),
777
+ bones: N.sort(),
778
+ nodeCount: te,
779
+ animations: S.map((K) => K.name),
695
780
  morphTargetNames: o.current
696
781
  });
697
782
  }, 0);
698
- return () => clearTimeout(N);
699
- }, [p, $]), re(u, () => ({
700
- playAnimation: v,
701
- stopAnimation: R,
702
- getAnimationNames: f,
783
+ return () => clearTimeout(P);
784
+ }, [m, S]), ne(d, () => ({
785
+ playAnimation: w,
786
+ stopAnimation: E,
787
+ getAnimationNames: p,
703
788
  getGroup: () => h.current,
704
- setMorphTarget: S,
789
+ setMorphTarget: x,
705
790
  getMorphTargetNames: () => o.current,
706
- setMeshVisibility: D,
791
+ setMeshVisibility: X,
707
792
  getMeshNames: y,
708
- setMaterialColor: w,
709
- getMaterialNames: j,
710
- getMaterialColor: b,
711
- setMaterialTextures: C,
712
- clearMaterialTextures: k
793
+ setMaterialColor: A,
794
+ getMaterialNames: O,
795
+ getMaterialColor: $,
796
+ setMaterialTextures: k,
797
+ clearMaterialTextures: I
713
798
  }));
714
- const O = B(
799
+ const j = D(
715
800
  () => ({
716
- scene: p,
717
- getBone: (N) => p.getObjectByName(N) || null
801
+ scene: m,
802
+ getBone: (P) => m.getObjectByName(P) || null
718
803
  }),
719
- [p]
720
- ), W = typeof a == "number" ? [a, a, a] : a;
721
- return /* @__PURE__ */ x(ie.Provider, { value: O, children: /* @__PURE__ */ se(
804
+ [m]
805
+ ), W = typeof i == "number" ? [i, i, i] : i;
806
+ return /* @__PURE__ */ b(le.Provider, { value: j, children: /* @__PURE__ */ _(
722
807
  "group",
723
808
  {
724
809
  ref: h,
725
810
  position: e,
726
- rotation: n,
811
+ rotation: r,
727
812
  scale: W,
728
813
  children: [
729
- /* @__PURE__ */ x("primitive", { object: p }),
814
+ /* @__PURE__ */ b("primitive", { object: m }),
730
815
  c
731
816
  ]
732
817
  }
733
818
  ) });
734
819
  }
735
820
  );
736
- le.displayName = "AnimatedModel";
737
- le.preload = (t) => {
821
+ ce.displayName = "AnimatedModel";
822
+ ce.preload = (t) => {
738
823
  U.preload(t);
739
824
  };
740
- const Re = te(
825
+ const Ce = oe(
741
826
  ({
742
827
  url: t,
743
828
  position: e = [0, 0, 0],
744
- rotation: n = [0, 0, 0],
745
- scale: a = 1,
829
+ rotation: r = [0, 0, 0],
830
+ scale: i = 1,
746
831
  morphTargets: l,
747
- meshVisibility: d,
832
+ meshVisibility: f,
748
833
  materialColors: M,
749
834
  materialTextures: T,
750
835
  onMorphTargetsFound: g,
751
- onLoad: s,
752
- onError: r
836
+ onLoad: n,
837
+ onError: s
753
838
  }, c) => {
754
- const { scene: u } = U(t), h = A(s);
755
- h.current = s;
756
- const o = A(g);
839
+ const { scene: d } = U(t), h = v(n);
840
+ h.current = n;
841
+ const o = v(g);
757
842
  o.current = g;
758
- const i = B(() => u.clone(), [u]), { setMorphTarget: m, getMorphTargetNames: $, getMorphTargetValues: p } = ae(
759
- i,
843
+ const a = D(() => d.clone(), [d]), { setMorphTarget: u, getMorphTargetNames: S, getMorphTargetValues: m } = ie(
844
+ a,
760
845
  l
761
- ), { setMeshVisibility: v, getMeshNames: R } = Y(
762
- i,
763
- d
764
- ), { setMaterialColor: f, getMaterialNames: S, getMaterialColor: D } = Z(
765
- i,
846
+ ), { setMeshVisibility: w, getMeshNames: E } = q(
847
+ a,
848
+ f
849
+ ), { setMaterialColor: p, getMaterialNames: x, getMaterialColor: X } = J(
850
+ a,
766
851
  M
767
- ), { setMaterialTextures: y, clearMaterialTextures: w } = q(
768
- i,
852
+ ), { setMaterialTextures: y, clearMaterialTextures: A } = Q(
853
+ a,
769
854
  T
770
855
  );
771
856
  return L(() => {
772
- var C;
773
- const b = $();
774
- b.length > 0 && ((C = o.current) == null || C.call(o, b));
775
- }, [i, $]), L(() => {
857
+ var k;
858
+ const $ = S();
859
+ $.length > 0 && ((k = o.current) == null || k.call(o, $));
860
+ }, [a, S]), L(() => {
776
861
  var W;
777
- if (!i) return;
778
- const b = [], C = /* @__PURE__ */ new Set(), k = [];
779
- let O = 0;
780
- i.traverse((N) => {
781
- if (O++, N.type === "Bone" && k.push(N.name), N.isMesh) {
782
- const X = N;
783
- b.push(X.name), X.castShadow = !0, X.receiveShadow = !0, (Array.isArray(X.material) ? X.material : [X.material]).forEach((_) => C.add(_.name));
862
+ if (!a) return;
863
+ const $ = [], k = /* @__PURE__ */ new Set(), I = [];
864
+ let j = 0;
865
+ a.traverse((P) => {
866
+ if (j++, P.type === "Bone" && I.push(P.name), P.isMesh) {
867
+ const N = P;
868
+ $.push(N.name), N.castShadow = !0, N.receiveShadow = !0, (Array.isArray(N.material) ? N.material : [N.material]).forEach((F) => k.add(F.name));
784
869
  }
785
870
  }), (W = h.current) == null || W.call(h, {
786
- meshes: b.sort(),
787
- materials: Array.from(C).sort(),
788
- bones: k.sort(),
789
- nodeCount: O
871
+ meshes: $.sort(),
872
+ materials: Array.from(k).sort(),
873
+ bones: I.sort(),
874
+ nodeCount: j
790
875
  });
791
- }, [i]), re(c, () => ({
792
- setMorphTarget: m,
793
- getMorphTargetNames: $,
794
- getMorphTargetValues: p,
795
- setMeshVisibility: v,
796
- getMeshNames: R,
797
- setMaterialColor: f,
798
- getMaterialNames: S,
799
- getMaterialColor: D,
876
+ }, [a]), ne(c, () => ({
877
+ setMorphTarget: u,
878
+ getMorphTargetNames: S,
879
+ getMorphTargetValues: m,
880
+ setMeshVisibility: w,
881
+ getMeshNames: E,
882
+ setMaterialColor: p,
883
+ getMaterialNames: x,
884
+ getMaterialColor: X,
800
885
  setMaterialTextures: y,
801
- clearMaterialTextures: w
802
- })), /* @__PURE__ */ x("group", { position: e, rotation: n, scale: typeof a == "number" ? [a, a, a] : a, children: /* @__PURE__ */ x("primitive", { object: i }) });
886
+ clearMaterialTextures: A
887
+ })), /* @__PURE__ */ b("group", { position: e, rotation: r, scale: typeof i == "number" ? [i, i, i] : i, children: /* @__PURE__ */ b("primitive", { object: a }) });
803
888
  }
804
889
  );
805
- Re.displayName = "MorphableModel";
806
- function Ne({
890
+ Ce.displayName = "MorphableModel";
891
+ function Be({
807
892
  children: t,
808
893
  bone: e,
809
- position: n = [0, 0, 0],
810
- rotation: a = [0, 0, 0],
894
+ position: r = [0, 0, 0],
895
+ rotation: i = [0, 0, 0],
811
896
  scale: l = 1
812
897
  }) {
813
- const { getBone: d } = Ee(), [M, T] = me(null);
898
+ const { getBone: f } = ke(), [M, T] = Y(null);
814
899
  return L(() => {
815
- const s = d(e);
816
- s ? T(s) : console.warn(`Bone "${e}" not found in model`);
817
- }, [e, d]), M ? ye(
818
- /* @__PURE__ */ x(
900
+ const n = f(e);
901
+ n ? T(n) : console.warn(`Bone "${e}" not found in model`);
902
+ }, [e, f]), M ? be(
903
+ /* @__PURE__ */ b(
819
904
  "group",
820
905
  {
821
- position: n,
822
- rotation: a,
906
+ position: r,
907
+ rotation: i,
823
908
  scale: typeof l == "number" ? [l, l, l] : l,
824
909
  children: t
825
910
  }
@@ -828,42 +913,42 @@ function Ne({
828
913
  ) : null;
829
914
  }
830
915
  function De(t, e) {
831
- const { scene: n, animations: a } = U(t), l = B(() => oe.clone(n), [n]);
916
+ const { scene: r, animations: i } = U(t), l = D(() => se.clone(r), [r]);
832
917
  return L(() => {
833
- var s;
918
+ var n;
834
919
  if (!l) return;
835
- const d = [], M = [], T = /* @__PURE__ */ new Set();
920
+ const f = [], M = [], T = /* @__PURE__ */ new Set();
836
921
  let g = 0;
837
- l.traverse((r) => {
838
- if (g++, r.type === "Bone" && d.push(r.name), r.isMesh) {
839
- const c = r;
922
+ l.traverse((s) => {
923
+ if (g++, s.type === "Bone" && f.push(s.name), s.isMesh) {
924
+ const c = s;
840
925
  M.push(c.name), c.castShadow = !0, c.receiveShadow = !0, (Array.isArray(c.material) ? c.material : [c.material]).forEach((h) => {
841
- T.add(h.name), h.shadowSide = E.DoubleSide;
926
+ T.add(h.name), h.shadowSide = R.DoubleSide;
842
927
  });
843
928
  }
844
- }), (s = e == null ? void 0 : e.onLoad) == null || s.call(e, {
929
+ }), (n = e == null ? void 0 : e.onLoad) == null || n.call(e, {
845
930
  meshes: M.sort(),
846
931
  materials: Array.from(T).sort(),
847
- bones: d.sort(),
932
+ bones: f.sort(),
848
933
  nodeCount: g
849
934
  });
850
- }, [l, e]), { scene: l, animations: a };
935
+ }, [l, e]), { scene: l, animations: i };
851
936
  }
852
- function Pe(t) {
937
+ function We(t) {
853
938
  U.preload(t);
854
939
  }
855
940
  export {
856
- le as AnimatedModel,
857
- Ne as BoneAttachment,
858
- Ae as Model,
859
- Re as MorphableModel,
941
+ ce as AnimatedModel,
942
+ Be as BoneAttachment,
943
+ Ee as Model,
944
+ Ce as MorphableModel,
860
945
  Xe as Scene3D,
861
- Pe as preloadModel,
862
- ve as useAnimationController,
946
+ We as preloadModel,
947
+ Re as useAnimationController,
863
948
  De as useClonedModel,
864
- Z as useMaterialColor,
865
- q as useMaterialTexture,
866
- Y as useMeshVisibility,
867
- ae as useMorphTargets
949
+ J as useMaterialColor,
950
+ Q as useMaterialTexture,
951
+ q as useMeshVisibility,
952
+ ie as useMorphTargets
868
953
  };
869
954
  //# sourceMappingURL=mbt-3d.js.map