@galacean/engine-physics-lite
v1.3.19
Published
To install, use:
Downloads
555
Maintainers
Keywords
Readme
Installation
To install, use:
npm install @galacean/engine-physics-lite
This will allow you to import engine entirely using:
import * as PHYSICS_LITE from "@galacean/engine-physics-lite";
or individual classes using:
import { LitePhysics } from "@galacean/engine-physics-lite";
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 LitePhysics.
engine.physicsManager.initialize(LitePhysics);
......
// Run engine.
engine.run();