Files
cocos4/cocos/physics/framework/physics-selector.ts
T
jiaxin.lai a4af34630f integrate trimesh shape of ammo & cannon (#6232)
* stash

* cannon impl

* ammo mesh collider

* finish ammo mesh collider

* cannon trimesh shape

* tweaks

* tweaks

* tweaks

* update @cocos/ammo &  @cocos/cannon

* fix ci

* naming norm

* use config object

* renaming

* naming norm

* naming norm

* tweaks

* stash

* stash

* stash

* add error map

* export impl

* update package-lock

* export impl of world

* tweaks
2020-03-15 19:41:16 +08:00

29 lines
615 B
TypeScript

/**
* @hidden
*/
export let PhysicsWorld: any;
export let RigidBody: any;
export let BoxShape: any;
export let SphereShape: any;
export let CapsuleShape: any;
export let TrimeshShape: any;
export interface IPhysicsWrapperObject {
world: any,
body?: any,
box: any,
sphere: any,
capsule?: any,
trimesh?: any,
}
export function instantiate (obj: IPhysicsWrapperObject) {
BoxShape = obj.box;
SphereShape = obj.sphere;
RigidBody = obj.body;
PhysicsWorld = obj.world;
if (obj.capsule) { CapsuleShape = obj.capsule; }
if (obj.trimesh) { TrimeshShape = obj.trimesh; }
}