armory
armory copied to clipboard
Electron html5 debug runtime
How about adding a electron application as a (debug) runtime for html5, like kode is doing it for vscode? This would make some things a lot easier:
- No need for a local web server
- Live reload if build output changes
- Livepatch feature via filesystem and/or socket connection (unix socket, not websockets).
- No browser determination quirks (#2693)
- No restriction for playing sound without user interaction
- Chromeless windows as default
- stdin/stdout communication with blender
- Start an existing build without opening blender
- Extending the runtime with native modules (no wasm)
- ...
Here https://github.com/tong/armory_html5_runtime is a quick hack to test this. Since the appliction uses haxe/js for it's main process one could easily extend it to add custom functionality.
This would require NPM in order to download and initialize the Node dependencies, correct? Kha/armsdk doesn't ship with NPM, only Node, so it would need to be either downloaded separately (which is more work / dependencies), or we ship NPM with the armsdk.
Frankly, I support, but also disagree with these approaches.
- Requires separate download - more dependencies, I'm not a fan of more dependencies, and to be honest, Armory3D is strictly centered around portability and NPM wouldn't fit in well with that mindset.. 🙂
- Ships with armsdk - this would be nice, less work for users, as well as allows me to add some NPM required dependencies to the armory_web repository. However, this would results in a slightly larger file size..
I don't think bundling npm with the sdk is a good idea.
Currently i am using the armory_electron_runtime as armory Subproject which works fine.
Maybe we can use the khafile.js (when used as Subproject) to check for dependencies, give some instructions or even auto install npm.