Files
2026-05-17 16:49:24 +02:00

67 lines
1.4 KiB
TypeScript

type FileStatus = 'pending' | 'uploading' | 'success' | 'error'
export interface TextureFile {
name: string
file: File
}
export type TextureDiagnosticSeverity = 'error' | 'warning'
export interface TextureDiagnosticIssue {
severity: TextureDiagnosticSeverity
title: string
detail: string
}
export interface TextureDiagnosticReport {
status: 'idle' | 'ok' | 'warning' | 'error'
summary: string
issues: TextureDiagnosticIssue[]
}
export type DriveStatus = 'pending' | 'uploading' | 'success' | 'error' | 'skipped'
export interface FolderEntry {
folderName: string
modelFile: File
textures: TextureFile[]
status: FileStatus
progress: number
error?: string
uploadWarning?: string
filename?: string
modelUrl?: string
assetUrls: Record<string, string>
viewerOpen?: boolean
warnings: string[]
textureReport: TextureDiagnosticReport
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
}