MCPcopy Index your code
hub / github.com/ColmapView/Colmapview.github.io / findSplatSourceById

Function findSplatSourceById

src/utils/splatFileSourcePolicy.ts:25–35  ·  view source on GitHub ↗
(
  loadedFiles: LoadedFiles | null,
  sourceId: string
)

Source from the content-addressed store, hash-verified

23
24/** Find a splat source by id, path, or downloaded file name. */
25export function findSplatSourceById(
26 loadedFiles: LoadedFiles | null,
27 sourceId: string
28): SplatFileSource | undefined {
29 const target = normalizeSplatSourceId(sourceId);
30 return loadedFiles?.splatFileSources?.find((source) =>
31 [source.id, source.path, source.file?.name].some(
32 (id) => id !== undefined && normalizeSplatSourceId(id) === target
33 )
34 );
35}
36
37/**
38 * Make `sourceId` the active splat, attaching its freshly-fetched `file`, and

Calls 1

normalizeSplatSourceIdFunction · 0.85

Tested by

no test coverage detected