0.0.14 • Published 10 years ago

uupaa.textureatlas.js v0.0.14

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

TextureAtlas.js Build Status

npm

Create texture atlas

Document

Run on

Browser and node-webkit

<script src="lib/TextureAtlas.js"></script>
<script>
var imageList = ["http://.../a.png", ...];
var sprite = new TextureAtlas();

TextureAtlas.imageLoader(imageList, function(images) {
    var canvas = document.createElement("canvas");
    var ctx = canvas.getContext("2d");

    for (var i = 0, iz = images.length; i < iz; ++i) {
        sprite.draw(images[i].src, ctx, i * 32, i * 32);
    }
}, function(error) {
    throw error;
}, function(image) {
    sprite.add(image.src, image);
});
</script>
0.0.14

10 years ago

0.0.13

10 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago