@leverege/tpi-viz 0.2.5 → 0.2.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.
- package/package.json +1 -1
- package/src/main.js +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leverege/tpi-viz",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "3D scene viewer for TPI manufacturing data — renders blade geometry, PTZ cameras, defects, ply layers, and flows. Exports mountViewer()/destroy() for embedding (e.g. an Imaginarium React route); also runs standalone.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
package/src/main.js
CHANGED
|
@@ -1509,6 +1509,7 @@ function enterPOV(idx) {
|
|
|
1509
1509
|
shell: pc.shell.visible,
|
|
1510
1510
|
internals: pc.internals.visible,
|
|
1511
1511
|
frustum: pc.frustum.visible,
|
|
1512
|
+
projection: pc.projection ? pc.projection.visible : undefined,
|
|
1512
1513
|
frustumChildren: frustums[i]
|
|
1513
1514
|
? frustums[i].children.map(c => c.visible) : null,
|
|
1514
1515
|
}));
|
|
@@ -1523,6 +1524,10 @@ function enterPOV(idx) {
|
|
|
1523
1524
|
});
|
|
1524
1525
|
} else {
|
|
1525
1526
|
pc.frustum.visible = false;
|
|
1527
|
+
// Hide the other cameras' contour/image projections too — otherwise
|
|
1528
|
+
// their LPD patterns keep rendering at the (now-hidden) frustum's far
|
|
1529
|
+
// plane and appear to float in space. Restored from the snapshot on exit.
|
|
1530
|
+
if (pc.projection) pc.projection.visible = false;
|
|
1526
1531
|
}
|
|
1527
1532
|
});
|
|
1528
1533
|
|
|
@@ -1639,6 +1644,7 @@ function exitPOV() {
|
|
|
1639
1644
|
pc.shell.visible = s.shell;
|
|
1640
1645
|
pc.internals.visible = s.internals;
|
|
1641
1646
|
pc.frustum.visible = s.frustum;
|
|
1647
|
+
if (pc.projection && s.projection !== undefined) pc.projection.visible = s.projection;
|
|
1642
1648
|
if (s.frustumChildren && frustums[i]) {
|
|
1643
1649
|
frustums[i].children.forEach((child, ci) => {
|
|
1644
1650
|
if (s.frustumChildren[ci] !== undefined) child.visible = s.frustumChildren[ci];
|
|
@@ -2606,6 +2612,9 @@ export async function mountViewer( container, opts = {} ) {
|
|
|
2606
2612
|
if ( el ) { el.textContent = `Init failed: ${err.message}`; }
|
|
2607
2613
|
throw err;
|
|
2608
2614
|
}
|
|
2615
|
+
// Debug/test handle: read-only access to the SceneRenderer for inspecting
|
|
2616
|
+
// scene state from outside (e.g. embed debugging, e2e assertions).
|
|
2617
|
+
_container.__tpiVizRenderer = renderer;
|
|
2609
2618
|
return { destroy };
|
|
2610
2619
|
}
|
|
2611
2620
|
|