Hierarchy

  • BlockOptions

Constructors

  • Default options when registering a block type

    Parameters

    • isFluid: boolean = false

    Returns BlockOptions

Properties

blockMesh: any

Specifies a custom mesh for this voxel, instead of terrain

fluid: boolean

whether a nonsolid block is a fluid (buoyant, viscous..)

fluidDensity: number

Fluid parameter for fluid blocks

material: string | string[]

The block material(s) for this voxel's faces. May be:

  • one (String) material name
  • array of 2 names: [top/bottom, sides]
  • array of 3 names: [top, bottom, sides]
  • array of 6 names: [-x, +x, -y, +y, -z, +z]
onCustomMeshCreate: ((mesh, x, y, z) => void)

Type declaration

    • (mesh, x, y, z): void
    • Parameters

      • mesh: TransformNode
      • x: number
      • y: number
      • z: number

      Returns void

onLoad: ((x, y, z) => void)

Type declaration

    • (x, y, z): void
    • Parameters

      • x: number
      • y: number
      • z: number

      Returns void

onSet: ((x, y, z) => void)

Type declaration

    • (x, y, z): void
    • Parameters

      • x: number
      • y: number
      • z: number

      Returns void

onUnload: ((x, y, z) => void)

Type declaration

    • (x, y, z): void
    • Parameters

      • x: number
      • y: number
      • z: number

      Returns void

onUnset: ((x, y, z) => void)

Type declaration

    • (x, y, z): void
    • Parameters

      • x: number
      • y: number
      • z: number

      Returns void

opaque: boolean

Whether the block fully obscures neighboring blocks

solid: boolean

Solidity for physics purposes

viscosity: number

Fluid parameter for fluid blocks

Generated using TypeDoc