ODE is an high performance library for simulating rigid body dynamics, it has advanced joint types and integrated collision detection with friction. ODE is useful for simulating vehicles, objects in virtual reality environments and virtual creatures.
Russell Smith is the original author of ODE.
Since V1.1.0, ODE is compiled to WebAssembly through emscripten, this adds an asynchronous step, the API add a promise wich is resolved when ODE engine is ready!
<script src="node_module/odejs/lib/libode.js"></script>
ODE.readyPromise.then(function() {
var world = new ODE.World();
[...]
});
npm install odejs
Babylon.js :
- Boxstack : Drop primitives & mesh object
- Chain : simulate a chain using 30 rigid body with Ball and Socket anchor joint
- HeightField : Drop primitives & mesh object on HeightMap
- Jeep : simulate a jeep using Hinge-2 joint
- Basket : play basketball using triangleMesh collider
Three.js :
- Boxstack : Drop random objects
A start of API documentation generated by jsdoc can be found HERE. The original manual can be found at http://ode.org/ode-latest-userguide.html
prerequisite :
- NodeJS & npm
- emscripten
- GNU MakeFile : windows port GnuWin32, MSYS & Cygwin
step to build :
> git clone https://github.com/Ricku34/ODE.js.git
> cd ODE.js
> npm install
> npm run build
build tasks :
build tasks used Grunt and Makefile, npm run build
launch the default grunt task
grunt tasks list :
- default : rebuild libode.js from scratch.
- clear : remove libode.js, c/c++ objet files and temp files.
- doc : generate documentation.
- js : rebuild libode.js from javasript sources (not recompile ODE C/C++ files).