@milk-ecs/rapier
TypeScript icon, indicating that this package has built-in type declarations

1.0.24 • Public • Published

Milk + PhysX


📦 PhysX Package for Milk.

🔧 Getting started

import { setupPhysx, PhysXPhysicsSystem, PhysXBody, PhysXBox } from '@milk-ecs/physx';

// Ensure to run `setupPhysx` before starting the engine (loads WASM)
setupPhysx().then(() => {
	new Engine();
});

// Add the PhysX system
engine.addSystem(new PhysXPhysicsSystem());

// Creating a simple box
const entity = new Entity();
entity.add(Transform);
entity.add(PhysXBody);
entity.add(PhysXBox, {
    size: Vector3.Equal(1 / 2)
});

🔎 Using PhysX Debugger

  1. Use the Profile build of PhysX setupPhysx('profile')
  2. Enable debugger in the system new PhysXPhysicsSystem(gravity, 1, true) (also reccomend using a low substep)
  3. Create a Websocket -> TCP proxy via websockify 8090 127.0.0.1:5425

Readme

Keywords

none

Package Sidebar

Install

npm i @milk-ecs/rapier

Weekly Downloads

1

Version

1.0.24

License

MIT

Unpacked Size

87.1 kB

Total Files

17

Last publish

Collaborators

  • vieo
  • andrewmunro