4 ms·
The only possible application I can imagine for that would be videogames, though. Because HTML+CSS+JS provides a fantastic cross-platform UI toolkit that every
by crazygringo 4y ago
The only possible application I can imagine for that would be videogames, though.
Because HTML+CSS+JS provides a fantastic cross-platform UI toolkit that everybody knows how to use.
Videogames create their own UI in order to have lots of shiny effects and a crazy immersive audio-filled controller-driven experience... but non-videogames don't need or want that.
Heck, I'm actually expecting the opposite -- for the entire OS interface to become based on Chromium HTML+CSS+JS, and eventually Electron apps don't bundle a runtime, because they're just apps. My Synology DSM is an entire operating system whose user interface runs in the browser and it just... makes sense.
- uoaei 4y agoWhat is holding back a UI framework for WebGPU? It won't have HTML but couldn't you just simulate a scaffold inside the WebGPU canvas?
- iainmerrick 4y agoFor most applications you'll want to do things like render text nicely, select text, copy and paste text, right-click to inspect, boost font sizes and change colors for accessibility, auto-translate to other languages. A lot of it is about text, I guess! Once you've re-implemented all that in a canvas, you've more or less built another web browser, so why not just use HTML?
- uoaei 4y agoPresumably the argument in this thread is that lugging around an Electron app just for HTML is overkill if you could put the same functionality in a much smaller package.
- rezmason 4y agoAlso, we may be able to create those packages from parts of browsers, which wouldn't be a re-implementation, and would benefit from the rigor of the standards. I agree that it would be kind of silly to then put this in the browser. Instead, I think it could be used to build the native target. And just to clarify my earlier statement, I'm not a fan of phasing out the use of the DOM in the browser— it has graceful degradation and accessibility features that are really important. It's more that there are people with existing Qt or JavaFX or Cocoa dependent projects, or whatever, who are now able to deploy to the web by implementing the UI layers in WASM/WebGPU.
- deleted 4y ago[deleted]
- mtrower 4y agoAlright guys, hear me out… Let’s build a browser inside of virtual assembly code that runs in a browser that runs on an OS that runs on real assembly code (sort of). We could run that on a physical processor, or in a VM (hey, maybe we could run that VM inside a browser that runs on…)
- crazygringo 4y agoWhy would you duplicate the massive amount of helpful functionality and styling HTML+CSS already provides? What's the point? It's one thing to build panels and buttons for a video game. It's a totally different beast to build a text layout and editing and selection engine, accessibility and screen reader compatibility, clipboard support, date pickers and file dialogs, and ten thousand other things.
- et1337 4y agoEven in the current HTML + CSS world, everyone writes their own date picker, file dialog, combo menu, etc. in React. It’s no longer acceptable to use built-in browser controls.
- nmfisher 4y agoFlutter would seem to be a logical replacement (though admittedly last time I checked, there are big issues with Flutter Web on some of the points you mentioned, particularly around text selection and accessibility).
- jimmySixDOF 4y agoIn this hypothetical 3D Application, made possible by WebGPU, the UI & Text elements are a part of the "video game" and need physics, animations, and xyz spatial controls missing from HTML+CSS.
- jamesgeck0 4y ago> Videogames create their own UI in order to have lots of shiny effects and a crazy immersive audio-filled controller-driven experience... but non-videogames don't need or want that. Because UI is such a pain, it's actually not uncommon for browser-based games to use HTML/CSS to handle their menus and HUD elements.
- danShumway 4y agoHTML/CSS definitely made prototyping easier for the game I'm working on, although I'm not sure if I'll stick with it for the final interface. My only critique in that area is that I can't put shaders on the DOM. CSS shaders were part of the CSS spec but they turned out to be pretty big privacy/security risks I guess, so they got deprecated before they ever really landed. I never figured out the full story. There's post-processing that you can do on a canvas that you can't do on a DOM tree -- not because it wouldn't be possible to do, just because... for multiple reasons, some of them very good, the browser doesn't support that kind of thing. If you could do fragment/vector shaders on parts of the DOM, I would very likely be using it for basically every text element in my game's interface. Those parts of the interface aren't really a performance concern either. The parts of my game where I feel like I really want GPU code are sprite rendering, the main gameplay window, etc... the menus are fine, I just don't like that I can't throw a fragment shader on top of them.
- jacquesm 4y agoCAD stuff could take advantage of this too.
- BlueTemplar 4y agoAt the end you pointed out the issue : the browser is good at displaying documents, but a program wants to run in the OS directly, and trying to make the browser an OS inside the OS only makes sense if you are Google and are trying to wrestle with Microsoft for the control of the OS that the average user is exposed to.
- danShumway 4y ago> for the entire OS interface to become based on Chromium HTML+CSS+JS I don't care about HTML and CSS and JS in specific, but yes, holy crud I want my native OS to be based on a user-inspectable XML-like tree. Yes please. It doesn't have to be HTML if everyone hates HTML. But there is a lot of potential beyond just developer convenience to having native apps start representing their interfaces using semantic language. I don't know how to get across how much stuff that would enable on the computer. I need to sit down at some point and try to build proof-of-concepts because the idea is something I genuinely just randomly get excited about sometimes, even though I know it's probably not going to ever actually exist any time soon and nobody is working on it. But just off the top of my head: - I would like to be able to have extremely low-latency remote-desktop access by streaming only the "DOM" tree instead of the entire screen. - I would like to be able to apply user-CSS styles to every single app on my computer. GTK/Gnome styling/etc... sort of works in this direction but... it's not as good. Let me right-click on a running app and inspect element. Let me style stuff in real time. This is something that was always a part of native development and still kind of is, but it feels like the native platforms have all gotten worse in this regard (but maybe that's just anecdotal). - I would like to be able to pipe the interface of an app into another app and scrape its content. - I would like to be able to script my native apps by running DOM queries rather than by learning some plugin language or simulating mouse movements. - I would like to be able to stream a specific sub-tree of an app's interface to another device. I would like to be able to open up my phone and have it show specifically the color picker from Krita and have it pipe my input back into Krita and I don't want to learn a Krita-specific scripting language to do that, I just want to run a query and pull out that sub-tree and stream it. I would like to be able to have an app just pull out the "canvas" element from Krita and occasionally snapshot it or mirror it to another monitor. - I would like to have multiple "views" of a single application by just passing the same application's "DOM" into two different renderers without needing to have two processes for the actual application. - I would like to be able to do all of that on-the-fly without sitting down and writing some specialized program, the same way I can do stuff on a website by just right-clicking and going "inspect element." And again, I don't really care if it's the DOM specifically, I just want all the stuff the DOM provides me as a user.
- ezst 4y ago