fix: canonicalize asset families
This commit is contained in:
@@ -6,19 +6,19 @@ export function classifyAssetCategory(filename: string): AssetCategory {
|
||||
const name = filename.replace(/\.[^.]+$/, '')
|
||||
const family = getAssetFamily(name.split('_')[0])
|
||||
|
||||
if (family === 'baseColor' || family === 'color') {
|
||||
if (family === 'color' || family === 'diffuse') {
|
||||
return 'color'
|
||||
}
|
||||
|
||||
if (family === 'roughness' || family === 'occlusionRoughnessMetallic') {
|
||||
if (family === 'roughness') {
|
||||
return 'roughness'
|
||||
}
|
||||
|
||||
if (family === 'normal' || family === 'normalOpengl') {
|
||||
if (family === 'normal') {
|
||||
return 'normal'
|
||||
}
|
||||
|
||||
if (family === 'metallic' || family === 'metalness') {
|
||||
if (family === 'metalness') {
|
||||
return 'metalness'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user