kami-batch
A fast and efficient 2D sprite batcher based loosely on LibGDX's implementation.
Usage
See examples folder for details. A full program could look like this:
//setup a canvasvar gl = width: 512 height: 512; //an opaque white texture, useful for tinting lines and rectanglesvar tex = gl; //create a sprite batchervar batch = gl; batch; //tint the vertex attributesbatch; //draw some spritesbatch;batch; //submit to GPUbatch; //add to DOMdocumentbody;
Planned Changes
- use projection matrices instead of a vector
- support rotation on the fly
License
MIT, see LICENSE.md for details.