TypeScript and ES5/ES6 JavaScript support for coding in Armory3D


As some of you may know, OpenFL recently added support for using the library with TypeScript and ES5/ES6 JavaScript as a library when targeting Javascript target for OpenFL.

This is possible thanks to the project: https://github.com/kevinresol/hxgenjs

I’ve played around with hxgenjs myself and it seems fairly trivial to convert Haxe libraries to Javascript this way. I was wondering if you could add official support for this in Armory3D.

I’m a contract software developer and it’d be much easier to convince my clients in the future to use Armory3D on projects instead of Three.js/Babylon.js if you added Typescript/Javascript support. This is because, for future maintainability of projects, it’s much easier for my clients to find Javascript/Typescript developers as Haxe is a niche language.

This could compile libraries to be used with both js/html5 or js/krom(v8) targets. I believe it would just need the correct build tools / workflow setup. Particularly what would be nice is an NPM/Webpack compatible workflow like OpenFL currently has.

Examples of build.hxml files using hxgenjs:

Let me know what you think, @lubos.



Thanks for the write-up @NuttyRyu. Been tinkering with this for a while and hope to enable it soon. I would like to support TypeScript, JS and WebAssembly, so it runs on both js/html5 and js/krom like you mention. :slight_smile: