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

Function encodeCameraState

src/utils/urlCameraStateCodec.ts:70–72  ·  view source on GitHub ↗
(state: CameraViewState)

Source from the content-addressed store, hash-verified

68 * Encode camera state to URL hash string.
69 */
70export function encodeCameraState(state: CameraViewState): string {
71 return `c=${toBase64Url(encodeCameraStateBinary(state))}`;
72}
73
74/**
75 * Decode camera state from raw bytes (72 bytes).

Callers 5

buildShareableUrlFunction · 0.90
useUrlStateFunction · 0.90
handlePopStateFunction · 0.90

Calls 2

toBase64UrlFunction · 0.85
encodeCameraStateBinaryFunction · 0.85

Tested by

no test coverage detected