Files
cocos4/cocos/physics/impl-selector.ts
T
pandamicro 9f89b0ef24 New module division (#5285)
* Temp

* temp

* move ui core

* Arrange ui and terrain

* Fix import path for all modules except core

* Move primitives into core

* Fix debug.getError

* Move audio-downloader to audio module

* export game from game.ts

* Migrate load-pipeline to ts

* Fix core modules and cleanup

* Move animation into core

* Fix module exports

* Fix director issue

* Remove most cc.director usage

* Fix ts issues

* Fix issues for unit test and editor running

* Revert removing deprecated import

* tweaks

* tweaks

* Fix ci

* Fix ci

* Add modules in module division

* Upgrade coordinates-converts-utils
2019-08-30 11:35:22 +08:00

32 lines
1.1 KiB
TypeScript

/**
* @hidden
*/
// Cannon
import { CannonRigidBody } from './cannon/cannon-body';
import { CannonWorld } from './cannon/cannon-world';
import { CannonBoxShape } from './cannon/shapes/cannon-box-shape';
import { CannonSphereShape } from './cannon/shapes/cannon-sphere-shape';
// built-in
import { BuiltInBody } from './cocos/builtin-body';
import { BuiltInWorld } from './cocos/builtin-world';
import { BuiltinBoxShape } from './cocos/shapes/builtin-box-shape';
import { BuiltinSphereShape } from './cocos/shapes/builtin-sphere-shape';
export let BoxShape: typeof CannonBoxShape | typeof BuiltinBoxShape;
export let SphereShape: typeof CannonSphereShape | typeof BuiltinSphereShape;
export let RigidBody: typeof CannonRigidBody | typeof BuiltInBody;
export let PhysicsWorld: typeof CannonWorld | typeof BuiltInWorld;
export function instantiate (
boxShape: typeof BoxShape,
sphereShape: typeof SphereShape,
body: typeof RigidBody,
world: typeof PhysicsWorld) {
BoxShape = boxShape;
SphereShape = sphereShape;
RigidBody = body;
PhysicsWorld = world;
}