debut refacto
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
// Shared constants — used by both client and server
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export const MODEL_EXTENSIONS = new Set(['.glb', '.gltf'])
|
||||
export const TEXTURE_EXTENSIONS = new Set(['.png', '.jpg', '.jpeg', '.webp'])
|
||||
export const ALL_ALLOWED_EXTENSIONS = new Set([...MODEL_EXTENSIONS, ...TEXTURE_EXTENSIONS])
|
||||
|
||||
export const REQUIRED_TEXTURES = ['roughness', 'normal', 'metalness', 'color', 'displace'] as const
|
||||
|
||||
export const VALID_DESTINATIONS = new Set([
|
||||
'farm', 'map', 'powergrid', 'workshop', 'general', 'environment',
|
||||
] as const)
|
||||
|
||||
export const DESTINATIONS = [
|
||||
{ value: 'farm', label: 'Farm' },
|
||||
{ value: 'map', label: 'Map' },
|
||||
{ value: 'powergrid', label: 'Powergrid' },
|
||||
{ value: 'workshop', label: 'Workshop' },
|
||||
{ value: 'general', label: 'General' },
|
||||
{ value: 'environment', label: 'Environment' },
|
||||
] as const
|
||||
|
||||
export type Destination = typeof DESTINATIONS[number]['value']
|
||||
|
||||
export const TMP_DIR = '/tmp/assets'
|
||||
|
||||
/** Maximum file size in bytes (100 MB) */
|
||||
export const MAX_FILE_SIZE = 100 * 1024 * 1024
|
||||
Reference in New Issue
Block a user