fix(viewer): preserve operator camera across AI layers

This commit is contained in:
DCCONSTRUCTIONS
2026-07-23 10:51:18 +03:00
parent a0706fd5d8
commit 3a64f54dea
12 changed files with 425 additions and 109 deletions
@@ -336,8 +336,10 @@ function SpatialWorkspace({
(source) => source.capabilities.overlay && source.modality !== "point-cloud",
);
const recordedPerceptionSupported = recordedSource && perceptionAvailability !== "unavailable";
const recordedPerceptionEnabled = showDetections2d || showSegmentation || showCuboids3d;
const unifiedPerception = recordedPerceptionSupported && recordedPerceptionEnabled;
// Keep one stable original-video + world composition for every admitted
// perception recording. Layer buttons then only change entity visibility;
// they never reparent the 3D view or invalidate the operator's camera.
const unifiedPerception = recordedPerceptionSupported;
const livePerceptionAvailable = !recordedSource && streamActive;
const detections2dActive = recordedSource
? showDetections2d