gdxjs-texture-packer
v0.1.2
Published
A little utility to pack a texture atlas at runtime. Written in typescript, used for gdxjs.
Downloads
10
Readme
gdxjs-texture-packer
A little utility to pack a texture atlas at runtime. Written in typescript, used for gdxjs.
Installation
$ npm install gdxjs-texture-packer
Usage
import { packRuntimeAtlas } from "./gdxjs-texture-packer";
...
const regionsToPack: TextureRegion[] = [];
regionsToPack.push(...originalAtlas.findRegions('name_of_regions_1'));
regionsToPack.push(...originalAtlas.findRegions('name_of_regions_2'));
const runtimeAtlas = packRuntimeAtlas(gl, regionsToPack);