Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Looks a bit like the ThreeJS editor reskinned. Is it using ThreeJS?


It is using ThreeJS for the 3D rendering, with a custom Rust geometry kernel to generate the mesh buffers to render. The editor interface is React based.


Pretty general question, but what has your approach been for coupling ThreeJS + React w/ a Rust/Wasm kernel for mesh generation? E.g. do you have Wasm own the memory and you give ThreeJS views of the memory to upload to GPU?


We don't need to update the scene at once, so when geometry changes we rebuild the buffer and send it over to typescript, and the three.js mesh will own the buffer. By being careful about what needs to be updated, we can keep things interactive.

This is an older blog post but it covers the general idea of it: https://blog.arcol.io/parametric-geometry-engine


Currently we simply copy a slice of the heap's ArrayBuffer from WASM to JS. In the past we exposed the heap slice directly but it was technically "unsafe" (perhaps because the heap can grow), and doing a copy did not hurt performance in any measurable way.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: