@needle-tools/engine 5.1.0-alpha.8 → 5.1.0-beta

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 (122) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/components.needle.json +1 -1
  3. package/dist/{materialx-CE2sUv2B.umd.cjs → materialx-B47Bz-xs.umd.cjs} +1 -1
  4. package/dist/{materialx-u1EqYrhu.min.js → materialx-B85WjP7E.min.js} +1 -1
  5. package/dist/{materialx-vyB2Zbt4.js → materialx-jkHmVPez.js} +1 -1
  6. package/dist/{needle-engine.bundle-3LOy9tj8.js → needle-engine.bundle-BWkDSRyF.js} +6248 -6001
  7. package/dist/{needle-engine.bundle-BuI2pjv1.min.js → needle-engine.bundle-BvgS8xMP.min.js} +171 -171
  8. package/dist/{needle-engine.bundle-DQy9vQdJ.umd.cjs → needle-engine.bundle-CdVr_iIe.umd.cjs} +142 -142
  9. package/dist/needle-engine.d.ts +359 -46
  10. package/dist/needle-engine.js +618 -606
  11. package/dist/needle-engine.min.js +1 -1
  12. package/dist/needle-engine.umd.cjs +1 -1
  13. package/dist/{vendor-ButPLzor.umd.cjs → vendor-1UvpPPSB.umd.cjs} +2 -2
  14. package/dist/{vendor-DqZC4Is7.min.js → vendor-BQ2Vuntm.min.js} +4 -4
  15. package/dist/{vendor-DkWSNjMV.js → vendor-BslSKZPo.js} +113 -106
  16. package/lib/engine/api.d.ts +1 -1
  17. package/lib/engine/api.js +1 -1
  18. package/lib/engine/api.js.map +1 -1
  19. package/lib/engine/engine_audio.d.ts +30 -1
  20. package/lib/engine/engine_audio.js +57 -13
  21. package/lib/engine/engine_audio.js.map +1 -1
  22. package/lib/engine/engine_init.js +2 -2
  23. package/lib/engine/engine_init.js.map +1 -1
  24. package/lib/engine/engine_license.d.ts +7 -7
  25. package/lib/engine/engine_license.js +72 -72
  26. package/lib/engine/engine_license.js.map +1 -1
  27. package/lib/engine/engine_math.d.ts +1 -1
  28. package/lib/engine/engine_math.js +10 -4
  29. package/lib/engine/engine_math.js.map +1 -1
  30. package/lib/engine/engine_networking_blob.js +3 -3
  31. package/lib/engine/engine_networking_blob.js.map +1 -1
  32. package/lib/engine/engine_scenedata.js +7 -0
  33. package/lib/engine/engine_scenedata.js.map +1 -1
  34. package/lib/engine/engine_serialization_core.js +7 -2
  35. package/lib/engine/engine_serialization_core.js.map +1 -1
  36. package/lib/engine/engine_time_utils.d.ts +10 -6
  37. package/lib/engine/engine_time_utils.js +10 -6
  38. package/lib/engine/engine_time_utils.js.map +1 -1
  39. package/lib/engine/engine_utils_qrcode.js +2 -2
  40. package/lib/engine/engine_utils_qrcode.js.map +1 -1
  41. package/lib/engine/webcomponents/needle menu/needle-menu-spatial.js +2 -2
  42. package/lib/engine/webcomponents/needle menu/needle-menu.js +5 -5
  43. package/lib/engine/webcomponents/needle menu/needle-menu.js.map +1 -1
  44. package/lib/engine/webcomponents/needle-engine.js +2 -2
  45. package/lib/engine/webcomponents/needle-engine.js.map +1 -1
  46. package/lib/engine/webcomponents/needle-engine.loading.js +2 -2
  47. package/lib/engine/webcomponents/needle-engine.loading.js.map +1 -1
  48. package/lib/engine/xr/TempXRContext.js +2 -2
  49. package/lib/engine/xr/TempXRContext.js.map +1 -1
  50. package/lib/engine-components/AudioSource.d.ts +46 -2
  51. package/lib/engine-components/AudioSource.js +268 -60
  52. package/lib/engine-components/AudioSource.js.map +1 -1
  53. package/lib/engine-components/Component.js +2 -1
  54. package/lib/engine-components/Component.js.map +1 -1
  55. package/lib/engine-components/DragControls.js +2 -2
  56. package/lib/engine-components/DragControls.js.map +1 -1
  57. package/lib/engine-components/DragControlsConstraints.d.ts +0 -15
  58. package/lib/engine-components/DragControlsConstraints.js +14 -8
  59. package/lib/engine-components/DragControlsConstraints.js.map +1 -1
  60. package/lib/engine-components/EventList.js +1 -1
  61. package/lib/engine-components/EventList.js.map +1 -1
  62. package/lib/engine-components/SceneSwitcher.d.ts +2 -0
  63. package/lib/engine-components/SceneSwitcher.js +43 -16
  64. package/lib/engine-components/SceneSwitcher.js.map +1 -1
  65. package/lib/engine-components/SeeThrough.d.ts +39 -0
  66. package/lib/engine-components/SeeThrough.js +69 -1
  67. package/lib/engine-components/SeeThrough.js.map +1 -1
  68. package/lib/engine-components/api.d.ts +1 -0
  69. package/lib/engine-components/api.js +1 -0
  70. package/lib/engine-components/api.js.map +1 -1
  71. package/lib/engine-components/codegen/components.d.ts +10 -0
  72. package/lib/engine-components/codegen/components.js +10 -0
  73. package/lib/engine-components/codegen/components.js.map +1 -1
  74. package/lib/engine-components/export/usdz/USDZExporter.js +4 -4
  75. package/lib/engine-components/timeline/PlayableDirector.js +1 -1
  76. package/lib/engine-components/timeline/PlayableDirector.js.map +1 -1
  77. package/lib/engine-components/web/ScrollFollow.d.ts +33 -0
  78. package/lib/engine-components/web/ScrollFollow.js +164 -22
  79. package/lib/engine-components/web/ScrollFollow.js.map +1 -1
  80. package/lib/needle-app.d.ts +18 -0
  81. package/lib/needle-app.js +19 -0
  82. package/lib/needle-app.js.map +1 -0
  83. package/package.json +3 -2
  84. package/plugins/common/license.js +25 -4
  85. package/plugins/common/needle-engine.js +5 -2
  86. package/plugins/types/userconfig.d.ts +22 -0
  87. package/plugins/vite/dts-generator.d.ts +24 -0
  88. package/plugins/vite/dts-generator.js +40 -7
  89. package/plugins/vite/index.d.ts +2 -0
  90. package/plugins/vite/index.js +17 -0
  91. package/plugins/vite/license.js +4 -4
  92. package/plugins/vite/needle-app.js +78 -5
  93. package/plugins/vite/remote.d.ts +28 -0
  94. package/plugins/vite/remote.js +124 -0
  95. package/src/engine/api.ts +1 -1
  96. package/src/engine/engine_audio.ts +68 -15
  97. package/src/engine/engine_gameobject.ts +1 -1
  98. package/src/engine/engine_init.ts +2 -2
  99. package/src/engine/engine_license.ts +69 -69
  100. package/src/engine/engine_math.ts +11 -4
  101. package/src/engine/engine_networking_blob.ts +3 -3
  102. package/src/engine/engine_scenedata.ts +7 -2
  103. package/src/engine/engine_serialization_core.ts +7 -2
  104. package/src/engine/engine_time_utils.ts +10 -6
  105. package/src/engine/engine_utils_qrcode.ts +2 -2
  106. package/src/engine/webcomponents/needle menu/needle-menu-spatial.ts +2 -2
  107. package/src/engine/webcomponents/needle menu/needle-menu.ts +5 -5
  108. package/src/engine/webcomponents/needle-engine.loading.ts +6 -6
  109. package/src/engine/webcomponents/needle-engine.ts +2 -2
  110. package/src/engine/xr/TempXRContext.ts +2 -2
  111. package/src/engine-components/AudioSource.ts +256 -55
  112. package/src/engine-components/Component.ts +2 -1
  113. package/src/engine-components/DragControls.ts +3 -2
  114. package/src/engine-components/DragControlsConstraints.ts +16 -8
  115. package/src/engine-components/EventList.ts +1 -1
  116. package/src/engine-components/SceneSwitcher.ts +37 -15
  117. package/src/engine-components/SeeThrough.ts +75 -1
  118. package/src/engine-components/api.ts +1 -0
  119. package/src/engine-components/codegen/components.ts +10 -0
  120. package/src/engine-components/export/usdz/USDZExporter.ts +4 -4
  121. package/src/engine-components/timeline/PlayableDirector.ts +1 -1
  122. package/src/engine-components/web/ScrollFollow.ts +168 -22
