Creates a mip mapped texture atlas from a list of tiles and uploads it to WebGL


Generates a WebGL texture atlas for a tile map.

npm install gl-tile-map

Generates a tilemap as atexture object.

  • gl is a webgl context
  • tiles is a 5 dimensional ndarray of tiles.
  • pad is an optional flag that if set pads each tile by a factor of 1/2 along each dimension.

Returns A gl-texture2d object encoding the atlas


(c) 2013 Mikola Lysenko. MIT License