import { getAssetFamily } from './asset-naming' export type AssetCategory = 'color' | 'diffuse' | 'roughness' | 'normal' | 'metalness' | 'height' | 'opacity' | 'orm' | 'ao' | 'assets' export function classifyAssetCategory(filename: string): AssetCategory { const name = filename.replace(/\.[^.]+$/, '') const family = getAssetFamily(name.split('_')[0]) if (family === 'color') { return 'color' } if (family === 'diffuse') { return 'diffuse' } if (family === 'roughness') { return 'roughness' } if (family === 'normal') { return 'normal' } if (family === 'metalness') { return 'metalness' } if (family === 'height') { return 'height' } if (family === 'opacity') { return 'opacity' } if (family === 'orm') { return 'orm' } if (family === 'ao') { return 'ao' } return 'assets' }