RogueCannon.ts 324 B

12345678910111213
  1. import * as CANNON from 'cannon-es';
  2. export type CollisionEvent = {body: CANNON.Body, target: CANNON.Body, contact: CANNON.ContactEquation};
  3. let world: CANNON.World = new CANNON.World();
  4. export function getWorld() {
  5. return world;
  6. }
  7. export function setWorld(newWorld: CANNON.World) {
  8. world = newWorld;
  9. }