Skip to content

marble3 / MaterialMap

Interface: MaterialMap ​

Defined in: src/terrain/voxels.ts:27

The block types of a voxel terrain and which one each block is.

Properties ​

types ​

types: object

Defined in: src/terrain/voxels.ts:29

A material, or six (one per face), for each block type.

Index Signature ​

[key: string]: Material | Material[]

Methods ​

getTypeAt() ​

getTypeAt(x, y, z, terrain): string

Defined in: src/terrain/voxels.ts:31

The key in types of the block at (x, y, z); terrain.heightMap tells how deep it is.

Parameters ​

x ​

number

y ​

number

z ​

number

terrain ​

BaseVoxelTerrain

Returns ​

string