mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 00:22:43 +08:00
9f89b0ef24
* 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
32 lines
1.1 KiB
TypeScript
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;
|
|
}
|