Class ModelCuboid

Defines a cuboid within a BlockModel.

ModelCuboid

Constructors

Properties

ambientOcclusion: boolean

Whether ambient occlusion is enabled for the cuboid.

Memberof

ModelCuboid

box: Box3

The bounding box of the cuboid.

Memberof

ModelCuboid

materials: ModelCuboidMaterials

The materials for each face of the cuboid.

Memberof

ModelCuboid

visible: ModelCuboidVisible

The visibility of each face of the cuboid.

Memberof

ModelCuboid

Accessors

  • get visibleFaces(): any
  • Gets number of visible faces.

    Returns any

    Memberof

    ModelCuboid

Methods

  • Serializes the cuboid into a JSON object.

    Returns any

    The serialized cuboid as a JSON object.

    Memberof

    ModelCuboid

  • Sets the ambient occlusion for the cuboid.

    Parameters

    • ambientOcclusionEnabled: boolean

      Whether ambient occlusion is enabled.

    Returns ModelCuboid

  • Sets the material for each face of the cuboid individually.

    Parameters

    • west: Material

      The material for the west face.

    • east: Material

      The material for the east face.

    • down: Material

      The material for the down face.

    • up: Material

      The material for the up face.

    • north: Material

      The material for the north face.

    • south: Material

      The material for the south face.

    Returns ModelCuboid

  • Sets the visibility for each face of the cuboid individually.

    Parameters

    • west: boolean

      Whether the west face is visible.

    • east: boolean

      Whether the east face is visible.

    • down: boolean

      Whether the down face is visible.

    • up: boolean

      Whether the up face is visible.

    • north: boolean

      Whether the north face is visible.

    • south: boolean

      Whether the south face is visible.

    Returns ModelCuboid

Generated using TypeDoc