refactor: tighten upload and viewer contracts

This commit is contained in:
Tom Boullay
2026-05-13 17:50:26 +02:00
parent 30ff9826dc
commit f6ac71dad2
11 changed files with 108 additions and 86 deletions
+27 -1
View File
@@ -1,4 +1,4 @@
export type FileStatus = 'pending' | 'uploading' | 'success' | 'error'
type FileStatus = 'pending' | 'uploading' | 'success' | 'error'
export interface TextureFile {
name: string
@@ -23,3 +23,29 @@ export interface FolderEntry {
driveStatus?: DriveStatus
driveError?: string
}
export interface ModelStats {
childObjects: number
drawCalls: number
materials: number
meshes: number
textures: number
triangles: number
}
export interface ModelHierarchyNode {
children: ModelHierarchyNode[]
id: string
name: string
position: [number, number, number]
rotation: [number, number, number]
type: string
visible: boolean
}
export interface SceneViewerProps {
url: string
assetUrls: Record<string, string>
onStatsReady: (stats: ModelStats) => void
onHierarchyReady: (hierarchy: ModelHierarchyNode) => void
}