Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GLTilemap

Hierarchy

  • GLTilemap

Index

Constructors

constructor

Properties

assetCache

assetCache: IAssetCache | undefined = undefined

blendMode

blendMode: IBlendMode

desc

desc: ITilemap

gl

gl: WebGLRenderingContext | null = null

renderBackgroundColor

renderBackgroundColor: boolean

shaders

shaders: IShaderCache | null = null

Accessors

layers

repeatTiles

  • set repeatTiles(v: boolean): void

scaledViewportHeight

  • get scaledViewportHeight(): number

scaledViewportWidth

  • get scaledViewportWidth(): number

tileScale

  • get tileScale(): number
  • set tileScale(scale: number): void

tilesets

viewportHeight

  • get viewportHeight(): number

viewportWidth

  • get viewportWidth(): number

Methods

createLayer

  • createLayer(...name: string[]): boolean

createLayerFromDesc

  • createLayerFromDesc(layer: ILayer): void

destroyLayer

  • destroyLayer(...name: string[]): boolean

destroyLayerFromDesc

  • destroyLayerFromDesc(layerDesc: ILayer): boolean

draw

  • draw(x?: number, y?: number): void
  • Draws the tilemap.

    Parameters

    • Default value x: number = 0

      The x offset at which to draw the map

    • Default value y: number = 0

      The y offset at which to draw the map

    Returns void

findLayerDesc

  • findLayerDesc(...name: string[]): ILayer | null

glInitialize

  • glInitialize(gl: WebGLRenderingContext): void

glTerminate

  • glTerminate(): void

resizeViewport

  • resizeViewport(width: number, height: number): void

update

  • update(dt: number): void
  • Updates each layer's animations by the given delta time.

    Parameters

    • dt: number

      Delta time in milliseconds to perform an update for.

    Returns void

Generated using TypeDoc