ss-component-new 1.2.23 → 1.2.25

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 (143) hide show
  1. package/dist/MTLLoader-AqmsmIp6.cjs +6 -0
  2. package/dist/MTLLoader-DJNdEDx2.js +609 -0
  3. package/dist/OrbitControls-Bj5caXhQ.js +419 -0
  4. package/dist/OrbitControls-rTIa-2s-.cjs +1 -0
  5. package/dist/{animationData-Bwh55Xw6.cjs → animationData-Bc9LlHz0.cjs} +1 -1
  6. package/dist/{animationData-D0TJ-9dd.js → animationData-Ca4l4roD.js} +4 -4
  7. package/dist/array-Baxi4C30.cjs +11 -0
  8. package/dist/array-Ca6KqnNx.js +1142 -0
  9. package/dist/{dataUtil-i5X2xhin.cjs → dataUtil-Cg2dZbrV.cjs} +1 -1
  10. package/dist/{dataUtil-gEKo7CEq.js → dataUtil-DUI9Vz64.js} +2 -2
  11. package/dist/{fileUtil-GIRXMs25.cjs → fileUtil-CTTbs0aJ.cjs} +1 -1
  12. package/dist/{fileUtil-CN00xr9W.js → fileUtil-CWt--rV-.js} +1 -1
  13. package/dist/{iconfont-C9-pGpAJ.cjs → iconfont-BaUxcJrk.cjs} +1 -1
  14. package/dist/{iconfont-DTSZW2AU.js → iconfont-D886hAXy.js} +2 -2
  15. package/dist/icons/svg//345/215/225/345/205/203/345/272/223.svg +1 -0
  16. package/dist/icons/svg//346/250/241/345/236/213/347/256/241/347/220/206.svg +1 -0
  17. package/dist/icons/svg//346/265/201/347/250/213/345/272/223.svg +1 -0
  18. package/dist/icons/svg//347/225/214/351/235/242/344/277/256/346/224/271.svg +1 -0
  19. package/dist/{index-BOJUyAaV.cjs → index-1z9RrjZc.cjs} +1 -1
  20. package/dist/{index-DSlPg3dk.cjs → index-9wWF5fgR.cjs} +1 -1
  21. package/dist/index-B-I7BsZI.js +2570 -0
  22. package/dist/{index-CqYUVCh5.js → index-B-p8m73c.js} +12 -12
  23. package/dist/{index-CK54pscx.cjs → index-B1qlTlfX.cjs} +1 -1
  24. package/dist/{index-BD5yZDAq.js → index-B5iT5NR0.js} +2 -2
  25. package/dist/{index-BkIFY0hK.cjs → index-B8MyAHnT.cjs} +1 -1
  26. package/dist/{index-7oJ8Ile4.js → index-BLW6fsom.js} +1 -1
  27. package/dist/{index-DbCNaQ87.cjs → index-BMK703KG.cjs} +1 -1
  28. package/dist/{index-eH9RMVXv.cjs → index-BNYCmfv9.cjs} +1 -1
  29. package/dist/{index-ThNNBX7h.js → index-BQkk6yoU.js} +1 -1
  30. package/dist/index-BQq7Cw_K.cjs +1 -0
  31. package/dist/{index-pmcRbjPd.cjs → index-BZENxsjL.cjs} +1 -1
  32. package/dist/{index-BNYeBPmi.cjs → index-BZoOaP9C.cjs} +1 -1
  33. package/dist/{index-G_cKl_J4.js → index-B_jnPuBE.js} +275 -270
  34. package/dist/{index-XXKsLOYd.js → index-Bke5IOmW.js} +2 -2
  35. package/dist/{index-DrWIUUZK.cjs → index-BtfS9ULE.cjs} +1 -1
  36. package/dist/{index-CvC2498b.js → index-BuLPXgWU.js} +5 -5
  37. package/dist/index-BxXOWAHT.cjs +1 -0
  38. package/dist/{index-2fqHNrPg.js → index-C8OFJprL.js} +4 -4
  39. package/dist/{index-CtXpoEg0.cjs → index-C9OPT3q5.cjs} +1 -1
  40. package/dist/{index-D8Y3imz9.cjs → index-CEV2ULrI.cjs} +1 -1
  41. package/dist/{index-BTTpV9o2.js → index-CTRrKUtw.js} +14 -14
  42. package/dist/{index-CptCatmL.js → index-CYmHP5Ky.js} +48 -32
  43. package/dist/{index-Dfwm0xPp.cjs → index-Cb0d2cT8.cjs} +1 -1
  44. package/dist/{index-Cl6HMOao.js → index-CeeMzEXY.js} +1 -1
  45. package/dist/{index-tttYIzsn.cjs → index-CjI5pDiU.cjs} +1 -1
  46. package/dist/{index-DEs8s152.js → index-CmUjrEkz.js} +6 -6
  47. package/dist/index-CtE7IIJq.js +7297 -0
  48. package/dist/{index-DSchKIyh.cjs → index-CxnH4vfV.cjs} +1 -1
  49. package/dist/index-CyY9deE5.cjs +1 -0
  50. package/dist/{index-DlIkbsRf.js → index-Cyk3pWtk.js} +6 -6
  51. package/dist/index-D-eD7QhS.js +654 -0
  52. package/dist/{index-NlkdTb--.js → index-D0odjY-X.js} +4 -4
  53. package/dist/{index-B0dydZDW.js → index-D1cjMjid.js} +1 -1
  54. package/dist/index-D5gT6DCZ.cjs +1 -0
  55. package/dist/{index-CvrBt7bU.js → index-D7GiDyDn.js} +6 -6
  56. package/dist/index-D88kGgy-.cjs +1 -0
  57. package/dist/{index-DMbCaqEC.cjs → index-DEExEFRs.cjs} +13 -13
  58. package/dist/{index-DllJulGH.cjs → index-DFMKBytS.cjs} +1 -1
  59. package/dist/{index-Dm_WlV6R.js → index-DNe_JGg0.js} +1 -1
  60. package/dist/{index-Bvk4OpkL.js → index-DTCPY-4V.js} +2 -2
  61. package/dist/{index-BTfg83yY.cjs → index-DTuCopl-.cjs} +1 -1
  62. package/dist/{index-BwEfrokO.js → index-DVSVJAdn.js} +2 -2
  63. package/dist/{index-7Ru3e632.cjs → index-DYr8VySV.cjs} +1 -1
  64. package/dist/{index-BQBxzTyE.js → index-DkA_gjlb.js} +2 -2
  65. package/dist/{index-7gU0r1We.cjs → index-Dkoh6zZr.cjs} +1 -1
  66. package/dist/{index-DNs9XPOG.js → index-DpE6q48b.js} +2 -2
  67. package/dist/{index-BVFL7Z_0.js → index-DqAAn-WP.js} +5 -5
  68. package/dist/{index-DHp714Ep.cjs → index-DrgssxCP.cjs} +1 -1
  69. package/dist/{index-Bt2MaT2G.js → index-J98IKvqx.js} +6 -6
  70. package/dist/{index-C6C5VWbs.cjs → index-PNi4RMPc.cjs} +1 -1
  71. package/dist/index-XXEzSATd.js +158 -0
  72. package/dist/{index-CADH_aSQ.cjs → index-clFmHtGU.cjs} +1 -1
  73. package/dist/{index-Be1LJMUR.js → index-pFuDv6dx.js} +2 -2
  74. package/dist/{index-BuSsSHAY.js → index-sk7jYyaG.js} +2301 -2282
  75. package/dist/{index-DQ3y1xkr.cjs → index-vmURlfDn.cjs} +1 -1
  76. package/dist/{index-BXEOQo2c.cjs → index-yyc7_nsV.cjs} +1 -1
  77. package/dist/index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BCjeeJqj.cjs +5675 -0
  78. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CtycIAIT.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-aFJhRTyx.js} +41519 -48931
  79. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-De0avjy5.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-Dv39W1q4.js} +6 -6
  80. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DhMDLOg8.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-OXHjy9ED.cjs} +1 -1
  81. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-C4gG2WxT.cjs +56 -0
  82. package/dist/{index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CEcxaThh.js → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CEIVtyL9.js} +10702 -10654
  83. package/dist/index.vue_vue_type_style_index_1_lang-D0ileuYo.cjs +32 -0
  84. package/dist/index.vue_vue_type_style_index_1_lang-DOP0uVOd.cjs +5 -0
  85. package/dist/index.vue_vue_type_style_index_1_lang-DSKzPKLD.js +8262 -0
  86. package/dist/{index.vue_vue_type_style_index_1_lang-DzZEPkuk.js → index.vue_vue_type_style_index_1_lang-DkkdpQbZ.js} +1368 -1456
  87. package/dist/{isString-CELwppr9.cjs → isString-BmAegMGI.cjs} +1 -1
  88. package/dist/{isString-DvY0kl3S.js → isString-CohCsKzS.js} +1 -1
  89. package/dist/{main-DQXqHTYg.js → main-B4gwcsBp.js} +5 -5
  90. package/dist/{main-yiUkyrA7.cjs → main-HIDJ5ncj.cjs} +1 -1
  91. package/dist/ss-component.cjs +1 -1
  92. package/dist/ss-component.css +2 -2
  93. package/dist/ss-component.js +11 -11
  94. package/dist/ss-component2.cjs +1 -1
  95. package/dist/ss-component2.js +12 -12
  96. package/dist/{threeModel-BiWZCOOI.js → threeModel-LJMbJaUb.js} +5 -5
  97. package/dist/{threeModel-Cva5i9Dy.cjs → threeModel-tRhkTPHD.cjs} +1 -1
  98. package/dist/threePreview-CeCm5KTT.cjs +1 -0
  99. package/dist/{threePreview-CjFKHY3_.js → threePreview-CqWnM1XW.js} +442 -541
  100. package/dist/{threeSceneView-DM8uof_D.cjs → threeSceneView-CTChIfwR.cjs} +1 -1
  101. package/dist/{threeSceneView-DPTQ_xR-.js → threeSceneView-D2mX_5N9.js} +11 -11
  102. package/dist/{threeSceneViewForCPMPIP-D5jl1r-h.cjs → threeSceneViewForCPMPIP-C_MBwi1O.cjs} +1 -1
  103. package/dist/{threeSceneViewForCPMPIP-Bqb44i-c.js → threeSceneViewForCPMPIP-CpVcogbP.js} +10 -10
  104. package/dist/{threeTrackPathView-BvxoafSz.js → threeTrackPathView-DMTpRQTP.js} +172 -354
  105. package/dist/threeTrackPathView-Deim_dX7.cjs +371 -0
  106. package/dist/threeViewerHost-BMrWNnGK.cjs +1 -0
  107. package/dist/{threeViewerHost-CKmZPGir.js → threeViewerHost-WXqI_L3g.js} +91 -78
  108. package/dist/{urdfTree-BxuavyNQ.js → urdfTree-BX92weHU.js} +1 -1
  109. package/dist/{urdfTree-wR2vnG4s.cjs → urdfTree-CbDb_7PZ.cjs} +1 -1
  110. package/dist/{workpieceTreePanel-C2BXrv3k.cjs → workpieceTreePanel-CbTolK6t.cjs} +1 -1
  111. package/dist/{workpieceTreePanel-CSKzSdIt.js → workpieceTreePanel-Q4S9btz3.js} +18 -18
  112. package/package.json +1 -1
  113. package/public/icons/svg//345/215/225/345/205/203/345/272/223.svg +1 -0
  114. package/public/icons/svg//346/250/241/345/236/213/347/256/241/347/220/206.svg +1 -0
  115. package/public/icons/svg//346/265/201/347/250/213/345/272/223.svg +1 -0
  116. package/public/icons/svg//347/225/214/351/235/242/344/277/256/346/224/271.svg +1 -0
  117. package/dist/MTLLoader-B8MnfNfT.cjs +0 -6
  118. package/dist/MTLLoader-BD3cbBAW.js +0 -657
  119. package/dist/OrbitControls-2UHRU9Fu.cjs +0 -1
  120. package/dist/OrbitControls-D1pz0uFI.js +0 -458
  121. package/dist/array-DMPAgNcb.cjs +0 -11
  122. package/dist/array-DTXrs6ZK.js +0 -1207
  123. package/dist/index-BLwwxnzs.cjs +0 -1
  124. package/dist/index-BVdolwlx.js +0 -7293
  125. package/dist/index-Bm3FE_ss.js +0 -504
  126. package/dist/index-BpTrDbkf.js +0 -22
  127. package/dist/index-C54wX50t.cjs +0 -1
  128. package/dist/index-CFriKZ-T.cjs +0 -1
  129. package/dist/index-CsOz5vsv.cjs +0 -1
  130. package/dist/index-D4pN9YmB.js +0 -144
  131. package/dist/index-DOhvzke2.js +0 -24
  132. package/dist/index-DPX3w6cO.js +0 -2643
  133. package/dist/index-DR9beXhk.cjs +0 -1
  134. package/dist/index-Do8zI4DM.cjs +0 -1
  135. package/dist/index-dwX_BHyo.cjs +0 -1
  136. package/dist/index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D6X3fCNs.cjs +0 -5677
  137. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-DLuOs1IZ.cjs +0 -56
  138. package/dist/index.vue_vue_type_style_index_1_lang-B0l6QIWy.js +0 -7806
  139. package/dist/index.vue_vue_type_style_index_1_lang-CC1o5rIu.cjs +0 -32
  140. package/dist/index.vue_vue_type_style_index_1_lang-Chzrrthw.cjs +0 -6
  141. package/dist/threePreview-BNvDY6xx.cjs +0 -1
  142. package/dist/threeTrackPathView-DgnuPrBe.cjs +0 -370
  143. package/dist/threeViewerHost-D80V4Cfh.cjs +0 -1
