fix: normalize exported texture filenames
This commit is contained in:
@@ -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'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user