3 ms·
> You could argue for an alternative to html/DOM - some kind of rendering format that is meant specifically for full-featured applications. Well, there are thr
by klodolph 7y ago
> You could argue for an alternative to html/DOM - some kind of rendering format that is meant specifically for full-featured applications.
Well, there are three ways to do that. You can use a 2D canvas, you can use a WebGL canvas, or you can use a bitmap canvas. This is roughly equivalent to what you get when you’re programming a desktop application anyway. This is a cornucopia of alternatives here! I’m having a hard time understanding what is missing.
These “use the DOM” in the same sense that desktop applications use the window manager. You’re just drawing into an element in some compositing system. This is fine, there’s no real benefit to bypassing the DOM—like window managers, you can bypass the compositor when possible and go through the compositor when unavoidable. This is transparent to the application programmer.
- drfuchs 7y agoWhat is missing is a way for one's wasm code to make WebGL or 2D canvas calls (or even write directly into a bitmap canvas), without writing a bunch of Javascript trampoline / thunk / whatever code. If I'm mistaken, a pointer to some C / C++ / Rust code that compiles down to wasm that actually touches a canvas that's being displayed in the browser would be most appreciated.
- klodolph 7y agoI think this will happen eventually… but there’s a lot of work to be done before it happens.