fix: normalize exported texture filenames

This commit is contained in:
Tom Boullay
2026-04-28 15:51:15 +02:00
parent 497b0853c5
commit 41e04002b8
9 changed files with 188 additions and 16 deletions
+13 -1
View File
@@ -1,6 +1,6 @@
import { getAssetFamily } from './asset-naming'
export type AssetCategory = 'color' | 'diffuse' | 'roughness' | 'normal' | 'metalness' | 'opacity' | 'assets'
export type AssetCategory = 'color' | 'diffuse' | 'roughness' | 'normal' | 'metalness' | 'height' | 'opacity' | 'orm' | 'ao' | 'assets'
export function classifyAssetCategory(filename: string): AssetCategory {
const name = filename.replace(/\.[^.]+$/, '')
@@ -26,9 +26,21 @@ export function classifyAssetCategory(filename: string): AssetCategory {
return 'metalness'
}
if (family === 'height') {
return 'height'
}
if (family === 'opacity') {
return 'opacity'
}
if (family === 'orm') {
return 'orm'
}
if (family === 'ao') {
return 'ao'
}
return 'assets'
}