gdxts-texture-packer
v0.2.11
Published
A little utility to pack a `TextureAtlas` at runtime. Written in typescript, used for gdxts.
Downloads
19
Readme
gdxts-texture-packer
A little utility to pack a TextureAtlas
at runtime. Written in typescript, used for gdxts.
Installation
$ npm install gdxts-texture-packer
Usage
import { packRuntimeAtlas } from "./gdxts-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);