()
| 41 | * Uses explicit field lists to ensure only visual state is shared. |
| 42 | */ |
| 43 | export function collectShareConfig(): ShareConfig { |
| 44 | const transformStore = useTransformStore.getState(); |
| 45 | const config = buildShareConfigFromStoreStates( |
| 46 | { |
| 47 | pointCloud: usePointCloudStore.getState(), |
| 48 | ui: useUIStore.getState(), |
| 49 | camera: useCameraStore.getState(), |
| 50 | rig: useRigStore.getState(), |
| 51 | transform: transformStore.transform, |
| 52 | splatTransform: transformStore.splatTransform, |
| 53 | }, |
| 54 | SHAREABLE_FIELDS |
| 55 | ); |
| 56 | const activeSplatSourceId = getShareActiveSplatSourceId(useReconstructionStore.getState().loadedFiles); |
| 57 | if (activeSplatSourceId) { |
| 58 | config.splat = { activeSourceId: activeSplatSourceId }; |
| 59 | } |
| 60 | return config; |
| 61 | } |
| 62 | |
| 63 | /** |
| 64 | * Apply share config to all stores. |
no test coverage detected