import { AssetError, type MeshAsset, type MeshMaterialSlot, type PrimitiveTopology, type Result, type Submesh, type VertexAttributeMap } from '@forgeax/engine-types'; /** Input shape for one independently drawn submesh. */ export type MeshBuilderSubmesh = Partial & { readonly topology?: PrimitiveTopology; }; /** All authoring facts accepted by {@link createMeshBuilder}. */ export interface MeshBuilderOptions { readonly attributes?: VertexAttributeMap; readonly indices?: ArrayLike; readonly submeshes?: readonly MeshBuilderSubmesh[]; readonly materialSlots?: readonly MeshMaterialSlot[]; } export interface MeshBuilder { /** Append one equally-cardinal attribute batch to the accumulated source. */ appendVertices(attributes: VertexAttributeMap): Result; /** Append raw index values; width is derived during build. */ appendIndices(indices: ArrayLike): Result; /** Add a draw range; omitted ranges are completed from the final source. */ addSubmesh(submesh: MeshBuilderSubmesh): Result; /** Derive one immutable MeshAsset from the accumulated source. */ build(): Result; } /** * Create a geometry-owned builder. All derived facts are computed once in * `build()` from the accumulated canonical attribute source. */ export declare function createMeshBuilder(options?: MeshBuilderOptions): MeshBuilder; //# sourceMappingURL=mesh-builder.d.ts.map