mirror of
https://github.com/galacean/engine.git
synced 2026-05-19 11:36:12 +08:00
* main: "v0.9.0-beta.80" build: update package name Oasis renamed to Galacean (#1453) "v0.9.0-beta.79" Temporary solution to duplicate bone names (#1452) "v0.9.0-beta.78" Fix multi light cull mask bug (#1451) "v0.9.0-beta.77" fix: skinned mesh renderer light culling bug "v0.9.0-beta.76" Fix light cull mask and support webgl1.0 (#1449) "v0.9.0-beta.75" Light support cull mask (#1448)
647 B
647 B
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();