52 lines
1.1 KiB
TypeScript
52 lines
1.1 KiB
TypeScript
type FileStatus = 'pending' | 'uploading' | 'success' | 'error'
|
|
|
|
export interface TextureFile {
|
|
name: string
|
|
file: File
|
|
}
|
|
|
|
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[]
|
|
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
|
|
}
|