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

Function decodeCameraStateBinary

src/utils/urlCameraStateCodec.ts:111–115  ·  view source on GitHub ↗
(data: string)

Source from the content-addressed store, hash-verified

109 * Decode camera state from Base64URL binary format.
110 */
111export function decodeCameraStateBinary(data: string): CameraViewState | null {
112 const bytes = fromBase64Url(data);
113 if (!bytes || bytes.length !== 72) return null;
114 return decodeCameraFromBytes(bytes);
115}
116
117/**
118 * Decode camera state from legacy text format.

Callers 3

shareUrl.test.tsFile · 0.90

Calls 2

fromBase64UrlFunction · 0.85
decodeCameraFromBytesFunction · 0.85

Tested by

no test coverage detected