top | item 41325725

Fluid Simulation and Web Assembly

39 points| nicholasjbs | 1 year ago |ehayes.page

7 comments

order

leephillips|1 year ago

When on this page almost all my keyboard shortcuts stopped working and it was difficult to close the page. I consider this a form of malware.

pekim|1 year ago

The page appears to install global keydown/up handlers that swallow all key events. And it also disables the browser's context menu.

nighthawk454|1 year ago

It’s running flawlessly on my iPad mini. Perhaps the site isn’t the issue.

ellellem|1 year ago

Fluid simulation is more suited to GPU (because particles/molecules...) than CPU. What am I missing? SIMD maybe? Not sure...

s-macke|1 year ago

WebAssembly programming is simply easier than GPU programming.

My game here [0] 6 years ago uses WebAssembly with a Finite Difference approach for the fluid part. Nowadays, fixed-width SIMD [1] is standardized and supported in the browser. But I don't now any website using it.

I have tried porting it to WebGPU. It is much more complicated and only Chrome supports it right now. To get fluid simulation working via the older standard WebGL is more like a hack.

[0| https://github.com/s-macke/Interplanetary-Postal-Service

[1] https://github.com/WebAssembly/simd/blob/master/proposals/si...