Can/should I use Three.js for high performance simulations?

I really love writing simulations and presenting them graphically using WebGL. Examples include:

https://ethanlipson.com/demos/fluid
https://ethanlipson.com/demos/metaballs-3d
https://ethanlipson.com/demos/boids

These demos can get low-level (as low-level as you can get using a web graphics API haha). I do a lot of computation on the GPU with fragment shaders as a substitute for compute shaders, using blending to add the computations in two different textures, reading directly from data textures in my vertex shader, etc. Stuff that the API is able to do pretty efficiently but wasn’t totally designed for.

However, I really like the convenience features that Three.js provides, like orbit cameras, texture loaders, and the ability to easily add simple geometry to a scene. My question is: is Three.js able to easily interop with these low level features of WebGL while also providing me these conveniences?

1 Like