rb-phys2d-threaded
v0.1.0
Published
Librirary for launching rb-phys2d physics engine in seperate thread
Downloads
11
Readme
Web Worker For RbPhys2D
Package for running RbPhys2D in dedicated WebWorker.
Limitations
Information regarding to contact between two bodies is not taking into account when listening collision events.
User defined joints
are also not working.
Installation
Using npm
package manager:
npm install rb-phys2d-threaded
Usage
ESM
import { createWorld } from 'rb-phys2d-threaded';
// Use the synonymous factory
const world = createWorld({ ... });
Browser
<!-- include bundle -->
<script src="./node_modules/rb-phys2d-threaded/dist/bundle/rb-phys2d-worker-source.js"></script>
<script src="./node_modules/rb-phys2d-threaded/dist/bundle/rb-phys2d-threaded.js"></script>
<script>
// use global accessible object rbPhys2dThreaded
const world = rbPhys2dThreaded.createWorld();
// ...
</script>
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.