Hi
I am struggling with the use of UV in sprite.geometry. Ultimately, I would like to have a lot of sprites on the stage using one texture (part of it). While in the case for a plane the uv change works as it should, for the sprite it always shows the whole texture
I modifiy sprite.geometry.attributes.uv.data.array to change items accordingly
uv[3] = (nx / texAtlas.numX);
uv[4] = ((ny / texAtlas.numY) + texAtlas.offset);
uv[8] = ((nx / texAtlas.numX) + texAtlas.offset);
uv[9] = ((ny / texAtlas.numY) + texAtlas.offset);
uv[13] = (nx / texAtlas.numX);
uv[14] = (ny / texAtlas.numY);
uv[18] = ((nx / texAtlas.numX) + texAtlas.offset);
uv[19] = (ny / texAtlas.numY);
nx,ny are position of the fragment on te texture atlas grid.
texAtlas.numX~Y are numbers of elements in grid
texAtlas.offset is grid size
finally, the sprite.geometry.uv settings are correct but you can still see the entire texture instead of its element