Options
All
  • Public
  • Public/Protected
  • All
Menu

Class representing model used by BlockRenderer

Hierarchy

  • Model

Index

Constructors

Methods

Constructors

constructor

  • new Model(): Model
  • new Model(mesh: RenderMesh): Model
  • new Model(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, descr: ModelTextureSet): Model
  • new Model(descr: ModelTextureSet): Model
  • new Model(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, texName: string, texId: number): Model
  • new Model(texName: string, texId: number): Model
  • new Model(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, id: number, data: number): Model
  • new Model(id: number, data: number): Model
  • Creates a new empty model

    Returns Model

  • Constructs new model using specified RenderMesh

    Parameters

    Returns Model

  • Creates a new empty model Constructs new model using specified RenderMesh Constructs new block model with single box inside specified block shape. The width of the full blockis 1x1x1 units. Constructs new block model with single box of the normal block size. Constructs new block model with single box inside specified block shape. The width of the full blockis 1x1x1 units. Uses block id and data to determine texture Constructs new block model with single box of the normal block size. The width of the full blockis 1x1x1 units. Uses block id and data to determine texture

    Parameters

    • x1: number
    • y1: number
    • z1: number
    • x2: number
    • y2: number
    • z2: number
    • descr: ModelTextureSet

    Returns Model

  • Creates a new empty model Constructs new model using specified RenderMesh Constructs new block model with single box inside specified block shape. The width of the full blockis 1x1x1 units. Constructs new block model with single box of the normal block size. Constructs new block model with single box inside specified block shape. The width of the full blockis 1x1x1 units. Uses block id and data to determine texture Constructs new block model with single box of the normal block size. The width of the full blockis 1x1x1 units. Uses block id and data to determine texture

    Parameters

    Returns Model

  • Constructs new block model with single box inside specified block shape. The width of the full blockis 1x1x1 units.

    Parameters

    • x1: number
    • y1: number
    • z1: number
    • x2: number
    • y2: number
    • z2: number
    • texName: string

      block texture name to be used with the model

    • texId: number

      block texture meta to be used with the model

    Returns Model

  • Constructs new block model with single box of the normal block size.

    Parameters

    • texName: string

      block texture name to be used with the model

    • texId: number

      block texture meta to be used with the model

    Returns Model

  • Constructs new block model with single box inside specified block shape. The width of the full blockis 1x1x1 units. Uses block id and data to determine texture

    Parameters

    • x1: number
    • y1: number
    • z1: number
    • x2: number
    • y2: number
    • z2: number
    • id: number

      sample block id

    • data: number

      sample block data

    Returns Model

  • Constructs new block model with single box of the normal block size. The width of the full blockis 1x1x1 units. Uses block id and data to determine texture

    Parameters

    • id: number
    • data: number

    Returns Model

Methods

addBox

  • addBox(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, id: number, data: number): void
  • addBox(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, descr: ModelTextureSet): void
  • addBox(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, texName: string, texId: number): void
  • addBox(id: number, data?: number): void
  • Adds new box to the model using specified block's textures

    Parameters

    • x1: number
    • y1: number
    • z1: number
    • x2: number
    • y2: number
    • z2: number
    • id: number
    • data: number

    Returns void

  • Adds new box to the model using specified textures for the six sides of the box

    Parameters

    • x1: number
    • y1: number
    • z1: number
    • x2: number
    • y2: number
    • z2: number
    • descr: ModelTextureSet

    Returns void

  • Adds new box to the model using specified block texture name and id

    Parameters

    • x1: number
    • y1: number
    • z1: number
    • x2: number
    • y2: number
    • z2: number
    • texName: string
    • texId: number

    Returns void

  • Adds new block with specified block's textures

    Parameters

    • id: number
    • Optional data: number

    Returns void

addMesh

Generated using TypeDoc