@galacean/engine-physics-physx
v1.3.19
Published
To install, use:
Downloads
524
Maintainers
Keywords
Readme
Installation
To install, use:
npm install @galacean/engine-physics-physx
This will allow you to import engine entirely using:
import * as PHYSICS_PHYSX from "@galacean/engine-physics-physx";
or individual classes using:
import { PhysXPhysics } from "@galacean/engine-physics-physx";
Usage
// Create engine by passing in the HTMLCanvasElement id and adjust canvas size
const engine = await WebGLEngine.create({ canvas: "canvas-id" });
// Initialize physics manager with PhysXPhysics.
engine.physicsManager.initialize(PhysXPhysics);
......
// Run engine.
engine.run();