very cool! if you're exploring wasm for graphics, take a look at Wander- lets you create and execute "renderlets" — portable modules containing graphics data and code compiled to wasm https://github.com/renderlet/wander
Show HN: A simple 2D fluid and gravity simulation with WASM and WebGL
11–20 of 25 posts
Re: Show HN: A simple 2D fluid and gravity simulation with WASM and WebGL
#12Beautiful!
Re: Show HN: A simple 2D fluid and gravity simulation with WASM and WebGL
#13Re: Show HN: A simple 2D fluid and gravity simulation with WASM and WebGL
#14super slow on Firefox, naturally
Working fine for me on Firefox - their WebGL support tends to be good enough, although there are plenty of other resource issues.
Re: Show HN: A simple 2D fluid and gravity simulation with WASM and WebGL
#15This is pretty cool - great to see what a small codebase can do with raw WebGL. Have you looked at WebGPU at all?
Re: Show HN: A simple 2D fluid and gravity simulation with WASM and WebGL
#16Very nice! Took me a while to realise it has mouse based gravity but very good! (I clicked directly on the link on a mobile device without checking here)
Re: Show HN: A simple 2D fluid and gravity simulation with WASM and WebGL
#17super slow on Firefox, naturally
60 fps for me in Firefox, with the processor <1% while running. 3060Ti was working, but not hard.
Re: Show HN: A simple 2D fluid and gravity simulation with WASM and WebGL
#18aww why does it not follow my finger as it does my cursor? this would be so fun!
Good point, added touch support :)
Re: Show HN: A simple 2D fluid and gravity simulation with WASM and WebGL
#19This is pretty cool - great to see what a small codebase can do with raw WebGL. Have you looked at WebGPU at all?
I wanted something that can run everywhere and WebGPU support is still behind some flags in Firefox and Safari I think, but I'm pretty excited about trying that as well.
Re: Show HN: A simple 2D fluid and gravity simulation with WASM and WebGL
#20Very nice! Took me a while to realise it has mouse based gravity but very good! (I clicked directly on the link on a mobile device without checking here)
Thank you. Yeah mobile support was an oversight from me, I added touch support now.