Skip to content

floppya/haxe-three.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Haxe externs for three.js

About

Haxe externs for three.js (release 47).

Please fork and contribute as I may not maintain it in the long run :)

If you meet me, buy me a beer. If you don’t think you are going to meet me, think about a little donation so I can buy my Humble Bundles :)

Laurent

Install

haxelib install three.js

Dev install

git clone git@github.com:labe-me/haxe-three.js.git
zip -r haxe-three.js.zip haxe-three.js
haxelib test haxe-three.js.zip
haxelib dev three.js `pwd`/haxe-three.js

Usage

Regular usage will embed three.js minified javascript:

haxe -lib three.js ...

Debug compilation will embed non-minified javascript (easier to debug):

haxe -lib three.js -debug ...

To avoid embedding javascript (don’t forget to include three.js javascript manually inside your HTML):

haxe -lib three.js -DnoEmbedJS ...

Take a look at the examples for some code ported from original three.js examples.

Todo list

Test api

Integrate RequestAnimationFrame

More work on Collada API part

More TODOs in Three.hx

Notes

Haxe modify some javascript prototypes and create a few incompatibilites.

Here’s a list of things to care about:

  • Array prototype is modified which affect the “for v in someArray” javascript behaviour
  • Date.now is overriden by haxe, the new method returns a Date object instead of the regular time stamp, this is bad and must be adressed.

Important: The three.js haxelib package provides a modified Date.hx and haxe/Timer.hx to fix the Date.now() problem.

About

Haxe externs for three.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 87.0%
  • Haxe 13.0%