threejs

Externs for three.js. Automated conversion from typescript (https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/threejs).
https://github.com/yar3333/haxe-threejs

This is not the latest stable version of threejs. See version 161.0.2 for the latest version.

To install, run:

haxelib install threejs 73.0.2 

See using Haxelib in Haxelib documentation for more information.

README.md

Three.js externs for Haxe

The aim of this library - fully automated (regex-based) conversion from TypeScript to Haxe.

How to update library

# install refactor library:
haxelib install refactor

# run in the root repo's folder (in my case I use MinGW on Windows):
make

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.

Embedding

By default, main three.js file does not embedded. Small external files (placed in the example folder of the original ThreeJS) embedded automatically on imports.

You can control embedding:

  • to embed main uncompressed three.js file: import js.three.Embed;
  • to embed main minified three-min.js file: import js.three.EmbedMin;
  • to stop auto embedding small files use compiler option: -D threejs-noEmbed
Contributors
yar3333
Version
73.0.2
Published
8 years ago
License
BSD

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub