KilledByAPixel / LittleJS

LittleJS is a fast HTML5 game engine with many features and no dependencies. 🚂 Choo-Choo!
MIT License
3.19k stars 160 forks source link

Better multi texture support #74

Closed KilledByAPixel closed 5 months ago

KilledByAPixel commented 6 months ago

Several users have mentioned wanting to use multiple tile sets. It would be good to think of a better way to handle rendering and loading of multiple files.

zbagdzevicius commented 5 months ago

+

KilledByAPixel commented 5 months ago

We Have Multi Texture Support!

engineInit now takes an array of images to load instead of just one. it waits for all images to load and stores info in textureInfos using the new TextureInfo class

Drawing functions used to take a tile index and tile size, now they take a TileInfo object

Webgl automatically will handle swapping out textures when necessary

All examples have been updated using the new system