Hacker News new | ask | show | jobs
by hutzlibu 886 days ago
"trying to replace native code with web pages? "

No one wants that. But many like to write their apps only for one plattform - and then still have them run allmost everywhere.

The web is the best we have to achieve this. And this will greatly improve the possibilities.

Edit: My app will soon finally use no more html elements. It is not a "webpage".

3 comments

> No one wants that.

I very much do want that since the WebGPU API is far easier and nicer to use than Vulkan or OpenGL. Also, it makes apps much more accessible to distribute them over web, and it is much more secure to use web apps than native apps. Unfortunately WebGPU is way too limited compared to desktop APIs.

You say no one wants that, then you describe doing exactly that.

If your “app” runs in a browser window—a window presented by a browser engine—it’s fundamentally a web page. (They’re two distinct words.)

I .. hate those pedantic discussions. But here you go: a web page by common understanding is mainly something to look at. Page implies document. A web app is a bit more. (And many tech people hate it, that browsers can do more)

So no, I do not want to replace native code with a web page. But in some cases with web apps.

Can you have an electron app without HTML elements? A pure WebGPU + Webassembly program?
YEah, but why wouldn't you want HTML CSS to render your ui.

I'm going to revisit electron / nw.js for games again this year. Last time I tried 4-5 years ago I could not get smooth animation with request animation frame.

Performance.

I recommend pixijs.

But it depends what you do, smooth animations of some elements is possible with html. But in my case it got complex and html was the bottleneck. Now I have the same assets in Pixi and it runs around 100× faster. No more lags, no stuttering. No more html.

(Allmost, some static content is still HTML, but that is fine, as long as the DOM does not get modified)