N-body simulation of particles in WGSL made for study purposes.

Click on the canvas to add attractors. Select "isRepelling" to place repelling particles. Select "mouseAsAttractor" to make the mouse cursor attract or repel particles.

This app is made using WGSL, so be sure you are using the newest version of Chrome or Edge for this. WebGPU should be supported by default in those browsers, but if not, try enabling it on chrome://flags/.

Sound

Comments

Log in with itch.io to leave a comment.

Looks cool, but it didn't work for me. I see this error in the console

main.js:52 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'requestDevice')     at main (main.js:52:29)
(1 edit)

Hi! This app is made using WGSL, so be sure you are using the newest version of Chrome or Edge for this. If the error persists, that means that WebGPU is not activated by default in your browser. In that case, you can activate it in chrome://flags/ I believe, not sure. WebGPU soon is going to be activated by default.

Thanks, I enabled it but still the same. Probably not supported for my GPU/OS

Sad to hear that, but I believe it's going to be supported by default to all devices soon. But thanks for commenting and letting me know :)!