Subimage support in Lux

Cartography OpenStreetMap CC-by-sa
View the full source.
var texture = Lux.texture({ width: 2048, height: 2048 });
for (var i=0; i < 8; ++i)
for (var j=0; j < 8; ++j)
    texture.load({
        src: "http://tile.openstreetmap.org/3/" + i + "/" + j + ".png",
        crossOrigin: "anonymous",
        x_offset: i * 256,
        y_offset: 2048 - (j+1) * 256,
        onload: function() { gl.display(); }
    });

Back to the index.