// generated by diplomat-tool import type { BlockPos } from "./BlockPos.mjs" import type { MeshConfig } from "./MeshConfig.mjs" import type { MeshResult } from "./MeshResult.mjs" import type { NucleationError } from "./NucleationError.mjs" import type { ResourcePack } from "./ResourcePack.mjs" import type { Schematic } from "./Schematic.mjs" import type { TextureAtlas } from "./TextureAtlas.mjs" import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; /** * Per-chunk mesh results. Wraps {@link crate::meshing::ChunkMeshResult}. */ export class ChunkMeshResult { /** @internal */ get ffiValue(): pointer; /** @internal */ constructor(); /** * Mesh with the default chunk size (old ABI: `schematic_mesh_by_chunk`). */ static create(schematic: Schematic, pack: ResourcePack, config: MeshConfig): ChunkMeshResult; /** * Mesh with an explicit chunk size (old ABI: `schematic_mesh_by_chunk_size`). */ static createWithSize(schematic: Schematic, pack: ResourcePack, config: MeshConfig, chunkSize: number): ChunkMeshResult; /** * Mesh chunks against a pre-built shared atlas, synchronously * (old ABI: `schematic_mesh_chunks_with_atlas`). For progress * reporting use {@link MeshJob::start} instead. */ static createWithAtlas(schematic: Schematic, pack: ResourcePack, config: MeshConfig, chunkSize: number, atlas: TextureAtlas): ChunkMeshResult; /** * Number of chunk meshes. */ chunkCount(): number; /** * Coordinate of the `index`-th chunk (old ABI: * `chunkmeshresult_chunk_coordinates` returned all of them flat). */ chunkCoordinateAt(index: number): BlockPos; /** * The mesh for one chunk coordinate (cloned). */ getMesh(cx: number, cy: number, cz: number): MeshResult; /** * Total vertex count across all chunk meshes. */ totalVertexCount(): number; /** * Total triangle count across all chunk meshes. */ totalTriangleCount(): number; /** * All chunk meshes serialized in the NUCM cache format, base64-encoded. */ nucmDataB64(): string; /** * NUCM v2 with a shared atlas, base64-encoded. */ nucmDataWithAtlasB64(atlas: TextureAtlas): string; }