MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / collectShareConfig

Function collectShareConfig

src/hooks/useUrlState.ts:43–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41 * Uses explicit field lists to ensure only visual state is shared.
42 */
43export 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.

Callers 2

generateShareableUrlFunction · 0.85

Calls 2

Tested by

no test coverage detected