Ask HN: Alternative 2D or non-html non-DOM-based layout engines?

8 points by borplk ↗ HN
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.

5 comments

[ 4.7 ms ] story [ 18.9 ms ] thread
Almost all ui systems have a layout engine.

https://arxiv.org/pdf/1401.1031.pdf

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

Use a game engine to build something that isn't a game.
But 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)

It 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.