
Show HN: N-Body simulation using WebAssembly - roknovosel
https://novoselrok.github.io/nbody-wasm/
======
petermcneeley
Uses the Barnes-Hut algorithm to avoid O( n^2 ) force calculations in favor of
O(n log n). Simple nearest neighbor tracking cannot be use in gravity
simulations as gravity has an effective infinite ranged potential.
[https://en.wikipedia.org/wiki/Barnes%E2%80%93Hut_simulation](https://en.wikipedia.org/wiki/Barnes%E2%80%93Hut_simulation)

------
hazz99
I just get a blank, dark screen. Recent version of Firefox.

~~~
roknovosel
Hey, author here. Any errors in the console? (Sometimes the Emscripten Module
fails to load)

~~~
helb
I got that too when i opened the tab in background. Chrome 70, console says:

 _Active resource loading counts reached to a per-frame limit while the tab is
in background. Network requests will be delayed until a previous loading
finishes, or the tab is foregrounded.
See[https://www.chromestatus.com/feature/5527160148197376](https://www.chromestatus.com/feature/5527160148197376)
for more details_

Works fine after page reload.

~~~
roknovosel
Ok, I'll test it on Chrome 70. Emscripten Module loading is not still as
reliable as I would like :/

