5 ms·
I really like the immediate mode GUI (IMGUI) paradigm. The other day, I looked into whether any web-based IMGUI libraries existed. It seems that HTML and the DO
by rossant 1y ago
I really like the immediate mode GUI (IMGUI) paradigm. The other day, I looked into whether any web-based IMGUI libraries existed. It seems that HTML and the DOM are designed so differently from IMGUI that such an approach doesn't really make sense, unfortunately, unless everything is rendered manually in a canvas, WebGL, or WebGPU, which brings its own set of challenges.
- edflsafoiewq 1y agoIsn't that basically what VDOM is?
- k__ 1y agoA virtual DOM is another indirection, so the opposite of what immediate mode tries to accomplish.
- edflsafoiewq 1y agoImmediate mode only describes the interface.
- k__ 1y agoDoes it? I had the impression that the lack of double buffering would imply a more direct access, this the "immediate" in the name.
- oasisaimlessly 1y agoYes, "immediate" refers just to the API. Source: [1] [1]: https://github.com/ocornut/imgui/wiki/About-the-IMGUI-paradigm#half-of-a-definition https://github.com/ocornut/imgui/wiki/About-the-IMGUI-paradi...
- ar-nelson 1y agoI really like Mithril.js (https://mithril.js.org/ https://mithril.js.org/), which is, IMO, as close as it gets to web IMGUI. It looks a lot like React, but rendering happens manually, either on each event or with a manual m.redraw() call.
- k__ 1y agoI think, similar to Preact, Mithril skips the VDOM, which makes it "more immediate" than React. However, updating the DOM and then turning the DOM to an image (i.e., rendering it) still has an indirection that using canvas/webgl/etc. don't have.
- nathcd 1y ago> I think, similar to Preact, Mithril skips the VDOM, which makes it "more immediate" than React. Both Mithril and Preact use virtual DOMs: https://mithril.js.org/vnodes.html https://mithril.js.org/vnodes.html https://preactjs.com/tutorial/01-vdom https://preactjs.com/tutorial/01-vdom