( sources: readonly SplatFileSource[], activeId: string | null )
| 11 | * already in memory. |
| 12 | */ |
| 13 | export 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. */ |
| 25 | export function findSplatSourceById( |
no outgoing calls
no test coverage detected