@d5techs/3dgs-lib 1.4.13 → 1.4.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/3dgs-lib.cjs CHANGED
@@ -13603,7 +13603,16 @@ class HotspotManager {
13603
13603
  let closestIdx = -1;
13604
13604
  for (let i = 0; i < this.hotspots.length; i++) {
13605
13605
  const h = this.hotspots[i];
13606
- const [px, py, pz] = h.position;
13606
+ let px, py, pz;
13607
+ const firstMesh = this.meshRenderer.getOverlayMeshByIndex(h.meshStartIndex);
13608
+ if (firstMesh) {
13609
+ const m = firstMesh.modelMatrix;
13610
+ px = m[12];
13611
+ py = m[13];
13612
+ pz = m[14];
13613
+ } else {
13614
+ [px, py, pz] = h.position;
13615
+ }
13607
13616
  const clipW = vp[3] * px + vp[7] * py + vp[11] * pz + vp[15];
13608
13617
  if (clipW <= 0) continue;
13609
13618
  const clipX = (vp[0] * px + vp[4] * py + vp[8] * pz + vp[12]) / clipW;