refactor: clean upload pipeline and restore draco delivery
This commit is contained in:
@@ -1,46 +1,9 @@
|
||||
import { getAssetFamily } from './asset-naming'
|
||||
|
||||
export type AssetCategory = 'color' | 'diffuse' | 'roughness' | 'normal' | 'metalness' | 'height' | 'opacity' | 'orm' | 'ao' | 'assets'
|
||||
import type { AssetCategory } from './types'
|
||||
|
||||
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'
|
||||
return family || 'assets'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user