From 73ba41d654173a652daa454e626e9212a2fb7a04 Mon Sep 17 00:00:00 2001 From: Marcel Wiessler Date: Wed, 3 Apr 2024 09:58:33 +0200 Subject: [PATCH] Fix: don't show image or mesh LODs in scenes list https://linear.app/needle/issue/NE-4560/sveltekit-lists-autolods-in-the-scenes-page --- src/routes/scenes/+layout.server.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/routes/scenes/+layout.server.ts b/src/routes/scenes/+layout.server.ts index 8dd9522..4e0b2bb 100644 --- a/src/routes/scenes/+layout.server.ts +++ b/src/routes/scenes/+layout.server.ts @@ -6,6 +6,8 @@ export async function load({ params }) { const files = readdirSync("static/assets"); const entries = files .filter((file) => file.endsWith(".glb") || file.endsWith(".gltf")) + // don't show progressive assets / LOD files in this list + .filter(file => !(file.startsWith("image_") || file.startsWith("mesh_"))) .map((file) => { let name = file.replaceAll("\\", "/").split("/").pop()!.split(".").shift(); name = toDisplayName(name!);