Class: SectionMesh
Defined in: packages/minerender/src/world/SectionMesh.ts:185
Merged terrain geometry and atlas pages for one 16×16×16 section. Owns its generated render resources.
Extends
Group
Methods
dispose()
dispose(): void;Defined in: packages/minerender/src/world/SectionMesh.ts:268
Frees the GPU-related resources allocated by this instance.
Returns
void
Remarks
Call this method whenever this instance is no longer used in your app. Geometries, materials and textures are potentially shared with other 3D objects and must be disposed of separately.
Overrides
Group.disposegetBlockIndex()
getBlockIndex(hit): number | undefined;Defined in: packages/minerender/src/world/SectionMesh.ts:191
Returns the owning section cell for a triangle hit on this mesh's merged geometry.
Parameters
| Parameter | Type |
|---|---|
hit | Intersection |
Returns
number | undefined
build()
static build(
entries,
maxAtlasSize?,
fluids?,
lighting?
): SectionMesh;Defined in: packages/minerender/src/world/SectionMesh.ts:202
Builds section-local meshes from visible quads. maxAtlasSize limits each atlas dimension in pixels.
Parameters
| Parameter | Type | Default value |
|---|---|---|
entries | readonly SectionMeshEntry[] | undefined |
maxAtlasSize | number | 2048 |
fluids? | SectionFluids | undefined |
lighting? | Pick<SectionGeometryInput, "light" | "ambientLight" | "ambientOcclusion"> | undefined |
Returns
SectionMesh
buildAsync()
static buildAsync(
entries,
maxAtlasSize?,
fluids?,
lighting?
): Promise<SectionMesh>;Defined in: packages/minerender/src/world/SectionMesh.ts:209
Builds section-local meshes in a browser worker when available, with synchronous fallback.
Parameters
| Parameter | Type | Default value |
|---|---|---|
entries | readonly SectionMeshEntry[] | undefined |
maxAtlasSize | number | 2048 |
fluids? | SectionFluids | undefined |
lighting? | Pick<SectionGeometryInput, "light" | "ambientLight" | "ambientOcclusion"> | undefined |
Returns
Promise<SectionMesh>
Inherited three.js API
Members inherited from Group are documented by three.js. MineRender overrides are listed above.