Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GLTilelayer

Due to the storage format used tileset images are limited to 256 x 256 tiles, and there can only be up to 256 tilesets. Similarly a multi-image tileset can only have up-to 256 images.

Since a tileset sheet with 256x256 tiles at 16x16 tile size is 4096x4096 pixels I think this restriciton is probably OK. Additonally if you actually approach the 256 image/tileset limit it will likely be a GPU bandwidth issue long before it is an issue with our storage format here.

Hierarchy

  • GLTilelayer

Index

Constructors

constructor

Properties

alpha

alpha: number

desc

gl

gl: WebGLRenderingContext | null = null

scrollScaleX

scrollScaleX: number = 1

scrollScaleY

scrollScaleY: number = 1

texture

texture: WebGLTexture | null = null

textureData

textureData: Uint8Array

type

type: Tilelayer = ELayerType.Tilelayer

Accessors

repeatTiles

  • get repeatTiles(): boolean
  • set repeatTiles(v: boolean): void

Methods

glInitialize

  • glInitialize(gl: WebGLRenderingContext): void

glTerminate

  • glTerminate(): void

update

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

    Parameters

    • dt: number

      Delta time in milliseconds to perform an update for.

    Returns void

uploadUniforms

Generated using TypeDoc