@@ -1,4 +1,4 @@
1
- import { Object3D as cc, PlaneGeometry as lc, Layers as Br, MeshBasicMaterial as ea, DoubleSide as Gs, AdditiveBlending as uc, InstancedBufferAttribute as mn, DynamicDrawUsage as ee, InstancedBufferGeometry as jl, Uniform$1 as Re, ShaderMaterial as Ws, BufferGeometry as yi, BufferAttribute as he, Mesh as Zr, MeshStandardMaterial as Gl, MeshPhysicalMaterial as Wl, ShaderChunk as $l, Triangle as Mn, Vector3 as H, Box3 as Fe, Matrix4 as Oe, Line3 as tn, Plane as hc, Vector2 as hn, BackSide as Hl, REVISION as fc, Ray as ql, FrontSide as na, LineSegments as dc, LineLoop as pc, Line as mc, Points as yc, Sphere as Xl, BatchedMesh as Yl, Matrix3 as Zl, Vector4 as vo, SkinnedMesh as Kl, InterpolateDiscrete as Ql, InterpolateLinear as gc, AnimationClip as tu, QuaternionKeyframeTrack as eu, ColorKeyframeTrack as nu, VectorKeyframeTrack as iu, BooleanKeyframeTrack as ru, NumberKeyframeTrack as su, PropertyBinding as ia } from "./three.js";
1
+ import { Object3D as cc, PlaneGeometry as lc, Layers as Br, MeshBasicMaterial as ea, DoubleSide as Gs, AdditiveBlending as uc, InstancedBufferAttribute as yn, DynamicDrawUsage as ee, InstancedBufferGeometry as jl, Uniform$1 as Re, ShaderMaterial as Ws, BufferGeometry as yi, BufferAttribute as he, Mesh as Zr, MeshStandardMaterial as Gl, MeshPhysicalMaterial as Wl, ShaderChunk as $l, Triangle as Mn, Vector3 as H, Box3 as Fe, Matrix4 as Oe, Line3 as tn, Plane as hc, Vector2 as fn, BackSide as Hl, REVISION as fc, Ray as ql, FrontSide as na, LineSegments as dc, LineLoop as pc, Line as mc, Points as yc, Sphere as Xl, BatchedMesh as Yl, Matrix3 as Zl, Vector4 as vo, SkinnedMesh as Kl, InterpolateDiscrete as Ql, InterpolateLinear as gc, AnimationClip as tu, QuaternionKeyframeTrack as eu, ColorKeyframeTrack as nu, VectorKeyframeTrack as iu, BooleanKeyframeTrack as ru, NumberKeyframeTrack as su, PropertyBinding as ia } from "./three.js";
2
2
  const ou = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
3
3
  function au(r) {
4
4
  return typeof r == "string" && ou.test(r);
@@ -91,7 +91,7 @@ function mu(r) {
91
91
  }
92
92
  return [e[0] >> 24 & 255, e[0] >> 16 & 255, e[0] >> 8 & 255, e[0] & 255, e[1] >> 24 & 255, e[1] >> 16 & 255, e[1] >> 8 & 255, e[1] & 255, e[2] >> 24 & 255, e[2] >> 16 & 255, e[2] >> 8 & 255, e[2] & 255, e[3] >> 24 & 255, e[3] >> 16 & 255, e[3] >> 8 & 255, e[3] & 255, e[4] >> 24 & 255, e[4] >> 16 & 255, e[4] >> 8 & 255, e[4] & 255];
93
93
  }
