You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently trying to create a game with a, infinite, procedurally created map. For performance reasons, I'm using instancing for the Boxes that make up the map. Everything works great, except that I can't figure out how to map different parts of my texture atlas to the Boxes depending on the coordinates.
The part where I update the map and move the Boxes is not included. The full repository can be found here, though the code might be kinda messy: https://github.com/Resaki1/taal
Can someone help me figuring out how to properly map the textures? I found some similar examples online, though they are all for vanilla Three.js, and I'm a beginner and have a hard time transferring those to my r3f code...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all!
I'm currently trying to create a game with a, infinite, procedurally created map. For performance reasons, I'm using instancing for the Boxes that make up the map. Everything works great, except that I can't figure out how to map different parts of my texture atlas to the Boxes depending on the coordinates.
I tried to create a minimal example here: https://codesandbox.io/s/hardcore-butterfly-q22348?file=/src/Map.js
The part where I update the map and move the Boxes is not included. The full repository can be found here, though the code might be kinda messy: https://github.com/Resaki1/taal
Can someone help me figuring out how to properly map the textures? I found some similar examples online, though they are all for vanilla Three.js, and I'm a beginner and have a hard time transferring those to my r3f code...
Beta Was this translation helpful? Give feedback.
All reactions