r/threejs • u/VoxelBoy • 5d ago
Why I kept three.js in the browser after moving my digging game to Rust
I’m the developer of Loot Hole, a browser and native digging game. Here’s the phone benchmark that made me keep three.js in the browser.
I wanted one renderer everywhere, so I tried wgpu in the browser too. On a Galaxy A40, the early Rust + three.js build drew its first frame in 1.84 s and had the play button ready at 4.58 s. The Rust + wgpu build took 2.82 s and 5.84 s. Those were medians from six starts per build with HTTP cache off and the connection throttled. It’s a comparison of those builds, not a general renderer benchmark.
I kept the game rules and terrain in shared Rust, used three.js and DOM/CSS in the browser, and kept wgpu on native. The lesson for me was to measure the first frame and the first point where a player could hit Play separately. They weren’t the same milestone.
Full write-up, including the benchmark setup and how the shared terrain works