3 ms·
Ask HN: Alternative 2D or non-html non-DOM-based layout engines?
Are there alternatives out there to the typical HTML/CSS for complex and high performance UI/layout?
(Doesn't have to be web based or in the browser)
Perhaps something based on 2D painting/canvas.
Game and physics engines are so powerful. They can render so much visual detail with high frame rates.
I want that kind of rendering power applied to UI/layout.
I can just paint a canvas in a loop like in a game, but that's too manual and tedious for layout and text handling without things like box models and CSS.
Use cases are many but imagine an editor for scientific work where you need to render a visualisation of millions of particles and so on.
I know I can have some basic stuff in HTML/CSS for example, and then stick that heavy stuff into a little box with WebGL and things of that nature.
I'm curious if there's a nicer technology out there that's basically as powerful as the fancy video game graphics, except it applies that power to layout/grid/UI/GUI/etc for use cases where the basic HTML/CSS/DOM is not enough.
- billconan 9y agoAlmost all ui systems have a layout engine. https://arxiv.org/pdf/1401.1031.pdf https://arxiv.org/pdf/1401.1031.pdf http://doc.qt.io/qt-5/layout.html http://doc.qt.io/qt-5/layout.html They may be different from physics engine, But there are already companies who have integrated physics into ui, such as https://www.raywenderlich.com/50197/uikit-dynamics-tutorial https://www.raywenderlich.com/50197/uikit-dynamics-tutorial
- billconan 9y agothere was also this kind of 3d ui, https://www.youtube.com/watch?v=M0ODskdEPnQ https://www.youtube.com/watch?v=M0ODskdEPnQ https://www.youtube.com/watch?v=6jhoWsHwU7w https://www.youtube.com/watch?v=6jhoWsHwU7w https://bumptop.github.io https://bumptop.github.io https://www.wired.com/2013/02/amazing-3d-desktop/ https://www.wired.com/2013/02/amazing-3d-desktop/ they certainly used game/physics engine, but they didn't use it for layout.
- PaulHoule 9y agoUse a game engine to build something that isn't a game.
- borplk 9y agoBut do they provide anything that would help me with layout/presentation? (think something remotely like CSS, or flexbox) Or do I have to make it all from scratch? (Not familiar with game engines)
- marktangotango 9y agoIt used to be a right of passage for indie gamedevs to implement ui frameworks for their games. There were a whole bunch of them on the Internet for SDL, allegro, OpenGL, etc... Conversely, most gui frameworks provide an OpenGL widget you can build an app around; qt, swing with jogl or lwjgl, etc. lots of options here.