@@ -1,23 +1,23 @@
1
- import { ref as K, shallowRef as Be, defineComponent as Ke, watch as Z, onMounted as Ve, nextTick as ze, onBeforeUnmount as Xe, resolveComponent as qe, createElementBlock as ee, openBlock as te, createElementVNode as L, withDirectives as z, createCommentVNode as pe, createVNode as H, unref as b, renderSlot as me, toDisplayString as ge, withCtx as We, isRef as $, vModelRadio as J, vShow as Ye } from "vue";
2
- import { u as $e, a as Je, b as Qe } from "./iconfont-DTSZW2AU.js";
3
- import { J as Ze, K as ce, N as Se, O as et, Q as W, R as Ne, U as O, Y as Ie, C as G, Z as P, f as Y, _ as tt, n as nt, D as st, r as Q, V as B, $ as rt, a0 as Ce, a1 as it, a2 as Oe, a3 as ot, a4 as at, a5 as ne, a6 as ct, a7 as ve, a8 as lt, a9 as ut, aa as ft, ab as le, ac as ke, ad as ue, ae as dt, af as ht, ag as pt, ah as se, ai as mt, v as Pe, p as gt, aj as q, ak as Tt, w as xt, al as Rt, k as Fe, am as Et, y as At, an as _t, ao as Lt, u as re, P as Mt, s as wt, ap as yt, aq as bt, ar as St, as as Nt, at as It, au as De, av as Ct, aw as Te, ax as xe, ay as Re, az as Ee, aA as Ae, aB as Ot, aC as vt, B as He, aD as kt, o as Pt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CtycIAIT.js";
4
- import { E as _e } from "./index-Dm_WlV6R.js";
5
- import { M as Ft, O as Dt, S as Ht } from "./MTLLoader-BD3cbBAW.js";
6
- import { T as j } from "./svgIcon-D-_fXUBL.js";
7
- import { _ as Ut } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
- function Le(f, t) {
9
- if (t === Ze)
10
- return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), f;
11
- if (t === ce || t === Se) {
12
- let e = f.getIndex();
1
+ import { ref as K, shallowRef as Ue, defineComponent as je, watch as Z, onMounted as Ke, nextTick as Ve, onBeforeUnmount as Xe, resolveComponent as ze, createElementBlock as ee, openBlock as te, createElementVNode as _, withDirectives as X, createCommentVNode as he, createVNode as H, unref as y, renderSlot as pe, toDisplayString as me, withCtx as qe, isRef as Q, vModelRadio as $, vShow as We } from "vue";
2
+ import { u as Ye, a as Qe, b as $e } from "./iconfont-D886hAXy.js";
3
+ import { J as Je, K as ce, N as ye, O as Ze, Q as W, R as Se, U as O, Y as Ne, C as G, Z as D, f as Y, _ as et, n as tt, D as nt, r as J, V as j, $ as st, a0 as Ie, a1 as rt, a2 as Ce, a3 as it, a4 as ot, a5 as ne, a6 as at, a7 as Oe, a8 as ct, a9 as lt, aa as ut, ab as ve, ac as dt, ad as le, ae as ft, af as ht, ag as pt, ah as se, ai as mt, v as De, p as gt, aj as q, ak as At, w as Tt, al as xt, k as Fe, am as Rt, y as Et, an as Lt, ao as _t, u as re, P as wt, s as bt, ap as Mt, aq as yt, ar as St, as as Nt, at as It, au as ke, av as Ct, aw as ge, ax as Ae, ay as Te, az as xe, aA as Re, aB as Ot, aC as vt, B as Pe, aD as Dt, o as Ft } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-aFJhRTyx.js";
4
+ import { E as Ee } from "./index-DNe_JGg0.js";
5
+ import { M as kt, O as Pt, S as Ht } from "./MTLLoader-DJNdEDx2.js";
6
+ import { T as U } from "./svgIcon-D-_fXUBL.js";
7
+ import { _ as Bt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
+ function Le(d, t) {
9
+ if (t === Je)
10
+ return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), d;
11
+ if (t === ce || t === ye) {
12
+ let e = d.getIndex();
13
13
  if (e === null) {
14
- const r = [], a = f.getAttribute("position");
14
+ const r = [], a = d.getAttribute("position");
15
15
  if (a !== void 0) {
16
16
  for (let o = 0; o < a.count; o++)
17
17
  r.push(o);
18
- f.setIndex(r), e = f.getIndex();
18
+ d.setIndex(r), e = d.getIndex();
19
19
  } else
20
- return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), f;
20
+ return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), d;
21
21
  }
22
22
  const i = e.count - 2, n = [];
23
23
  if (t === ce)
@@ -27,22 +27,17 @@ function Le(f, t) {
27
27
  for (let r = 0; r < i; r++)
28
28
  r % 2 === 0 ? (n.push(e.getX(r)), n.push(e.getX(r + 1)), n.push(e.getX(r + 2))) : (n.push(e.getX(r + 2)), n.push(e.getX(r + 1)), n.push(e.getX(r)));
29
29
  n.length / 3 !== i && console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");
30
- const s = f.clone();
30
+ const s = d.clone();
31
31
  return s.setIndex(n), s.clearGroups(), s;
32
32
  } else
33
- return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", t), f;
33
+ return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", t), d;
34
34
  }
35
- class Gt extends et {
36
- /**
37
- * Constructs a new glTF loader.
38
- *
39
- * @param {LoadingManager} [manager] - The loading manager.
40
- */
35
+ class Gt extends Ze {
41
36
  constructor(t) {
42
37
  super(t), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(e) {
43
- return new zt(e);
44
- }), this.register(function(e) {
45
38
  return new Xt(e);
39
+ }), this.register(function(e) {
40
+ return new zt(e);
46
41
  }), this.register(function(e) {
47
42
  return new tn(e);
48
43
  }), this.register(function(e) {
@@ -54,13 +49,13 @@ class Gt extends et {
54
49
  }), this.register(function(e) {
55
50
  return new Yt(e);
56
51
  }), this.register(function(e) {
57
- return new $t(e);
52
+ return new Qt(e);
58
53
  }), this.register(function(e) {
59
- return new Jt(e);
54
+ return new $t(e);
60
55
  }), this.register(function(e) {
61
56
  return new Vt(e);
62
57
  }), this.register(function(e) {
63
- return new Qt(e);
58
+ return new Jt(e);
64
59
  }), this.register(function(e) {
65
60
  return new qt(e);
66
61
  }), this.register(function(e) {
@@ -68,22 +63,13 @@ class Gt extends et {
68
63
  }), this.register(function(e) {
69
64
  return new Zt(e);
70
65
  }), this.register(function(e) {
71
- return new Bt(e);
66
+ return new jt(e);
72
67
  }), this.register(function(e) {
73
68
  return new rn(e);
74
69
  }), this.register(function(e) {
75
70
  return new on(e);
76
71
  });
77
72
  }
78
- /**
79
- * Starts loading from the given URL and passes the loaded glTF asset
80
- * to the `onLoad()` callback.
81
- *
82
- * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI.
83
- * @param {function(GLTFLoader~LoadObject)} onLoad - Executed when the loading process has been finished.
84
- * @param {onProgressCallback} onProgress - Executed while the loading is in progress.
85
- * @param {onErrorCallback} onError - Executed when errors occur.
86
- */
87
73
  load(t, e, i, n) {
88
74
  const s = this;
89
75
  let r;
@@ -97,7 +83,7 @@ class Gt extends et {
97
83
  this.manager.itemStart(t);
98
84
  const a = function(c) {
99
85
  n ? n(c) : console.error(c), s.manager.itemError(t), s.manager.itemEnd(t);
100
- }, o = new Ne(this.manager);
86
+ }, o = new Se(this.manager);
101
87
  o.setPath(this.path), o.setResponseType("arraybuffer"), o.setRequestHeader(this.requestHeader), o.setWithCredentials(this.withCredentials), o.load(t, function(c) {
102
88
  try {
103
89
  s.parse(c, r, function(u) {
@@ -108,78 +94,40 @@ class Gt extends et {
108
94
  }
109
95
  }, i, a);
110
96
  }
111
- /**
112
- * Sets the given Draco loader to this loader. Required for decoding assets
113
- * compressed with the `KHR_draco_mesh_compression` extension.
114
- *
115
- * @param {DRACOLoader} dracoLoader - The Draco loader to set.
116
- * @return {GLTFLoader} A reference to this loader.
117
- */
118
97
  setDRACOLoader(t) {
119
98
  return this.dracoLoader = t, this;
120
99
  }
121
- /**
122
- * Sets the given KTX2 loader to this loader. Required for loading KTX2
123
- * compressed textures.
124
- *
125
- * @param {KTX2Loader} ktx2Loader - The KTX2 loader to set.
126
- * @return {GLTFLoader} A reference to this loader.
127
- */
100
+ setDDSLoader() {
101
+ throw new Error(
102
+ 'THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".'
103
+ );
104
+ }
128
105
  setKTX2Loader(t) {
129
106
  return this.ktx2Loader = t, this;
130
107
  }
131
- /**
132
- * Sets the given meshopt decoder. Required for decoding assets
133
- * compressed with the `EXT_meshopt_compression` extension.
134
- *
135
- * @param {Object} meshoptDecoder - The meshopt decoder to set.
136
- * @return {GLTFLoader} A reference to this loader.
137
- */
138
108
  setMeshoptDecoder(t) {
139
109
  return this.meshoptDecoder = t, this;
140
110
  }
141
- /**
142
- * Registers a plugin callback. This API is internally used to implement the various
143
- * glTF extensions but can also used by third-party code to add additional logic
144
- * to the loader.
145
- *
146
- * @param {function(parser:GLTFParser)} callback - The callback function to register.
147
- * @return {GLTFLoader} A reference to this loader.
148
- */
149
111
  register(t) {
150
112
  return this.pluginCallbacks.indexOf(t) === -1 && this.pluginCallbacks.push(t), this;
151
113
  }
152
- /**
153
- * Unregisters a plugin callback.
154
- *
155
- * @param {Function} callback - The callback function to unregister.
156
- * @return {GLTFLoader} A reference to this loader.
157
- */
158
114
  unregister(t) {
159
115
  return this.pluginCallbacks.indexOf(t) !== -1 && this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(t), 1), this;
160
116
  }
161
- /**
162
- * Parses the given FBX data and returns the resulting group.
163
- *
164
- * @param {string|ArrayBuffer} data - The raw glTF data.
165
- * @param {string} path - The URL base path.
166
- * @param {function(GLTFLoader~LoadObject)} onLoad - Executed when the loading process has been finished.
167
- * @param {onErrorCallback} onError - Executed when errors occur.
168
- */
169
117
  parse(t, e, i, n) {
170
118
  let s;
171
119
  const r = {}, a = {}, o = new TextDecoder();
172
120
  if (typeof t == "string")
173
121
  s = JSON.parse(t);
174
122
  else if (t instanceof ArrayBuffer)
175
- if (o.decode(new Uint8Array(t, 0, 4)) === Ue) {
123
+ if (o.decode(new Uint8Array(t, 0, 4)) === He) {
176
124
  try {
177
- r[R.KHR_BINARY_GLTF] = new an(t);
125
+ r[x.KHR_BINARY_GLTF] = new an(t);
178
126
  } catch (l) {
179
127
  n && n(l);
180
128
  return;
181
129
  }
182
- s = JSON.parse(r[R.KHR_BINARY_GLTF].content);
130
+ s = JSON.parse(r[x.KHR_BINARY_GLTF].content);
183
131
  } else
184
132
  s = JSON.parse(o.decode(t));
185
133
  else
@@ -188,7 +136,7 @@ class Gt extends et {
188
136
  n && n(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
189
137
  return;
190
138
  }
191
- const c = new En(s, {
139
+ const c = new Rn(s, {
192
140
  path: e || this.resourcePath || "",
193
141
  crossOrigin: this.crossOrigin,
194
142
  requestHeader: this.requestHeader,
@@ -203,34 +151,26 @@ class Gt extends et {
203
151
  }
204
152
  if (s.extensionsUsed)
205
153
  for (let u = 0; u < s.extensionsUsed.length; ++u) {
206
- const l = s.extensionsUsed[u], d = s.extensionsRequired || [];
154
+ const l = s.extensionsUsed[u], f = s.extensionsRequired || [];
207
155
  switch (l) {
208
- case R.KHR_MATERIALS_UNLIT:
156
+ case x.KHR_MATERIALS_UNLIT:
209
157
  r[l] = new Kt();
210
158
  break;
211
- case R.KHR_DRACO_MESH_COMPRESSION:
159
+ case x.KHR_DRACO_MESH_COMPRESSION:
212
160
  r[l] = new cn(s, this.dracoLoader);
213
161
  break;
214
- case R.KHR_TEXTURE_TRANSFORM:
162
+ case x.KHR_TEXTURE_TRANSFORM:
215
163
  r[l] = new ln();
216
164
  break;
217
- case R.KHR_MESH_QUANTIZATION:
165
+ case x.KHR_MESH_QUANTIZATION:
218
166
  r[l] = new un();
219
167
  break;
220
168
  default:
221
- d.indexOf(l) >= 0 && a[l] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + l + '".');
169
+ f.indexOf(l) >= 0 && a[l] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + l + '".');
222
170
  }
223
171
  }
224
172
  c.setExtensions(r), c.setPlugins(a), c.parse(i, n);
225
173
  }
226
- /**
227
- * Async version of {@link GLTFLoader#parse}.
228
- *
229
- * @async
230
- * @param {string|ArrayBuffer} data - The raw glTF data.
231
- * @param {string} path - The URL base path.
232
- * @return {Promise<GLTFLoader~LoadObject>} A Promise that resolves with the loaded glTF when the parsing has been finished.
233
- */
234
174
  parseAsync(t, e) {
235
175
  const i = this;
236
176
  return new Promise(function(n, s) {
@@ -238,24 +178,24 @@ class Gt extends et {
238
178
  });
239
179
  }
240
180
  }
241
- function jt() {
242
- let f = {};
181
+ function Ut() {
182
+ let d = {};
243
183
  return {
244
184
  get: function(t) {
245
- return f[t];
185
+ return d[t];
246
186
  },
247
187
  add: function(t, e) {
248
- f[t] = e;
188
+ d[t] = e;
249
189
  },
250
190
  remove: function(t) {
251
- delete f[t];
191
+ delete d[t];
252
192
  },
253
193
  removeAll: function() {
254
- f = {};
194
+ d = {};
255
195
  }
256
196
  };
257
197
  }
258
- const R = {
198
+ const x = {
259
199
  KHR_BINARY_GLTF: "KHR_binary_glTF",
260
200
  KHR_DRACO_MESH_COMPRESSION: "KHR_draco_mesh_compression",
261
201
  KHR_LIGHTS_PUNCTUAL: "KHR_lights_punctual",
@@ -279,9 +219,9 @@ const R = {
279
219
  EXT_MESHOPT_COMPRESSION: "EXT_meshopt_compression",
280
220
  EXT_MESH_GPU_INSTANCING: "EXT_mesh_gpu_instancing"
281
221
  };
282
- class Bt {
222
+ class jt {
283
223
  constructor(t) {
284
- this.parser = t, this.name = R.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
224
+ this.parser = t, this.name = x.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
285
225
  }
286
226
  _markDefs() {
287
227
  const t = this.parser, e = this.parser.json.nodes || [];
@@ -297,22 +237,22 @@ class Bt {
297
237
  const s = e.json, o = ((s.extensions && s.extensions[this.name] || {}).lights || [])[t];
298
238
  let c;
299
239
  const u = new G(16777215);
300
- o.color !== void 0 && u.setRGB(o.color[0], o.color[1], o.color[2], P);
240
+ o.color !== void 0 && u.setRGB(o.color[0], o.color[1], o.color[2], D);
301
241
  const l = o.range !== void 0 ? o.range : 0;
302
242
  switch (o.type) {
303
243
  case "directional":
304
- c = new st(u), c.target.position.set(0, 0, -1), c.add(c.target);
244
+ c = new nt(u), c.target.position.set(0, 0, -1), c.add(c.target);
305
245
  break;
306
246
  case "point":
307
- c = new nt(u), c.distance = l;
247
+ c = new tt(u), c.distance = l;
308
248
  break;
309
249
  case "spot":
310
- c = new tt(u), c.distance = l, 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);
250
+ c = new et(u), c.distance = l, 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);
311
251
  break;
312
252
  default:
313
253
  throw new Error("THREE.GLTFLoader: Unexpected light type: " + o.type);
314
254
  }
315
- return c.position.set(0, 0, 0), k(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(i, n), n;
255
+ return c.position.set(0, 0, 0), c.decay = 2, P(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(i, n), n;
316
256
  }
317
257
  getDependency(t, e) {
318
258
  if (t === "light")
@@ -327,7 +267,7 @@ class Bt {
327
267
  }
328
268
  class Kt {
329
269
  constructor() {
330
- this.name = R.KHR_MATERIALS_UNLIT;
270
+ this.name = x.KHR_MATERIALS_UNLIT;
331
271
  }
332
272
  getMaterialType() {
333
273
  return q;
@@ -339,7 +279,7 @@ class Kt {
339
279
  if (s) {
340
280
  if (Array.isArray(s.baseColorFactor)) {
341
281
  const r = s.baseColorFactor;
342
- t.color.setRGB(r[0], r[1], r[2], P), t.opacity = r[3];
282
+ t.color.setRGB(r[0], r[1], r[2], D), t.opacity = r[3];
343
283
  }
344
284
  s.baseColorTexture !== void 0 && n.push(i.assignTexture(t, "map", s.baseColorTexture, Y));
345
285
  }
@@ -348,7 +288,7 @@ class Kt {
348
288
  }
349
289
  class Vt {
350
290
  constructor(t) {
351
- this.parser = t, this.name = R.KHR_MATERIALS_EMISSIVE_STRENGTH;
291
+ this.parser = t, this.name = x.KHR_MATERIALS_EMISSIVE_STRENGTH;
352
292
  }
353
293
  extendMaterialParams(t, e) {
354
294
  const n = this.parser.json.materials[t];
@@ -358,9 +298,9 @@ class Vt {
358
298
  return s !== void 0 && (e.emissiveIntensity = s), Promise.resolve();
359
299
  }
360
300
  }
361
- class zt {
301
+ class Xt {
362
302
  constructor(t) {
363
- this.parser = t, this.name = R.KHR_MATERIALS_CLEARCOAT;
303
+ this.parser = t, this.name = x.KHR_MATERIALS_CLEARCOAT;
364
304
  }
365
305
  getMaterialType(t) {
366
306
  const i = this.parser.json.materials[t];
@@ -373,14 +313,14 @@ class zt {
373
313
  const s = [], r = n.extensions[this.name];
374
314
  if (r.clearcoatFactor !== void 0 && (e.clearcoat = r.clearcoatFactor), r.clearcoatTexture !== void 0 && s.push(i.assignTexture(e, "clearcoatMap", r.clearcoatTexture)), r.clearcoatRoughnessFactor !== void 0 && (e.clearcoatRoughness = r.clearcoatRoughnessFactor), r.clearcoatRoughnessTexture !== void 0 && s.push(i.assignTexture(e, "clearcoatRoughnessMap", r.clearcoatRoughnessTexture)), r.clearcoatNormalTexture !== void 0 && (s.push(i.assignTexture(e, "clearcoatNormalMap", r.clearcoatNormalTexture)), r.clearcoatNormalTexture.scale !== void 0)) {
375
315
  const a = r.clearcoatNormalTexture.scale;
376
- e.clearcoatNormalScale = new Ie(a, a);
316
+ e.clearcoatNormalScale = new Ne(a, a);
377
317
  }
378
318
  return Promise.all(s);
379
319
  }
380
320
  }
381
- class Xt {
321
+ class zt {
382
322
  constructor(t) {
383
- this.parser = t, this.name = R.KHR_MATERIALS_DISPERSION;
323
+ this.parser = t, this.name = x.KHR_MATERIALS_DISPERSION;
384
324
  }
385
325
  getMaterialType(t) {
386
326
  const i = this.parser.json.materials[t];
@@ -396,7 +336,7 @@ class Xt {
396
336
  }
397
337
  class qt {
398
338
  constructor(t) {
399
- this.parser = t, this.name = R.KHR_MATERIALS_IRIDESCENCE;
339
+ this.parser = t, this.name = x.KHR_MATERIALS_IRIDESCENCE;
400
340
  }
401
341
  getMaterialType(t) {
402
342
  const i = this.parser.json.materials[t];
@@ -412,7 +352,7 @@ class qt {
412
352
  }
413
353
  class Wt {
414
354
  constructor(t) {
415
- this.parser = t, this.name = R.KHR_MATERIALS_SHEEN;
355
+ this.parser = t, this.name = x.KHR_MATERIALS_SHEEN;
416
356
  }
417
357
  getMaterialType(t) {
418
358
  const i = this.parser.json.materials[t];
@@ -427,14 +367,14 @@ class Wt {
427
367
  const r = n.extensions[this.name];
428
368
  if (r.sheenColorFactor !== void 0) {
429
369
  const a = r.sheenColorFactor;
430
- e.sheenColor.setRGB(a[0], a[1], a[2], P);
370
+ e.sheenColor.setRGB(a[0], a[1], a[2], D);
431
371
  }
432
372
  return r.sheenRoughnessFactor !== void 0 && (e.sheenRoughness = r.sheenRoughnessFactor), r.sheenColorTexture !== void 0 && s.push(i.assignTexture(e, "sheenColorMap", r.sheenColorTexture, Y)), r.sheenRoughnessTexture !== void 0 && s.push(i.assignTexture(e, "sheenRoughnessMap", r.sheenRoughnessTexture)), Promise.all(s);
433
373
  }
434
374
  }
435
375
  class Yt {
436
376
  constructor(t) {
437
- this.parser = t, this.name = R.KHR_MATERIALS_TRANSMISSION;
377
+ this.parser = t, this.name = x.KHR_MATERIALS_TRANSMISSION;
438
378
  }
439
379
  getMaterialType(t) {
440
380
  const i = this.parser.json.materials[t];
@@ -448,9 +388,9 @@ class Yt {
448
388
  return r.transmissionFactor !== void 0 && (e.transmission = r.transmissionFactor), r.transmissionTexture !== void 0 && s.push(i.assignTexture(e, "transmissionMap", r.transmissionTexture)), Promise.all(s);
449
389
  }
450
390
  }
451
- class $t {
391
+ class Qt {
452
392
  constructor(t) {
453
- this.parser = t, this.name = R.KHR_MATERIALS_VOLUME;
393
+ this.parser = t, this.name = x.KHR_MATERIALS_VOLUME;
454
394
  }
455
395
  getMaterialType(t) {
456
396
  const i = this.parser.json.materials[t];
@@ -463,12 +403,12 @@ class $t {
463
403
  const s = [], r = n.extensions[this.name];
464
404
  e.thickness = r.thicknessFactor !== void 0 ? r.thicknessFactor : 0, r.thicknessTexture !== void 0 && s.push(i.assignTexture(e, "thicknessMap", r.thicknessTexture)), e.attenuationDistance = r.attenuationDistance || 1 / 0;
465
405
  const a = r.attenuationColor || [1, 1, 1];
466
- return e.attenuationColor = new G().setRGB(a[0], a[1], a[2], P), Promise.all(s);
406
+ return e.attenuationColor = new G().setRGB(a[0], a[1], a[2], D), Promise.all(s);
467
407
  }
468
408
  }
469
- class Jt {
409
+ class $t {
470
410
  constructor(t) {
471
- this.parser = t, this.name = R.KHR_MATERIALS_IOR;
411
+ this.parser = t, this.name = x.KHR_MATERIALS_IOR;
472
412
  }
473
413
  getMaterialType(t) {
474
414
  const i = this.parser.json.materials[t];
@@ -482,9 +422,9 @@ class Jt {
482
422
  return e.ior = s.ior !== void 0 ? s.ior : 1.5, Promise.resolve();
483
423
  }
484
424
  }
485
- class Qt {
425
+ class Jt {
486
426
  constructor(t) {
487
- this.parser = t, this.name = R.KHR_MATERIALS_SPECULAR;
427
+ this.parser = t, this.name = x.KHR_MATERIALS_SPECULAR;
488
428
  }
489
429
  getMaterialType(t) {
490
430
  const i = this.parser.json.materials[t];
@@ -497,12 +437,12 @@ class Qt {
497
437
  const s = [], r = n.extensions[this.name];
498
438
  e.specularIntensity = r.specularFactor !== void 0 ? r.specularFactor : 1, r.specularTexture !== void 0 && s.push(i.assignTexture(e, "specularIntensityMap", r.specularTexture));
499
439
  const a = r.specularColorFactor || [1, 1, 1];
500
- return e.specularColor = new G().setRGB(a[0], a[1], a[2], P), r.specularColorTexture !== void 0 && s.push(i.assignTexture(e, "specularColorMap", r.specularColorTexture, Y)), Promise.all(s);
440
+ return e.specularColor = new G().setRGB(a[0], a[1], a[2], D), r.specularColorTexture !== void 0 && s.push(i.assignTexture(e, "specularColorMap", r.specularColorTexture, Y)), Promise.all(s);
501
441
  }
502
442
  }
503
443
  class Zt {
504
444
  constructor(t) {
505
- this.parser = t, this.name = R.EXT_MATERIALS_BUMP;
445
+ this.parser = t, this.name = x.EXT_MATERIALS_BUMP;
506
446
  }
507
447
  getMaterialType(t) {
508
448
  const i = this.parser.json.materials[t];
@@ -518,7 +458,7 @@ class Zt {
518
458
  }
519
459
  class en {
520
460
  constructor(t) {
521
- this.parser = t, this.name = R.KHR_MATERIALS_ANISOTROPY;
461
+ this.parser = t, this.name = x.KHR_MATERIALS_ANISOTROPY;
522
462
  }
523
463
  getMaterialType(t) {
524
464
  const i = this.parser.json.materials[t];
@@ -534,7 +474,7 @@ class en {
534
474
  }
535
475
  class tn {
536
476
  constructor(t) {
537
- this.parser = t, this.name = R.KHR_TEXTURE_BASISU;
477
+ this.parser = t, this.name = x.KHR_TEXTURE_BASISU;
538
478
  }
539
479
  loadTexture(t) {
540
480
  const e = this.parser, i = e.json, n = i.textures[t];
@@ -551,7 +491,7 @@ class tn {
551
491
  }
552
492
  class nn {
553
493
  constructor(t) {
554
- this.parser = t, this.name = R.EXT_TEXTURE_WEBP;
494
+ this.parser = t, this.name = x.EXT_TEXTURE_WEBP, this.isSupported = null;
555
495
  }
556
496
  loadTexture(t) {
557
497
  const e = this.name, i = this.parser, n = i.json, s = n.textures[t];
@@ -563,12 +503,25 @@ class nn {
563
503
  const c = i.options.manager.getHandler(a.uri);
564
504
  c !== null && (o = c);
565
505
  }
566
- return i.loadTextureImage(t, r.source, o);
506
+ return this.detectSupport().then(function(c) {
507
+ if (c) return i.loadTextureImage(t, r.source, o);
508
+ if (n.extensionsRequired && n.extensionsRequired.indexOf(e) >= 0)
509
+ throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");
510
+ return i.loadTexture(t);
511
+ });
512
+ }
513
+ detectSupport() {
514
+ return this.isSupported || (this.isSupported = new Promise(function(t) {
515
+ const e = new Image();
516
+ e.src = "data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA", e.onload = e.onerror = function() {
517
+ t(e.height === 1);
518
+ };
519
+ })), this.isSupported;
567
520
  }
568
521
  }
569
522
  class sn {
570
523
  constructor(t) {
571
- this.parser = t, this.name = R.EXT_TEXTURE_AVIF;
524
+ this.parser = t, this.name = x.EXT_TEXTURE_AVIF, this.isSupported = null;
572
525
  }
573
526
  loadTexture(t) {
574
527
  const e = this.name, i = this.parser, n = i.json, s = n.textures[t];
@@ -580,12 +533,25 @@ class sn {
580
533
  const c = i.options.manager.getHandler(a.uri);
581
534
  c !== null && (o = c);
582
535
  }
583
- return i.loadTextureImage(t, r.source, o);
536
+ return this.detectSupport().then(function(c) {
537
+ if (c) return i.loadTextureImage(t, r.source, o);
538
+ if (n.extensionsRequired && n.extensionsRequired.indexOf(e) >= 0)
539
+ throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");
540
+ return i.loadTexture(t);
541
+ });
542
+ }
543
+ detectSupport() {
544
+ return this.isSupported || (this.isSupported = new Promise(function(t) {
545
+ const e = new Image();
546
+ e.src = "data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=", e.onload = e.onerror = function() {
547
+ t(e.height === 1);
548
+ };
549
+ })), this.isSupported;
584
550
  }
585
551
  }
586
552
  class rn {
587
553
  constructor(t) {
588
- this.name = R.EXT_MESHOPT_COMPRESSION, this.parser = t;
554
+ this.name = x.EXT_MESHOPT_COMPRESSION, this.parser = t;
589
555
  }
590
556
  loadBufferView(t) {
591
557
  const e = this.parser.json, i = e.bufferViews[t];
@@ -597,12 +563,12 @@ class rn {
597
563
  return null;
598
564
  }
599
565
  return s.then(function(a) {
600
- const o = n.byteOffset || 0, c = n.byteLength || 0, u = n.count, l = n.byteStride, d = new Uint8Array(a, o, c);
601
- return r.decodeGltfBufferAsync ? r.decodeGltfBufferAsync(u, l, d, n.mode, n.filter).then(function(h) {
566
+ const o = n.byteOffset || 0, c = n.byteLength || 0, u = n.count, l = n.byteStride, f = new Uint8Array(a, o, c);
567
+ return r.decodeGltfBufferAsync ? r.decodeGltfBufferAsync(u, l, f, n.mode, n.filter).then(function(h) {
602
568
  return h.buffer;
603
569
  }) : r.ready.then(function() {
604
570
  const h = new ArrayBuffer(u * l);
605
- return r.decodeGltfBuffer(new Uint8Array(h), u, l, d, n.mode, n.filter), h;
571
+ return r.decodeGltfBuffer(new Uint8Array(h), u, l, f, n.mode, n.filter), h;
606
572
  });
607
573
  });
608
574
  } else
@@ -611,7 +577,7 @@ class rn {
611
577
  }
612
578
  class on {
613
579
  constructor(t) {
614
- this.name = R.EXT_MESH_GPU_INSTANCING, this.parser = t;
580
+ this.name = x.EXT_MESH_GPU_INSTANCING, this.parser = t;
615
581
  }
616
582
  createNodeMesh(t) {
617
583
  const e = this.parser.json, i = e.nodes[t];
@@ -625,46 +591,46 @@ class on {
625
591
  for (const c in r)
626
592
  a.push(this.parser.getDependency("accessor", r[c]).then((u) => (o[c] = u, o[c])));
627
593
  return a.length < 1 ? null : (a.push(this.parser.createNodeMesh(t)), Promise.all(a).then((c) => {
628
- const u = c.pop(), l = u.isGroup ? u.children : [u], d = c[0].count, h = [];
594
+ const u = c.pop(), l = u.isGroup ? u.children : [u], f = c[0].count, h = [];
629
595
  for (const p of l) {
630
- const x = new Q(), m = new B(), g = new Ce(), E = new B(1, 1, 1), M = new rt(p.geometry, p.material, d);
631
- for (let T = 0; T < d; T++)
632
- o.TRANSLATION && m.fromBufferAttribute(o.TRANSLATION, T), o.ROTATION && g.fromBufferAttribute(o.ROTATION, T), o.SCALE && E.fromBufferAttribute(o.SCALE, T), M.setMatrixAt(T, x.compose(m, g, E));
633
- for (const T in o)
634
- if (T === "_COLOR_0") {
635
- const N = o[T];
636
- M.instanceColor = new it(N.array, N.itemSize, N.normalized);
637
- } else T !== "TRANSLATION" && T !== "ROTATION" && T !== "SCALE" && p.geometry.setAttribute(T, o[T]);
638
- Oe.prototype.copy.call(M, p), this.parser.assignFinalMaterial(M), h.push(M);
596
+ const T = new J(), m = new j(), g = new Ie(), R = new j(1, 1, 1), w = new st(p.geometry, p.material, f);
597
+ for (let A = 0; A < f; A++)
598
+ o.TRANSLATION && m.fromBufferAttribute(o.TRANSLATION, A), o.ROTATION && g.fromBufferAttribute(o.ROTATION, A), o.SCALE && R.fromBufferAttribute(o.SCALE, A), w.setMatrixAt(A, T.compose(m, g, R));
599
+ for (const A in o)
600
+ if (A === "_COLOR_0") {
601
+ const N = o[A];
602
+ w.instanceColor = new rt(N.array, N.itemSize, N.normalized);
603
+ } else A !== "TRANSLATION" && A !== "ROTATION" && A !== "SCALE" && p.geometry.setAttribute(A, o[A]);
604
+ Ce.prototype.copy.call(w, p), this.parser.assignFinalMaterial(w), h.push(w);
639
605
  }
640
606
  return u.isGroup ? (u.clear(), u.add(...h), u) : h[0];
641
607
  }));
642
608
  }
643
609
  }
644
- const Ue = "glTF", X = 12, Me = { JSON: 1313821514, BIN: 5130562 };
610
+ const He = "glTF", z = 12, _e = { JSON: 1313821514, BIN: 5130562 };
645
611
  class an {
646
612
  constructor(t) {
647
- this.name = R.KHR_BINARY_GLTF, this.content = null, this.body = null;
648
- const e = new DataView(t, 0, X), i = new TextDecoder();
613
+ this.name = x.KHR_BINARY_GLTF, this.content = null, this.body = null;
614
+ const e = new DataView(t, 0, z), i = new TextDecoder();
649
615
  if (this.header = {
650
616
  magic: i.decode(new Uint8Array(t.slice(0, 4))),
651
617
  version: e.getUint32(4, !0),
652
618
  length: e.getUint32(8, !0)
653
- }, this.header.magic !== Ue)
619
+ }, this.header.magic !== He)
654
620
  throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
655
621
  if (this.header.version < 2)
656
622
  throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
657
- const n = this.header.length - X, s = new DataView(t, X);
623
+ const n = this.header.length - z, s = new DataView(t, z);
658
624
  let r = 0;
659
625
  for (; r < n; ) {
660
626
  const a = s.getUint32(r, !0);
661
627
  r += 4;
662
628
  const o = s.getUint32(r, !0);
663
- if (r += 4, o === Me.JSON) {
664
- const c = new Uint8Array(t, X + r, a);
629
+ if (r += 4, o === _e.JSON) {
630
+ const c = new Uint8Array(t, z + r, a);
665
631
  this.content = i.decode(c);
666
- } else if (o === Me.BIN) {
667
- const c = X + r;
632
+ } else if (o === _e.BIN) {
633
+ const c = z + r;
668
634
  this.body = t.slice(c, c + a);
669
635
  }
670
636
  r += a;
@@ -677,37 +643,37 @@ class cn {
677
643
  constructor(t, e) {
678
644
  if (!e)
679
645
  throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
680
- this.name = R.KHR_DRACO_MESH_COMPRESSION, this.json = t, this.dracoLoader = e, this.dracoLoader.preload();
646
+ this.name = x.KHR_DRACO_MESH_COMPRESSION, this.json = t, this.dracoLoader = e, this.dracoLoader.preload();
681
647
  }
682
648
  decodePrimitive(t, e) {
683
649
  const i = this.json, n = this.dracoLoader, s = t.extensions[this.name].bufferView, r = t.extensions[this.name].attributes, a = {}, o = {}, c = {};
684
650
  for (const u in r) {
685
- const l = fe[u] || u.toLowerCase();
651
+ const l = ue[u] || u.toLowerCase();
686
652
  a[l] = r[u];
687
653
  }
688
654
  for (const u in t.attributes) {
689
- const l = fe[u] || u.toLowerCase();
655
+ const l = ue[u] || u.toLowerCase();
690
656
  if (r[u] !== void 0) {
691
- const d = i.accessors[t.attributes[u]], h = V[d.componentType];
692
- c[l] = h.name, o[l] = d.normalized === !0;
657
+ const f = i.accessors[t.attributes[u]], h = V[f.componentType];
658
+ c[l] = h.name, o[l] = f.normalized === !0;
693
659
  }
694
660
  }
695
661
  return e.getDependency("bufferView", s).then(function(u) {
696
- return new Promise(function(l, d) {
662
+ return new Promise(function(l, f) {
697
663
  n.decodeDracoFile(u, function(h) {
698
664
  for (const p in h.attributes) {
699
- const x = h.attributes[p], m = o[p];
700
- m !== void 0 && (x.normalized = m);
665
+ const T = h.attributes[p], m = o[p];
666
+ m !== void 0 && (T.normalized = m);
701
667
  }
702
668
  l(h);
703
- }, a, c, P, d);
669
+ }, a, c, D, f);
704
670
  });
705
671
  });
706
672
  }
707
673
  }
708
674
  class ln {
709
675
  constructor() {
710
- this.name = R.KHR_TEXTURE_TRANSFORM;
676
+ this.name = x.KHR_TEXTURE_TRANSFORM;
711
677
  }
712
678
  extendTexture(t, e) {
713
679
  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;
@@ -715,10 +681,10 @@ class ln {
715
681
  }
716
682
  class un {
717
683
  constructor() {
718
- this.name = R.KHR_MESH_QUANTIZATION;
684
+ this.name = x.KHR_MESH_QUANTIZATION;
719
685
  }
720
686
  }
721
- class Ge extends vt {
687
+ class Be extends vt {
722
688
  constructor(t, e, i, n) {
723
689
  super(t, e, i, n);
724
690
  }
@@ -729,19 +695,19 @@ class Ge extends vt {
729
695
  return e;
730
696
  }
731
697
  interpolate_(t, e, i, n) {
732
- const s = this.resultBuffer, r = this.sampleValues, a = this.valueSize, o = a * 2, c = a * 3, u = n - e, l = (i - e) / u, d = l * l, h = d * l, p = t * c, x = p - c, m = -2 * h + 3 * d, g = h - d, E = 1 - m, M = g - d + l;
733
- for (let T = 0; T !== a; T++) {
734
- const N = r[x + T + a], I = r[x + T + o] * u, _ = r[p + T + a], v = r[p + T] * u;
735
- s[T] = E * N + M * I + m * _ + g * v;
698
+ const s = this.resultBuffer, r = this.sampleValues, a = this.valueSize, o = a * 2, c = a * 3, u = n - e, l = (i - e) / u, f = l * l, h = f * l, p = t * c, T = p - c, m = -2 * h + 3 * f, g = h - f, R = 1 - m, w = g - f + l;
699
+ for (let A = 0; A !== a; A++) {
700
+ const N = r[T + A + a], I = r[T + A + o] * u, L = r[p + A + a], v = r[p + A] * u;
701
+ s[A] = R * N + w * I + m * L + g * v;
736
702
  }
737
703
  return s;
738
704
  }
739
705
  }
740
- const fn = new Ce();
741
- class dn extends Ge {
706
+ const dn = new Ie();
707
+ class fn extends Be {
742
708
  interpolate_(t, e, i, n) {
743
709
  const s = super.interpolate_(t, e, i, n);
744
- return fn.fromArray(s).normalize().toArray(s), s;
710
+ return dn.fromArray(s).normalize().toArray(s), s;
745
711
  }
746
712
  }
747
713
  const C = {
@@ -760,16 +726,16 @@ const C = {
760
726
  5125: Uint32Array,
761
727
  5126: Float32Array
762
728
  }, we = {
763
- 9728: ke,
764
- 9729: le,
765
- 9984: ft,
766
- 9985: ut,
767
- 9986: lt,
768
- 9987: ve
769
- }, ye = {
729
+ 9728: dt,
730
+ 9729: ve,
731
+ 9984: ut,
732
+ 9985: lt,
733
+ 9986: ct,
734
+ 9987: Oe
735
+ }, be = {
770
736
  33071: ht,
771
- 33648: dt,
772
- 10497: ue
737
+ 33648: ft,
738
+ 10497: le
773
739
  }, ie = {
774
740
  SCALAR: 1,
775
741
  VEC2: 2,
@@ -778,7 +744,7 @@ const C = {
778
744
  MAT2: 4,
779
745
  MAT3: 9,
780
746
  MAT4: 16
781
- }, fe = {
747
+ }, ue = {
782
748
  POSITION: "position",
783
749
  NORMAL: "normal",
784
750
  TANGENT: "tangent",
@@ -789,7 +755,7 @@ const C = {
789
755
  COLOR_0: "color",
790
756
  WEIGHTS_0: "skinWeight",
791
757
  JOINTS_0: "skinIndex"
792
- }, D = {
758
+ }, k = {
793
759
  scale: "scale",
794
760
  translation: "position",
795
761
  rotation: "quaternion",
@@ -798,15 +764,15 @@ const C = {
798
764
  CUBICSPLINE: void 0,
799
765
  // We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
800
766
  // keyframe track will be initialized with a default interpolation type, then modified.
801
- LINEAR: De,
767
+ LINEAR: ke,
802
768
  STEP: It
803
769
  }, oe = {
804
770
  OPAQUE: "OPAQUE",
805
771
  MASK: "MASK",
806
772
  BLEND: "BLEND"
807
773
  };
808
- function pn(f) {
809
- return f.DefaultMaterial === void 0 && (f.DefaultMaterial = new Pe({
774
+ function pn(d) {
775
+ return d.DefaultMaterial === void 0 && (d.DefaultMaterial = new De({
810
776
  color: 16777215,
811
777
  emissive: 0,
812
778
  metalness: 1,
@@ -814,36 +780,36 @@ function pn(f) {
814
780
  transparent: !1,
815
781
  depthTest: !0,
816
782
  side: Ot
817
- })), f.DefaultMaterial;
783
+ })), d.DefaultMaterial;
818
784
  }
819
- function U(f, t, e) {
785
+ function B(d, t, e) {
820
786
  for (const i in e.extensions)
821
- f[i] === void 0 && (t.userData.gltfExtensions = t.userData.gltfExtensions || {}, t.userData.gltfExtensions[i] = e.extensions[i]);
787
+ d[i] === void 0 && (t.userData.gltfExtensions = t.userData.gltfExtensions || {}, t.userData.gltfExtensions[i] = e.extensions[i]);
822
788
  }
823
- function k(f, t) {
824
- t.extras !== void 0 && (typeof t.extras == "object" ? Object.assign(f.userData, t.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + t.extras));
789
+ function P(d, t) {
790
+ t.extras !== void 0 && (typeof t.extras == "object" ? Object.assign(d.userData, t.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + t.extras));
825
791
  }
826
- function mn(f, t, e) {
792
+ function mn(d, t, e) {
827
793
  let i = !1, n = !1, s = !1;
828
794
  for (let c = 0, u = t.length; c < u; c++) {
829
795
  const l = t[c];
830
796
  if (l.POSITION !== void 0 && (i = !0), l.NORMAL !== void 0 && (n = !0), l.COLOR_0 !== void 0 && (s = !0), i && n && s) break;
831
797
  }
832
- if (!i && !n && !s) return Promise.resolve(f);
798
+ if (!i && !n && !s) return Promise.resolve(d);
833
799
  const r = [], a = [], o = [];
834
800
  for (let c = 0, u = t.length; c < u; c++) {
835
801
  const l = t[c];
836
802
  if (i) {
837
- const d = l.POSITION !== void 0 ? e.getDependency("accessor", l.POSITION) : f.attributes.position;
838
- r.push(d);
803
+ const f = l.POSITION !== void 0 ? e.getDependency("accessor", l.POSITION) : d.attributes.position;
804
+ r.push(f);
839
805
  }
840
806
  if (n) {
841
- const d = l.NORMAL !== void 0 ? e.getDependency("accessor", l.NORMAL) : f.attributes.normal;
842
- a.push(d);
807
+ const f = l.NORMAL !== void 0 ? e.getDependency("accessor", l.NORMAL) : d.attributes.normal;
808
+ a.push(f);
843
809
  }
844
810
  if (s) {
845
- const d = l.COLOR_0 !== void 0 ? e.getDependency("accessor", l.COLOR_0) : f.attributes.color;
846
- o.push(d);
811
+ const f = l.COLOR_0 !== void 0 ? e.getDependency("accessor", l.COLOR_0) : d.attributes.color;
812
+ o.push(f);
847
813
  }
848
814
  }
849
815
  return Promise.all([
@@ -851,41 +817,41 @@ function mn(f, t, e) {
851
817
  Promise.all(a),
852
818
  Promise.all(o)
853
819
  ]).then(function(c) {
854
- const u = c[0], l = c[1], d = c[2];
855
- return i && (f.morphAttributes.position = u), n && (f.morphAttributes.normal = l), s && (f.morphAttributes.color = d), f.morphTargetsRelative = !0, f;
820
+ const u = c[0], l = c[1], f = c[2];
821
+ return i && (d.morphAttributes.position = u), n && (d.morphAttributes.normal = l), s && (d.morphAttributes.color = f), d.morphTargetsRelative = !0, d;
856
822
  });
857
823
  }
858
- function gn(f, t) {
859
- if (f.updateMorphTargets(), t.weights !== void 0)
824
+ function gn(d, t) {
825
+ if (d.updateMorphTargets(), t.weights !== void 0)
860
826
  for (let e = 0, i = t.weights.length; e < i; e++)
861
- f.morphTargetInfluences[e] = t.weights[e];
827
+ d.morphTargetInfluences[e] = t.weights[e];
862
828
  if (t.extras && Array.isArray(t.extras.targetNames)) {
863
829
  const e = t.extras.targetNames;
864
- if (f.morphTargetInfluences.length === e.length) {
865
- f.morphTargetDictionary = {};
830
+ if (d.morphTargetInfluences.length === e.length) {
831
+ d.morphTargetDictionary = {};
866
832
  for (let i = 0, n = e.length; i < n; i++)
867
- f.morphTargetDictionary[e[i]] = i;
833
+ d.morphTargetDictionary[e[i]] = i;
868
834
  } else
869
835
  console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.");
870
836
  }
871
837
  }
872
- function Tn(f) {
838
+ function An(d) {
873
839
  let t;
874
- const e = f.extensions && f.extensions[R.KHR_DRACO_MESH_COMPRESSION];
875
- if (e ? t = "draco:" + e.bufferView + ":" + e.indices + ":" + ae(e.attributes) : t = f.indices + ":" + ae(f.attributes) + ":" + f.mode, f.targets !== void 0)
876
- for (let i = 0, n = f.targets.length; i < n; i++)
877
- t += ":" + ae(f.targets[i]);
840
+ const e = d.extensions && d.extensions[x.KHR_DRACO_MESH_COMPRESSION];
841
+ if (e ? t = "draco:" + e.bufferView + ":" + e.indices + ":" + ae(e.attributes) : t = d.indices + ":" + ae(d.attributes) + ":" + d.mode, d.targets !== void 0)
842
+ for (let i = 0, n = d.targets.length; i < n; i++)
843
+ t += ":" + ae(d.targets[i]);
878
844
  return t;
879
845
  }
880
- function ae(f) {
846
+ function ae(d) {
881
847
  let t = "";
882
- const e = Object.keys(f).sort();
848
+ const e = Object.keys(d).sort();
883
849
  for (let i = 0, n = e.length; i < n; i++)
884
- t += e[i] + ":" + f[e[i]] + ";";
850
+ t += e[i] + ":" + d[e[i]] + ";";
885
851
  return t;
886
852
  }
887
- function de(f) {
888
- switch (f) {
853
+ function de(d) {
854
+ switch (d) {
889
855
  case Int8Array:
890
856
  return 1 / 127;
891
857
  case Uint8Array:
@@ -898,21 +864,15 @@ function de(f) {
898
864
  throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.");
899
865
  }
900
866
  }
901
- function xn(f) {
902
- return f.search(/\.jpe?g($|\?)/i) > 0 || f.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : f.search(/\.webp($|\?)/i) > 0 || f.search(/^data\:image\/webp/) === 0 ? "image/webp" : f.search(/\.ktx2($|\?)/i) > 0 || f.search(/^data\:image\/ktx2/) === 0 ? "image/ktx2" : "image/png";
867
+ function Tn(d) {
868
+ return d.search(/\.jpe?g($|\?)/i) > 0 || d.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : d.search(/\.webp($|\?)/i) > 0 || d.search(/^data\:image\/webp/) === 0 ? "image/webp" : "image/png";
903
869
  }
904
- const Rn = new Q();
905
- class En {
870
+ const xn = new J();
871
+ class Rn {
906
872
  constructor(t = {}, e = {}) {
907
- this.json = t, this.extensions = {}, this.plugins = {}, this.options = e, this.cache = new jt(), 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 = {};
908
- let i = !1, n = -1, s = !1, r = -1;
909
- if (typeof navigator < "u") {
910
- const a = navigator.userAgent;
911
- i = /^((?!chrome|android).)*safari/i.test(a) === !0;
912
- const o = a.match(/Version\/(\d+)/);
913
- n = i && o ? parseInt(o[1], 10) : -1, s = a.indexOf("Firefox") > -1, r = s ? a.match(/Firefox\/([0-9]+)\./)[1] : -1;
914
- }
915
- typeof createImageBitmap > "u" || i && n < 17 || s && r < 98 ? this.textureLoader = new ot(this.options.manager) : this.textureLoader = new at(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new Ne(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
873
+ this.json = t, this.extensions = {}, this.plugins = {}, this.options = e, this.cache = new Ut(), 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 = {};
874
+ let i = !1, n = !1, s = -1;
875
+ typeof navigator < "u" && (i = /^((?!chrome|android).)*safari/i.test(navigator.userAgent) === !0, n = navigator.userAgent.indexOf("Firefox") > -1, s = n ? navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1] : -1), typeof createImageBitmap > "u" || i || n && s < 98 ? this.textureLoader = new it(this.options.manager) : this.textureLoader = new ot(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new Se(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
916
876
  }
917
877
  setExtensions(t) {
918
878
  this.extensions = t;
@@ -942,7 +902,7 @@ class En {
942
902
  parser: i,
943
903
  userData: {}
944
904
  };
945
- return U(s, a, n), k(a, n), Promise.all(i._invokeAll(function(o) {
905
+ return B(s, a, n), P(a, n), Promise.all(i._invokeAll(function(o) {
946
906
  return o.afterRoot && o.afterRoot(a);
947
907
  })).then(function() {
948
908
  for (const o of a.scenes)
@@ -953,8 +913,6 @@ class En {
953
913
  }
954
914
  /**
955
915
  * Marks the special nodes/meshes in json for efficient parse.
956
- *
957
- * @private
958
916
  */
959
917
  _markDefs() {
960
918
  const t = this.json.nodes || [], e = this.json.skins || [], i = this.json.meshes || [];
@@ -976,23 +934,11 @@ class En {
976
934
  * Textures) can be reused directly and are not marked here.
977
935
  *
978
936
  * Example: CesiumMilkTruck sample model reuses "Wheel" meshes.
979
- *
980
- * @private
981
- * @param {Object} cache
982
- * @param {Object3D} index
983
937
  */
984
938
  _addNodeRef(t, e) {
985
939
  e !== void 0 && (t.refs[e] === void 0 && (t.refs[e] = t.uses[e] = 0), t.refs[e]++);
986
940
  }
987
- /**
988
- * Returns a reference to a shared resource, cloning it if necessary.
989
- *
990
- * @private
991
- * @param {Object} cache
992
- * @param {number} index
993
- * @param {Object} object
994
- * @return {Object}
995
- */
941
+ /** Returns a reference to a shared resource, cloning it if necessary. */
996
942
  _getNodeRef(t, e, i) {
997
943
  if (t.refs[e] <= 1) return i;
998
944
  const n = i.clone(), s = (r, a) => {
@@ -1024,8 +970,6 @@ class En {
1024
970
  }
1025
971
  /**
1026
972
  * Requests the specified dependency asynchronously, with caching.
1027
- *
1028
- * @private
1029
973
  * @param {string} type
1030
974
  * @param {number} index
1031
975
  * @return {Promise<Object3D|Material|THREE.Texture|AnimationClip|ArrayBuffer|Object>}
@@ -1093,8 +1037,6 @@ class En {
1093
1037
  }
1094
1038
  /**
1095
1039
  * Requests all dependencies of the specified type asynchronously, with caching.
1096
- *
1097
- * @private
1098
1040
  * @param {string} type
1099
1041
  * @return {Promise<Array<Object>>}
1100
1042
  */
@@ -1110,8 +1052,6 @@ class En {
1110
1052
  }
1111
1053
  /**
1112
1054
  * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#buffers-and-buffer-views
1113
- *
1114
- * @private
1115
1055
  * @param {number} bufferIndex
1116
1056
  * @return {Promise<ArrayBuffer>}
1117
1057
  */
@@ -1120,7 +1060,7 @@ class En {
1120
1060
  if (e.type && e.type !== "arraybuffer")
1121
1061
  throw new Error("THREE.GLTFLoader: " + e.type + " buffer type is not supported.");
1122
1062
  if (e.uri === void 0 && t === 0)
1123
- return Promise.resolve(this.extensions[R.KHR_BINARY_GLTF].body);
1063
+ return Promise.resolve(this.extensions[x.KHR_BINARY_GLTF].body);
1124
1064
  const n = this.options;
1125
1065
  return new Promise(function(s, r) {
1126
1066
  i.load(W.resolveURL(e.uri, n.path), s, void 0, function() {
@@ -1130,8 +1070,6 @@ class En {
1130
1070
  }
1131
1071
  /**
1132
1072
  * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#buffers-and-buffer-views
1133
- *
1134
- * @private
1135
1073
  * @param {number} bufferViewIndex
1136
1074
  * @return {Promise<ArrayBuffer>}
1137
1075
  */
@@ -1144,8 +1082,6 @@ class En {
1144
1082
  }
1145
1083
  /**
1146
1084
  * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#accessors
1147
- *
1148
- * @private
1149
1085
  * @param {number} accessorIndex
1150
1086
  * @return {Promise<BufferAttribute|InterleavedBufferAttribute>}
1151
1087
  */
@@ -1157,30 +1093,27 @@ class En {
1157
1093
  }
1158
1094
  const s = [];
1159
1095
  return n.bufferView !== void 0 ? s.push(this.getDependency("bufferView", n.bufferView)) : s.push(null), n.sparse !== void 0 && (s.push(this.getDependency("bufferView", n.sparse.indices.bufferView)), s.push(this.getDependency("bufferView", n.sparse.values.bufferView))), Promise.all(s).then(function(r) {
1160
- const a = r[0], o = ie[n.type], c = V[n.componentType], u = c.BYTES_PER_ELEMENT, l = u * o, d = n.byteOffset || 0, h = n.bufferView !== void 0 ? i.bufferViews[n.bufferView].byteStride : void 0, p = n.normalized === !0;
1161
- let x, m;
1096
+ const a = r[0], o = ie[n.type], c = V[n.componentType], u = c.BYTES_PER_ELEMENT, l = u * o, f = n.byteOffset || 0, h = n.bufferView !== void 0 ? i.bufferViews[n.bufferView].byteStride : void 0, p = n.normalized === !0;
1097
+ let T, m;
1162
1098
  if (h && h !== l) {
1163
- const g = Math.floor(d / h), E = "InterleavedBuffer:" + n.bufferView + ":" + n.componentType + ":" + g + ":" + n.count;
1164
- let M = e.cache.get(E);
1165
- M || (x = new c(a, g * h, n.count * h / u), M = new ct(x, h / u), e.cache.add(E, M)), m = new Ct(M, o, d % h / u, p);
1099
+ const g = Math.floor(f / h), R = "InterleavedBuffer:" + n.bufferView + ":" + n.componentType + ":" + g + ":" + n.count;
1100
+ let w = e.cache.get(R);
1101
+ w || (T = new c(a, g * h, n.count * h / u), w = new at(T, h / u), e.cache.add(R, w)), m = new Ct(w, o, f % h / u, p);
1166
1102
  } else
1167
- a === null ? x = new c(n.count * o) : x = new c(a, d, n.count * o), m = new ne(x, o, p);
1103
+ a === null ? T = new c(n.count * o) : T = new c(a, f, n.count * o), m = new ne(T, o, p);
1168
1104
  if (n.sparse !== void 0) {
1169
- const g = ie.SCALAR, E = V[n.sparse.indices.componentType], M = n.sparse.indices.byteOffset || 0, T = n.sparse.values.byteOffset || 0, N = new E(r[1], M, n.sparse.count * g), I = new c(r[2], T, n.sparse.count * o);
1170
- a !== null && (m = new ne(m.array.slice(), m.itemSize, m.normalized)), m.normalized = !1;
1171
- for (let _ = 0, v = N.length; _ < v; _++) {
1172
- const w = N[_];
1173
- if (m.setX(w, I[_ * o]), o >= 2 && m.setY(w, I[_ * o + 1]), o >= 3 && m.setZ(w, I[_ * o + 2]), o >= 4 && m.setW(w, I[_ * o + 3]), o >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
1105
+ const g = ie.SCALAR, R = V[n.sparse.indices.componentType], w = n.sparse.indices.byteOffset || 0, A = n.sparse.values.byteOffset || 0, N = new R(r[1], w, n.sparse.count * g), I = new c(r[2], A, n.sparse.count * o);
1106
+ a !== null && (m = new ne(m.array.slice(), m.itemSize, m.normalized));
1107
+ for (let L = 0, v = N.length; L < v; L++) {
1108
+ const b = N[L];
1109
+ if (m.setX(b, I[L * o]), o >= 2 && m.setY(b, I[L * o + 1]), o >= 3 && m.setZ(b, I[L * o + 2]), o >= 4 && m.setW(b, I[L * o + 3]), o >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
1174
1110
  }
1175
- m.normalized = p;
1176
1111
  }
1177
1112
  return m;
1178
1113
  });
1179
1114
  }
1180
1115
  /**
1181
1116
  * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#textures
1182
- *
1183
- * @private
1184
1117
  * @param {number} textureIndex
1185
1118
  * @return {Promise<THREE.Texture|null>}
1186
1119
  */
@@ -1199,8 +1132,8 @@ class En {
1199
1132
  return this.textureCache[o];
1200
1133
  const c = this.loadImageSource(e, i).then(function(u) {
1201
1134
  u.flipY = !1, u.name = r.name || a.name || "", u.name === "" && typeof a.uri == "string" && a.uri.startsWith("data:image/") === !1 && (u.name = a.uri);
1202
- const d = (s.samplers || {})[r.sampler] || {};
1203
- return u.magFilter = we[d.magFilter] || le, u.minFilter = we[d.minFilter] || ve, u.wrapS = ye[d.wrapS] || ue, u.wrapT = ye[d.wrapT] || ue, u.generateMipmaps = !u.isCompressedTexture && u.minFilter !== ke && u.minFilter !== le, n.associations.set(u, { textures: t }), u;
1135
+ const f = (s.samplers || {})[r.sampler] || {};
1136
+ return u.magFilter = we[f.magFilter] || ve, u.minFilter = we[f.minFilter] || Oe, u.wrapS = be[f.wrapS] || le, u.wrapT = be[f.wrapT] || le, n.associations.set(u, { textures: t }), u;
1204
1137
  }).catch(function() {
1205
1138
  return null;
1206
1139
  });
@@ -1215,21 +1148,21 @@ class En {
1215
1148
  if (r.bufferView !== void 0)
1216
1149
  o = i.getDependency("bufferView", r.bufferView).then(function(l) {
1217
1150
  c = !0;
1218
- const d = new Blob([l], { type: r.mimeType });
1219
- return o = a.createObjectURL(d), o;
1151
+ const f = new Blob([l], { type: r.mimeType });
1152
+ return o = a.createObjectURL(f), o;
1220
1153
  });
1221
1154
  else if (r.uri === void 0)
1222
1155
  throw new Error("THREE.GLTFLoader: Image " + t + " is missing URI and bufferView");
1223
1156
  const u = Promise.resolve(o).then(function(l) {
1224
- return new Promise(function(d, h) {
1225
- let p = d;
1226
- e.isImageBitmapLoader === !0 && (p = function(x) {
1227
- const m = new Te(x);
1228
- m.needsUpdate = !0, d(m);
1157
+ return new Promise(function(f, h) {
1158
+ let p = f;
1159
+ e.isImageBitmapLoader === !0 && (p = function(T) {
1160
+ const m = new ge(T);
1161
+ m.needsUpdate = !0, f(m);
1229
1162
  }), e.load(W.resolveURL(l, s.path), p, void 0, h);
1230
1163
  });
1231
1164
  }).then(function(l) {
1232
- return c === !0 && a.revokeObjectURL(o), k(l, r), l.userData.mimeType = r.mimeType || xn(r.uri), l;
1165
+ return c === !0 && a.revokeObjectURL(o), l.userData.mimeType = r.mimeType || Tn(r.uri), l;
1233
1166
  }).catch(function(l) {
1234
1167
  throw console.error("THREE.GLTFLoader: Couldn't load texture", o), l;
1235
1168
  });
@@ -1237,23 +1170,20 @@ class En {
1237
1170
  }
1238
1171
  /**
1239
1172
  * Asynchronously assigns a texture to the given material parameters.
1240
- *
1241
- * @private
1242
1173
  * @param {Object} materialParams
1243
1174
  * @param {string} mapName
1244
1175
  * @param {Object} mapDef
1245
- * @param {string} [colorSpace]
1246
1176
  * @return {Promise<Texture>}
1247
1177
  */
1248
1178
  assignTexture(t, e, i, n) {
1249
1179
  const s = this;
1250
1180
  return this.getDependency("texture", i.index).then(function(r) {
1251
1181
  if (!r) return null;
1252
- if (i.texCoord !== void 0 && i.texCoord > 0 && (r = r.clone(), r.channel = i.texCoord), s.extensions[R.KHR_TEXTURE_TRANSFORM]) {
1253
- const a = i.extensions !== void 0 ? i.extensions[R.KHR_TEXTURE_TRANSFORM] : void 0;
1182
+ if (i.texCoord !== void 0 && i.texCoord > 0 && (r = r.clone(), r.channel = i.texCoord), s.extensions[x.KHR_TEXTURE_TRANSFORM]) {
1183
+ const a = i.extensions !== void 0 ? i.extensions[x.KHR_TEXTURE_TRANSFORM] : void 0;
1254
1184
  if (a) {
1255
1185
  const o = s.associations.get(r);
1256
- r = s.extensions[R.KHR_TEXTURE_TRANSFORM].extendTexture(r, a), s.associations.set(r, o);
1186
+ r = s.extensions[x.KHR_TEXTURE_TRANSFORM].extendTexture(r, a), s.associations.set(r, o);
1257
1187
  }
1258
1188
  }
1259
1189
  return n !== void 0 && (r.colorSpace = n), t[e] = r, r;
@@ -1265,9 +1195,7 @@ class En {
1265
1195
  * but reuse of the same glTF material may require multiple threejs materials
1266
1196
  * to accommodate different primitive types, defines, etc. New materials will
1267
1197
  * be created if necessary, and reused from a cache.
1268
- *
1269
- * @private
1270
- * @param {Object3D} mesh Mesh, Line, or Points instance.
1198
+ * @param {Object3D} mesh Mesh, Line, or Points instance.
1271
1199
  */
1272
1200
  assignFinalMaterial(t) {
1273
1201
  const e = t.geometry;
@@ -1291,12 +1219,10 @@ class En {
1291
1219
  t.material = i;
1292
1220
  }
1293
1221
  getMaterialType() {
1294
- return Pe;
1222
+ return De;
1295
1223
  }
1296
1224
  /**
1297
1225
  * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials
1298
- *
1299
- * @private
1300
1226
  * @param {number} materialIndex
1301
1227
  * @return {Promise<Material>}
1302
1228
  */
@@ -1304,45 +1230,39 @@ class En {
1304
1230
  const e = this, i = this.json, n = this.extensions, s = i.materials[t];
1305
1231
  let r;
1306
1232
  const a = {}, o = s.extensions || {}, c = [];
1307
- if (o[R.KHR_MATERIALS_UNLIT]) {
1308
- const l = n[R.KHR_MATERIALS_UNLIT];
1233
+ if (o[x.KHR_MATERIALS_UNLIT]) {
1234
+ const l = n[x.KHR_MATERIALS_UNLIT];
1309
1235
  r = l.getMaterialType(), c.push(l.extendParams(a, s, e));
1310
1236
  } else {
1311
1237
  const l = s.pbrMetallicRoughness || {};
1312
1238
  if (a.color = new G(1, 1, 1), a.opacity = 1, Array.isArray(l.baseColorFactor)) {
1313
- const d = l.baseColorFactor;
1314
- a.color.setRGB(d[0], d[1], d[2], P), a.opacity = d[3];
1239
+ const f = l.baseColorFactor;
1240
+ a.color.setRGB(f[0], f[1], f[2], D), a.opacity = f[3];
1315
1241
  }
1316
- l.baseColorTexture !== void 0 && c.push(e.assignTexture(a, "map", l.baseColorTexture, Y)), a.metalness = l.metallicFactor !== void 0 ? l.metallicFactor : 1, a.roughness = l.roughnessFactor !== void 0 ? l.roughnessFactor : 1, l.metallicRoughnessTexture !== void 0 && (c.push(e.assignTexture(a, "metalnessMap", l.metallicRoughnessTexture)), c.push(e.assignTexture(a, "roughnessMap", l.metallicRoughnessTexture))), r = this._invokeOne(function(d) {
1317
- return d.getMaterialType && d.getMaterialType(t);
1318
- }), c.push(Promise.all(this._invokeAll(function(d) {
1319
- return d.extendMaterialParams && d.extendMaterialParams(t, a);
1242
+ l.baseColorTexture !== void 0 && c.push(e.assignTexture(a, "map", l.baseColorTexture, Y)), a.metalness = l.metallicFactor !== void 0 ? l.metallicFactor : 1, a.roughness = l.roughnessFactor !== void 0 ? l.roughnessFactor : 1, l.metallicRoughnessTexture !== void 0 && (c.push(e.assignTexture(a, "metalnessMap", l.metallicRoughnessTexture)), c.push(e.assignTexture(a, "roughnessMap", l.metallicRoughnessTexture))), r = this._invokeOne(function(f) {
1243
+ return f.getMaterialType && f.getMaterialType(t);
1244
+ }), c.push(Promise.all(this._invokeAll(function(f) {
1245
+ return f.extendMaterialParams && f.extendMaterialParams(t, a);
1320
1246
  })));
1321
1247
  }
1322
1248
  s.doubleSided === !0 && (a.side = gt);
1323
1249
  const u = s.alphaMode || oe.OPAQUE;
1324
- if (u === oe.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, u === oe.MASK && (a.alphaTest = s.alphaCutoff !== void 0 ? s.alphaCutoff : 0.5)), s.normalTexture !== void 0 && r !== q && (c.push(e.assignTexture(a, "normalMap", s.normalTexture)), a.normalScale = new Ie(1, 1), s.normalTexture.scale !== void 0)) {
1250
+ if (u === oe.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, u === oe.MASK && (a.alphaTest = s.alphaCutoff !== void 0 ? s.alphaCutoff : 0.5)), s.normalTexture !== void 0 && r !== q && (c.push(e.assignTexture(a, "normalMap", s.normalTexture)), a.normalScale = new Ne(1, 1), s.normalTexture.scale !== void 0)) {
1325
1251
  const l = s.normalTexture.scale;
1326
1252
  a.normalScale.set(l, l);
1327
1253
  }
1328
1254
  if (s.occlusionTexture !== void 0 && r !== q && (c.push(e.assignTexture(a, "aoMap", s.occlusionTexture)), s.occlusionTexture.strength !== void 0 && (a.aoMapIntensity = s.occlusionTexture.strength)), s.emissiveFactor !== void 0 && r !== q) {
1329
1255
  const l = s.emissiveFactor;
1330
- a.emissive = new G().setRGB(l[0], l[1], l[2], P);
1256
+ a.emissive = new G().setRGB(l[0], l[1], l[2], D);
1331
1257
  }
1332
1258
  return s.emissiveTexture !== void 0 && r !== q && c.push(e.assignTexture(a, "emissiveMap", s.emissiveTexture, Y)), Promise.all(c).then(function() {
1333
1259
  const l = new r(a);
1334
- return s.name && (l.name = s.name), k(l, s), e.associations.set(l, { materials: t }), s.extensions && U(n, l, s), l;
1260
+ return s.name && (l.name = s.name), P(l, s), e.associations.set(l, { materials: t }), s.extensions && B(n, l, s), l;
1335
1261
  });
1336
1262
  }
1337
- /**
1338
- * When Object3D instances are targeted by animation, they need unique names.
1339
- *
1340
- * @private
1341
- * @param {string} originalName
1342
- * @return {string}
1343
- */
1263
+ /** When Object3D instances are targeted by animation, they need unique names. */
1344
1264
  createUniqueName(t) {
1345
- const e = Tt.sanitizeNodeName(t || "");
1265
+ const e = At.sanitizeNodeName(t || "");
1346
1266
  return e in this.nodeNamesUsed ? e + "_" + ++this.nodeNamesUsed[e] : (this.nodeNamesUsed[e] = 0, e);
1347
1267
  }
1348
1268
  /**
@@ -1350,35 +1270,32 @@ class En {
1350
1270
  *
1351
1271
  * Creates BufferGeometries from primitives.
1352
1272
  *
1353
- * @private
1354
1273
  * @param {Array<GLTF.Primitive>} primitives
1355
1274
  * @return {Promise<Array<BufferGeometry>>}
1356
1275
  */
1357
1276
  loadGeometries(t) {
1358
1277
  const e = this, i = this.extensions, n = this.primitiveCache;
1359
1278
  function s(a) {
1360
- return i[R.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a, e).then(function(o) {
1361
- return be(o, a, e);
1279
+ return i[x.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a, e).then(function(o) {
1280
+ return Me(o, a, e);
1362
1281
  });
1363
1282
  }
1364
1283
  const r = [];
1365
1284
  for (let a = 0, o = t.length; a < o; a++) {
1366
- const c = t[a], u = Tn(c), l = n[u];
1285
+ const c = t[a], u = An(c), l = n[u];
1367
1286
  if (l)
1368
1287
  r.push(l.promise);
1369
1288
  else {
1370
- let d;
1371
- c.extensions && c.extensions[R.KHR_DRACO_MESH_COMPRESSION] ? d = s(c) : d = be(new xt(), c, e), n[u] = { primitive: c, promise: d }, r.push(d);
1289
+ let f;
1290
+ c.extensions && c.extensions[x.KHR_DRACO_MESH_COMPRESSION] ? f = s(c) : f = Me(new Tt(), c, e), n[u] = { primitive: c, promise: f }, r.push(f);
1372
1291
  }
1373
1292
  }
1374
1293
  return Promise.all(r);
1375
1294
  }
1376
1295
  /**
1377
1296
  * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#meshes
1378
- *
1379
- * @private
1380
1297
  * @param {number} meshIndex
1381
- * @return {Promise<Group|Mesh|SkinnedMesh|Line|Points>}
1298
+ * @return {Promise<Group|Mesh|SkinnedMesh>}
1382
1299
  */
1383
1300
  loadMesh(t) {
1384
1301
  const e = this, i = this.json, n = this.extensions, s = i.meshes[t], r = s.primitives, a = [];
@@ -1389,22 +1306,22 @@ class En {
1389
1306
  return a.push(e.loadGeometries(r)), Promise.all(a).then(function(o) {
1390
1307
  const c = o.slice(0, o.length - 1), u = o[o.length - 1], l = [];
1391
1308
  for (let h = 0, p = u.length; h < p; h++) {
1392
- const x = u[h], m = r[h];
1309
+ const T = u[h], m = r[h];
1393
1310
  let g;
1394
- const E = c[h];
1311
+ const R = c[h];
1395
1312
  if (m.mode === C.TRIANGLES || m.mode === C.TRIANGLE_STRIP || m.mode === C.TRIANGLE_FAN || m.mode === void 0)
1396
- g = s.isSkinnedMesh === !0 ? new Rt(x, E) : new Fe(x, E), g.isSkinnedMesh === !0 && g.normalizeSkinWeights(), m.mode === C.TRIANGLE_STRIP ? g.geometry = Le(g.geometry, Se) : m.mode === C.TRIANGLE_FAN && (g.geometry = Le(g.geometry, ce));
1313
+ g = s.isSkinnedMesh === !0 ? new xt(T, R) : new Fe(T, R), g.isSkinnedMesh === !0 && g.normalizeSkinWeights(), m.mode === C.TRIANGLE_STRIP ? g.geometry = Le(g.geometry, ye) : m.mode === C.TRIANGLE_FAN && (g.geometry = Le(g.geometry, ce));
1397
1314
  else if (m.mode === C.LINES)
1398
- g = new Et(x, E);
1315
+ g = new Rt(T, R);
1399
1316
  else if (m.mode === C.LINE_STRIP)
1400
- g = new At(x, E);
1317
+ g = new Et(T, R);
1401
1318
  else if (m.mode === C.LINE_LOOP)
1402
- g = new _t(x, E);
1319
+ g = new Lt(T, R);
1403
1320
  else if (m.mode === C.POINTS)
1404
- g = new Lt(x, E);
1321
+ g = new _t(T, R);
1405
1322
  else
1406
1323
  throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + m.mode);
1407
- Object.keys(g.geometry.morphAttributes).length > 0 && gn(g, s), g.name = e.createUniqueName(s.name || "mesh_" + t), k(g, s), m.extensions && U(n, g, m), e.assignFinalMaterial(g), l.push(g);
1324
+ Object.keys(g.geometry.morphAttributes).length > 0 && gn(g, s), g.name = e.createUniqueName(s.name || "mesh_" + t), P(g, s), m.extensions && B(n, g, m), e.assignFinalMaterial(g), l.push(g);
1408
1325
  }
1409
1326
  for (let h = 0, p = l.length; h < p; h++)
1410
1327
  e.associations.set(l[h], {
@@ -1412,18 +1329,16 @@ class En {
1412
1329
  primitives: h
1413
1330
  });
1414
1331
  if (l.length === 1)
1415
- return s.extensions && U(n, l[0], s), l[0];
1416
- const d = new re();
1417
- s.extensions && U(n, d, s), e.associations.set(d, { meshes: t });
1332
+ return s.extensions && B(n, l[0], s), l[0];
1333
+ const f = new re();
1334
+ s.extensions && B(n, f, s), e.associations.set(f, { meshes: t });
1418
1335
  for (let h = 0, p = l.length; h < p; h++)
1419
- d.add(l[h]);
1420
- return d;
1336
+ f.add(l[h]);
1337
+ return f;
1421
1338
  });
1422
1339
  }
1423
1340
  /**
1424
1341
  * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#cameras
1425
- *
1426
- * @private
1427
1342
  * @param {number} cameraIndex
1428
1343
  * @return {Promise<THREE.Camera>}
1429
1344
  */
@@ -1434,12 +1349,10 @@ class En {
1434
1349
  console.warn("THREE.GLTFLoader: Missing camera parameters.");
1435
1350
  return;
1436
1351
  }
1437
- return i.type === "perspective" ? e = new Mt(wt.radToDeg(n.yfov), n.aspectRatio || 1, n.znear || 1, n.zfar || 2e6) : i.type === "orthographic" && (e = new yt(-n.xmag, n.xmag, n.ymag, -n.ymag, n.znear, n.zfar)), i.name && (e.name = this.createUniqueName(i.name)), k(e, i), Promise.resolve(e);
1352
+ return i.type === "perspective" ? e = new wt(bt.radToDeg(n.yfov), n.aspectRatio || 1, n.znear || 1, n.zfar || 2e6) : i.type === "orthographic" && (e = new Mt(-n.xmag, n.xmag, n.ymag, -n.ymag, n.znear, n.zfar)), i.name && (e.name = this.createUniqueName(i.name)), P(e, i), Promise.resolve(e);
1438
1353
  }
1439
1354
  /**
1440
1355
  * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
1441
- *
1442
- * @private
1443
1356
  * @param {number} skinIndex
1444
1357
  * @return {Promise<Skeleton>}
1445
1358
  */
@@ -1453,26 +1366,24 @@ class En {
1453
1366
  const l = r[c];
1454
1367
  if (l) {
1455
1368
  a.push(l);
1456
- const d = new Q();
1457
- s !== null && d.fromArray(s.array, c * 16), o.push(d);
1369
+ const f = new J();
1370
+ s !== null && f.fromArray(s.array, c * 16), o.push(f);
1458
1371
  } else
1459
1372
  console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', e.joints[c]);
1460
1373
  }
1461
- return new bt(a, o);
1374
+ return new yt(a, o);
1462
1375
  });
1463
1376
  }
1464
1377
  /**
1465
1378
  * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#animations
1466
- *
1467
- * @private
1468
1379
  * @param {number} animationIndex
1469
1380
  * @return {Promise<AnimationClip>}
1470
1381
  */
1471
1382
  loadAnimation(t) {
1472
1383
  const e = this.json, i = this, n = e.animations[t], s = n.name ? n.name : "animation_" + t, r = [], a = [], o = [], c = [], u = [];
1473
- for (let l = 0, d = n.channels.length; l < d; l++) {
1474
- const h = n.channels[l], p = n.samplers[h.sampler], x = h.target, m = x.node, g = n.parameters !== void 0 ? n.parameters[p.input] : p.input, E = n.parameters !== void 0 ? n.parameters[p.output] : p.output;
1475
- x.node !== void 0 && (r.push(this.getDependency("node", m)), a.push(this.getDependency("accessor", g)), o.push(this.getDependency("accessor", E)), c.push(p), u.push(x));
1384
+ for (let l = 0, f = n.channels.length; l < f; l++) {
1385
+ const h = n.channels[l], p = n.samplers[h.sampler], T = h.target, m = T.node, g = n.parameters !== void 0 ? n.parameters[p.input] : p.input, R = n.parameters !== void 0 ? n.parameters[p.output] : p.output;
1386
+ T.node !== void 0 && (r.push(this.getDependency("node", m)), a.push(this.getDependency("accessor", g)), o.push(this.getDependency("accessor", R)), c.push(p), u.push(T));
1476
1387
  }
1477
1388
  return Promise.all([
1478
1389
  Promise.all(r),
@@ -1481,15 +1392,15 @@ class En {
1481
1392
  Promise.all(c),
1482
1393
  Promise.all(u)
1483
1394
  ]).then(function(l) {
1484
- const d = l[0], h = l[1], p = l[2], x = l[3], m = l[4], g = [];
1485
- for (let E = 0, M = d.length; E < M; E++) {
1486
- const T = d[E], N = h[E], I = p[E], _ = x[E], v = m[E];
1487
- if (T === void 0) continue;
1488
- T.updateMatrix && T.updateMatrix();
1489
- const w = i._createAnimationTracks(T, N, I, _, v);
1490
- if (w)
1491
- for (let F = 0; F < w.length; F++)
1492
- g.push(w[F]);
1395
+ const f = l[0], h = l[1], p = l[2], T = l[3], m = l[4], g = [];
1396
+ for (let R = 0, w = f.length; R < w; R++) {
1397
+ const A = f[R], N = h[R], I = p[R], L = T[R], v = m[R];
1398
+ if (A === void 0) continue;
1399
+ A.updateMatrix && A.updateMatrix();
1400
+ const b = i._createAnimationTracks(A, N, I, L, v);
1401
+ if (b)
1402
+ for (let F = 0; F < b.length; F++)
1403
+ g.push(b[F]);
1493
1404
  }
1494
1405
  return new St(s, void 0, g);
1495
1406
  });
@@ -1507,8 +1418,6 @@ class En {
1507
1418
  }
1508
1419
  /**
1509
1420
  * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#nodes-and-hierarchy
1510
- *
1511
- * @private
1512
1421
  * @param {number} nodeIndex
1513
1422
  * @return {Promise<Object3D>}
1514
1423
  */
@@ -1522,9 +1431,9 @@ class En {
1522
1431
  Promise.all(r),
1523
1432
  o
1524
1433
  ]).then(function(c) {
1525
- const u = c[0], l = c[1], d = c[2];
1526
- d !== null && u.traverse(function(h) {
1527
- h.isSkinnedMesh && h.bind(d, Rn);
1434
+ const u = c[0], l = c[1], f = c[2];
1435
+ f !== null && u.traverse(function(h) {
1436
+ h.isSkinnedMesh && h.bind(f, xn);
1528
1437
  });
1529
1438
  for (let h = 0, p = l.length; h < p; h++)
1530
1439
  u.add(l[h]);
@@ -1548,33 +1457,25 @@ class En {
1548
1457
  a.push(c);
1549
1458
  }), this.nodeCache[t] = Promise.all(a).then(function(c) {
1550
1459
  let u;
1551
- if (s.isBone === !0 ? u = new Nt() : c.length > 1 ? u = new re() : c.length === 1 ? u = c[0] : u = new Oe(), u !== c[0])
1552
- for (let l = 0, d = c.length; l < d; l++)
1460
+ if (s.isBone === !0 ? u = new Nt() : c.length > 1 ? u = new re() : c.length === 1 ? u = c[0] : u = new Ce(), u !== c[0])
1461
+ for (let l = 0, f = c.length; l < f; l++)
1553
1462
  u.add(c[l]);
1554
- if (s.name && (u.userData.name = s.name, u.name = r), k(u, s), s.extensions && U(i, u, s), s.matrix !== void 0) {
1555
- const l = new Q();
1463
+ if (s.name && (u.userData.name = s.name, u.name = r), P(u, s), s.extensions && B(i, u, s), s.matrix !== void 0) {
1464
+ const l = new J();
1556
1465
  l.fromArray(s.matrix), u.applyMatrix4(l);
1557
1466
  } else
1558
1467
  s.translation !== void 0 && u.position.fromArray(s.translation), s.rotation !== void 0 && u.quaternion.fromArray(s.rotation), s.scale !== void 0 && u.scale.fromArray(s.scale);
1559
- if (!n.associations.has(u))
1560
- n.associations.set(u, {});
1561
- else if (s.mesh !== void 0 && n.meshCache.refs[s.mesh] > 1) {
1562
- const l = n.associations.get(u);
1563
- n.associations.set(u, { ...l });
1564
- }
1565
- return n.associations.get(u).nodes = t, u;
1468
+ return n.associations.has(u) || n.associations.set(u, {}), n.associations.get(u).nodes = t, u;
1566
1469
  }), this.nodeCache[t];
1567
1470
  }
1568
1471
  /**
1569
1472
  * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#scenes
1570
- *
1571
- * @private
1572
1473
  * @param {number} sceneIndex
1573
1474
  * @return {Promise<Group>}
1574
1475
  */
1575
1476
  loadScene(t) {
1576
1477
  const e = this.extensions, i = this.json.scenes[t], n = this, s = new re();
1577
- i.name && (s.name = n.createUniqueName(i.name)), k(s, i), i.extensions && U(e, s, i);
1478
+ i.name && (s.name = n.createUniqueName(i.name)), P(s, i), i.extensions && B(e, s, i);
1578
1479
  const r = i.nodes || [], a = [];
1579
1480
  for (let o = 0, c = r.length; o < c; o++)
1580
1481
  a.push(n.getDependency("node", r[o]));
@@ -1583,11 +1484,11 @@ class En {
1583
1484
  s.add(o[u]);
1584
1485
  const c = (u) => {
1585
1486
  const l = /* @__PURE__ */ new Map();
1586
- for (const [d, h] of n.associations)
1587
- (d instanceof se || d instanceof Te) && l.set(d, h);
1588
- return u.traverse((d) => {
1589
- const h = n.associations.get(d);
1590
- h != null && l.set(d, h);
1487
+ for (const [f, h] of n.associations)
1488
+ (f instanceof se || f instanceof ge) && l.set(f, h);
1489
+ return u.traverse((f) => {
1490
+ const h = n.associations.get(f);
1491
+ h != null && l.set(f, h);
1591
1492
  }), l;
1592
1493
  };
1593
1494
  return n.associations = c(s), s;
@@ -1595,38 +1496,38 @@ class En {
1595
1496
  }
1596
1497
  _createAnimationTracks(t, e, i, n, s) {
1597
1498
  const r = [], a = t.name ? t.name : t.uuid, o = [];
1598
- D[s.path] === D.weights ? t.traverse(function(d) {
1599
- d.morphTargetInfluences && o.push(d.name ? d.name : d.uuid);
1499
+ k[s.path] === k.weights ? t.traverse(function(f) {
1500
+ f.morphTargetInfluences && o.push(f.name ? f.name : f.uuid);
1600
1501
  }) : o.push(a);
1601
1502
  let c;
1602
- switch (D[s.path]) {
1603
- case D.weights:
1604
- c = Re;
1503
+ switch (k[s.path]) {
1504
+ case k.weights:
1505
+ c = Te;
1605
1506
  break;
1606
- case D.rotation:
1607
- c = Ee;
1608
- break;
1609
- case D.translation:
1610
- case D.scale:
1507
+ case k.rotation:
1611
1508
  c = xe;
1612
1509
  break;
1510
+ case k.position:
1511
+ case k.scale:
1512
+ c = Ae;
1513
+ break;
1613
1514
  default:
1614
1515
  switch (i.itemSize) {
1615
1516
  case 1:
1616
- c = Re;
1517
+ c = Te;
1617
1518
  break;
1618
1519
  case 2:
1619
1520
  case 3:
1620
1521
  default:
1621
- c = xe;
1522
+ c = Ae;
1622
1523
  break;
1623
1524
  }
1624
1525
  break;
1625
1526
  }
1626
- const u = n.interpolation !== void 0 ? hn[n.interpolation] : De, l = this._getArrayFromAccessor(i);
1627
- for (let d = 0, h = o.length; d < h; d++) {
1527
+ const u = n.interpolation !== void 0 ? hn[n.interpolation] : ke, l = this._getArrayFromAccessor(i);
1528
+ for (let f = 0, h = o.length; f < h; f++) {
1628
1529
  const p = new c(
1629
- o[d] + "." + D[s.path],
1530
+ o[f] + "." + k[s.path],
1630
1531
  e.array,
1631
1532
  l,
1632
1533
  u
@@ -1647,19 +1548,19 @@ class En {
1647
1548
  }
1648
1549
  _createCubicSplineTrackInterpolant(t) {
1649
1550
  t.createInterpolant = function(i) {
1650
- const n = this instanceof Ee ? dn : Ge;
1551
+ const n = this instanceof xe ? fn : Be;
1651
1552
  return new n(this.times, this.values, this.getValueSize() / 3, i);
1652
1553
  }, t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
1653
1554
  }
1654
1555
  }
1655
- function An(f, t, e) {
1656
- const i = t.attributes, n = new He();
1556
+ function En(d, t, e) {
1557
+ const i = t.attributes, n = new Pe();
1657
1558
  if (i.POSITION !== void 0) {
1658
1559
  const a = e.json.accessors[i.POSITION], o = a.min, c = a.max;
1659
1560
  if (o !== void 0 && c !== void 0) {
1660
1561
  if (n.set(
1661
- new B(o[0], o[1], o[2]),
1662
- new B(c[0], c[1], c[2])
1562
+ new j(o[0], o[1], o[2]),
1563
+ new j(c[0], c[1], c[2])
1663
1564
  ), a.normalized) {
1664
1565
  const u = de(V[a.componentType]);
1665
1566
  n.min.multiplyScalar(u), n.max.multiplyScalar(u);
@@ -1672,15 +1573,15 @@ function An(f, t, e) {
1672
1573
  return;
1673
1574
  const s = t.targets;
1674
1575
  if (s !== void 0) {
1675
- const a = new B(), o = new B();
1576
+ const a = new j(), o = new j();
1676
1577
  for (let c = 0, u = s.length; c < u; c++) {
1677
1578
  const l = s[c];
1678
1579
  if (l.POSITION !== void 0) {
1679
- const d = e.json.accessors[l.POSITION], h = d.min, p = d.max;
1580
+ const f = e.json.accessors[l.POSITION], h = f.min, p = f.max;
1680
1581
  if (h !== void 0 && p !== void 0) {
1681
- if (o.setX(Math.max(Math.abs(h[0]), Math.abs(p[0]))), o.setY(Math.max(Math.abs(h[1]), Math.abs(p[1]))), o.setZ(Math.max(Math.abs(h[2]), Math.abs(p[2]))), d.normalized) {
1682
- const x = de(V[d.componentType]);
1683
- o.multiplyScalar(x);
1582
+ if (o.setX(Math.max(Math.abs(h[0]), Math.abs(p[0]))), o.setY(Math.max(Math.abs(h[1]), Math.abs(p[1]))), o.setZ(Math.max(Math.abs(h[2]), Math.abs(p[2]))), f.normalized) {
1583
+ const T = de(V[f.componentType]);
1584
+ o.multiplyScalar(T);
1684
1585
  }
1685
1586
  a.max(o);
1686
1587
  } else
@@ -1689,35 +1590,35 @@ function An(f, t, e) {
1689
1590
  }
1690
1591
  n.expandByVector(a);
1691
1592
  }
1692
- f.boundingBox = n;
1693
- const r = new kt();
1694
- n.getCenter(r.center), r.radius = n.min.distanceTo(n.max) / 2, f.boundingSphere = r;
1593
+ d.boundingBox = n;
1594
+ const r = new Dt();
1595
+ n.getCenter(r.center), r.radius = n.min.distanceTo(n.max) / 2, d.boundingSphere = r;
1695
1596
  }
1696
- function be(f, t, e) {
1597
+ function Me(d, t, e) {
1697
1598
  const i = t.attributes, n = [];
1698
1599
  function s(r, a) {
1699
1600
  return e.getDependency("accessor", r).then(function(o) {
1700
- f.setAttribute(a, o);
1601
+ d.setAttribute(a, o);
1701
1602
  });
1702
1603
  }
1703
1604
  for (const r in i) {
1704
- const a = fe[r] || r.toLowerCase();
1705
- a in f.attributes || n.push(s(i[r], a));
1605
+ const a = ue[r] || r.toLowerCase();
1606
+ a in d.attributes || n.push(s(i[r], a));
1706
1607
  }
1707
- if (t.indices !== void 0 && !f.index) {
1608
+ if (t.indices !== void 0 && !d.index) {
1708
1609
  const r = e.getDependency("accessor", t.indices).then(function(a) {
1709
- f.setIndex(a);
1610
+ d.setIndex(a);
1710
1611
  });
1711
1612
  n.push(r);
1712
1613
  }
1713
- return Ae.workingColorSpace !== P && "COLOR_0" in i && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Ae.workingColorSpace}" not supported.`), k(f, t), An(f, t, e), Promise.all(n).then(function() {
1714
- return t.targets !== void 0 ? mn(f, t.targets, e) : f;
1614
+ return Re.workingColorSpace !== D && "COLOR_0" in i && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Re.workingColorSpace}" not supported.`), P(d, t), En(d, t, e), Promise.all(n).then(function() {
1615
+ return t.targets !== void 0 ? mn(d, t.targets, e) : d;
1715
1616
  });
1716
1617
  }
1717
- function _n() {
1718
- const f = K(!1), t = K(""), e = Be([]), i = K(null), n = new Ft(), s = new Dt(), r = new Ht(), a = new Gt();
1618
+ function Ln() {
1619
+ const d = K(!1), t = K(""), e = Ue([]), i = K(null), n = new kt(), s = new Pt(), r = new Ht(), a = new Gt();
1719
1620
  return {
1720
- isLoading: f,
1621
+ isLoading: d,
1721
1622
  loadingProgress: t,
1722
1623
  loadedModels: e,
1723
1624
  error: i,
@@ -1727,71 +1628,71 @@ function _n() {
1727
1628
  console.warn("loadModelsFromBlobs 加载的文件数组为空!");
1728
1629
  return;
1729
1630
  }
1730
- f.value = !0, t.value = "准备加载...", e.value = [], i.value = null;
1631
+ d.value = !0, t.value = "准备加载...", e.value = [], i.value = null;
1731
1632
  const u = /* @__PURE__ */ new Map();
1732
1633
  c.forEach((p) => {
1733
1634
  p instanceof File && u.set(p.name.toLowerCase(), p);
1734
1635
  });
1735
- const l = [], d = [];
1636
+ const l = [], f = [];
1736
1637
  try {
1737
1638
  for (const p of c) {
1738
- const x = p.name || "unknown_file", m = (h = x.split(".").pop()) == null ? void 0 : h.toLowerCase();
1639
+ const T = p.name || "unknown_file", m = (h = T.split(".").pop()) == null ? void 0 : h.toLowerCase();
1739
1640
  if (m === "mtl") continue;
1740
1641
  const g = URL.createObjectURL(p);
1741
1642
  l.push(g);
1742
- let E = null;
1743
- const M = (T) => {
1744
- const N = T.lengthComputable ? T.loaded / T.total * 100 : 0;
1745
- t.value = `正在加载 ${x}... ${Math.round(N)}%`;
1643
+ let R = null;
1644
+ const w = (A) => {
1645
+ const N = A.lengthComputable ? A.loaded / A.total * 100 : 0;
1646
+ t.value = `正在加载 ${T}... ${Math.round(N)}%`;
1746
1647
  };
1747
- switch (t.value = `正在加载 ${x}... 0%`, m) {
1648
+ switch (t.value = `正在加载 ${T}... 0%`, m) {
1748
1649
  case "obj":
1749
- const T = x.replace(/\.obj$/i, ".mtl").toLowerCase();
1750
- if (u.has(T)) {
1751
- const v = u.get(T), w = URL.createObjectURL(v);
1752
- l.push(w);
1753
- const F = await n.loadAsync(w);
1650
+ const A = T.replace(/\.obj$/i, ".mtl").toLowerCase();
1651
+ if (u.has(A)) {
1652
+ const v = u.get(A), b = URL.createObjectURL(v);
1653
+ l.push(b);
1654
+ const F = await n.loadAsync(b);
1754
1655
  F.preload(), s.setMaterials(F);
1755
1656
  } else
1756
1657
  s.setMaterials(null);
1757
- E = await s.loadAsync(g, M);
1658
+ R = await s.loadAsync(g, w);
1758
1659
  break;
1759
1660
  case "stl":
1760
- const N = await r.loadAsync(g, M), I = new Pt({ color: 11184810, specular: 1118481, shininess: 200 });
1761
- E = new Fe(N, I);
1661
+ const N = await r.loadAsync(g, w), I = new Ft({ color: 11184810, specular: 1118481, shininess: 200 });
1662
+ R = new Fe(N, I);
1762
1663
  break;
1763
1664
  case "gltf":
1764
1665
  case "glb":
1765
- E = (await a.loadAsync(g, M)).scene;
1666
+ R = (await a.loadAsync(g, w)).scene;
1766
1667
  break;
1767
1668
  default:
1768
- console.warn(`不支持的文件类型: .${m}`), t.value = `不支持的文件类型: ${x}`;
1669
+ console.warn(`不支持的文件类型: .${m}`), t.value = `不支持的文件类型: ${T}`;
1769
1670
  continue;
1770
1671
  }
1771
- E && (E.userData.boundingBox = new He().setFromObject(E), d.push(E));
1672
+ R && (R.userData.boundingBox = new Pe().setFromObject(R), f.push(R));
1772
1673
  }
1773
- e.value = d, t.value = "加载完成!";
1674
+ e.value = f, t.value = "加载完成!";
1774
1675
  } catch (p) {
1775
1676
  throw console.error("加载模型时出错:", p), i.value = `加载失败: ${p.message || "未知错误"}`, t.value = "加载失败!", e.value = [], p;
1776
1677
  } finally {
1777
- f.value = !1, l.forEach((p) => URL.revokeObjectURL(p));
1678
+ d.value = !1, l.forEach((p) => URL.revokeObjectURL(p));
1778
1679
  }
1779
1680
  }
1780
1681
  };
1781
1682
  }
1782
- const Ln = { class: "obj-viewer-container" }, Mn = { class: "buttonGroup-topLeft" }, wn = { class: "buttonGroup-left" }, yn = { class: "buttonGroup-right" }, bn = { class: "left-panel" }, Sn = { class: "panel-header" }, Nn = {
1683
+ const _n = { class: "obj-viewer-container" }, wn = { class: "buttonGroup-topLeft" }, bn = { class: "buttonGroup-left" }, Mn = { class: "buttonGroup-right" }, yn = { class: "left-panel" }, Sn = { class: "panel-header" }, Nn = {
1783
1684
  key: 0,
1784
1685
  class: "clipping-content"
1785
- }, In = { class: "radio-group" }, Cn = { class: "radio-label" }, On = { class: "radio-label" }, vn = { class: "radio-label" }, kn = { class: "radio-label" }, Pn = {
1686
+ }, In = { class: "radio-group" }, Cn = { class: "radio-label" }, On = { class: "radio-label" }, vn = { class: "radio-label" }, Dn = { class: "radio-label" }, Fn = {
1786
1687
  key: 0,
1787
1688
  class: "loading-overlay"
1788
- }, Fn = /* @__PURE__ */ Ke({
1689
+ }, kn = /* @__PURE__ */ je({
1789
1690
  __name: "threePreview",
1790
1691
  props: {
1791
1692
  fileBlobs: { default: () => [] }
1792
1693
  },
1793
- setup(f) {
1794
- const t = f, e = K(null), i = K(!1), n = K(""), {
1694
+ setup(d) {
1695
+ const t = d, e = K(null), i = K(!1), n = K(""), {
1795
1696
  currentModels: s,
1796
1697
  resetView: r,
1797
1698
  initThreeJS: a,
@@ -1799,178 +1700,178 @@ const Ln = { class: "obj-viewer-container" }, Mn = { class: "buttonGroup-topLeft
1799
1700
  getThreeJSObjects: c,
1800
1701
  cleanup: u,
1801
1702
  setModels: l,
1802
- axesHelperVisible: d,
1703
+ axesHelperVisible: f,
1803
1704
  toggleAxesVisibility: h
1804
- } = $e(e), {
1705
+ } = Ye(e), {
1805
1706
  isLoading: p,
1806
- loadingProgress: x,
1707
+ loadingProgress: T,
1807
1708
  loadedModels: m,
1808
1709
  error: g,
1809
- loadModelsFromBlobs: E
1810
- } = _n(), { isAnimating: M, toggleAnimation: T, stopAnimation: N } = Je(c, s), { isClipping: I, activeClippingAxis: _, toggleClipping: v, updateClippingPlanes: w } = Qe(
1710
+ loadModelsFromBlobs: R
1711
+ } = Ln(), { isAnimating: w, toggleAnimation: A, stopAnimation: N } = Qe(c, s), { isClipping: I, activeClippingAxis: L, toggleClipping: v, updateClippingPlanes: b } = $e(
1811
1712
  c,
1812
1713
  s
1813
1714
  ), F = () => {
1814
1715
  h();
1815
1716
  };
1816
- Z(() => t.fileBlobs, (y) => {
1817
- y && y.length > 0 && E(y).catch((A) => {
1818
- console.error("加载错误:", A);
1717
+ Z(() => t.fileBlobs, (M) => {
1718
+ M && M.length > 0 && R(M).catch((E) => {
1719
+ console.error("加载错误:", E);
1819
1720
  });
1820
1721
  }, {
1821
1722
  immediate: !0,
1822
1723
  deep: !0
1823
- }), Z(m, (y) => {
1824
- y && y.length > 0 && l(y);
1825
- }), Z(g, (y) => {
1826
- y && _e.error(`模型加载失败: ${y}`);
1724
+ }), Z(m, (M) => {
1725
+ M && M.length > 0 && l(M);
1726
+ }), Z(g, (M) => {
1727
+ M && Ee.error(`模型加载失败: ${M}`);
1827
1728
  });
1828
- const he = (y) => {
1829
- i.value = !0, n.value = y, y === "剖面视图" && !I.value && v();
1729
+ const fe = (M) => {
1730
+ i.value = !0, n.value = M, M === "剖面视图" && !I.value && v();
1830
1731
  };
1831
- return Ve(async () => {
1832
- await ze();
1732
+ return Ke(async () => {
1733
+ await Ve();
1833
1734
  try {
1834
1735
  a(), window.addEventListener("resize", o);
1835
- } catch (y) {
1836
- console.error("Three.js 初始化失败:", y), _e.error("渲染引擎初始化失败!");
1736
+ } catch (M) {
1737
+ console.error("Three.js 初始化失败:", M), Ee.error("渲染引擎初始化失败!");
1837
1738
  }
1838
1739
  }), Xe(() => {
1839
- n.value = "", window.removeEventListener("resize", o), M.value && N(), u();
1840
- }), (y, A) => {
1841
- const je = qe("el-scrollbar");
1842
- return te(), ee("div", Ln, [
1843
- L("div", {
1740
+ n.value = "", window.removeEventListener("resize", o), w.value && N(), u();
1741
+ }), (M, E) => {
1742
+ const Ge = ze("el-scrollbar");
1743
+ return te(), ee("div", _n, [
1744
+ _("div", {
1844
1745
  ref_key: "threejsContainer",
1845
1746
  ref: e,
1846
1747
  class: "threejs-container"
1847
1748
  }, null, 512),
1848
- A[15] || (A[15] = L("div", { class: "buttonGroup-top" }, null, -1)),
1849
- L("div", Mn, [
1850
- H(j, {
1749
+ E[15] || (E[15] = _("div", { class: "buttonGroup-top" }, null, -1)),
1750
+ _("div", wn, [
1751
+ H(U, {
1851
1752
  name: "viewReset",
1852
1753
  size: "24",
1853
- onClick: b(r),
1754
+ onClick: y(r),
1854
1755
  title: "重置"
1855
1756
  }, null, 8, ["onClick"]),
1856
- H(j, {
1757
+ H(U, {
1857
1758
  name: "fangda",
1858
1759
  size: "24",
1859
1760
  title: "放大"
1860
1761
  }),
1861
- H(j, {
1762
+ H(U, {
1862
1763
  name: "suoxiao",
1863
1764
  size: "24",
1864
1765
  title: "缩小"
1865
1766
  }),
1866
- H(j, {
1767
+ H(U, {
1867
1768
  name: "lookAround",
1868
1769
  size: "24",
1869
- onClick: b(T),
1870
- title: b(M) ? "停止动画" : "动画视图"
1770
+ onClick: y(A),
1771
+ title: y(w) ? "停止动画" : "动画视图"
1871
1772
  }, null, 8, ["onClick", "title"]),
1872
- H(j, {
1773
+ H(U, {
1873
1774
  name: "zuobiaoxi",
1874
1775
  size: "24",
1875
- active: b(d),
1776
+ active: y(f),
1876
1777
  onClick: F,
1877
1778
  title: "显隐坐标轴"
1878
1779
  }, null, 8, ["active"])
1879
1780
  ]),
1880
- L("div", wn, [
1881
- me(y.$slots, "button-left", { switchRightPanel: he }, void 0, !0),
1882
- H(j, {
1781
+ _("div", bn, [
1782
+ pe(M.$slots, "button-left", { switchRightPanel: fe }, void 0, !0),
1783
+ H(U, {
1883
1784
  name: "clipping",
1884
1785
  size: "24",
1885
- onClick: A[0] || (A[0] = (S) => he("剖面视图")),
1786
+ onClick: E[0] || (E[0] = (S) => fe("剖面视图")),
1886
1787
  active: i.value && n.value === "剖面视图",
1887
1788
  title: "剖面视图"
1888
1789
  }, null, 8, ["active"])
1889
1790
  ]),
1890
- L("div", yn, [
1891
- me(y.$slots, "button-right", {}, void 0, !0)
1791
+ _("div", Mn, [
1792
+ pe(M.$slots, "button-right", {}, void 0, !0)
1892
1793
  ]),
1893
- A[16] || (A[16] = L("div", { class: "buttonGroup-bottom" }, null, -1)),
1894
- z(L("div", bn, [
1895
- L("div", Sn, [
1896
- L("span", null, ge(n.value), 1),
1897
- L("span", {
1794
+ E[16] || (E[16] = _("div", { class: "buttonGroup-bottom" }, null, -1)),
1795
+ X(_("div", yn, [
1796
+ _("div", Sn, [
1797
+ _("span", null, me(n.value), 1),
1798
+ _("span", {
1898
1799
  class: "close",
1899
- onClick: A[1] || (A[1] = (S) => i.value = !1)
1800
+ onClick: E[1] || (E[1] = (S) => i.value = !1)
1900
1801
  }, " X ")
1901
1802
  ]),
1902
- H(je, { "max-height": "650px" }, {
1903
- default: We(() => [
1803
+ H(Ge, { "max-height": "650px" }, {
1804
+ default: qe(() => [
1904
1805
  n.value === "剖面视图" ? (te(), ee("div", Nn, [
1905
- L("div", In, [
1906
- L("label", Cn, [
1907
- z(L("input", {
1806
+ _("div", In, [
1807
+ _("label", Cn, [
1808
+ X(_("input", {
1908
1809
  type: "radio",
1909
1810
  name: "clipping-axis",
1910
1811
  value: "none",
1911
- "onUpdate:modelValue": A[2] || (A[2] = (S) => $(_) ? _.value = S : null),
1912
- onChange: A[3] || (A[3] = //@ts-ignore
1913
- (...S) => b(w) && b(w)(...S))
1812
+ "onUpdate:modelValue": E[2] || (E[2] = (S) => Q(L) ? L.value = S : null),
1813
+ onChange: E[3] || (E[3] = //@ts-ignore
1814
+ (...S) => y(b) && y(b)(...S))
1914
1815
  }, null, 544), [
1915
- [J, b(_)]
1816
+ [$, y(L)]
1916
1817
  ]),
1917
- A[10] || (A[10] = L("span", { class: "radio-text" }, "无切割", -1))
1818
+ E[10] || (E[10] = _("span", { class: "radio-text" }, "无切割", -1))
1918
1819
  ]),
1919
- L("label", On, [
1920
- z(L("input", {
1820
+ _("label", On, [
1821
+ X(_("input", {
1921
1822
  type: "radio",
1922
1823
  name: "clipping-axis",
1923
1824
  value: "x",
1924
- "onUpdate:modelValue": A[4] || (A[4] = (S) => $(_) ? _.value = S : null),
1925
- onChange: A[5] || (A[5] = //@ts-ignore
1926
- (...S) => b(w) && b(w)(...S))
1825
+ "onUpdate:modelValue": E[4] || (E[4] = (S) => Q(L) ? L.value = S : null),
1826
+ onChange: E[5] || (E[5] = //@ts-ignore
1827
+ (...S) => y(b) && y(b)(...S))
1927
1828
  }, null, 544), [
1928
- [J, b(_)]
1829
+ [$, y(L)]
1929
1830
  ]),
1930
- A[11] || (A[11] = L("span", { class: "radio-text" }, "X轴切割", -1))
1831
+ E[11] || (E[11] = _("span", { class: "radio-text" }, "X轴切割", -1))
1931
1832
  ]),
1932
- L("label", vn, [
1933
- z(L("input", {
1833
+ _("label", vn, [
1834
+ X(_("input", {
1934
1835
  type: "radio",
1935
1836
  name: "clipping-axis",
1936
1837
  value: "y",
1937
- "onUpdate:modelValue": A[6] || (A[6] = (S) => $(_) ? _.value = S : null),
1938
- onChange: A[7] || (A[7] = //@ts-ignore
1939
- (...S) => b(w) && b(w)(...S))
1838
+ "onUpdate:modelValue": E[6] || (E[6] = (S) => Q(L) ? L.value = S : null),
1839
+ onChange: E[7] || (E[7] = //@ts-ignore
1840
+ (...S) => y(b) && y(b)(...S))
1940
1841
  }, null, 544), [
1941
- [J, b(_)]
1842
+ [$, y(L)]
1942
1843
  ]),
1943
- A[12] || (A[12] = L("span", { class: "radio-text" }, "Y轴切割", -1))
1844
+ E[12] || (E[12] = _("span", { class: "radio-text" }, "Y轴切割", -1))
1944
1845
  ]),
1945
- L("label", kn, [
1946
- z(L("input", {
1846
+ _("label", Dn, [
1847
+ X(_("input", {
1947
1848
  type: "radio",
1948
1849
  name: "clipping-axis",
1949
1850
  value: "z",
1950
- "onUpdate:modelValue": A[8] || (A[8] = (S) => $(_) ? _.value = S : null),
1951
- onChange: A[9] || (A[9] = //@ts-ignore
1952
- (...S) => b(w) && b(w)(...S))
1851
+ "onUpdate:modelValue": E[8] || (E[8] = (S) => Q(L) ? L.value = S : null),
1852
+ onChange: E[9] || (E[9] = //@ts-ignore
1853
+ (...S) => y(b) && y(b)(...S))
1953
1854
  }, null, 544), [
1954
- [J, b(_)]
1855
+ [$, y(L)]
1955
1856
  ]),
1956
- A[13] || (A[13] = L("span", { class: "radio-text" }, "Z轴切割", -1))
1857
+ E[13] || (E[13] = _("span", { class: "radio-text" }, "Z轴切割", -1))
1957
1858
  ])
1958
1859
  ])
1959
- ])) : pe("", !0)
1860
+ ])) : he("", !0)
1960
1861
  ]),
1961
1862
  _: 1
1962
1863
  })
1963
1864
  ], 512), [
1964
- [Ye, i.value]
1865
+ [We, i.value]
1965
1866
  ]),
1966
- b(p) ? (te(), ee("div", Pn, [
1967
- A[14] || (A[14] = L("div", { class: "loading-spinner" }, null, -1)),
1968
- L("p", null, ge(b(x)), 1)
1969
- ])) : pe("", !0)
1867
+ y(p) ? (te(), ee("div", Fn, [
1868
+ E[14] || (E[14] = _("div", { class: "loading-spinner" }, null, -1)),
1869
+ _("p", null, me(y(T)), 1)
1870
+ ])) : he("", !0)
1970
1871
  ]);
1971
1872
  };
1972
1873
  }
1973
- }), Vn = /* @__PURE__ */ Ut(Fn, [["__scopeId", "data-v-0b2f8148"]]);
1874
+ }), Vn = /* @__PURE__ */ Bt(kn, [["__scopeId", "data-v-0b2f8148"]]);
1974
1875
  export {
1975
1876
  Vn as default
1976
1877
  };