Cross-Platform 3D Engine
Platforms supported by BabylonHx
Powered by Haxe 
Tell Me More


What ?

BabylonHx is an ultra-portable lightweight 3D engine.
It is a port of the excellent BabylonJs 3D engine to the Haxe programming language.

It brings Babylon3D to all mainstream platforms in form of native app.

Being compatible with three Haxe libraries/frameworks for cross-platform development: Lime/OpenFl, NME and Snow,
it allows you to easily create 3D games and applications for almost every platform - all from a single code base.
Some of the platforms you can build games and applications for are: Windows, Mac, Linux, iOS, Android, BlackBerry, FirefoxOS, Tizen, HTML5...

BabylonHx is especially flexible when it comes to building for the web.There are three ways to build for web:

  • Use it in Lime/OpenFl or Snow project and build for JS/HTML5 just like for any other target supported by this libraries.
  • When targeting the web only, BabylonHx can work with no dependency on external libraries at all.
    Simply create Haxe JS project and build it by passing "purejs" parameter to Haxe compiler.
  • Finally, you can compile BabylonHx engine to JS file and then use it from JavaScript in exactly the same way you would use the original BabylonJS engine. In fact, you can simply replace the original babylon.js file in existing BabylonJS javascript project with the babylon.js file compiled from BabylonHx and everything will work the same.

Why ?

Primary reason for doing this port was a practical need for a cross-platform 3D engine. A true 'code once run everywhere' solution - which I finaly got with this port.

Another reason was was curiosity. Not to see if it can be done but too see how far I can go with Haxe. It turns out that I can go as far as I wish.
With Haxe, there are no limits!

BabylonHx is WIP, its not 'feature complete' (compared to the original JS version) but its very close to that. It covers my current needs but some stuff is still missing (or needs to be fixed), especialy on C++ targets.

This project is also a sort of my 'give back' to Haxe from which I have benefited a lot in the last few years. Hopefully, it will help in bringing more attention to this amazing programming language and to the technologies built on top of it.

How ?

To get started working with BabylonHx, first you need to install Haxe compiler and NekoVM. That will also install Haxe library manager "haxelib" which you will use to install necessary libraries/frameworks.

Then you'll have to install runtime files for c++ backend for Haxe - HXCPP, execute from command line:

haxelib install hxcpp

After that, you can choose one of the three fantastic Haxe libraries/frameworks:


or you can install all of them. BabylonHx is compatible with all three.

To start with Lime execute from cmd line:

haxelib install lime

and after that execute:

haxelib run lime setup

When Lime is installed and configured you'll have to install dev tools for each platform you wish to build BabylonHx for, so if you want to build for Windows you should run this from cmd line:

haxelib run lime setup windows

This will start download process of VisualStudio and it will install and setup everything for you. For every other platform the process is the same, for example android:

haxelib run lime setup android

It will download android sdk/ndk and Ant (and java sdk if you don't have it already).
You should accept default locations that installer will offer.
For web (js) target you don't have to install anything.

Finally, you have to install "poly2trihx" library which is used by BabylonHx and "actuate" lib which is used in some examples:

haxelib install poly2trihx
haxelib install actuate

Now you should be ready to build BabylonHx.
Download complete repo from and navigate to folder where you have downloaded files.
Then run from cmd line:

haxelib run lime test project.xml html5

this should build "BasicScene" sample and run it in your browser.

You can build for windows/android by changing build target:

haxelib run lime test project.xml windows
haxelib run lime test project.xml android

If you wish, you can also instal NME and Snow:

haxelib install nme
haxelib git snow

For Snow you'll also need to install Flow which is used to build Snow projects:

haxelib git flow

Then, to build for NME run:

haxelib run nme build build.nmml android

And for Snow:

haxelib run flow build android

OimoHx library used in some examples is located here:
and code for loading .OBJ, .STL and .PLY formats is located in BabylonHx_Extensions repo:

An that should be it.

Hopefully I haven't missed any critical step, feel free to ask if you run into any problems.


Find out about Babylon3D engine on its web site

Documentation can be found here:

Show me some examples


BabylonHx is open-source project available via github at

You can install it via haxelib with:

haxelib git BabylonHx

Or you can download complete repo:

If you wish to use pure JavaScript version, you can find it here:

Load "Heart" scene (.babylon file)



view source




view source

Send me a message

Fork me on GitHub