Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GLTileset

Hierarchy

  • GLTileset

Index

Constructors

constructor

Properties

desc

desc: ITileset

gl

gl: WebGLRenderingContext | null = null

images

images: (null | ImageBitmap | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | OffscreenCanvas)[] = []

The images in this tileset.

textures

textures: (null | WebGLTexture)[] = []

The gl textures in this tileset

Accessors

lastgid

  • get lastgid(): number

Methods

bind

  • bind(startSlot: number): void

containsGid

  • containsGid(gid: number): boolean
  • Returns true if the given gid is contained in this tileset

    Parameters

    • gid: number

      The global ID of the tile in a map.

    Returns boolean

containsLocalId

  • containsLocalId(index: number): boolean
  • Returns true if the given index is contained in this tileset

    Parameters

    • index: number

      The local index of a tile in this tileset.

    Returns boolean

getTileLocalId

  • getTileLocalId(gid: number): number
  • Returns the tile ID for a given gid. Assumes it is within range

    Parameters

    • gid: number

      The global ID of the tile in a map.

    Returns number

getTileProperties

  • getTileProperties(gid: number): ITileProps | null
  • Gathers the properties of a tile

    Parameters

    • gid: number

      The global ID of the tile in a map.

    Returns ITileProps | null

glInitialize

  • glInitialize(gl: WebGLRenderingContext): void

glTerminate

  • glTerminate(): void

Generated using TypeDoc