labe-me/haxe-three.js — pull request #4 by jacius (2013-04-14 00:28:21+00:00)
Title: Update for three.js r57 and Haxe 3

I have undertaken the epic task of updating haxe-three.js to work with three.js r57 (the current version) and Haxe 3.

### What I did:

* I split up the huge js/Three.hx into separate files, one per class or interface. I think having separate files will make it easier to maintain in the future. I don't know of a good way to organize them into subdirectories (lights, objects, renderers, etc.), so they are all just sitting in one directory.

* I manually went through every file in three.js's src directory and updated or created the externs in haxe-three.js. I also removed any externs for things that no longer exist in the main three.js distribution.

Because this was a manual process, and there are a lot of classes in three.js, and I am new to Haxe, there may be some mistakes. Reviewing the changes will be a big task, unfortunately!

* I updated use of the old Haxe 2 APIs (js.Dom and js.Lib.window) to instead use the new Haxe 3 APIs (js.html and js.Browser.window).

* I removed the Date.hx and Time.hx files, because they are no longer needed in Haxe 3, and in fact cause errors now.

* I put many integer constants as static vars of the js.three.Three class (e.g. js.three.Three.FlatShading), instead of them being grouped into many different made-up classes (e.g. js.three.Shading.Flat). I don't know if my way is good or bad style in Haxe, but it does mirror the three.js API more closely.

### What I did not do:

* I did not attempt to create externs for classes in the "examples" directory in three.js. That means there are no longer externs for ColladaLoader, SVGRenderer, FlyControls, and other things that were moved from "src" to "examples" in three.js.

* I did not update the haxe-three.js examples.