voxel / voxel-stitch

stitch block textures into a tile map for rect-mip-map
4 stars 1 forks source link

voxel-stitch

Stitches a set of block textures together into a texture atlas

The texture names are looked up from voxel-registry and the texture data from artpacks.

For an example, run npm start or try the live demo.

Arbitrary rects vs fixed arrays

voxel-stitch uses atlaspack, which supports packing textures of arbitrary rectangular shapes onto a two-dimensional canvas. The mip maps are generated using rect-mip-map.

(Before version 0.3, voxel-stitch would generate a 5-dimensional ndarray is in a format suitable for gl-tile-map / tile-mip-map, which required fixed texture sizes.)

Usage

Load using voxel-plugins, options:

Methods:

Events (voxel-stitch is an EventEmitter and emits the following):

Variables:

License

MIT