Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
joaodasilvaz
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
joaodasilvaz
5y ago
Not quite, as this is a native program and not a Javascript module. Window.js is like Node itself, but has different APIs. The main difference is that it gives you a desktop window and the Canvas 2D API, and doesn't have any of Node&#x
2.
▲
by
joaodasilvaz
5y ago
I had two ideas for Typescript in mind: 1. provide type declarations for the Window.js APIs, and 2. integrate with the Typescript compiler during development (e.g. F5 to reload, run typescript sources "directly", show compiler err
3.
▲
by
joaodasilvaz
5y ago
Please do! I've just started discussions to figure out how to do this, please share your thoughts: https://github.com/windowjs/windowjs/discussions/27 https://github.com/windowjs/win
4.
▲
by
joaodasilvaz
5y ago
What kind of APIs do you have in mind? Ideally yes, Window.js should make it possible (and easy!) to build fully accessible programs. I don't have much experience in this area though, so I'd have to look for help building this :-)
5.
▲
by
joaodasilvaz
5y ago
Not right now. I've just filed an issue to track this: https://github.com/windowjs/windowjs/issues/19 Window.js replicates web APIs where it makes sense, so I'd look into duplicating the Gamepad API
6.
▲
by
joaodasilvaz
5y ago
From a quick look at plask.org: * seems like Plask is only for macOS (Window.js also supports Windows and Linux) * Plask exposes the Skia APIs directly to Javascript; Window.js exposes a <canvas>-alike API instead (but also based on S
7.
▲
by
joaodasilvaz
5y ago
Thanks for the hint! Do you happen to be familiar with ANGLE? What happens if I just expose GLES 3.0 bindings as WebGL2 based on the native drivers on each platform? (my earlier understanding was that ANGLE was a WebGL-to-Direct3D translati
8.
▲
by
joaodasilvaz
5y ago
Note that Chrome also builds on Skia, via the Blink rendering engine. So Skia is very well aligned with the needs of the Canvas API. As for performance, Window.js has a bit less overhead since it doesn't have a DOM and doesn't imp
9.
▲
by
joaodasilvaz
5y ago
It's quite a bit smaller though I'm not familiar with how big Electron is nowadays. The largest part is, by far, v8; I think there's room to remove unused code there. You can see the size of the binary in the GitHub Actions b
10.
▲
by
joaodasilvaz
5y ago
libsdl and GLFW are very similar! I ended up using GLFW because it's closer to what I wanted to do with Skia and WebGL, and I didn't need the 2D functionality of SDL. Note that Window.js does not expose GLFW directly; it exposes A
11.
▲
by
joaodasilvaz
5y ago
Three.js should load and run as long as its usage of window, document, etc works as it expects. So the plan is to have a small loader that prepares the environment that Three.js expects before loading it. This has already been done for Proc
12.
▲
by
joaodasilvaz
5y ago
Electron is a lot more feature-complete and mature, and that's what should be used for any serious projects indeed :-) Window.js is a subset; it doesn't include the DOM nor the CSS APIs, nor a lot of web APIs. Window.js is a tool
13.
▲
by
joaodasilvaz
5y ago
Hi HN, author of windowjs here. I was planning to have the project in a more complete state before announcing to HN :-) It was mostly a fun project to put together v8, GLFW and Skia, and I hope others find it useful and fun to work on too.