#Three.js vs R3F (for Metaverse)

8 messages · Page 1 of 1 (latest)

simple crystal
#

Hello, everyone!

I’m currently pondering whether to utilize Three.js or R3F for a sizable metaverse project.

Certainly, Three.js has proven its worth in projects like Decentraland.
On the other hand, R3F is an intriguing option as it combines the capabilities of Three.js with React.

Does anyone have any insights or experiences to share? I would greatly appreciate hearing your thoughts!

Best Regards

solar tapir
#

Take https://sougen.co as an example.

Sougen

Sougen is a Web-First Metaverse. A barrier-free experience for millions of users.

#

Although, you're still using three.js, and R3F doesn't impact your runtime performance.

#

So, I wouldn't choose on the basis of performance/scale besides authorship and incidentally what your UI wants.

simple crystal
torn comet
#

I would put 'what your UI wants' well over authorship, FWIW; I agree that the choice between the two is very much a per-project question. If you think that your project fits well into the React 'flow' and can map out a solid fit onto a tree of React components responding to data changes, then R3F should be a fine choice. Not every project is likely to look that way, though (games, most notably, are still IMHO not a great fit), and there's certainly nothing wrong with using 'raw' Three.

solar tapir
#

Your game logic should look identical, whether you go with R3F or vanilla three. Simple frame polling or fancy ECS -- React doesn't know about it.

#

React and friends can more easily blend in UI state and encapsulate logic into their own components extending three classes.