(config: ShareConfig)
| 65 | * Automatically applies all fields using setState. |
| 66 | */ |
| 67 | export function applyShareConfig(config: ShareConfig): void { |
| 68 | if (config.splat?.activeSourceId) { |
| 69 | useReconstructionStore.getState().setRequestedSplatSourceId(config.splat.activeSourceId); |
| 70 | useImageMetricsStore.getState().clearSplatPsnr(); |
| 71 | } |
| 72 | |
| 73 | // Point cloud store |
| 74 | if (config.pointCloud) { |
| 75 | usePointCloudStore.setState(config.pointCloud); |
| 76 | } |
| 77 | |
| 78 | // UI store |
| 79 | if (config.ui) { |
| 80 | useUIStore.setState(config.ui); |
| 81 | } |
| 82 | |
| 83 | // Camera store |
| 84 | if (config.camera) { |
| 85 | useCameraStore.setState(config.camera); |
| 86 | } |
| 87 | |
| 88 | // Rig store |
| 89 | if (config.rig) { |
| 90 | useRigStore.setState(config.rig); |
| 91 | } |
| 92 | |
| 93 | // Transform store |
| 94 | if (config.transform) { |
| 95 | useTransformStore.getState().setTransform(config.transform); |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | /** |
| 100 | * Hook for bidirectional sync between camera state and URL hash. |
no outgoing calls
no test coverage detected