import * as THREE from "three"; import type { VoxelWorld } from "../world/VoxelWorld.ts"; import type { VoxelChunk } from "../world/VoxelChunk.ts"; import type { VoxelLayer } from "../world/VoxelLayer.ts"; import type { BlockRegistry } from "../blocks/BlockRegistry.ts"; import type { BlockShapeRegistry } from "../blocks/BlockShapeRegistry.ts"; import type { TilesetManager } from "../tileset/TilesetManager.ts"; export interface VoxelMeshBuilderOptions { world: VoxelWorld; blockRegistry: BlockRegistry; shapeRegistry: BlockShapeRegistry; tilesetManager: TilesetManager; } /** * Builds per-tileset THREE.BufferGeometries for one chunk using naive face culling. * * Algorithm: for each filled voxel, emit only the faces where the adjacent * voxel in the face's direction either does not exist or does not occlude. * Non-axis-aligned faces (slopes, corners) correctly rotate their culling * direction via rotateFace() before the neighbour lookup. * * Voxels at a position already occupied by a higher-priority layer are skipped * entirely (the higher layer's chunk will render that position instead). * * Geometry is split by tileset so each resulting mesh can be assigned the * correct material/texture when multiple tilesets are in use. * * Greedy meshing is intentionally omitted: it is incompatible with per-face UV * rotation and the non-cube shapes supported by this renderer. */ export declare class VoxelMeshBuilder { #private; constructor(options: VoxelMeshBuilderOptions); /** * Builds merged BufferGeometries for one chunk, grouped by tileset ID. * Returns null if the chunk is empty or produces no visible faces. * * Each entry in the returned Map is a separate geometry containing only the * faces whose tile references belong to that tileset, allowing the caller to * bind the correct texture per draw call. */ buildChunkGeometries(chunk: VoxelChunk, layer: VoxelLayer): Map | null; } //# sourceMappingURL=VoxelMeshBuilder.d.ts.map