()
| 94 | } |
| 95 | |
| 96 | function SceneContent() { |
| 97 | const { |
| 98 | data: { |
| 99 | reconstruction, |
| 100 | wasmReconstruction, |
| 101 | splatFile, |
| 102 | isIdle, |
| 103 | autoHideElements, |
| 104 | showAutoHideEditor, |
| 105 | viewResetTrigger, |
| 106 | viewDirection, |
| 107 | viewTrigger, |
| 108 | transform, |
| 109 | splatTransform, |
| 110 | requestedSplatBackend, |
| 111 | splatBackendAvailability, |
| 112 | splatBackendResolution, |
| 113 | splatsVisible, |
| 114 | urlProgress, |
| 115 | }, |
| 116 | actions: { |
| 117 | setSparkBackendAvailable, |
| 118 | }, |
| 119 | } = useSceneContentStoreFacade(); |
| 120 | // Use shared alignment mode (includes point picking AND floor detection) |
| 121 | const isAlignmentMode = useIsAlignmentMode(); |
| 122 | |
| 123 | const bounds = useMemo(() => { |
| 124 | return buildSceneBounds(reconstruction, wasmReconstruction); |
| 125 | }, [reconstruction, wasmReconstruction]); |
| 126 | |
| 127 | const cameras = useCamerasNode(); |
| 128 | const axes = useAxesNode(); |
| 129 | const grid = useGridNode(); |
| 130 | const gizmo = useGizmoNode(); |
| 131 | const webGpuSplatCanvasMounted = shouldMountWebGpuSplatCanvas( |
| 132 | requestedSplatBackend, |
| 133 | splatBackendAvailability, |
| 134 | splatFile |
| 135 | ); |
| 136 | const sparkSplatLayerNeeded = splatFile |
| 137 | && shouldPreloadSparkSplatRuntime(requestedSplatBackend, splatBackendAvailability); |
| 138 | |
| 139 | // Compute transforms for visual preview. The active transform wraps COLMAP |
| 140 | // content, while the splat transform is persisted after Apply because raw |
| 141 | // splat geometry cannot be baked into the source file. |
| 142 | const { |
| 143 | transformMatrix, |
| 144 | splatTransformMatrix, |
| 145 | webGpuSplatModelMatrix, |
| 146 | transformedCenter, |
| 147 | } = useMemo(() => { |
| 148 | const sim3d = isIdentityEuler(transform) ? null : createSim3dFromEuler(transform); |
| 149 | const splatSim3d = isIdentityEuler(splatTransform) ? null : createSim3dFromEuler(splatTransform); |
| 150 | const matrix = sim3d ? sim3dToMatrix4(sim3d) : null; |
| 151 | const splatMatrix = splatSim3d ? sim3dToMatrix4(splatSim3d) : null; |
| 152 | const webGpuMatrix = sim3d && splatSim3d |
| 153 | ? sim3dToMatrix4(composeSim3d(sim3d, splatSim3d)) |
nothing calls this directly
no test coverage detected