Three.js externs for Haxe
The aim of this library - fully automated (regex-based) conversion from TypeScript to Haxe.
- For conversion used refactor haxe library.
- Original typescript code: three.d.ts.
How to update library
-
Install refactor library:
haxelib install refactor - Edit Makefile and change ThreeJS version to desired at the
TAG = rXXline. -
Run in the root repo's folder (in my case I use MinGW on Windows):
make rebuild - Manually check files. Documentator helps your:
edit
TAG = rXXline inMakefilerunmake native-jsgotodocumentator/binand runThreejsDocumentator.exeafter correcting typescript, runmake rebuildagain
Project structure
Folders:
- native-ts - original typescript files (automatically downloaded if not exist - git must be installed);
- raw - one big haxe file - result of the conversion TypeScript->Haxe;
- manual - manually created files (copied to library at final step);
- unused - files from labe-me project, which not exists in current externs (need to check them in future);
- documentator - C# application to help writing documentation and fix typescript;
- native-js - original three.js files (used by documentator only).
Files:
- postprocess.rules - edit this to fix Float->Int;
- extract_classes.rules - regexs to find classes/interfaces (used to split raw haxe file to separate class files);
- extract_vars.rules - regexs to find & save exported vars;
- postprocess_vars.rules - regexs to process exported vars files.