Re:Show HN: 3 years and 1M users later, I just open-sourced ...
by Intralexical on Monday March 04, 2024 @07:01PM
(#39597751)
Oh, wow. When this came up before, I don't know if I looked at the DOM, because I assumed you would do this type of thing by drawing pixels on a Canvas. It's actually made of HTML elements? That's impressive.
[ Parent
| on HN ]
Re:Show HN: 3 years and 1M users later, I just open-sourced ...
by Aaronmacaron on Monday March 04, 2024 @07:41PM
(#39598055)
I too think it's very impressive but wouldn't it be even more impressive if it was made using canvas? It would mean that you would need to implement your own rendering loop and layout engine. You'd need to reimplement a lot of elements such as input fields or buttons. You get all of this for free when building on top of HTML/CSS.
Re:Show HN: 3 years and 1M users later, I just open-sourced ...
by noduerme on Monday March 04, 2024 @09:18PM
(#39598704)
You do get a lot of UI elements for free, but styling them consistently and getting them to layout properly becomes a lot more difficult.
Re:Show HN: 3 years and 1M users later, I just open-sourced ...
by Intralexical on Monday March 04, 2024 @09:19PM
(#39598715)
I think it would likely be more technically involved and complicated if it were made with `canvas`.
But large blobs drawing to `canvas` aren't anything new at this point. The part that impressed me is doing it the simple way, using what the browser already provides, and getting it to work this well.
Re:Show HN: 3 years and 1M users later, I just open-sourced ...
by msephton on Friday March 08, 2024 @12:47PM
(#39643609)
Synology DSM (the web interface for a Synology NAS) also constructs a desktop UI the HTML way.
Re:Show HN: 3 years and 1M users later, I just open-sourced ...
by onetom on Tuesday March 05, 2024 @12:44AM
(#39599866)
It's hard to make that performant.
As a reference, here is a browser-adapted version of the https://cuis.st/ Smalltalk environment, which does its own rendering onto a canvas:
https://github.com/nmingotti/The-Cuis-CookBook/wiki/Run-Cuis...
Re:Show HN: 3 years and 1M users later, I just open-sourced ...
by MatthiasPortzel on Tuesday March 05, 2024 @09:51AM
(#39604147)
It’s not performant if you’re using JavaScript APIs. But it’s also possible to write to a canvas with WebGL, which is hardware accelerated and is much faster than jQuery. I believe (although I can’t find a source for it now), that xterm.js used this strategy.
Re:Show HN: 3 years and 1M users later, I just open-sourced ...
by mrBurger on Tuesday March 05, 2024 @01:35AM
(#39600106)
I dunno, once you write the renderer, you essentially have no limits to worry about.
Working within the confines of HTML is way more impressive to me.
Re:Show HN: 3 years and 1M users later, I just open-sourced ...
by moffkalast on Tuesday March 05, 2024 @05:18PM
(#39609872)
That would be pretty slow, but with WebGL it could work.