mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
65b0478c69
* 3d v1.1.1-exp physics expriment (#6787) * activate when not awake (#6781) * activate when not awake * cannon too * off event listener when onDestroy * add clearVelocity & clearForces * add CC_CONFIG to ammo\cannon * add convex mesh & reuse mesh * cache enable false by default * terrain collider * cone collider * fix scale of ammo box & sphere * simple collider * add worldBounds & boundingSphere to collider * add clear*** to rigid body * enhance physics material * enhance event * plane collider * stash * tweaks * update @cocos/ammo to v1.0.7-beta.1 * typing * enchance update shape dynamic * absolute scale cannon-box * expose allowsleep * fix warning of generate declaration * remove physics_builtin * DO NOT MERGE * Better reuse * Correct construct and deconstruct * avoid ammo memory leaks * minor refactor contact data * fix cannon terrain tileSize * stash * optimize auto wakeup * [Ammo] fix update by re add * 400~ * overwrite ArrayCollisionMatrix.prototype.reset * Export enum by namespace * stash * fix remove child shape of btCompound * fix event with CCD * dynamic instantiate * STASH * add group to rigid body * update attachedRigidBody of collider in editor * stash physics config * tweaks of ammo config * stash * stash * collision matrix * stash * rename deltaTime to fixedTimeStep * group mask collider * allow get mask * set default group to Layers.Enum.DEFAULT * add group change fallback * cannon collision matrix * fix * update @cocos/ammo to 1.0.7-beta.2 * more prop * fix * disable on 1.1.1-exp * tweaks * fix circular dependency * tweaks * rename simple to simplex * rename collider -> colliders * stash * ammo p2p * hinge constraint * adapt cannon p2p pivotB * ammo p2p setPivotB * constraint * tweaks * remove macro of physics * refactor physics selector * import ammo from ammo-instantiated * update @cocos/ammo * update @cocos/cannon
47 lines
617 B
TypeScript
47 lines
617 B
TypeScript
/**
|
|
* @category physics
|
|
*/
|
|
|
|
import { Enum } from "../../core";
|
|
|
|
export enum ERigidBodyType {
|
|
DYNAMIC = 1,
|
|
STATIC = 2,
|
|
KINEMATIC = 4,
|
|
}
|
|
|
|
export enum EAxisDirection {
|
|
X_AXIS,
|
|
Y_AXIS,
|
|
Z_AXIS,
|
|
}
|
|
Enum(EAxisDirection);
|
|
|
|
export enum ESimplexType {
|
|
VERTEX = 1,
|
|
LINE = 2,
|
|
TRIANGLE = 3,
|
|
TETRAHEDRON = 4,
|
|
}
|
|
Enum(ESimplexType);
|
|
|
|
export enum EColliderType {
|
|
BOX,
|
|
SPHERE,
|
|
CAPSULE,
|
|
CYLINDER,
|
|
CONE,
|
|
MESH,
|
|
PLANE,
|
|
SIMPLEX,
|
|
TERRAIN,
|
|
}
|
|
Enum(EColliderType);
|
|
|
|
export enum EConstraintType {
|
|
POINT_TO_POINT,
|
|
HINGE,
|
|
CONE_TWIST
|
|
}
|
|
Enum(EConstraintType);
|