// generated by diplomat-tool import type { ChunkMeshResult } from "./ChunkMeshResult.mjs" import type { MeshConfig } from "./MeshConfig.mjs" import type { MeshProgress } from "./MeshProgress.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"; /** * A chunk-meshing job running on a background thread. Replaces the old * `schematic_mesh_chunks_with_atlas_progress` C callback: poll it from a * timer loop with {@link MeshJob::poll_progress}, then call * {@link MeshJob::take_result} once (it blocks until the job finishes and * consumes the job — a second call returns `AlreadyConsumed`). */ export class MeshJob { /** @internal */ get ffiValue(): pointer; /** @internal */ constructor(); /** * Kick off chunk meshing with a shared atlas on a background thread * and return immediately. Takes the same parameters as * {@link ChunkMeshResult::create_with_atlas}. */ static start(schematic: Schematic, pack: ResourcePack, config: MeshConfig, chunkSize: number, atlas: TextureAtlas): MeshJob; /** * Cheap, non-blocking progress snapshot. Call from a timer/poll loop. */ pollProgress(): MeshProgress; /** * Block until the job finishes (if it hasn't already) and return the * result. Consumes the job: a second call returns `AlreadyConsumed`. */ takeResult(): ChunkMeshResult; }