/** * The world.json `assets[]` record for a file a creator uploaded, kind by kind. * * Kept pure — inputs in, a plain object out — so the shape each kind writes is unit-tested * without a project on disk, and so `add.ts` stays about the order of operations (classify, read, * upload, bake, write) rather than about which fields go where. * * Every shape mirrors what the Creator's Assets tab writes for the same file * (`useAssetsEditor.ts` `handleFileUpload`, `assetsGlbKeepImport.ts`), including `production`: * `uploaded` is the one provenance only the uploading side can know — the engine's voxelize * handler stamps `generated` because it sees the same GLB whether a person or a generator made it, * and the Creator overwrites that too. */ import type { VxlSummary } from './vxl-summary.js'; export interface UploadedAssetBase { id: string; name: string; /** Where the uploaded bytes are served from. */ url: string; /** Raw file size in bytes — what the Creator records, not the gzipped transfer size. */ size: number; /** The file's basename, kept as provenance. */ sourceName: string; /** ISO timestamp for `production.at`. */ at: string; } /** An image: the thumbnail IS the image, as the Creator and the image generator both record. */ export declare function imageAssetEntry(input: UploadedAssetBase): Record; export declare function audioAssetEntry(input: UploadedAssetBase): Record; export declare function jsonAssetEntry(input: UploadedAssetBase): Record; /** * A `.vxl` uploaded as-is, with the metadata its own header states — the fields the Creator gets * back from `/api/analyze-asset` for the same file. */ export declare function vxlAssetEntry(input: UploadedAssetBase, summary: VxlSummary): Record; /** The Creator's keep-as-GLB import: `type: 'glb'`, the mesh as its own source, 2 m tall by default. */ export declare const DEFAULT_GLB_TARGET_HEIGHT = 2; export declare function glbAssetEntry(input: UploadedAssetBase, targetHeight: number | undefined): Record; /** * The record the engine returned from `CREATE_ASSET_FROM_GLB_URL`, re-stamped as an upload. The * engine's own `production` says `generated` with the GLB as `sourceUrl`; the method is corrected, * the source URL kept (it is the uploaded GLB), and the creator's filename added. */ export declare function voxelizedGlbAssetEntry(engineAsset: Record, input: Pick): Record;