94
- const Cd = du("v5", 80, mu), vs = 2, Ue = 4, Ze = 4, yu = 4, an = new Int32Array(2), ra = new Float32Array(an.buffer), sa = new Float64Array(an.buffer), cr = new Uint16Array(new Uint8Array([1, 0]).buffer)[0] === 1;
94
+ const Cd = du("v5", 80, mu), vs = 2, Ue = 4, Ze = 4, yu = 4, cn = new Int32Array(2), ra = new Float32Array(cn.buffer), sa = new Float64Array(cn.buffer), cr = new Uint16Array(new Uint8Array([1, 0]).buffer)[0] === 1;
95
95
  class Qe {
96
96
  constructor(t, e) {
97
97
  this.low = t | 0, this.high = e | 0;
@@ -176,10 +176,10 @@ class Jr {
176
176
  return new Qe(this.readUint32(t), this.readUint32(t + 4));
177
177
  }
178
178
  readFloat32(t) {
179
- return an[0] = this.readInt32(t), ra[0];
179
+ return cn[0] = this.readInt32(t), ra[0];
180
180
  }
181
181
  readFloat64(t) {
182
- return an[cr ? 0 : 1] = this.readInt32(t), an[cr ? 1 : 0] = this.readInt32(t + 4), sa[0];
182
+ return cn[cr ? 0 : 1] = this.readInt32(t), cn[cr ? 1 : 0] = this.readInt32(t + 4), sa[0];
183
183
  }
184
184
  writeInt8(t, e) {
185
185
  this.bytes_[t] = e;
@@ -206,10 +206,10 @@ class Jr {
206
206
  this.writeUint32(t, e.low), this.writeUint32(t + 4, e.high);
207
207
  }
208
208
  writeFloat32(t, e) {
209
- ra[0] = e, this.writeInt32(t, an[0]);
209
+ ra[0] = e, this.writeInt32(t, cn[0]);
210
210
  }
211
211
  writeFloat64(t, e) {
212
- sa[0] = e, this.writeInt32(t, an[cr ? 0 : 1]), this.writeInt32(t + 4, an[cr ? 1 : 0]);
212
+ sa[0] = e, this.writeInt32(t, cn[cr ? 0 : 1]), this.writeInt32(t + 4, cn[cr ? 1 : 0]);
213
213
  }
214
214
  /**
215
215
  * Return the file identifier. Behavior is undefined for FlatBuffers whose
@@ -2459,7 +2459,7 @@ class qn {
2459
2459
  return new qn(this.a.clone(), this.b.clone());
2460
2460
  }
2461
2461
  }
2462
- class ln {
2462
+ class un {
2463
2463
  constructor(t, e) {
2464
2464
  this.subType = e, this.type = "function", this.keys = t;
2465
2465
  }
@@ -2495,10 +2495,10 @@ class ln {
2495
2495
  };
2496
2496
  }
2497
2497
  static fromJSON(t) {
2498
- return new ln(t.keys.map((e) => [ju(e.value, t.subType), e.pos]), t.subType);
2498
+ return new un(t.keys.map((e) => [ju(e.value, t.subType), e.pos]), t.subType);
2499
2499
  }
2500
2500
  clone() {
2501
- return this.subType === "Number" ? new ln(this.keys.map(([t, e]) => [t, e]), this.subType) : new ln(this.keys.map(([t, e]) => [t.clone(), e]), this.subType);
2501
+ return this.subType === "Number" ? new un(this.keys.map(([t, e]) => [t, e]), this.subType) : new un(this.keys.map(([t, e]) => [t.clone(), e]), this.subType);
2502
2502
  }
2503
2503
  }
2504
2504
  const hr = new G();
@@ -2510,7 +2510,7 @@ class Pn {
2510
2510
  [1, 0],
2511
2511
  [1, 1]
2512
2512
  ]) {
2513
- this.type = "function", this.color = new ln(t, "Color"), this.alpha = new ln(e, "Number");
2513
+ this.type = "function", this.color = new un(t, "Color"), this.alpha = new un(e, "Number");
2514
2514
  }
2515
2515
  genColor(t, e, n) {
2516
2516
  return this.color.genValue(hr, n), e.set(hr.x, hr.y, hr.z, this.alpha.genValue(1, n));
@@ -2528,7 +2528,7 @@ class Pn {
2528
2528
  return t.functions.length > 0 && e.push([qn.fromJSON(t.functions[t.functions.length - 1].function).b, 1]), new Pn(e.map((n) => [new G(n[0].x, n[0].y, n[0].z), n[1]]), e.map((n) => [n[0].w, n[1]]));
2529
2529
  } else {
2530
2530
  const e = new Pn();
2531
- return e.alpha = ln.fromJSON(t.alpha), e.color = ln.fromJSON(t.color), e;
2531
+ return e.alpha = un.fromJSON(t.alpha), e.color = un.fromJSON(t.color), e;
2532
2532
  }
2533
2533
  }
2534
2534
  clone() {
@@ -5897,7 +5897,7 @@ class wh extends wc {
5897
5897
  super(t), this.vector_ = new G(), this.vector2_ = new G(), this.vector3_ = new G(), this.quaternion_ = new rt(), this.quaternion2_ = new rt(), this.quaternion3_ = new rt(), this.rotationMat_ = new De(), this.rotationMat2_ = new De(), this.maxParticles = 1e3, this.setupBuffers(), this.rebuildMaterial();
5898
5898
  }
5899
5899
  buildExpandableBuffers() {
5900
- this.offsetBuffer = new mn(new Float32Array(this.maxParticles * 3), 3), this.offsetBuffer.setUsage(ee), this.geometry.setAttribute("offset", this.offsetBuffer), this.colorBuffer = new mn(new Float32Array(this.maxParticles * 4), 4), this.colorBuffer.setUsage(ee), this.geometry.setAttribute("color", this.colorBuffer), this.settings.renderMode === J.Mesh ? (this.rotationBuffer = new mn(new Float32Array(this.maxParticles * 4), 4), this.rotationBuffer.setUsage(ee), this.geometry.setAttribute("rotation", this.rotationBuffer)) : (this.settings.renderMode === J.BillBoard || this.settings.renderMode === J.HorizontalBillBoard || this.settings.renderMode === J.VerticalBillBoard || this.settings.renderMode === J.StretchedBillBoard) && (this.rotationBuffer = new mn(new Float32Array(this.maxParticles), 1), this.rotationBuffer.setUsage(ee), this.geometry.setAttribute("rotation", this.rotationBuffer)), this.sizeBuffer = new mn(new Float32Array(this.maxParticles * 3), 3), this.sizeBuffer.setUsage(ee), this.geometry.setAttribute("size", this.sizeBuffer), this.uvTileBuffer = new mn(new Float32Array(this.maxParticles), 1), this.uvTileBuffer.setUsage(ee), this.geometry.setAttribute("uvTile", this.uvTileBuffer), this.settings.renderMode === J.StretchedBillBoard && (this.velocityBuffer = new mn(new Float32Array(this.maxParticles * 4), 4), this.velocityBuffer.setUsage(ee), this.geometry.setAttribute("velocity", this.velocityBuffer));
5900
+ this.offsetBuffer = new yn(new Float32Array(this.maxParticles * 3), 3), this.offsetBuffer.setUsage(ee), this.geometry.setAttribute("offset", this.offsetBuffer), this.colorBuffer = new yn(new Float32Array(this.maxParticles * 4), 4), this.colorBuffer.setUsage(ee), this.geometry.setAttribute("color", this.colorBuffer), this.settings.renderMode === J.Mesh ? (this.rotationBuffer = new yn(new Float32Array(this.maxParticles * 4), 4), this.rotationBuffer.setUsage(ee), this.geometry.setAttribute("rotation", this.rotationBuffer)) : (this.settings.renderMode === J.BillBoard || this.settings.renderMode === J.HorizontalBillBoard || this.settings.renderMode === J.VerticalBillBoard || this.settings.renderMode === J.StretchedBillBoard) && (this.rotationBuffer = new yn(new Float32Array(this.maxParticles), 1), this.rotationBuffer.setUsage(ee), this.geometry.setAttribute("rotation", this.rotationBuffer)), this.sizeBuffer = new yn(new Float32Array(this.maxParticles * 3), 3), this.sizeBuffer.setUsage(ee), this.geometry.setAttribute("size", this.sizeBuffer), this.uvTileBuffer = new yn(new Float32Array(this.maxParticles), 1), this.uvTileBuffer.setUsage(ee), this.geometry.setAttribute("uvTile", this.uvTileBuffer), this.settings.renderMode === J.StretchedBillBoard && (this.velocityBuffer = new yn(new Float32Array(this.maxParticles * 4), 4), this.velocityBuffer.setUsage(ee), this.geometry.setAttribute("velocity", this.velocityBuffer));
5901
5901
  }
5902
5902
  setupBuffers() {
5903
5903
  this.geometry && this.geometry.dispose(), this.geometry = new jl(), this.geometry.setIndex(this.settings.instancingGeometry.getIndex()), this.settings.instancingGeometry.hasAttribute("normal") && this.geometry.setAttribute("normal", this.settings.instancingGeometry.getAttribute("normal")), this.geometry.setAttribute("position", this.settings.instancingGeometry.getAttribute("position")), this.geometry.setAttribute("uv", this.settings.instancingGeometry.getAttribute("uv")), this.buildExpandableBuffers();
@@ -9723,7 +9723,7 @@ tr = qt;
9723
9723
  var j = {};
9724
9724
  Ve(j, "LogLevel", () => ce, (r) => ce = r);
9725
9725
  Ve(j, "default", () => Ea, (r) => Ea = r);
9726
- var yn = function(r, t) {
9726
+ var gn = function(r, t) {
9727
9727
  var e = typeof Symbol == "function" && r[Symbol.iterator];
9728
9728
  if (!e) return r;
9729
9729
  var n = e.call(r), i, s = [], a;
@@ -9741,7 +9741,7 @@ var yn = function(r, t) {
9741
9741
  }
9742
9742
  }
9743
9743
  return s;
9744
- }, gn = function(r, t, e) {
9744
+ }, vn = function(r, t, e) {
9745
9745
  if (e || arguments.length === 2)
9746
9746
  for (var n = 0, i = t.length, s; n < i; n++) (s || !(n in t)) && (s || (s = Array.prototype.slice.call(t, 0, n)), s[n] = t[n]);
9747
9747
  return r.concat(s || Array.prototype.slice.call(t));
@@ -9766,32 +9766,32 @@ var Yh = (
9766
9766
  configurable: !0
9767
9767
  }), r.prototype.log = function() {
9768
9768
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
9769
- this._logLevel >= ce.All && this._print.apply(this, gn([
9769
+ this._logLevel >= ce.All && this._print.apply(this, vn([
9770
9770
  ce.All
9771
- ], yn(t), !1));
9771
+ ], gn(t), !1));
9772
9772
  }, r.prototype.warn = function() {
9773
9773
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
9774
- this._logLevel >= ce.Warnings && this._print.apply(this, gn([
9774
+ this._logLevel >= ce.Warnings && this._print.apply(this, vn([
9775
9775
  ce.Warnings
9776
- ], yn(t), !1));
9776
+ ], gn(t), !1));
9777
9777
  }, r.prototype.error = function() {
9778
9778
  for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
9779
- this._logLevel >= ce.Errors && this._print.apply(this, gn([
9779
+ this._logLevel >= ce.Errors && this._print.apply(this, vn([
9780
9780
  ce.Errors
9781
- ], yn(t), !1));
9781
+ ], gn(t), !1));
9782
9782
  }, r.prototype.setLogFunction = function(t) {
9783
9783
  this._print = t;
9784
9784
  }, r.prototype._print = function(t) {
9785
9785
  for (var e = [], n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
9786
- var i = gn([
9786
+ var i = vn([
9787
9787
  Xh
9788
- ], yn(e), !1);
9788
+ ], gn(e), !1);
9789
9789
  for (var s in i) i[s] instanceof Error && (i[s] = "(" + i[s].name + ") " + i[s].message);
9790
- t >= ce.All ? console.log.apply(console, gn([], yn(i), !1)) : t >= ce.Warnings ? console.warn.apply(console, gn([
9790
+ t >= ce.All ? console.log.apply(console, vn([], gn(i), !1)) : t >= ce.Warnings ? console.warn.apply(console, vn([
9791
9791
  "WARNING"
9792
- ], yn(i), !1)) : t >= ce.Errors && console.error.apply(console, gn([
9792
+ ], gn(i), !1)) : t >= ce.Errors && console.error.apply(console, vn([
9793
9793
  "ERROR"
9794
- ], yn(i), !1));
9794
+ ], gn(i), !1));
9795
9795
  }, r;
9796
9796
  })()
9797
9797
  ), Ea = new Yh(), hl = {};
@@ -12135,21 +12135,21 @@ class _f {
12135
12135
  }
12136
12136
  }
12137
12137
  const mt = /* @__PURE__ */ new _f();
12138
- let un, $n;
12138
+ let hn, $n;
12139
12139
  const Nn = [], Sr = /* @__PURE__ */ new Ro(() => new Fe());
12140
12140
  function bf(r, t, e, n, i, s) {
12141
- un = Sr.getPrimitive(), $n = Sr.getPrimitive(), Nn.push(un, $n), mt.setBuffer(r._roots[t]);
12141
+ hn = Sr.getPrimitive(), $n = Sr.getPrimitive(), Nn.push(hn, $n), mt.setBuffer(r._roots[t]);
12142
12142
  const a = uo(0, r.geometry, e, n, i, s);
12143
- mt.clearBuffer(), Sr.releasePrimitive(un), Sr.releasePrimitive($n), Nn.pop(), Nn.pop();
12143
+ mt.clearBuffer(), Sr.releasePrimitive(hn), Sr.releasePrimitive($n), Nn.pop(), Nn.pop();
12144
12144
  const o = Nn.length;
12145
- return o > 0 && ($n = Nn[o - 1], un = Nn[o - 2]), a;
12145
+ return o > 0 && ($n = Nn[o - 1], hn = Nn[o - 2]), a;
12146
12146
  }
12147
12147
  function uo(r, t, e, n, i = null, s = 0, a = 0) {
12148
12148
  const { float32Array: o, uint16Array: c, uint32Array: l } = mt;
12149
12149
  let h = r * 2;
12150
12150
  if (kt(h, c)) {
12151
12151
  const m = Ht(r, l), p = ie(h, c);
12152
- return xt(r, o, un), n(m, p, !1, a, s + r / Et, un);
12152
+ return xt(r, o, hn), n(m, p, !1, a, s + r / Et, hn);
12153
12153
  } else {
12154
12154
  let R = function(A) {
12155
12155
  const { uint16Array: N, uint32Array: L } = mt;
@@ -12166,12 +12166,12 @@ function uo(r, t, e, n, i = null, s = 0, a = 0) {
12166
12166
  };
12167
12167
  const m = Bt(r), p = Nt(r, l);
12168
12168
  let b = m, T = p, g, v, x, _;
12169
- if (i && (x = un, _ = $n, xt(b, o, x), xt(T, o, _), g = i(x), v = i(_), v < g)) {
12169
+ if (i && (x = hn, _ = $n, xt(b, o, x), xt(T, o, _), g = i(x), v = i(_), v < g)) {
12170
12170
  b = p, T = m;
12171
12171
  const A = g;
12172
12172
  g = v, v = A, x = _;
12173
12173
  }
12174
- x || (x = un, xt(b, o, x));
12174
+ x || (x = hn, xt(b, o, x));
12175
12175
  const C = kt(b * 2, c), M = e(x, C, g, a + 1, s + b / Et);
12176
12176
  let P;
12177
12177
  if (M === oo) {
@@ -12207,7 +12207,7 @@ function uo(r, t, e, n, i = null, s = 0, a = 0) {
12207
12207
  return !!z;
12208
12208
  }
12209
12209
  }
12210
- const vi = /* @__PURE__ */ new mt.constructor(), Yr = /* @__PURE__ */ new mt.constructor(), cn = /* @__PURE__ */ new Ro(() => new Fe()), Un = /* @__PURE__ */ new Fe(), Dn = /* @__PURE__ */ new Fe(), Bs = /* @__PURE__ */ new Fe(), Ns = /* @__PURE__ */ new Fe();
12210
+ const vi = /* @__PURE__ */ new mt.constructor(), Yr = /* @__PURE__ */ new mt.constructor(), ln = /* @__PURE__ */ new Ro(() => new Fe()), Un = /* @__PURE__ */ new Fe(), Dn = /* @__PURE__ */ new Fe(), Bs = /* @__PURE__ */ new Fe(), Ns = /* @__PURE__ */ new Fe();
12211
12211
  let Us = !1;
12212
12212
  function Tf(r, t, e, n) {
12213
12213
  if (Us)
@@ -12218,7 +12218,7 @@ function Tf(r, t, e, n) {
12218
12218
  const l = new Oe().copy(e).invert();
12219
12219
  for (let h = 0, d = i.length; h < d; h++) {
12220
12220
  vi.setBuffer(i[h]), c = 0;
12221
- const m = cn.getPrimitive();
12221
+ const m = ln.getPrimitive();
12222
12222
  xt(0, vi.float32Array, m), m.applyMatrix4(l);
12223
12223
  for (let p = 0, b = s.length; p < b && (Yr.setBuffer(s[p]), a = ke(
12224
12224
  0,
@@ -12233,7 +12233,7 @@ function Tf(r, t, e, n) {
12233
12233
  m
12234
12234
  ), Yr.clearBuffer(), c += s[p].byteLength / $t, !a); p++)
12235
12235
  ;
12236
- if (cn.releasePrimitive(m), vi.clearBuffer(), o += i[h].byteLength / $t, a)
12236
+ if (ln.releasePrimitive(m), vi.clearBuffer(), o += i[h].byteLength / $t, a)
12237
12237
  break;
12238
12238
  }
12239
12239
  return Us = !1, a;
@@ -12264,7 +12264,7 @@ function ke(r, t, e, n, i, s = 0, a = 0, o = 0, c = 0, l = null, h = !1) {
12264
12264
  a + t / Et
12265
12265
  );
12266
12266
  else if (P) {
12267
- const O = cn.getPrimitive();
12267
+ const O = ln.getPrimitive();
12268
12268
  xt(t, g, O), O.applyMatrix4(e);
12269
12269
  const z = Bt(r), R = Nt(r, b);
12270
12270
  xt(z, p, Un), xt(R, p, Dn);
@@ -12293,7 +12293,7 @@ function ke(r, t, e, n, i, s = 0, a = 0, o = 0, c = 0, l = null, h = !1) {
12293
12293
  o + 1,
12294
12294
  O,
12295
12295
  !h
12296
- ), cn.releasePrimitive(O);
12296
+ ), ln.releasePrimitive(O);
12297
12297
  } else {
12298
12298
  const O = Bt(t), z = Nt(t, v);
12299
12299
  xt(O, g, Bs), xt(z, g, Ns);
@@ -12340,7 +12340,7 @@ function ke(r, t, e, n, i, s = 0, a = 0, o = 0, c = 0, l = null, h = !1) {
12340
12340
  h
12341
12341
  );
12342
12342
  else {
12343
- const A = cn.getPrimitive();
12343
+ const A = ln.getPrimitive();
12344
12344
  A.copy(Bs).applyMatrix4(e);
12345
12345
  const N = Bt(r), L = Nt(r, b);
12346
12346
  xt(N, p, Un), xt(L, p, Dn);
@@ -12369,7 +12369,7 @@ function ke(r, t, e, n, i, s = 0, a = 0, o = 0, c = 0, l = null, h = !1) {
12369
12369
  o + 1,
12370
12370
  A,
12371
12371
  !h
12372
- ), cn.releasePrimitive(A);
12372
+ ), ln.releasePrimitive(A);
12373
12373
  }
12374
12374
  else if (B)
12375
12375
  if (M)
@@ -12387,7 +12387,7 @@ function ke(r, t, e, n, i, s = 0, a = 0, o = 0, c = 0, l = null, h = !1) {
12387
12387
  h
12388
12388
  );
12389
12389
  else {
12390
- const A = cn.getPrimitive();
12390
+ const A = ln.getPrimitive();
12391
12391
  A.copy(Ns).applyMatrix4(e);
12392
12392
  const N = Bt(r), L = Nt(r, b);
12393
12393
  xt(N, p, Un), xt(L, p, Dn);
@@ -12416,7 +12416,7 @@ function ke(r, t, e, n, i, s = 0, a = 0, o = 0, c = 0, l = null, h = !1) {
12416
12416
  o + 1,
12417
12417
  A,
12418
12418
  !h
12419
- ), cn.releasePrimitive(A);
12419
+ ), ln.releasePrimitive(A);
12420
12420
  }
12421
12421
  }
12422
12422
  return E;
@@ -12704,7 +12704,7 @@ const kf = /* @__PURE__ */ (function() {
12704
12704
  g !== 0 ? v = (d * m - b * p) / g : v = 0, x = (d + v * m) / p, a.x = v, a.y = x;
12705
12705
  };
12706
12706
  })(), Oo = /* @__PURE__ */ (function() {
12707
- const r = /* @__PURE__ */ new hn(), t = /* @__PURE__ */ new H(), e = /* @__PURE__ */ new H();
12707
+ const r = /* @__PURE__ */ new fn(), t = /* @__PURE__ */ new H(), e = /* @__PURE__ */ new H();
12708
12708
  return function(i, s, a, o) {
12709
12709
  kf(i, s, r);
12710
12710
  let c = r.x, l = r.y;
@@ -12781,7 +12781,7 @@ xe.prototype.closestPointToSegment = /* @__PURE__ */ (function() {
12781
12781
  };
12782
12782
  })();
12783
12783
  xe.prototype.intersectsTriangle = /* @__PURE__ */ (function() {
12784
- const r = /* @__PURE__ */ new xe(), t = /* @__PURE__ */ new en(), e = /* @__PURE__ */ new en(), n = /* @__PURE__ */ new H(), i = /* @__PURE__ */ new H(), s = /* @__PURE__ */ new H(), a = /* @__PURE__ */ new H(), o = /* @__PURE__ */ new tn(), c = /* @__PURE__ */ new tn(), l = /* @__PURE__ */ new H(), h = /* @__PURE__ */ new hn(), d = /* @__PURE__ */ new hn();
12784
+ const r = /* @__PURE__ */ new xe(), t = /* @__PURE__ */ new en(), e = /* @__PURE__ */ new en(), n = /* @__PURE__ */ new H(), i = /* @__PURE__ */ new H(), s = /* @__PURE__ */ new H(), a = /* @__PURE__ */ new H(), o = /* @__PURE__ */ new tn(), c = /* @__PURE__ */ new tn(), l = /* @__PURE__ */ new H(), h = /* @__PURE__ */ new fn(), d = /* @__PURE__ */ new fn();
12785
12785
  function m(_, C, M, P) {
12786
12786
  const E = n;
12787
12787
  !_.isDegenerateIntoPoint && !_.isDegenerateIntoSegment ? E.copy(_.plane.normal) : E.copy(C.plane.normal);
@@ -13066,7 +13066,7 @@ function zf(r, t, e = {}, n = 0, i = 1 / 0) {
13066
13066
  const l = Math.sqrt(o);
13067
13067
  return e.point ? e.point.copy(Ds) : e.point = Ds.clone(), e.distance = l, e.faceIndex = c, e;
13068
13068
  }
13069
- const xr = parseInt(fc) >= 169, If = parseInt(fc) <= 161, vn = /* @__PURE__ */ new H(), Sn = /* @__PURE__ */ new H(), xn = /* @__PURE__ */ new H(), _r = /* @__PURE__ */ new hn(), br = /* @__PURE__ */ new hn(), Tr = /* @__PURE__ */ new hn(), Wa = /* @__PURE__ */ new H(), $a = /* @__PURE__ */ new H(), Ha = /* @__PURE__ */ new H(), oi = /* @__PURE__ */ new H();
13069
+ const xr = parseInt(fc) >= 169, If = parseInt(fc) <= 161, Sn = /* @__PURE__ */ new H(), xn = /* @__PURE__ */ new H(), _n = /* @__PURE__ */ new H(), _r = /* @__PURE__ */ new fn(), br = /* @__PURE__ */ new fn(), Tr = /* @__PURE__ */ new fn(), Wa = /* @__PURE__ */ new H(), $a = /* @__PURE__ */ new H(), Ha = /* @__PURE__ */ new H(), oi = /* @__PURE__ */ new H();
13070
13070
  function Bf(r, t, e, n, i, s, a, o) {
13071
13071
  let c;
13072
13072
  if (s === Hl ? c = r.intersectTriangle(n, e, t, !0, i) : c = r.intersectTriangle(t, e, n, s !== Gs, i), c === null) return null;
@@ -13077,22 +13077,22 @@ function Bf(r, t, e, n, i, s, a, o) {
13077
13077
  };
13078
13078
  }
13079
13079
  function qa(r, t, e, n, i, s, a, o, c, l, h) {
13080
- vn.fromBufferAttribute(t, s), Sn.fromBufferAttribute(t, a), xn.fromBufferAttribute(t, o);
13081
- const d = Bf(r, vn, Sn, xn, oi, c, l, h);
13080
+ Sn.fromBufferAttribute(t, s), xn.fromBufferAttribute(t, a), _n.fromBufferAttribute(t, o);
13081
+ const d = Bf(r, Sn, xn, _n, oi, c, l, h);
13082
13082
  if (d) {
13083
13083
  if (n) {
13084
- _r.fromBufferAttribute(n, s), br.fromBufferAttribute(n, a), Tr.fromBufferAttribute(n, o), d.uv = new hn();
13085
- const p = Mn.getInterpolation(oi, vn, Sn, xn, _r, br, Tr, d.uv);
13084
+ _r.fromBufferAttribute(n, s), br.fromBufferAttribute(n, a), Tr.fromBufferAttribute(n, o), d.uv = new fn();
13085
+ const p = Mn.getInterpolation(oi, Sn, xn, _n, _r, br, Tr, d.uv);
13086
13086
  xr || (d.uv = p);
13087
13087
  }
13088
13088
  if (i) {
13089
- _r.fromBufferAttribute(i, s), br.fromBufferAttribute(i, a), Tr.fromBufferAttribute(i, o), d.uv1 = new hn();
13090
- const p = Mn.getInterpolation(oi, vn, Sn, xn, _r, br, Tr, d.uv1);
13089
+ _r.fromBufferAttribute(i, s), br.fromBufferAttribute(i, a), Tr.fromBufferAttribute(i, o), d.uv1 = new fn();
13090
+ const p = Mn.getInterpolation(oi, Sn, xn, _n, _r, br, Tr, d.uv1);
13091
13091
  xr || (d.uv1 = p), If && (d.uv2 = d.uv1);
13092
13092
  }
13093
13093
  if (e) {
13094
13094
  Wa.fromBufferAttribute(e, s), $a.fromBufferAttribute(e, a), Ha.fromBufferAttribute(e, o), d.normal = new H();
13095
- const p = Mn.getInterpolation(oi, vn, Sn, xn, Wa, $a, Ha, d.normal);
13095
+ const p = Mn.getInterpolation(oi, Sn, xn, _n, Wa, $a, Ha, d.normal);
13096
13096
  d.normal.dot(r.direction) > 0 && d.normal.multiplyScalar(-1), xr || (d.normal = p);
13097
13097
  }
13098
13098
  const m = {
@@ -13102,9 +13102,9 @@ function qa(r, t, e, n, i, s, a, o, c, l, h) {
13102
13102
  normal: new H(),
13103
13103
  materialIndex: 0
13104
13104
  };
13105
- if (Mn.getNormal(vn, Sn, xn, m.normal), d.face = m, d.faceIndex = s, xr) {
13105
+ if (Mn.getNormal(Sn, xn, _n, m.normal), d.face = m, d.faceIndex = s, xr) {
13106
13106
  const p = new H();
13107
- Mn.getBarycoord(oi, vn, Sn, xn, p), d.barycoord = p;
13107
+ Mn.getBarycoord(oi, Sn, xn, _n, p), d.barycoord = p;
13108
13108
  }
13109
13109
  }
13110
13110
  return d;
@@ -13212,7 +13212,7 @@ function Lf(r, t = null) {
13212
13212
  }
13213
13213
  }
13214
13214
  }
13215
- function fn(r, t, e, n, i) {
13215
+ function dn(r, t, e, n, i) {
13216
13216
  let s, a, o, c, l, h;
13217
13217
  const d = 1 / e.direction.x, m = 1 / e.direction.y, p = 1 / e.direction.z, b = e.origin.x, T = e.origin.y, g = e.origin.z;
13218
13218
  let v = t[r], x = t[r + 3], _ = t[r + 1], C = t[r + 3 + 1], M = t[r + 2], P = t[r + 3 + 2];
@@ -13253,9 +13253,9 @@ function ho(r, t, e, n, i, s, a) {
13253
13253
  Nf(t, e, n, m, p, i, s, a);
13254
13254
  } else {
13255
13255
  const m = Bt(r);
13256
- fn(m, o, n, s, a) && ho(m, t, e, n, i, s, a);
13256
+ dn(m, o, n, s, a) && ho(m, t, e, n, i, s, a);
13257
13257
  const p = Nt(r, l);
13258
- fn(p, o, n, s, a) && ho(p, t, e, n, i, s, a);
13258
+ dn(p, o, n, s, a) && ho(p, t, e, n, i, s, a);
13259
13259
  }
13260
13260
  }
13261
13261
  const Gf = ["x", "y", "z"];
@@ -13274,7 +13274,7 @@ function fo(r, t, e, n, i, s) {
13274
13274
  const d = ko(r, c), m = Gf[d], b = n.direction[m] >= 0;
13275
13275
  let T, g;
13276
13276
  b ? (T = Bt(r), g = Nt(r, c)) : (T = Nt(r, c), g = Bt(r));
13277
- const x = fn(T, a, n, i, s) ? fo(T, t, e, n, i, s) : null;
13277
+ const x = dn(T, a, n, i, s) ? fo(T, t, e, n, i, s) : null;
13278
13278
  if (x) {
13279
13279
  const M = x.point[m];
13280
13280
  if (b ? M <= a[g + d] : (
@@ -13283,7 +13283,7 @@ function fo(r, t, e, n, i, s) {
13283
13283
  ))
13284
13284
  return x;
13285
13285
  }
13286
- const C = fn(g, a, n, i, s) ? fo(g, t, e, n, i, s) : null;
13286
+ const C = dn(g, a, n, i, s) ? fo(g, t, e, n, i, s) : null;
13287
13287
  return x && C ? x.distance <= C.distance ? x : C : x || C || null;
13288
13288
  }
13289
13289
  }
@@ -13424,9 +13424,9 @@ function mo(r, t, e, n, i, s, a) {
13424
13424
  Ff(t, e, n, m, p, i, s, a);
13425
13425
  } else {
13426
13426
  const m = Bt(r);
13427
- fn(m, o, n, s, a) && mo(m, t, e, n, i, s, a);
13427
+ dn(m, o, n, s, a) && mo(m, t, e, n, i, s, a);
13428
13428
  const p = Nt(r, l);
13429
- fn(p, o, n, s, a) && mo(p, t, e, n, i, s, a);
13429
+ dn(p, o, n, s, a) && mo(p, t, e, n, i, s, a);
13430
13430
  }
13431
13431
  }
13432
13432
  const td = ["x", "y", "z"];
@@ -13445,7 +13445,7 @@ function yo(r, t, e, n, i, s) {
13445
13445
  const d = ko(r, c), m = td[d], b = n.direction[m] >= 0;
13446
13446
  let T, g;
13447
13447
  b ? (T = Bt(r), g = Nt(r, c)) : (T = Nt(r, c), g = Bt(r));
13448
- const x = fn(T, a, n, i, s) ? yo(T, t, e, n, i, s) : null;
13448
+ const x = dn(T, a, n, i, s) ? yo(T, t, e, n, i, s) : null;
13449
13449
  if (x) {
13450
13450
  const M = x.point[m];
13451
13451
  if (b ? M <= a[g + d] : (
@@ -13454,7 +13454,7 @@ function yo(r, t, e, n, i, s) {
13454
13454
  ))
13455
13455
  return x;
13456
13456
  }
13457
- const C = fn(g, a, n, i, s) ? yo(g, t, e, n, i, s) : null;
13457
+ const C = dn(g, a, n, i, s) ? yo(g, t, e, n, i, s) : null;
13458
13458
  return x && C ? x.distance <= C.distance ? x : C : x || C || null;
13459
13459
  }
13460
13460
  }
@@ -13846,7 +13846,7 @@ function ud(r = {}) {
13846
13846
  const { type: t = Ki } = r;
13847
13847
  return this.boundsTree = new t(this, r), this.boundsTree;
13848
13848
  }
13849
- const _n = /* @__PURE__ */ new H(), bn = /* @__PURE__ */ new H(), Tn = /* @__PURE__ */ new H(), nc = /* @__PURE__ */ new vo(), zr = /* @__PURE__ */ new H(), Js = /* @__PURE__ */ new H(), ic = /* @__PURE__ */ new vo(), rc = /* @__PURE__ */ new vo(), Ir = /* @__PURE__ */ new Oe(), sc = /* @__PURE__ */ new Oe();
13849
+ const bn = /* @__PURE__ */ new H(), Tn = /* @__PURE__ */ new H(), Cn = /* @__PURE__ */ new H(), nc = /* @__PURE__ */ new vo(), zr = /* @__PURE__ */ new H(), Js = /* @__PURE__ */ new H(), ic = /* @__PURE__ */ new vo(), rc = /* @__PURE__ */ new vo(), Ir = /* @__PURE__ */ new Oe(), sc = /* @__PURE__ */ new Oe();
13850
13850
  function hi(r, t) {
13851
13851
  if (!r && !t)
13852
13852
  return;
@@ -14047,7 +14047,7 @@ class yd {
14047
14047
  const l = o.position, h = s ? o.normal : null, d = a ? o.tangent : null, m = n.morphAttributes.position, p = n.morphAttributes.normal, b = n.morphAttributes.tangent, T = n.morphTargetsRelative, g = t.morphTargetInfluences, v = new Zl();
14048
14048
  v.getNormalMatrix(t.matrixWorld), n.index && e.index.array.set(n.index.array);
14049
14049
  for (let x = 0, _ = o.position.count; x < _; x++)
14050
- _n.fromBufferAttribute(l, x), h && bn.fromBufferAttribute(h, x), d && (nc.fromBufferAttribute(d, x), Tn.fromBufferAttribute(d, x)), g && (m && js(m, g, T, x, _n), p && js(p, g, T, x, bn), b && js(b, g, T, x, Tn)), t.isSkinnedMesh && (t.applyBoneTransform(x, _n), h && oc(t, x, bn), d && oc(t, x, Tn)), i && _n.applyMatrix4(t.matrixWorld), c.position.setXYZ(x, _n.x, _n.y, _n.z), h && (i && bn.applyNormalMatrix(v), c.normal.setXYZ(x, bn.x, bn.y, bn.z)), d && (i && Tn.transformDirection(t.matrixWorld), c.tangent.setXYZW(x, Tn.x, Tn.y, Tn.z, nc.w));
14050
+ bn.fromBufferAttribute(l, x), h && Tn.fromBufferAttribute(h, x), d && (nc.fromBufferAttribute(d, x), Cn.fromBufferAttribute(d, x)), g && (m && js(m, g, T, x, bn), p && js(p, g, T, x, Tn), b && js(b, g, T, x, Cn)), t.isSkinnedMesh && (t.applyBoneTransform(x, bn), h && oc(t, x, Tn), d && oc(t, x, Cn)), i && bn.applyMatrix4(t.matrixWorld), c.position.setXYZ(x, bn.x, bn.y, bn.z), h && (i && Tn.applyNormalMatrix(v), c.normal.setXYZ(x, Tn.x, Tn.y, Tn.z)), d && (i && Cn.transformDirection(t.matrixWorld), c.tangent.setXYZW(x, Cn.x, Cn.y, Cn.z, nc.w));
14051
14051
  for (const x in this.attributes) {
14052
14052
  const _ = this.attributes[x];
14053
14053
  _ === "position" || _ === "tangent" || _ === "normal" || !(_ in o) || (c[_] || e.setAttribute(_, mi(o[_])), hi(o[_], c[_]), Cl(o[_], c[_]));
@@ -14100,7 +14100,7 @@ const ve = {
14100
14100
  material: "material",
14101
14101
  camera: "camera",
14102
14102
  light: "light"
14103
- }, Cn = "KHR_animation_pointer", gd = {
14103
+ }, an = "KHR_animation_pointer", gd = {
14104
14104
  // We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
14105
14105
  // keyframe track will be initialized with a default interpolation type, then modified.
14106
14106
  CUBICSPLINE: void 0,
@@ -14110,7 +14110,7 @@ const ve = {
14110
14110
  class vd {
14111
14111
  /** @type {import("three/examples/jsm/loaders/GLTFLoader").GLTFParser} */
14112
14112
  constructor(t) {
14113
- this.name = Cn, this.parser = t, this.animationPointerResolver = null;
14113
+ this.name = an, this.parser = t, this.animationPointerResolver = null;
14114
14114
  }
14115
14115
  /**
14116
14116
  * @param {import("..").AnimationPointerResolver | null} animationPointerResolver
@@ -14125,11 +14125,11 @@ class vd {
14125
14125
  }
14126
14126
  loadAnimationTargetFromChannelWithAnimationPointer(t) {
14127
14127
  xd();
14128
- const e = t.target, n = e.extensions && e.extensions[Cn] && e.path && e.path === "pointer";
14128
+ const e = t.target, n = e.extensions && e.extensions[an] && e.path && e.path === "pointer";
14129
14129
  if (!n) return null;
14130
14130
  let i, s = ve.node, a;
14131
14131
  if (n) {
14132
- const c = e.extensions[Cn];
14132
+ const c = e.extensions[an];
14133
14133
  let l = c.pointer;
14134
14134
  if (!l) {
14135
14135
  console.warn("Invalid path", c, e);
@@ -14240,23 +14240,27 @@ class vd {
14240
14240
  break;
14241
14241
  case ve.node:
14242
14242
  const m = ("/nodes/" + a.toString() + "/").length, p = l.substring(0, m);
14243
- switch (i = l.substring(m), i) {
14244
- case "translation":
14245
- i = "position";
14246
- break;
14247
- case "rotation":
14248
- i = "quaternion";
14249
- break;
14250
- case "scale":
14251
- i = "scale";
14252
- break;
14253
- case "weights":
14254
- i = "morphTargetInfluences";
14255
- break;
14256
- case "extensions/KHR_node_visibility/visible":
14257
- i = "visible";
14258
- break;
14259
- }
14243
+ if (i = l.substring(m), i.startsWith("weights/")) {
14244
+ const v = i.substring(8);
14245
+ /^\d+$/.test(v) ? i = "morphTargetInfluences[" + v + "]" : console.warn(an + ": invalid weight index", i, l);
14246
+ } else
14247
+ switch (i) {
14248
+ case "translation":
14249
+ i = "position";
14250
+ break;
14251
+ case "rotation":
14252
+ i = "quaternion";
14253
+ break;
14254
+ case "scale":
14255
+ i = "scale";
14256
+ break;
14257
+ case "weights":
14258
+ i = "morphTargetInfluences";
14259
+ break;
14260
+ case "extensions/KHR_node_visibility/visible":
14261
+ i = "visible";
14262
+ break;
14263
+ }
14260
14264
  l = p + i;
14261
14265
  break;
14262
14266
  case ve.light:
@@ -14307,7 +14311,7 @@ class vd {
14307
14311
  l = g + i;
14308
14312
  break;
14309
14313
  }
14310
- this.animationPointerResolver?.resolvePath && (l = this.animationPointerResolver.resolvePath(l)), e.extensions[Cn].pointer = l;
14314
+ this.animationPointerResolver?.resolvePath && (l = this.animationPointerResolver.resolvePath(l)), e.extensions[an].pointer = l;
14311
14315
  }
14312
14316
  if (a == null || isNaN(a)) {
14313
14317
  console.warn("Failed resolving animation node id: " + a, e);
@@ -14317,17 +14321,20 @@ class vd {
14317
14321
  return s === ve.node ? o = this.parser.getDependency("node", a) : s === ve.material ? o = this.parser.getDependency("material", a) : s === ve.light ? o = this.parser.getDependency("light", a) : s === ve.camera ? o = this.parser.getDependency("camera", a) : console.error("Unhandled type", s), o;
14318
14322
  }
14319
14323
  createAnimationTracksWithAnimationPointer(t, e, n, i, s) {
14320
- if (!(s.extensions && s.extensions[Cn] && s.path && s.path === "pointer")) return null;
14321
- let o = s.extensions[Cn].pointer;
14324
+ if (!(s.extensions && s.extensions[an] && s.path && s.path === "pointer")) return null;
14325
+ let o = s.extensions[an].pointer;
14322
14326
  if (!o) return null;
14323
14327
  const c = [];
14324
14328
  o = o.replaceAll("/", ".");
14325
14329
  const l = o.split(".");
14326
14330
  var d = t.name !== void 0 && t.name !== null ? t.name : t.uuid;
14327
- if (l[2] = d, l[3] === "morphTargetInfluences" && t.type === "Group") {
14328
- for (const b of t.children)
14329
- b instanceof Kl && b.morphTargetInfluences && (l[3] = b.name, l[4] = "morphTargetInfluences", p(this.parser));
14330
- return c;
14331
+ if (l[2] = d, l[3]?.startsWith("morphTargetInfluences")) {
14332
+ const b = l[3];
14333
+ if (t.type === "Group") {
14334
+ for (const T of t.children)
14335
+ T instanceof Kl && T.morphTargetInfluences && (l[3] = T.name, l[4] = b, p(this.parser));
14336
+ return c;
14337
+ }
14331
14338
  }
14332
14339
  p(this.parser);
14333
14340
  function m(b, T) {
@@ -14451,7 +14458,7 @@ function xd() {
14451
14458
  }
14452
14459
  if (!i) {
14453
14460
  const s = r(t, n[2]);
14454
- return s || console.warn(Cn + ": Property binding not found", e, t, t.name, n), s;
14461
+ return s || console.warn(an + ": Property binding not found", e, t, t.name, n), s;
14455
14462
  }
14456
14463
  return i;
14457
14464
  }
@@ -15169,7 +15176,7 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
15169
15176
  function Io(u) {
15170
15177
  return u === document.scrollingElement ? document : u;
15171
15178
  }
15172
- function dn(u) {
15179
+ function pn(u) {
15173
15180
  ss(u);
15174
15181
  let f = Gt.get(u).animations;
15175
15182
  if (f.length === 0) return;
@@ -15227,7 +15234,7 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
15227
15234
  f.updateScheduled || (setTimeout((() => {
15228
15235
  for (const y of f.timelineRefs) {
15229
15236
  const S = y.deref();
15230
- S && dn(S);
15237
+ S && pn(S);
15231
15238
  }
15232
15239
  f.updateScheduled = !1;
15233
15240
  })), f.updateScheduled = !0);
@@ -15261,7 +15268,7 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
15261
15268
  w.sourceMeasurements.scrollLeft = f.scrollLeft, w.sourceMeasurements.scrollTop = f.scrollTop;
15262
15269
  for (const U of w.timelineRefs) {
15263
15270
  const F = U.deref();
15264
- F && dn(F);
15271
+ F && pn(F);
15265
15272
  }
15266
15273
  };
15267
15274
  Io(f).addEventListener("scroll", D), w.disconnect = () => {
@@ -15280,7 +15287,7 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
15280
15287
  let S = Gt.get(u).animations;
15281
15288
  for (let w = 0; w < S.length; w++) if (S[w].animation == f) return;
15282
15289
  S.push({ animation: f, tickAnimation: y }), queueMicrotask((() => {
15283
- dn(u);
15290
+ pn(u);
15284
15291
  }));
15285
15292
  }
15286
15293
  class te {
@@ -15289,17 +15296,17 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
15289
15296
  if (!No(f.axis)) throw TypeError("Invalid axis");
15290
15297
  Gt.get(this).axis = f.axis;
15291
15298
  }
15292
- dn(this);
15299
+ pn(this);
15293
15300
  }
15294
15301
  set source(f) {
15295
- Rn(this, f), dn(this);
15302
+ Rn(this, f), pn(this);
15296
15303
  }
15297
15304
  get source() {
15298
15305
  return Gt.get(this).source;
15299
15306
  }
15300
15307
  set axis(f) {
15301
15308
  if (!No(f)) throw TypeError("Invalid axis");
15302
- Gt.get(this).axis = f, dn(this);
15309
+ Gt.get(this).axis = f, pn(this);
15303
15310
  }
15304
15311
  get axis() {
15305
15312
  return Gt.get(this).axis;
@@ -15471,7 +15478,7 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
15471
15478
  nr(y.source);
15472
15479
  })).observe(y.subject), new MutationObserver((() => {
15473
15480
  nr(y.source);
15474
- })).observe(y.subject, { attributes: !0, attributeFilter: ["class", "style"] })), ss(this), y.subjectMeasurements = as(y.source, y.subject), dn(this);
15481
+ })).observe(y.subject, { attributes: !0, attributeFilter: ["class", "style"] })), ss(this), y.subjectMeasurements = as(y.source, y.subject), pn(this);
15475
15482
  }
15476
15483
  get source() {
15477
15484
  return ss(this), Gt.get(this).source;
@@ -15524,7 +15531,7 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
15524
15531
  function Jo() {
15525
15532
  return new DOMException("The user aborted a request", "AbortError");
15526
15533
  }
15527
- function pn(u, f) {
15534
+ function mn(u, f) {
15528
15535
  if (f === null) return f;
15529
15536
  if (typeof f != "number") throw new DOMException(`Unexpected value: ${f}. Cannot convert to CssNumberish`, "InvalidStateError");
15530
15537
  const y = u.rangeDuration ?? 100, S = $e(u), w = S ? y * f / S : 0;
@@ -15734,7 +15741,7 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
15734
15741
  const q = F.apply(S);
15735
15742
  if (y.timeline) {
15736
15743
  const Y = y.duration ?? 100;
15737
- q.localTime = pn(y, q.localTime), q.endTime = pn(y, q.endTime), q.activeDuration = pn(y, q.activeDuration);
15744
+ q.localTime = mn(y, q.localTime), q.endTime = mn(y, q.endTime), q.activeDuration = mn(y, q.activeDuration);
15738
15745
  const Z = $e(y), pt = q.iterations ? (Z - q.delay - q.endDelay) / q.iterations : 0;
15739
15746
  q.duration = Z ? CSS.percent(Y * pt / Z) : CSS.percent(0), y.timeline.currentTime === void 0 && (q.localTime = null);
15740
15747
  }
@@ -15792,7 +15799,7 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
15792
15799
  }
15793
15800
  get startTime() {
15794
15801
  const f = X.get(this);
15795
- return f.timeline ? pn(f, f.startTime) : f.animation.startTime;
15802
+ return f.timeline ? mn(f, f.startTime) : f.animation.startTime;
15796
15803
  }
15797
15804
  set startTime(f) {
15798
15805
  const y = X.get(this);
@@ -15803,7 +15810,7 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
15803
15810
  }
15804
15811
  get currentTime() {
15805
15812
  const f = X.get(this);
15806
- return f.timeline ? f.holdTime != null ? pn(f, f.holdTime) : pn(f, $o(f)) : f.animation.currentTime;
15813
+ return f.timeline ? f.holdTime != null ? mn(f, f.holdTime) : mn(f, $o(f)) : f.animation.currentTime;
15807
15814
  }
15808
15815
  set currentTime(f) {
15809
15816
  const y = X.get(this);
@@ -15861,7 +15868,7 @@ var _d = Object.defineProperty, bd = (r, t, e) => t in r ? _d(r, t, { enumerable
15861
15868
  if (y > 0 && S == 1 / 0) throw new DOMException("Cannot finish Animation with an infinite target effect end.", "InvalidStateError");
15862
15869
  ze(f);
15863
15870
  const w = y < 0 ? 0 : S;
15864
- this.currentTime = pn(f, w);
15871
+ this.currentTime = mn(f, w);
15865
15872
  const k = St(f, f.timeline.currentTime);
15866
15873
  f.startTime === null && k !== null && (f.startTime = k - w / f.animation.playbackRate), f.pendingTask == "pause" && f.startTime !== null && (f.holdTime = null, f.pendingTask = null, f.readyPromise.resolve(this)), f.pendingTask == "play" && f.startTime !== null && (f.pendingTask = null, f.readyPromise.resolve(this)), We(f, !0, !0);
15867
15874
  }