mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-06 19:42:39 +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
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
/**
|
|
* @hidden
|
|
*/
|
|
|
|
import { ILifecycle } from './i-lifecycle'
|
|
import { IGroupMask } from './i-group-mask'
|
|
import { IVec3Like } from '../../core/math/type-define';
|
|
import { ColliderComponent, RigidBodyComponent, PhysicMaterial } from '../../../exports/physics-framework';
|
|
import { Mesh } from '../../core';
|
|
|
|
export interface IBaseShape extends ILifecycle, IGroupMask {
|
|
readonly impl: any;
|
|
readonly collider: ColliderComponent;
|
|
readonly attachedRigidBody: RigidBodyComponent | null;
|
|
initialize (v: ColliderComponent): void;
|
|
setMaterial: (v: PhysicMaterial | null) => void;
|
|
setAsTrigger: (v: boolean) => void;
|
|
setCenter: (v: IVec3Like) => void;
|
|
}
|
|
|
|
export interface IBoxShape extends IBaseShape {
|
|
setSize: (v: IVec3Like) => void;
|
|
}
|
|
|
|
export interface ISphereShape extends IBaseShape {
|
|
setRadius: (v: number) => void;
|
|
}
|
|
|
|
export interface ICapsuleShape extends IBaseShape {
|
|
setRadius: (v: number) => void;
|
|
setHeight: (v: number) => void;
|
|
setDirection: (v: number) => void;
|
|
}
|
|
|
|
export interface ITrimeshShape extends IBaseShape {
|
|
setMesh: (v: Mesh | null) => void;
|
|
} |