@isaac-mason/tmp-jolt-physics
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

JoltPhysics.js

This project enables using Jolt Physics in JavaScript.

Demos

Using

The library comes in 2 flavours: a JavaScript version and a WASM version. See falling_shapes.html for an example on how to use the library.

Not all of the Jolt interface has been exposed yet. If you need something, just add it to JoltJS.idl and JoltJS.h and send a pull request.

Building

This project has only been compiled under Linux.

  • Install emscripten and ensure that its environment variables have been setup
  • Install cmake
  • Run ./build.sh for the optimized build or ./build.sh Debug for the debug build

Running

By default the examples use the WASM version of Jolt. This requires serving the html file using a web server rather than opening the html file directly. Use e.g. serve to quickly host the file.

If you need to debug the C++ code take a look at WASM debugging.

Credits

This project was started from the Ammo.js code, but little remains of it as the Jolt Physics API is very different from the Bullet API.

License

The project is distributed under the MIT license.

Package Sidebar

Install

npm i @isaac-mason/tmp-jolt-physics

Weekly Downloads

2

Version

0.0.1

License

MIT

Unpacked Size

5.73 MB

Total Files

8

Last publish

Collaborators

  • isaacmason