@milk-ecs/physx
v1.0.24
Published
<div align="center">
Downloads
148
Readme
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
- Use the Profile build of PhysX
- Setup PhysX with a PVDGenerator
setupPhysx(createPhysXDebuggerFile(...))
setupPhysx(createPhysXDebuggerWebsocket(...))
setupPhysx(createPhysXDebuggerTCP(...))
WebSocket Debugger
- Create a Websocket -> TCP proxy via
websockify 8090 127.0.0.1:5425
TCP on remote server
- Create a reverse port-forward
ssh -R 8090:127.0.0.1:5425 dev.milkshake.io
Compiling
Only supports building through docker, although you can easily cd into the submodule and run the shell scripts yourself.
yarn compile
yarn build