I'm working on optimizing the draw calls in my THREE.js scene by reducing the amount of rendering required. I have a grid of large 32x32 tiles that are .gtlf models imported from the disk. Each tile has a model with just 8 vertices and a texture. However, when inspecting the canvas using tools like Spector, I noticed that there are 151 draw calls being made, with each model being rendered separately.
These tiles are generated by looping through the grid for every tile, checking if it needs a model, and then retrieving the model data from a Map where it was loaded using THREE.GLTFLoader. Occasionally, the material or rotation of the tiles may change, but only during setup.
Since these tiles will remain static and do not require any transformations, I am looking for optimization techniques to group the rendering of these tiles into as few draw calls as possible, considering they are essentially the same object.