Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TerrainBlock

Hierarchy

  • TerrainBlock

Index

Constructors

constructor

  • Parameters

    Returns TerrainBlock

Properties

Private _index

_index: number[] = [1, 1]

Private _info

Private _node

Private _renderable

_renderable: TerrainRenderable

Private _terrain

_terrain: Terrain

Private _weightMap

_weightMap: Texture2D | null = null

Accessors

layers

  • get layers(): number[]
  • Returns number[]

lightmap

  • Returns null | Texture2D

lightmapUVParam

  • get lightmapUVParam(): Vec4
  • Returns Vec4

Methods

getMaterialDefines

  • Parameters

    • nlayers: number

    Returns IDefineMap

invalidMaterial

  • _invalidMaterial(): void
  • Returns void

updateHeight

  • _updateHeight(): void
  • Returns void

updateLightmap

  • updateLightmap(tex: Texture2D | null, uoff: number, voff: number, uscale: number, vscale: number): void
  • Parameters

    • tex: Texture2D | null
    • uoff: number
    • voff: number
    • uscale: number
    • vscale: number

    Returns void

updateMaterial

  • updateMaterial(init: boolean): void
  • Parameters

    • init: boolean

    Returns void

updateWeightMap

  • _updateWeightMap(): void
  • Returns void

build

  • build(): void
  • Returns void

destroy

  • destroy(): void
  • Returns void

getIndex

  • getIndex(): number[]
  • Returns number[]

getLayer

  • getLayer(index: number): number
  • Parameters

    • index: number

    Returns number

getMaxLayer

  • getMaxLayer(): 1 | 0 | 2 | 3
  • Returns 1 | 0 | 2 | 3

getRect

  • Returns Rect

getTerrain

  • Returns Terrain

rebuild

  • rebuild(): void
  • Returns void

setBrushMaterial

  • setBrushMaterial(mtl: Material | null): void
  • Parameters

    Returns void

setLayer

  • setLayer(index: number, layerId: number): void
  • Parameters

    • index: number
    • layerId: number

    Returns void

update

  • update(): void
  • Returns void

Generated using TypeDoc