PhysX for JavaScript.
npm install physx-jsPhysX for JavaScript.
This repo complements the work being done over at prestomation/PhysX to create emscripten bindings for NVIDIAGameWorks/PhysX.
At some point the prestomation/PhysX fork may be merged into NVIDIAGameWorks/PhysX and this repo will be updated to track that repo instead.
This repo serves multiple purposes:
- Provide a Docker workflow for compiling and building PhysX to WebAssembly via Emscripten
- Provide a Docker workflow for adding new bindings (the whole PhysX API is not currently covered yet)
- To publish WebAssembly files to npm (physx-js) so that they can be used in projects via npm or CDN
There is an example with threejs and physx-js using Webpack in the /example folder.
The example is also available to preview here, it's hosted on now
```
npm install physx-js
The physx.release.js file can be imported via Webpack or included as a script on the page
The physx.release.wasm file needs to be served in a static/public folder so that it can be loaded in a browser environment
See /examples for how this can be used in Node, Browser and Browser w/ Webpack.
You may want to load the WebAssembly files via CDN, in which case you can use jsDelivr's npm mirror, loaded as a script:
`