How to draw a tilemap in three.js?

You basically transform texture coordinates by modifying Texture.repeat and Texture.offset. You just need to know some properties about your sprite sheet e.g. how many images it contains and the respective dimensions. Check out the following live demo to see this approach in action:

https://jsfiddle.net/f2Lommf5/16880/

2 Likes