A JavaScript port of the Jolt Physics engine using Emscripten, enabling high-performance physics simulations in web applications.
JoltPhysics.js is a JavaScript port of the Jolt Physics engine, a high-performance physics simulation library. It enables developers to integrate advanced rigid body dynamics, collision detection, and physics interactions into web-based applications, games, and simulations. The library is compiled from C++ using Emscripten, providing near-native performance in the browser.
Web developers and game creators building 3D simulations, interactive experiences, or browser-based games that require realistic physics. It's particularly useful for those already familiar with Jolt Physics or seeking a robust alternative to existing web physics engines.
Developers choose JoltPhysics.js for its comprehensive feature set, performance optimizations through WASM and multithreading, and direct parity with the battle-tested C++ Jolt Physics engine. Its multiple build flavors allow fine-tuning for specific project needs, from compatibility to maximum speed.
Port of JoltPhysics to JavaScript using emscripten
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Almost the entire C++ Jolt interface is exposed, enabling direct use of advanced features like vehicle physics and soft bodies, as documented in the JoltJS.idl file.
Offers seven flavors including WASM, asm.js, and multithreaded variants, allowing developers to balance performance, compatibility, and bundle size based on project needs.
Supports cross-platform deterministic compilation with the -DCROSS_PLATFORM_DETERMINISTIC=ON flag, ensuring identical physics results across browsers and systems.
Provides explicit reference counting and Jolt.destroy() methods for efficient resource handling, though it requires manual cleanup to avoid leaks.
Requires explicit calls to Jolt.destroy() and careful reference counting, which the README admits can lead to memory leaks if neglected, adding developer overhead.
Setting up involves choosing from seven build flavors and managing WASM files separately, with additional steps for bundlers like Vite, increasing initial complexity.
WASM builds offer near-native speed but have large bundle sizes, especially multithreaded versions, which can impact web application load times and compatibility.