@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 +10 -1
- package/dist/3dgs-lib.cjs.map +1 -1
- package/dist/3dgs-lib.js +10 -1
- package/dist/3dgs-lib.js.map +1 -1
- package/package.json +1 -1
package/dist/3dgs-lib.js
CHANGED
|
@@ -13601,7 +13601,16 @@ class HotspotManager {
|
|
|
13601
13601
|
let closestIdx = -1;
|
|
13602
13602
|
for (let i = 0; i < this.hotspots.length; i++) {
|
|
13603
13603
|
const h = this.hotspots[i];
|
|
13604
|
-
|
|
13604
|
+
let px, py, pz;
|
|
13605
|
+
const firstMesh = this.meshRenderer.getOverlayMeshByIndex(h.meshStartIndex);
|
|
13606
|
+
if (firstMesh) {
|
|
13607
|
+
const m = firstMesh.modelMatrix;
|
|
13608
|
+
px = m[12];
|
|
13609
|
+
py = m[13];
|
|
13610
|
+
pz = m[14];
|
|
13611
|
+
} else {
|
|
13612
|
+
[px, py, pz] = h.position;
|
|
13613
|
+
}
|
|
13605
13614
|
const clipW = vp[3] * px + vp[7] * py + vp[11] * pz + vp[15];
|
|
13606
13615
|
if (clipW <= 0) continue;
|
|
13607
13616
|
const clipX = (vp[0] * px + vp[4] * py + vp[8] * pz + vp[12]) / clipW;
|