@roomle/web-sdk 3.9.0-alpha.4 → 3.9.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/lib/{BufferGeometry-ltw0XkYt.mjs → BufferGeometry-Dxcf7n9V.mjs} +1 -1
  2. package/lib/{BufferGeometry-ltw0XkYt.mjs.map → BufferGeometry-Dxcf7n9V.mjs.map} +1 -1
  3. package/lib/ConfiguratorKernel.wasm +0 -0
  4. package/lib/{GLTFExporter-yfYOtLdk.mjs → GLTFExporter-kpv1e-Ks.mjs} +84 -84
  5. package/lib/{GLTFExporter-yfYOtLdk.mjs.map → GLTFExporter-kpv1e-Ks.mjs.map} +1 -1
  6. package/lib/GaussianBlurNode-CMVlBe39.mjs +59 -0
  7. package/lib/GaussianBlurNode-CMVlBe39.mjs.map +1 -0
  8. package/lib/{PointLightHelper-AxCe6I00.mjs → PointLightHelper-fzRB58rC.mjs} +2 -2
  9. package/lib/{PointLightHelper-AxCe6I00.mjs.map → PointLightHelper-fzRB58rC.mjs.map} +1 -1
  10. package/lib/RoomleCore.wasm +0 -0
  11. package/lib/RoomleToolsCore.wasm +0 -0
  12. package/lib/{SpotLightHelper-DpMerFPv.mjs → SpotLightHelper-D5UFwRPb.mjs} +2 -2
  13. package/lib/{SpotLightHelper-DpMerFPv.mjs.map → SpotLightHelper-D5UFwRPb.mjs.map} +1 -1
  14. package/lib/{USDZExporter-DFJQYX8l.mjs → USDZExporter-Y0SSGr5_.mjs} +2 -2
  15. package/lib/{USDZExporter-DFJQYX8l.mjs.map → USDZExporter-Y0SSGr5_.mjs.map} +1 -1
  16. package/lib/{api-x84SYo8e.mjs → api-52cOotqw.mjs} +2 -2
  17. package/lib/{api-x84SYo8e.mjs.map → api-52cOotqw.mjs.map} +1 -1
  18. package/lib/{asset-loader.worker-A7nEeQB4.mjs → asset-loader.worker-C911tbNL.mjs} +1 -1
  19. package/lib/asset-loader.worker-C911tbNL.mjs.map +1 -0
  20. package/lib/{banana-for-scale-CFY_5rk1.mjs → banana-for-scale-B_LIHI9q.mjs} +3 -3
  21. package/lib/{banana-for-scale-CFY_5rk1.mjs.map → banana-for-scale-B_LIHI9q.mjs.map} +1 -1
  22. package/lib/{budgeteer.sw-CQWYbQSc.mjs → budgeteer.sw-D3VxiASa.mjs} +1 -1
  23. package/lib/budgeteer.sw-D3VxiASa.mjs.map +1 -0
  24. package/lib/{common-utils-L3DF6Ey5.mjs → common-utils-B9PC_rvS.mjs} +2 -2
  25. package/lib/{common-utils-L3DF6Ey5.mjs.map → common-utils-B9PC_rvS.mjs.map} +1 -1
  26. package/lib/{component-dimensioning-FjlPqIvQ.mjs → component-dimensioning-12aJsCzQ.mjs} +31 -31
  27. package/lib/{component-dimensioning-FjlPqIvQ.mjs.map → component-dimensioning-12aJsCzQ.mjs.map} +1 -1
  28. package/lib/{component-raycast-helper-1n4uXeSD.mjs → component-raycast-helper-CcrmOq29.mjs} +14 -14
  29. package/lib/{component-raycast-helper-1n4uXeSD.mjs.map → component-raycast-helper-CcrmOq29.mjs.map} +1 -1
  30. package/lib/configurator-CarZpfPv.mjs +2 -0
  31. package/lib/{configurator-Dw5JbPMY.mjs → configurator-D3ZKy6bf.mjs} +10 -10
  32. package/lib/{configurator-Dw5JbPMY.mjs.map → configurator-D3ZKy6bf.mjs.map} +1 -1
  33. package/lib/{continuous-drawing-helper-DEmx54k_.mjs → continuous-drawing-helper-D25YPUle.mjs} +4 -4
  34. package/lib/{continuous-drawing-helper-DEmx54k_.mjs.map → continuous-drawing-helper-D25YPUle.mjs.map} +1 -1
  35. package/lib/{dimensioning-helper-BXD6AEqL.mjs → dimensioning-helper-d6JA4UMr.mjs} +49 -49
  36. package/lib/{dimensioning-helper-BXD6AEqL.mjs.map → dimensioning-helper-d6JA4UMr.mjs.map} +1 -1
  37. package/lib/dimensioning-helper-pPTkh8pl.mjs +2 -0
  38. package/lib/{glb-viewer-CWkc6wx7.mjs → glb-viewer-BJJ9OIlH.mjs} +35 -35
  39. package/lib/{glb-viewer-CWkc6wx7.mjs.map → glb-viewer-BJJ9OIlH.mjs.map} +1 -1
  40. package/lib/glb-viewer-CJ7BPqI-.mjs +2 -0
  41. package/lib/{highlight-coordinator-BJJw_RgR.mjs → highlight-coordinator-BuFleG2q.mjs} +8 -8
  42. package/lib/{highlight-coordinator-BJJw_RgR.mjs.map → highlight-coordinator-BuFleG2q.mjs.map} +1 -1
  43. package/lib/{homag-intelligence-Dk4WxD0p.mjs → homag-intelligence-BxpMWKLs.mjs} +5 -5
  44. package/lib/{homag-intelligence-Dk4WxD0p.mjs.map → homag-intelligence-BxpMWKLs.mjs.map} +1 -1
  45. package/lib/{imos-ix-poc-export-helper-C9wPB6fl.mjs → imos-ix-poc-export-helper-DU0ag-Lw.mjs} +3 -3
  46. package/lib/{imos-ix-poc-export-helper-C9wPB6fl.mjs.map → imos-ix-poc-export-helper-DU0ag-Lw.mjs.map} +1 -1
  47. package/lib/{kernel-utils-B5QlsCwn.mjs → kernel-utils-Cj5B4fDD.mjs} +16 -16
  48. package/lib/{kernel-utils-B5QlsCwn.mjs.map → kernel-utils-Cj5B4fDD.mjs.map} +1 -1
  49. package/lib/{main-CqSFaC9L.mjs → main-QTvbXAvy.mjs} +27277 -3406
  50. package/lib/main-QTvbXAvy.mjs.map +1 -0
  51. package/lib/{material-viewer-BSgvHUAe.mjs → material-viewer-BPcCfvCC.mjs} +18 -18
  52. package/lib/{material-viewer-BSgvHUAe.mjs.map → material-viewer-BPcCfvCC.mjs.map} +1 -1
  53. package/lib/packages-JQ2uWInj.mjs +4 -0
  54. package/lib/{planner-BgAj8Jp1.mjs → planner-C1-sOmHY.mjs} +5 -5
  55. package/lib/{planner-BgAj8Jp1.mjs.map → planner-C1-sOmHY.mjs.map} +1 -1
  56. package/lib/planner-CnRaQM_h.mjs +2 -0
  57. package/lib/{plugin-system-BBgoIai2.mjs → plugin-system-DlME_5b_.mjs} +2 -2
  58. package/lib/{plugin-system-BBgoIai2.mjs.map → plugin-system-DlME_5b_.mjs.map} +1 -1
  59. package/lib/rolldown-runtime-BwvMKf85.mjs +23 -0
  60. package/lib/roomle-headless.d.ts +32 -4
  61. package/lib/roomle-headless.js +40 -40
  62. package/lib/roomle-headless.js.map +1 -1
  63. package/lib/{roomle-renderer-CkSFbpmg.mjs → roomle-renderer-DYQvV88j.mjs} +2 -2
  64. package/lib/{roomle-renderer-CkSFbpmg.mjs.map → roomle-renderer-DYQvV88j.mjs.map} +1 -1
  65. package/lib/roomle-sdk.d.ts +32 -4
  66. package/lib/roomle-sdk.js +8 -8
  67. package/lib/{roomle-webgpu-renderer-DUr1RZL6.mjs → roomle-webgpu-renderer-BrZZeAGw.mjs} +296 -419
  68. package/lib/roomle-webgpu-renderer-BrZZeAGw.mjs.map +1 -0
  69. package/lib/{scene-renderer-BuMnigf2.mjs → scene-renderer-3nhM4cEu.mjs} +394 -394
  70. package/lib/{scene-renderer-BuMnigf2.mjs.map → scene-renderer-3nhM4cEu.mjs.map} +1 -1
  71. package/lib/{script-loader-DzyUQT3-.mjs → script-loader-3LiaLeLT.mjs} +2 -2
  72. package/lib/{script-loader-DzyUQT3-.mjs.map → script-loader-3LiaLeLT.mjs.map} +1 -1
  73. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
  74. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  75. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  76. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  77. package/lib/{stats-helper-BZnX3BX3.mjs → stats-helper-COC7Moh0.mjs} +3 -3
  78. package/lib/{stats-helper-BZnX3BX3.mjs.map → stats-helper-COC7Moh0.mjs.map} +1 -1
  79. package/lib/{three.core-DNErG1F6.mjs → three.core-tV_4n8Wg.mjs} +374 -301
  80. package/lib/{three.core-DNErG1F6.mjs.map → three.core-tV_4n8Wg.mjs.map} +1 -1
  81. package/lib/{three.module-BZkESKo3.mjs → three.module-DC5fF9Zl.mjs} +1568 -1568
  82. package/lib/{three.module-BZkESKo3.mjs.map → three.module-DC5fF9Zl.mjs.map} +1 -1
  83. package/lib/three.tsl-CAEdYyg3.mjs +136 -0
  84. package/lib/three.tsl-CAEdYyg3.mjs.map +1 -0
  85. package/lib/three.tsl-S0OKwamA.mjs +2 -0
  86. package/lib/{three.webgpu-C8myBXe1.mjs → three.webgpu-CkP2nkXM.mjs} +747 -747
  87. package/lib/{three.webgpu-C8myBXe1.mjs.map → three.webgpu-CkP2nkXM.mjs.map} +1 -1
  88. package/lib/three.webgpu-qrxDA_v0.mjs +3 -0
  89. package/lib/{threejs-utils-D7sinreM.mjs → threejs-utils-CElderZe.mjs} +68 -68
  90. package/lib/threejs-utils-CElderZe.mjs.map +1 -0
  91. package/lib/{tools-core-BxOoo-C1.mjs → tools-core-mkA4m80O.mjs} +3 -3
  92. package/lib/{tools-core-BxOoo-C1.mjs.map → tools-core-mkA4m80O.mjs.map} +1 -1
  93. package/lib/workers-HXGCmmZS.mjs +6 -0
  94. package/lib/{workers-BJYv3y38.mjs.map → workers-HXGCmmZS.mjs.map} +1 -1
  95. package/package.json +1 -1
  96. package/lib/asset-loader.worker-A7nEeQB4.mjs.map +0 -1
  97. package/lib/budgeteer.sw-CQWYbQSc.mjs.map +0 -1
  98. package/lib/configurator-DeUTcLI3.mjs +0 -2
  99. package/lib/dimensioning-helper-Do9jwg8T.mjs +0 -2
  100. package/lib/glb-viewer-Ci-IZcIt.mjs +0 -2
  101. package/lib/main-CqSFaC9L.mjs.map +0 -1
  102. package/lib/packages-0mEYlGTx.mjs +0 -4
  103. package/lib/planner-CIvdB7af.mjs +0 -2
  104. package/lib/rolldown-runtime-DgwB9i60.mjs +0 -13
  105. package/lib/roomle-webgpu-renderer-DUr1RZL6.mjs.map +0 -1
  106. package/lib/three.webgpu-WIkDzwXU.mjs +0 -3
  107. package/lib/threejs-utils-D7sinreM.mjs.map +0 -1
  108. package/lib/workers-BJYv3y38.mjs +0 -6
