Remove obsolete code

This commit is contained in:
Andreas Sundquist
2025-05-30 10:49:49 -07:00
parent 7defe60edb
commit 8b5f854848
25 changed files with 5267 additions and 7213 deletions
-14
View File
@@ -73,7 +73,6 @@ export class SplatLoader extends Loader {
export enum SplatFileType {
PLY = "ply",
WLG0 = "wlg0",
SPZ = "spz",
SPLAT = "splat",
KSPLAT = "ksplat",
@@ -86,9 +85,6 @@ export function getSplatFileType(
if ((view.getUint32(0, true) & 0x00ffffff) === 0x00796c70) {
return SplatFileType.PLY;
}
if (view.getUint32(0, true) === 0x30474c57) {
return SplatFileType.WLG0;
}
if ((view.getUint32(0, true) & 0x00ffffff) === 0x00088b1f) {
// Gzipped file, unpack beginning to check magic number
const header = decompressPartialGzip(fileBytes, 4);
@@ -125,9 +121,6 @@ export function getSplatFileTypeFromPath(
if (extension === "ply") {
return SplatFileType.PLY;
}
if (extension === "wlg") {
return SplatFileType.WLG0;
}
if (extension === "spz") {
return SplatFileType.SPZ;
}
@@ -164,13 +157,6 @@ export async function unpackSplats({
}
switch (splatFileType) {
case SplatFileType.WLG0:
return await withWorker(async (worker) => {
const { packedArray, numSplats } = (await worker.call("decodeWlg", {
fileBytes,
})) as { packedArray: Uint32Array; numSplats: number };
return { packedArray, numSplats };
});
case SplatFileType.PLY: {
const ply = new PlyReader({ fileBytes });
await ply.parseHeader();