Files
engine/packages/physics-physx/README.md
GuoLei1990 b3ce268544 Merge branch 'main' into dev/1.0
* 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)
2023-04-06 14:11:08 +08:00

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();