import { type DefaultMaterialMapping, type DefaultMaterialSummary } from './defaultMaterials'; import type { CompiledSceneArtifact, SourceConversionReceipt, Vec3 } from './types'; /** * Pack-agnostic multi-asset Scene compiler front door. * * Enumerates every mesh file in a source directory (FBX/OBJ/GLB), compiles EACH * placed mesh into its own detail+proxy GLB pair reusing the proven Helsinki/ * Bistro machinery, deduplicates identical meshes by content hash so repeated * props share resources, optionally swaps imported materials/textures for the * shared HELIX default set, clusters instances spatially into distance-mode * stream cells, probes a standing spawn across ALL placed collider proxies, and * emits one schema-valid Scene v2 package of N individually streamed nodes. */ export declare const SUPPORTED_MESH_EXTENSIONS: readonly [".fbx", ".obj", ".glb"]; export type MultiAssetCompileResult = { scenePath: string; receiptPath: string; resourcePaths: string[]; totalBytes: number; placements: number; uniqueMeshes: number; proxiesKept: number; proxiesDropped: number; streamGroups: number; cells: number; spawn: Vec3; defaultMaterials?: DefaultMaterialSummary; }; export declare function compileMultiAssetScene(input: { sourceDir: string; outputDir: string; title: string; sourceId: string; receipt: SourceConversionReceipt; /** Subtracted from OBJ vertex positions before conversion (packs authored in a map CRS). */ localOrigin?: Vec3; axisMapping?: (source: Vec3) => Vec3; /** Swap imported materials/textures for the shared HELIX default set (opt-in per import). */ defaultMaterials?: boolean | { mapping?: DefaultMaterialMapping; }; maxTextureDimension?: number; proxyTargetTriangles?: number; detailTargetTriangles?: number; cellSizeM?: number; /** Skip the compile-time multipart file-count guard; see createSceneV2MultiAssetPackage. */ vaultPinned?: boolean; }): Promise; /** * Deterministic digest over a whole source pack: sorted relative paths plus * every file's bytes. This is the `originalSha256` a pack receipt pins, the * same role the immutable archive hash plays for single-archive imports. */ export declare function packOriginalSha256(sourceDir: string): Promise; /** Builds an explicit rights-clean receipt for one mesh pack, license-agnostically. */ export declare function receiptForPack(input: { sourceId: string; originalSha256: string; title: string; creator: string; license: string; licenseUrl: string; sourceUrl: string; }): SourceConversionReceipt; /** Recursively lists supported mesh files; refuses loudly on known-but-unsupported mesh formats. */ export declare function listMeshFiles(root: string): Promise; /** * Content hash over what a compiled asset IS geometrically — its node * hierarchy and each node's TRS, which mesh hangs on which node, primitive * modes, accessor buffers, indices, material parameters and texture payloads — * with node/mesh/material names, filenames and receipt metadata excluded. Two * compilations of the same source asset therefore hash equal even when their * GLBs differ byte-for-byte. * * The hierarchy is part of the identity, not decoration. Digesting only the * mesh list makes two multi-part props that differ solely by a child node's * rotation hash identical, so dedup collapses them and one placement renders * the other's part orientation — the exact failure mode of any kitbash or FBX * prop assembled from separately-transformed pieces. */ export declare function geometryContentHash(artifact: CompiledSceneArtifact): Promise;