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

Function getNextSplatSourceId

src/utils/splatFileSourcePolicy.ts:13–22  ·  view source on GitHub ↗
(
  sources: readonly SplatFileSource[],
  activeId: string | null
)

Source from the content-addressed store, hash-verified

11 * already in memory.
12 */
13export function getNextSplatSourceId(
14 sources: readonly SplatFileSource[],
15 activeId: string | null
16): string | null {
17 if (sources.length <= 1) {
18 return null;
19 }
20 const activeIndex = activeId ? sources.findIndex((source) => source.id === activeId) : -1;
21 return sources[(activeIndex + 1) % sources.length].id;
22}
23
24/** Find a splat source by id, path, or downloaded file name. */
25export function findSplatSourceById(

Calls

no outgoing calls

Tested by

no test coverage detected