mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 16:52:43 +08:00
a4af34630f
* 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
29 lines
615 B
TypeScript
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; }
|
|
}
|