diff --git a/src/helpers/normalizeFiletype.ts b/src/helpers/normalizeFiletype.ts index cf9389a..dcdce29 100644 --- a/src/helpers/normalizeFiletype.ts +++ b/src/helpers/normalizeFiletype.ts @@ -31,6 +31,24 @@ export const normalizeOutputFiletype = (filetype: string): string => { case "markdown_mmd": case "markdown": return "md"; + // assimp format ids that aren't real file extensions — map to the + // canonical extension for the underlying format so the output file + // opens in third-party viewers. The format id is still passed to + // `assimp export -f` so the right encoding/variant is produced. + case "glb2": + return "glb"; + case "gltf2": + return "gltf"; + case "objnomtl": + return "obj"; + case "stlb": + return "stl"; + case "plyb": + return "ply"; + case "fbxa": + return "fbx"; + case "assjson": + return "json"; default: return lowercaseFiletype; }