MCPcopy
hub / github.com/sparkjsdev/spark / getSplatFileTypeFromPath

Function getSplatFileTypeFromPath

src/SplatLoader.ts:451–474  ·  view source on GitHub ↗
(
  pathOrUrl: string,
)

Source from the content-addressed store, hash-verified

449}
450
451export function getSplatFileTypeFromPath(
452 pathOrUrl: string,
453): SplatFileType | undefined {
454 const extension = getFileExtension(pathOrUrl);
455 if (extension === "ply") {
456 return SplatFileType.PLY;
457 }
458 if (extension === "spz") {
459 return SplatFileType.SPZ;
460 }
461 if (extension === "splat") {
462 return SplatFileType.SPLAT;
463 }
464 if (extension === "ksplat") {
465 return SplatFileType.KSPLAT;
466 }
467 if (extension === "sog") {
468 return SplatFileType.PCSOGSZIP;
469 }
470 if (extension === "rad") {
471 return SplatFileType.RAD;
472 }
473 return undefined;
474}
475
476export type PcSogsJson = {
477 means: {

Callers 3

transcodeSpzFunction · 0.90
constructorMethod · 0.90
unpackSplatsFunction · 0.85

Calls 1

getFileExtensionFunction · 0.85

Tested by

no test coverage detected