Binary file
@@ -1,4 +1,4 @@
1
- import { At as e, C as t, D as n, In as r, Kt as i, Nn as a, Vr as o, Xr as s, Xt as c, Yt as l, bn as u, jr as d, on as f, p, rn as m, vn as h, vt as g, x as _, xi as v, xn as y, yn as b } from "./three.core-DNErG1F6.mjs";
1
+ import { Hr as e, Ln as t, Mr as n, O as r, Pn as i, S as a, Si as o, Sn as s, Xt as c, Zr as l, Zt as u, bn as d, in as f, jt as p, m, qt as h, sn as g, w as _, xn as v, yn as y, yt as b } from "./three.core-tV_4n8Wg.mjs";
2
2
  //#region ../../node_modules/three/examples/jsm/exporters/GLTFExporter.js
3
3
  var x = {
4
4
  POSITION: [
@@ -100,13 +100,13 @@ var x = {
100
100
  MIRRORED_REPEAT: 33648,
101
101
  REPEAT: 10497
102
102
  }, w = "KHR_mesh_quantization", T = {};
103
- T[b] = C.NEAREST, T[y] = C.NEAREST_MIPMAP_NEAREST, T[u] = C.NEAREST_MIPMAP_LINEAR, T[i] = C.LINEAR, T[c] = C.LINEAR_MIPMAP_NEAREST, T[l] = C.LINEAR_MIPMAP_LINEAR, T[_] = C.CLAMP_TO_EDGE, T[d] = C.REPEAT, T[h] = C.MIRRORED_REPEAT;
103
+ T[d] = C.NEAREST, T[s] = C.NEAREST_MIPMAP_NEAREST, T[v] = C.NEAREST_MIPMAP_LINEAR, T[h] = C.LINEAR, T[u] = C.LINEAR_MIPMAP_NEAREST, T[c] = C.LINEAR_MIPMAP_LINEAR, T[a] = C.CLAMP_TO_EDGE, T[n] = C.REPEAT, T[y] = C.MIRRORED_REPEAT;
104
104
  var E = {
105
105
  scale: "scale",
106
106
  position: "translation",
107
107
  quaternion: "rotation",
108
108
  morphTargetInfluences: "weights"
109
- }, D = new t(), O = 12, k = 1179937895, A = 2, j = 8, M = 1313821514, N = 5130562;
109
+ }, D = new _(), O = 12, k = 1179937895, A = 2, j = 8, M = 1313821514, N = 5130562;
110
110
  function P(e, t) {
111
111
  return e.length === t.length && e.every(function(e, n) {
112
112
  return e === t[n];
@@ -142,7 +142,7 @@ function L(e, t, n) {
142
142
  };
143
143
  for (let i = t; i < t + n; i++) for (let t = 0; t < e.itemSize; t++) {
144
144
  let n;
145
- e.itemSize > 4 ? n = e.array[i * e.itemSize + t] : (t === 0 ? n = e.getX(i) : t === 1 ? n = e.getY(i) : t === 2 ? n = e.getZ(i) : t === 3 && (n = e.getW(i)), e.normalized === !0 && (n = m.normalize(n, e.array))), r.min[t] = Math.min(r.min[t], n), r.max[t] = Math.max(r.max[t], n);
145
+ e.itemSize > 4 ? n = e.array[i * e.itemSize + t] : (t === 0 ? n = e.getX(i) : t === 1 ? n = e.getY(i) : t === 2 ? n = e.getZ(i) : t === 3 && (n = e.getW(i)), e.normalized === !0 && (n = f.normalize(n, e.array))), r.min[t] = Math.min(r.min[t], n), r.max[t] = Math.max(r.max[t], n);
146
146
  }
147
147
  return r;
148
148
  }
@@ -256,14 +256,14 @@ var H = class {
256
256
  }
257
257
  isNormalizedNormalAttribute(e) {
258
258
  if (this.cache.attributesNormalized.has(e)) return !1;
259
- let t = new v();
259
+ let t = new o();
260
260
  for (let n = 0, r = e.count; n < r; n++) if (Math.abs(t.fromBufferAttribute(e, n).length() - 1) > 5e-4) return !1;
261
261
  return !0;
262
262
  }
263
263
  createNormalizedNormalAttribute(e) {
264
264
  let t = this.cache;
265
265
  if (t.attributesNormalized.has(e)) return t.attributesNormalized.get(e);
266
- let n = e.clone(), r = new v();
266
+ let n = e.clone(), r = new o();
267
267
  for (let e = 0, t = n.count; e < t; e++) r.fromBufferAttribute(n, e), r.x === 0 && r.y === 0 && r.z === 0 ? r.setX(1) : r.normalize(), n.setXYZ(e, r.x, r.y, r.z);
268
268
  return t.attributesNormalized.set(e, n), n;
269
269
  }
@@ -273,32 +273,32 @@ var H = class {
273
273
  }
274
274
  async buildMetalRoughTextureAsync(e, t) {
275
275
  if (e === t) return e;
276
- function r(e) {
276
+ function n(e) {
277
277
  return e.colorSpace === "srgb" ? function(e) {
278
278
  return e < .04045 ? e * .0773993808 : (e * .9478672986 + .0521327014) ** 2.4;
279
279
  } : function(e) {
280
280
  return e;
281
281
  };
282
282
  }
283
- e instanceof n && (e = await this.decompressTextureAsync(e)), t instanceof n && (t = await this.decompressTextureAsync(t));
284
- let i = e ? e.image : null, a = t ? t.image : null, o = Math.max(i ? i.width : 0, a ? a.width : 0), c = Math.max(i ? i.height : 0, a ? a.height : 0), l = B();
285
- l.width = o, l.height = c;
286
- let u = l.getContext("2d", { willReadFrequently: !0 });
287
- u.fillStyle = "#00ffff", u.fillRect(0, 0, o, c);
288
- let d = u.getImageData(0, 0, o, c);
283
+ e instanceof r && (e = await this.decompressTextureAsync(e)), t instanceof r && (t = await this.decompressTextureAsync(t));
284
+ let i = e ? e.image : null, a = t ? t.image : null, o = Math.max(i ? i.width : 0, a ? a.width : 0), s = Math.max(i ? i.height : 0, a ? a.height : 0), c = B();
285
+ c.width = o, c.height = s;
286
+ let u = c.getContext("2d", { willReadFrequently: !0 });
287
+ u.fillStyle = "#00ffff", u.fillRect(0, 0, o, s);
288
+ let d = u.getImageData(0, 0, o, s);
289
289
  if (i) {
290
- u.drawImage(i, 0, 0, o, c);
291
- let t = r(e), n = u.getImageData(0, 0, o, c).data;
292
- for (let e = 2; e < n.length; e += 4) d.data[e] = t(n[e] / 256) * 256;
290
+ u.drawImage(i, 0, 0, o, s);
291
+ let t = n(e), r = u.getImageData(0, 0, o, s).data;
292
+ for (let e = 2; e < r.length; e += 4) d.data[e] = t(r[e] / 256) * 256;
293
293
  }
294
294
  if (a) {
295
- u.drawImage(a, 0, 0, o, c);
296
- let e = r(t), n = u.getImageData(0, 0, o, c).data;
297
- for (let t = 1; t < n.length; t += 4) d.data[t] = e(n[t] / 256) * 256;
295
+ u.drawImage(a, 0, 0, o, s);
296
+ let e = n(t), r = u.getImageData(0, 0, o, s).data;
297
+ for (let t = 1; t < r.length; t += 4) d.data[t] = e(r[t] / 256) * 256;
298
298
  }
299
299
  u.putImageData(d, 0, 0);
300
300
  let f = (e || t).clone();
301
- return f.source = new s(l), f.colorSpace = "", f.channel = (e || t).channel, e && t && e.channel !== t.channel && console.warn("THREE.GLTFExporter: UV channels for metalnessMap and roughnessMap textures must match."), console.warn("THREE.GLTFExporter: Merged metalnessMap and roughnessMap textures."), f;
301
+ return f.source = new l(c), f.colorSpace = "", f.channel = (e || t).channel, e && t && e.channel !== t.channel && console.warn("THREE.GLTFExporter: UV channels for metalnessMap and roughnessMap textures must match."), console.warn("THREE.GLTFExporter: Merged metalnessMap and roughnessMap textures."), f;
302
302
  }
303
303
  async decompressTextureAsync(e, t = Infinity) {
304
304
  if (this.textureUtils === null) throw Error("THREE.GLTFExporter: setTextureUtils() must be called to process compressed textures.");
@@ -329,7 +329,7 @@ var H = class {
329
329
  for (let i = n; i < n + r; i++) {
330
330
  for (let n = 0; n < e.itemSize; n++) {
331
331
  let r;
332
- e.itemSize > 4 ? r = e.array[i * e.itemSize + n] : (n === 0 ? r = e.getX(i) : n === 1 ? r = e.getY(i) : n === 2 ? r = e.getZ(i) : n === 3 && (r = e.getW(i)), e.normalized === !0 && (r = m.normalize(r, e.array))), t === C.FLOAT ? l.setFloat32(u, r, !0) : t === C.INT ? l.setInt32(u, r, !0) : t === C.UNSIGNED_INT ? l.setUint32(u, r, !0) : t === C.SHORT ? l.setInt16(u, r, !0) : t === C.UNSIGNED_SHORT ? l.setUint16(u, r, !0) : t === C.BYTE ? l.setInt8(u, r) : t === C.UNSIGNED_BYTE && l.setUint8(u, r), u += o;
332
+ e.itemSize > 4 ? r = e.array[i * e.itemSize + n] : (n === 0 ? r = e.getX(i) : n === 1 ? r = e.getY(i) : n === 2 ? r = e.getZ(i) : n === 3 && (r = e.getW(i)), e.normalized === !0 && (r = f.normalize(r, e.array))), t === C.FLOAT ? l.setFloat32(u, r, !0) : t === C.INT ? l.setInt32(u, r, !0) : t === C.UNSIGNED_INT ? l.setUint32(u, r, !0) : t === C.SHORT ? l.setInt16(u, r, !0) : t === C.UNSIGNED_SHORT ? l.setUint16(u, r, !0) : t === C.BYTE ? l.setInt8(u, r) : t === C.UNSIGNED_BYTE && l.setUint8(u, r), u += o;
333
333
  }
334
334
  u % s !== 0 && (u += s - u % s);
335
335
  }
@@ -407,7 +407,7 @@ var H = class {
407
407
  else throw Error("THREE.GLTFExporter: Invalid image type. Use HTMLImageElement, HTMLCanvasElement, ImageBitmap or OffscreenCanvas.");
408
408
  s.binary === !0 ? c.push(V(f, r).then((e) => i.processBufferViewImage(e)).then((e) => {
409
409
  d.bufferView = e;
410
- })) : d.uri = g.getDataURL(f, r);
410
+ })) : d.uri = b.getDataURL(f, r);
411
411
  let m = o.images.push(d) - 1;
412
412
  return l[u] = m, m;
413
413
  } else throw Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.");
@@ -424,15 +424,15 @@ var H = class {
424
424
  return t.samplers.push(n) - 1;
425
425
  }
426
426
  async processTextureAsync(e) {
427
- let t = this.options, r = this.cache, i = this.json;
428
- if (r.textures.has(e)) return r.textures.get(e);
429
- i.textures ||= [], e instanceof n && (e = await this.decompressTextureAsync(e, t.maxTextureSize));
427
+ let t = this.options, n = this.cache, i = this.json;
428
+ if (n.textures.has(e)) return n.textures.get(e);
429
+ i.textures ||= [], e instanceof r && (e = await this.decompressTextureAsync(e, t.maxTextureSize));
430
430
  let a = e.userData.mimeType, o = this.processImage(e.image, e.format, e.flipY, a), s = { sampler: this.processSampler(e) };
431
431
  a === "image/webp" ? (s.extensions = s.extensions || {}, s.extensions.EXT_texture_webp = { source: o }, this.extensionsUsed.EXT_texture_webp = !0, this.extensionsRequired.EXT_texture_webp = !0) : s.source = o, e.name && (s.name = e.name), await this._invokeAllAsync(async function(t) {
432
432
  t.writeTexture && await t.writeTexture(e, s);
433
433
  });
434
434
  let c = i.textures.push(s) - 1;
435
- return r.textures.set(e, c), c;
435
+ return n.textures.set(e, c), c;
436
436
  }
437
437
  async processMaterialAsync(e) {
438
438
  let t = this.cache, n = this.json;
@@ -611,7 +611,7 @@ var H = class {
611
611
  znear: e.near < 0 ? 0 : e.near
612
612
  } : r.perspective = {
613
613
  aspectRatio: e.aspect,
614
- yfov: m.degToRad(e.fov),
614
+ yfov: f.degToRad(e.fov),
615
615
  zfar: e.far <= 0 ? .001 : e.far,
616
616
  znear: e.near < 0 ? 0 : e.near
617
617
  }, e.name !== "" && (r.name = e.type), t.cameras.push(r) - 1;
@@ -619,9 +619,9 @@ var H = class {
619
619
  processAnimation(e, t) {
620
620
  let n = this.json, r = this.nodeMap;
621
621
  n.animations ||= [], e = S.Utils.mergeMorphTargetTracks(e.clone(), t);
622
- let i = e.tracks, o = [], s = [];
623
- for (let e = 0; e < i.length; ++e) {
624
- let n = i[e], c = a.parseTrackName(n.name), l = a.findNode(t, c.nodeName), u = E[c.propertyName];
622
+ let a = e.tracks, o = [], s = [];
623
+ for (let e = 0; e < a.length; ++e) {
624
+ let n = a[e], c = i.parseTrackName(n.name), l = i.findNode(t, c.nodeName), u = E[c.propertyName];
625
625
  if (c.objectName === "bones" && (l = l.isSkinnedMesh === !0 ? l.skeleton.getBoneByName(c.objectIndex) : void 0), !l || !u) {
626
626
  console.warn("THREE.GLTFExporter: Could not export animation track \"%s\".", n.name);
627
627
  continue;
@@ -630,8 +630,8 @@ var H = class {
630
630
  u === E.morphTargetInfluences && (d /= l.morphTargetInfluences.length);
631
631
  let f;
632
632
  n.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline === !0 ? (f = "CUBICSPLINE", d /= 3) : f = n.getInterpolation() === 2300 ? "STEP" : "LINEAR", s.push({
633
- input: this.processAccessor(new p(n.times, 1)),
634
- output: this.processAccessor(new p(n.values, d)),
633
+ input: this.processAccessor(new m(n.times, 1)),
634
+ output: this.processAccessor(new m(n.values, d)),
635
635
  interpolation: f
636
636
  }), o.push({
637
637
  sampler: s.length - 1,
@@ -653,10 +653,10 @@ var H = class {
653
653
  if (i === void 0) return null;
654
654
  let a = e.skeleton.bones[0];
655
655
  if (a === void 0) return null;
656
- let o = [], s = new Float32Array(i.bones.length * 16), c = new f();
656
+ let o = [], s = new Float32Array(i.bones.length * 16), c = new g();
657
657
  for (let t = 0; t < i.bones.length; ++t) o.push(n.get(i.bones[t])), c.copy(i.boneInverses[t]), c.multiply(e.bindMatrix).toArray(s, t * 16);
658
658
  return t.skins === void 0 && (t.skins = []), t.skins.push({
659
- inverseBindMatrices: this.processAccessor(new p(s, 16)),
659
+ inverseBindMatrices: this.processAccessor(new m(s, 16)),
660
660
  joints: o,
661
661
  skeleton: n.get(a)
662
662
  }), r.skin = t.skins.length - 1;
@@ -770,24 +770,24 @@ var H = class {
770
770
  }
771
771
  i.length > 0 && (r.nodes = i), this.serializeUserData(e, r);
772
772
  }
773
- async processObjectsAsync(e) {
774
- let t = new o();
775
- t.name = "AuxScene";
776
- for (let n = 0; n < e.length; n++) t.children.push(e[n]);
777
- await this.processSceneAsync(t);
778
- }
779
- async processInputAsync(e) {
780
- let t = this.options;
781
- e = e instanceof Array ? e : [e], await this._invokeAllAsync(function(t) {
782
- t.beforeParse && t.beforeParse(e);
773
+ async processObjectsAsync(t) {
774
+ let n = new e();
775
+ n.name = "AuxScene";
776
+ for (let e = 0; e < t.length; e++) n.children.push(t[e]);
777
+ await this.processSceneAsync(n);
778
+ }
779
+ async processInputAsync(t) {
780
+ let n = this.options;
781
+ t = t instanceof Array ? t : [t], await this._invokeAllAsync(function(e) {
782
+ e.beforeParse && e.beforeParse(t);
783
783
  });
784
- let n = [];
785
- for (let t = 0; t < e.length; t++) e[t] instanceof o ? await this.processSceneAsync(e[t]) : n.push(e[t]);
786
- n.length > 0 && await this.processObjectsAsync(n);
784
+ let r = [];
785
+ for (let n = 0; n < t.length; n++) t[n] instanceof e ? await this.processSceneAsync(t[n]) : r.push(t[n]);
786
+ r.length > 0 && await this.processObjectsAsync(r);
787
787
  for (let e = 0; e < this.skins.length; ++e) this.processSkin(this.skins[e]);
788
- for (let n = 0; n < t.animations.length; ++n) this.processAnimation(t.animations[n], e[0]);
789
- await this._invokeAllAsync(function(t) {
790
- t.afterParse && t.afterParse(e);
788
+ for (let e = 0; e < n.animations.length; ++e) this.processAnimation(n.animations[e], t[0]);
789
+ await this._invokeAllAsync(function(e) {
790
+ e.afterParse && e.afterParse(t);
791
791
  });
792
792
  }
793
793
  async _invokeAllAsync(e) {
@@ -1008,16 +1008,16 @@ var H = class {
1008
1008
  constructor(e) {
1009
1009
  this.writer = e, this.name = "EXT_mesh_gpu_instancing";
1010
1010
  }
1011
- writeNode(e, t) {
1011
+ writeNode(e, n) {
1012
1012
  if (!e.isInstancedMesh) return;
1013
- let n = this.writer, i = e, a = new Float32Array(i.count * 3), o = new Float32Array(i.count * 4), s = new Float32Array(i.count * 3), c = new f(), l = new v(), u = new r(), d = new v();
1014
- for (let e = 0; e < i.count; e++) i.getMatrixAt(e, c), c.decompose(l, u, d), l.toArray(a, e * 3), u.toArray(o, e * 4), d.toArray(s, e * 3);
1015
- let m = {
1016
- TRANSLATION: n.processAccessor(new p(a, 3)),
1017
- ROTATION: n.processAccessor(new p(o, 4)),
1018
- SCALE: n.processAccessor(new p(s, 3))
1013
+ let r = this.writer, i = e, a = new Float32Array(i.count * 3), s = new Float32Array(i.count * 4), c = new Float32Array(i.count * 3), l = new g(), u = new o(), d = new t(), f = new o();
1014
+ for (let e = 0; e < i.count; e++) i.getMatrixAt(e, l), l.decompose(u, d, f), u.toArray(a, e * 3), d.toArray(s, e * 4), f.toArray(c, e * 3);
1015
+ let p = {
1016
+ TRANSLATION: r.processAccessor(new m(a, 3)),
1017
+ ROTATION: r.processAccessor(new m(s, 4)),
1018
+ SCALE: r.processAccessor(new m(c, 3))
1019
1019
  };
1020
- i.instanceColor && (m._COLOR_0 = n.processAccessor(i.instanceColor)), t.extensions = t.extensions || {}, t.extensions[this.name] = { attributes: m }, n.extensionsUsed[this.name] = !0, n.extensionsRequired[this.name] = !0;
1020
+ i.instanceColor && (p._COLOR_0 = r.processAccessor(i.instanceColor)), n.extensions = n.extensions || {}, n.extensions[this.name] = { attributes: p }, r.extensionsUsed[this.name] = !0, r.extensionsRequired[this.name] = !0;
1021
1021
  }
1022
1022
  };
1023
1023
  S.Utils = {
@@ -1042,40 +1042,40 @@ S.Utils = {
1042
1042
  }
1043
1043
  return e.times = i, e.values = a, s;
1044
1044
  },
1045
- mergeMorphTargetTracks: function(t, n) {
1046
- let r = [], i = {}, o = t.tracks;
1047
- for (let t = 0; t < o.length; ++t) {
1048
- let s = o[t], c = a.parseTrackName(s.name), l = a.findNode(n, c.nodeName);
1049
- if (c.propertyName !== "morphTargetInfluences" || c.propertyIndex === void 0) {
1050
- r.push(s);
1045
+ mergeMorphTargetTracks: function(e, t) {
1046
+ let n = [], r = {}, a = e.tracks;
1047
+ for (let e = 0; e < a.length; ++e) {
1048
+ let o = a[e], s = i.parseTrackName(o.name), c = i.findNode(t, s.nodeName);
1049
+ if (s.propertyName !== "morphTargetInfluences" || s.propertyIndex === void 0) {
1050
+ n.push(o);
1051
1051
  continue;
1052
1052
  }
1053
- if (s.createInterpolant !== s.InterpolantFactoryMethodDiscrete && s.createInterpolant !== s.InterpolantFactoryMethodLinear) {
1054
- if (s.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline) throw Error("THREE.GLTFExporter: Cannot merge tracks with glTF CUBICSPLINE interpolation.");
1055
- console.warn("THREE.GLTFExporter: Morph target interpolation mode not yet supported. Using LINEAR instead."), s = s.clone(), s.setInterpolation(e);
1053
+ if (o.createInterpolant !== o.InterpolantFactoryMethodDiscrete && o.createInterpolant !== o.InterpolantFactoryMethodLinear) {
1054
+ if (o.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline) throw Error("THREE.GLTFExporter: Cannot merge tracks with glTF CUBICSPLINE interpolation.");
1055
+ console.warn("THREE.GLTFExporter: Morph target interpolation mode not yet supported. Using LINEAR instead."), o = o.clone(), o.setInterpolation(p);
1056
1056
  }
1057
- let u = l.morphTargetInfluences.length, d = l.morphTargetDictionary[c.propertyIndex];
1058
- if (d === void 0) throw Error("THREE.GLTFExporter: Morph target name not found: " + c.propertyIndex);
1059
- let f;
1060
- if (i[l.uuid] === void 0) {
1061
- f = s.clone();
1062
- let e = new f.ValueBufferType(u * f.times.length);
1063
- for (let t = 0; t < f.times.length; t++) e[t * u + d] = f.values[t];
1064
- f.name = (c.nodeName || "") + ".morphTargetInfluences", f.values = e, i[l.uuid] = f, r.push(f);
1057
+ let l = c.morphTargetInfluences.length, u = c.morphTargetDictionary[s.propertyIndex];
1058
+ if (u === void 0) throw Error("THREE.GLTFExporter: Morph target name not found: " + s.propertyIndex);
1059
+ let d;
1060
+ if (r[c.uuid] === void 0) {
1061
+ d = o.clone();
1062
+ let e = new d.ValueBufferType(l * d.times.length);
1063
+ for (let t = 0; t < d.times.length; t++) e[t * l + u] = d.values[t];
1064
+ d.name = (s.nodeName || "") + ".morphTargetInfluences", d.values = e, r[c.uuid] = d, n.push(d);
1065
1065
  continue;
1066
1066
  }
1067
- let p = s.createInterpolant(new s.ValueBufferType(1));
1068
- f = i[l.uuid];
1069
- for (let e = 0; e < f.times.length; e++) f.values[e * u + d] = p.evaluate(f.times[e]);
1070
- for (let e = 0; e < s.times.length; e++) {
1071
- let t = this.insertKeyframe(f, s.times[e]);
1072
- f.values[t * u + d] = s.values[e];
1067
+ let f = o.createInterpolant(new o.ValueBufferType(1));
1068
+ d = r[c.uuid];
1069
+ for (let e = 0; e < d.times.length; e++) d.values[e * l + u] = f.evaluate(d.times[e]);
1070
+ for (let e = 0; e < o.times.length; e++) {
1071
+ let t = this.insertKeyframe(d, o.times[e]);
1072
+ d.values[t * l + u] = o.values[e];
1073
1073
  }
1074
1074
  }
1075
- return t.tracks = r, t;
1075
+ return e.tracks = n, e;
1076
1076
  },
1077
1077
  toTypedBufferAttribute: function(e, t) {
1078
- let n = new p(new t(e.count * e.itemSize), e.itemSize, !1);
1078
+ let n = new m(new t(e.count * e.itemSize), e.itemSize, !1);
1079
1079
  if (!e.normalized && !e.isInterleavedBufferAttribute) return n.array.set(e.array), n;
1080
1080
  for (let t = 0, r = e.count; t < r; t++) for (let r = 0; r < e.itemSize; r++) n.setComponent(t, r, e.getComponent(t, r));
1081
1081
  return n;
@@ -1084,4 +1084,4 @@ S.Utils = {
1084
1084
  //#endregion
1085
1085
  export { S as GLTFExporter };
1086
1086
 
1087
- //# sourceMappingURL=GLTFExporter-yfYOtLdk.mjs.map
1087
+ //# sourceMappingURL=GLTFExporter-kpv1e-Ks.mjs.map