3 ms·
But bypassing DOM is the main point when you have to draw and animate a lot of stuff quickly. I say let the browsers use these low level API for speeding up DO
by beebeepka 3y ago
But bypassing DOM is the main point when you have to draw and animate a lot of stuff quickly.
I say let the browsers use these low level API for speeding up DOM and CSS. But also allow people to bypass this layer.
Back in the day I migrated (more like recreated) a web RTS from DOM to canvas and getting rid of all that HTML and CSS was a massive relief. Deleted so much markup, styles and js all while improving performance massively.
- danShumway 3y agoI'm using WebGL for game development right now (and am somewhat looking forward to WebGPU) -- I'm not saying everything needs to be in the DOM. Just most things. It shouldn't really be the default for application frameworks to target Canvas (and multiple frameworks do treat it like the default rendering target). Like I said: > There are a few places where this doesn't make sense, but if we're honest most application state even for native apps really ought to be represented in the form of an interactive document. An RTS may be an exception to that because for most RTS games you can't sit down and describe what's going on in the game in a clear way using a pure-text tree or interactive document. But "exception" is the important word there. Most web apps aren't games, most web apps shouldn't be laying out complicated 2D/3D graphical scenes.