mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
aa0eb1bdaf
* stash * stash * stash * stash * fix z direction * impl cannon cylinder * stash * stash * stash * fix memory leak * update @cocos/ammo * add error map * update package-lock * tweaks
32 lines
722 B
TypeScript
32 lines
722 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 let CylinderShape: any;
|
|
|
|
export interface IPhysicsWrapperObject {
|
|
world: any,
|
|
body?: any,
|
|
box: any,
|
|
sphere: any,
|
|
capsule?: any,
|
|
trimesh?: any,
|
|
cylinder?: 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; }
|
|
if (obj.cylinder) { CylinderShape = obj.cylinder; }
|
|
}
|