@sequent-org/ifc-viewer 1.2.4-ci.60.0 → 1.2.4-ci.61.0
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sequent-org/ifc-viewer",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.2.4-ci.
|
|
4
|
+
"version": "1.2.4-ci.61.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "IFC 3D model viewer component for web applications - fully self-contained with local IFCLoader",
|
|
7
7
|
"main": "src/index.js",
|
|
@@ -1473,6 +1473,11 @@ export class LabelPlacementController {
|
|
|
1473
1473
|
this._tmpV.copy(m.localPoint);
|
|
1474
1474
|
model.localToWorld(this._tmpV);
|
|
1475
1475
|
|
|
1476
|
+
if (this.#isPointClippedBySection(this._tmpV)) {
|
|
1477
|
+
m.el.style.display = "none";
|
|
1478
|
+
continue;
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1476
1481
|
const ndc = this._tmpV.project(camera);
|
|
1477
1482
|
|
|
1478
1483
|
// Если точка за камерой или далеко за пределами — скрываем
|
|
@@ -1495,6 +1500,16 @@ export class LabelPlacementController {
|
|
|
1495
1500
|
}
|
|
1496
1501
|
}
|
|
1497
1502
|
|
|
1503
|
+
#isPointClippedBySection(pointWorld) {
|
|
1504
|
+
const planes = this.viewer?.clipping?.planes || [];
|
|
1505
|
+
for (const plane of planes) {
|
|
1506
|
+
if (!plane || !Number.isFinite(plane.constant)) continue;
|
|
1507
|
+
const signed = plane.distanceToPoint(pointWorld);
|
|
1508
|
+
if (signed < -1e-4) return true;
|
|
1509
|
+
}
|
|
1510
|
+
return false;
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1498
1513
|
#setLabelsHidden(hidden) {
|
|
1499
1514
|
const next = !!hidden;
|
|
1500
1515
|
if (this._labelsHidden === next) return;
|