import { Object3D } from 'three'; import { type ProxyReduction } from './proxy'; import { type BistroTexturePlanEntry } from './bistroTexturePlan'; import type { CompiledSceneArtifact, SourceConversionReceipt, Vec3 } from './types'; /** * Splits one parsed source scene into individually placeable assets: every * direct child of the root whose subtree carries meshes becomes one placement, * keeping the child's WORLD transform as the placement transform. * * The placement transform must be the world transform, not the child's local * one: the exported per-asset GLB carries the child's local TRS on its root * node, and the Scene v2 node applies the placement ON TOP of that — using the * local transform would apply it twice. Callers zero the child's local * transform before export (resetLocalTransform) so the GLB holds pure * asset-local geometry and the Scene v2 transform holds the whole story. */ export declare function splitObject3DIntoPlacements(root: Object3D): Array<{ name: string; transform: { position: Vec3; rotation: [number, number, number, number]; scale: Vec3; }; subtree: Object3D; }>; /** Zeros a subtree's LOCAL transform so its exported GLB carries pure asset-local geometry. */ export declare function resetLocalTransform(node: Object3D): void; export type CompiledFbxPlacement = { name: string; transform: { position: Vec3; rotation: [number, number, number, number]; scale: Vec3; }; detail: CompiledSceneArtifact; /** null when no simplified proxy earned its file slot — see proxy.ts. */ proxy: CompiledSceneArtifact | null; proxyReduction: ProxyReduction; }; /** * Compiles each mesh-carrying child of one FBX file into its own detail+proxy * GLB pair, preserving the child's source world transform for Scene v2 * placement. Texture decoding and material self-containment run once per FILE * (materials are shared across siblings); export, simplification and baking run * per ASSET, so a pack of many small props does not pay Bistro-scale costs N * times over. */ export declare function compileFbxPlacedAssets(input: { path: string; sourceName: string; receipt: SourceConversionReceipt; resolveTextures: (basenames: readonly string[]) => Promise>; maxTextureDimension?: number; proxyTargetTriangles?: number; detailTargetTriangles?: number; }): Promise<{ placements: CompiledFbxPlacement[]; unsupported: string[]; }>; /** * Derives the collision proxy from one compiled detail artifact: flat default * material, meshopt-simplified, pruned. Shared with every intake format — see * proxy.ts, which owns the implementation. */ export { simplifiedProxyArtifact } from './proxy'; export type BistroDetailPlan = { schemaVersion: 'helix.bistro-detail-plan/1'; sourceNodes: Array<{ id: string; parent: string | null; position: Vec3; rotation: [number, number, number, number]; scale: Vec3; materials: string[]; }>; materialAssignments: Array<{ node: string; materials: string[]; }>; textures: BistroTexturePlanEntry[]; unsupported: string[]; }; export declare function compileFbxGeometryGlbs(input: { path: string; sourceName: string; receipt: SourceConversionReceipt; resolveTextures: (basenames: readonly string[]) => Promise>; maxTextureDimension?: number; proxyTargetTriangles?: number; detailTargetTriangles?: number; }): Promise<{ /** null when the simplified proxy did not actually get smaller — see proxy.ts. */ proxy: CompiledSceneArtifact | null; proxyReduction: ProxyReduction; detail: CompiledSceneArtifact; detailPlan: BistroDetailPlan; }>;