3 ms·
It is definitely an amazing achievement to make a behemoth like Qt run in the browser, but at the same time it's also the worst case: a huge C++ code base with
by flohofwoe 11y ago
It is definitely an amazing achievement to make a behemoth like Qt run in the browser, but at the same time it's also the worst case: a huge C++ code base with everything and the kitchen sink, built for traditional, big UI applications, which is already a big download if installed traditionally, in the end used just to get a few button on screen ;)
As a modern alternative, there are new, very slim immediate-mode UIs for tools out of the game industry which might not look quite as shiny, but render UIs very efficiently, with very little code to write and execute. For instance this dear imgui emscripten demo is a 325kByte download (1% of the Qt demo! and it gets smaller if you don't use all the different UI elements):
http://floooh.github.io/oryol/asmjs/ImGuiDemo.html http://floooh.github.io/oryol/asmjs/ImGuiDemo.html
The UI is rebuilt every frame, and easily running at 60fps with very few drawcalls.
And people are doing amazing things with it:
https://github.com/ocornut/imgui/issues/123 https://github.com/ocornut/imgui/issues/123
https://github.com/ocornut/imgui/issues/539 https://github.com/ocornut/imgui/issues/539
- adrusi 11y agoHuh, I was surprised how smooth the imgui demo was on mobile (firefox on android). Much nicer than when people try to do similar with Dom elements.
- slight 11y agoThat IMGUI demo is awesome. I'd love to be able to drive it from regular JS, it would be really handy for all sorts of things.
- flohofwoe 11y agoIt should be possible (and relatively easy) to wrap it into a module that's callable from Javascript, similar to what Alon Zakai has done with the Bullet physics engine (https://github.com/kripken/ammo.js/ https://github.com/kripken/ammo.js/).