@fred3d/physics-ammo
v0.1.0
Published
Ammo.js physics implementation for Fred3D
Readme
@fred3d/physics-ammo
Ammo.js physics implementation for the Fred3D engine.
Overview
This package provides an Ammo.js-based implementation of the physics abstractions defined in the @fred3d/physics package. It allows you to use Ammo.js (the JavaScript port of Bullet Physics) as the physics engine in your Fred3D applications.
Installation
# Using npm
npm install @fred3d/physics @fred3d/physics-ammo
# Using pnpm
pnpm install @fred3d/physics @fred3d/physics-ammo
# Using yarn
yarn add @fred3d/physics @fred3d/physics-ammoUsage
import { PhysicsManager, PhysicsEngineType } from '@fred3d/physics';
import '@fred3d/physics-ammo'; // Import to register the Ammo.js implementation
// Initialize the physics system with Ammo.js
await PhysicsManager.getInstance().initialize(PhysicsEngineType.AMMO);
// Use physics as normal
const world = PhysicsManager.getInstance().getWorld();
// ...Features
- Complete implementation of the Fred3D physics abstraction using Ammo.js
- Support for rigid bodies, colliders, joints, and materials
- Efficient physics simulation with continuous collision detection
- Compatible with all standard Fred3D physics utilities
Requirements
- Fred3D engine
- Three.js version 0.173.0 or higher
