4 ms·
Ah interesting - so my thinking on this is: - I see that I poorly communicated this in the title, but I was actually shooting less for "Rust/WASM makes this be
by chinedufn 8y ago
Ah interesting - so my thinking on this is:
- I see that I poorly communicated this in the title, but I was actually shooting less for "Rust/WASM makes this better!!" and more for "Hey, this is possible with pretty much just Rust/WASM!" I ended up hand writing about 10 lines of JS [1] in total
- More minor point - WebGL commands don't need to be called via JS [2] after anyref and host bindings land, and I think that it's important for people to know that it's possible to do things on the web without JS (whether that's a good idea is very situational)!
So yeah apologies if the title could be a bit better - but the main goal was to share with others that it's possible to build 3d experiences on the web with Rust today!
And - just to not come off wrong here - I'm not saying whether this is right or wrong and when to go this route. I am just interested in demonstrating how to do it :)
But all in all you're right - all of this same experience could totally be built with only JS if someone so desired!
[1] - https://github.com/chinedufn/webgl-water-tutorial/blob/master/index.html https://github.com/chinedufn/webgl-water-tutorial/blob/maste...
[2] - https://github.com/WebAssembly/reference-types/blob/master/proposals/reference-types/Overview.md https://github.com/WebAssembly/reference-types/blob/master/p...
- abritinthebay 8y ago> WebGL commands don't need to be called via JS after anyref and host bindings land So they DO need to be called by JS now. Which was what they said. The WASM advocates obsession with features that don’t exist yet and won’t be mainstream supported for a long time after they land is extremely frustrating. WASM is cool, let’s stop pretending it’s something it’s not tho!