refactor: clean upload pipeline and restore draco delivery

This commit is contained in:
Tom Boullay
2026-04-29 16:29:32 +02:00
parent 097b8f6486
commit 498765db61
32 changed files with 769 additions and 215 deletions
+2 -39
View File
@@ -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'
}