diff --git a/cocos/physics/physx/character-controllers/physx-box-character-controller.ts b/cocos/physics/physx/character-controllers/physx-box-character-controller.ts index 3d58ac36e8e..738d23101d0 100644 --- a/cocos/physics/physx/character-controllers/physx-box-character-controller.ts +++ b/cocos/physics/physx/character-controllers/physx-box-character-controller.ts @@ -34,6 +34,8 @@ import { degreesToRadians } from '../../../core/utils/misc'; const v3_0 = new Vec3(0, 0, 0); const upDir = new Vec3(0, 1, 0); + +/** @mangle */ export class PhysXBoxCharacterController extends PhysXCharacterController implements IBoxCharacterController { get component (): BoxCharacterController { return this._comp as BoxCharacterController; diff --git a/cocos/physics/physx/character-controllers/physx-capsule-character-controller.ts b/cocos/physics/physx/character-controllers/physx-capsule-character-controller.ts index 9e4dfdd2b50..a53b0e56c72 100644 --- a/cocos/physics/physx/character-controllers/physx-capsule-character-controller.ts +++ b/cocos/physics/physx/character-controllers/physx-capsule-character-controller.ts @@ -34,6 +34,8 @@ import { degreesToRadians } from '../../../core/utils/misc'; const v3_0 = new Vec3(0, 0, 0); const upDir = new Vec3(0, 1, 0);//temp + +/** @mangle */ export class PhysXCapsuleCharacterController extends PhysXCharacterController implements ICapsuleCharacterController { get component (): CapsuleCharacterController { return this._comp as CapsuleCharacterController; diff --git a/cocos/physics/physx/character-controllers/physx-character-controller.ts b/cocos/physics/physx/character-controllers/physx-character-controller.ts index 2c6d25b881c..9641ad2d2f7 100644 --- a/cocos/physics/physx/character-controllers/physx-character-controller.ts +++ b/cocos/physics/physx/character-controllers/physx-character-controller.ts @@ -34,6 +34,8 @@ import { TransformBit } from '../../../scene-graph'; const v3_0 = new Vec3(0, 0, 0); const v3_1 = new Vec3(0, 0, 0); + +/** @mangle */ export class PhysXCharacterController implements IBaseCharacterController { private _isEnabled = false; protected _impl: any = null; diff --git a/cocos/physics/physx/joints/physx-configurable-joint.ts b/cocos/physics/physx/joints/physx-configurable-joint.ts index f8f881dede1..d592b3cb55c 100644 --- a/cocos/physics/physx/joints/physx-configurable-joint.ts +++ b/cocos/physics/physx/joints/physx-configurable-joint.ts @@ -46,6 +46,7 @@ function getConstraintFlag (v: EConstraintMode): any { } } +/** @mangle */ export class PhysXConfigurableJoint extends PhysXJoint implements IConfigurableConstraint { protected _setLinearLimit (): void { const linearLimit = this.constraint.linearLimitSettings; diff --git a/cocos/physics/physx/joints/physx-fixed-joint.ts b/cocos/physics/physx/joints/physx-fixed-joint.ts index ea25afbac19..bf81cc093c1 100644 --- a/cocos/physics/physx/joints/physx-fixed-joint.ts +++ b/cocos/physics/physx/joints/physx-fixed-joint.ts @@ -33,6 +33,7 @@ const v3_0 = new Vec3(); const quat_0 = new Quat(); const mat_0 = new Mat4(); +/** @mangle */ export class PhysXFixedJoint extends PhysXJoint implements IFixedConstraint { setBreakForce (v: number): void { this._breakForce = this.constraint.breakForce; diff --git a/cocos/physics/physx/joints/physx-joint.ts b/cocos/physics/physx/joints/physx-joint.ts index 6be6778e8e0..55aa0c54930 100644 --- a/cocos/physics/physx/joints/physx-joint.ts +++ b/cocos/physics/physx/joints/physx-joint.ts @@ -29,6 +29,7 @@ import { PX, setJointActors, _pxtrans } from '../physx-adapter'; import { PhysXRigidBody } from '../physx-rigid-body'; import { PhysXInstance } from '../physx-instance'; +/** @mangle */ export class PhysXJoint implements IBaseConstraint { private static _tempActor: any; diff --git a/cocos/physics/physx/joints/physx-revolute-joint.ts b/cocos/physics/physx/joints/physx-revolute-joint.ts index 4f6997874ce..a1f17ea1a89 100644 --- a/cocos/physics/physx/joints/physx-revolute-joint.ts +++ b/cocos/physics/physx/joints/physx-revolute-joint.ts @@ -35,6 +35,7 @@ const v3_2 = new Vec3(); const quat_0 = new Quat(); const mat_0 = new Mat4(); +/** @mangle */ export class PhysXRevoluteJoint extends PhysXJoint implements IHingeConstraint { private _limitPair = new PX.PxJointAngularLimitPair(0, 0); diff --git a/cocos/physics/physx/joints/physx-spherical-joint.ts b/cocos/physics/physx/joints/physx-spherical-joint.ts index f463614754a..7e77637a167 100644 --- a/cocos/physics/physx/joints/physx-spherical-joint.ts +++ b/cocos/physics/physx/joints/physx-spherical-joint.ts @@ -28,6 +28,7 @@ import { IPointToPointConstraint } from '../../spec/i-physics-constraint'; import { PX, _trans, getTempTransform, _pxtrans } from '../physx-adapter'; import { PhysXJoint } from './physx-joint'; +/** @mangle */ export class PhysXSphericalJoint extends PhysXJoint implements IPointToPointConstraint { setPivotA (v: IVec3Like): void { const cs = this.constraint; diff --git a/cocos/physics/physx/physx-contact-equation.ts b/cocos/physics/physx/physx-contact-equation.ts index d7df69ac6bb..2340b06170a 100644 --- a/cocos/physics/physx/physx-contact-equation.ts +++ b/cocos/physics/physx/physx-contact-equation.ts @@ -27,6 +27,8 @@ import { IContactEquation, ICollisionEvent, Collider } from '../framework'; import { getContactNormal, getContactPosition } from './physx-adapter'; const quat = new Quat(); + +/** @mangle */ export class PhysXContactEquation implements IContactEquation { get isBodyA (): boolean { return this.colliderA.uuid === this.event.selfCollider.uuid; diff --git a/cocos/physics/physx/physx-rigid-body.ts b/cocos/physics/physx/physx-rigid-body.ts index 1213d620e89..7d59ef22a92 100644 --- a/cocos/physics/physx/physx-rigid-body.ts +++ b/cocos/physics/physx/physx-rigid-body.ts @@ -32,6 +32,7 @@ import { PhysXWorld } from './physx-world'; const v3_0 = new Vec3(); +/** @mangle */ export class PhysXRigidBody implements IRigidBody { get impl (): any { return this._sharedBody.impl; } diff --git a/cocos/physics/physx/physx-shared-body.ts b/cocos/physics/physx/physx-shared-body.ts index c4470d4e2ae..f36567ff232 100644 --- a/cocos/physics/physx/physx-shared-body.ts +++ b/cocos/physics/physx/physx-shared-body.ts @@ -38,6 +38,7 @@ import { PhysXJoint } from './joints/physx-joint'; import { PhysicsGroup } from '../framework/physics-enum'; import { Node } from '../../scene-graph'; +/** @mangle */ export class PhysXSharedBody { private static idCounter = 0; private static readonly sharedBodesMap = new Map(); diff --git a/cocos/physics/physx/shapes/physx-box-shape.ts b/cocos/physics/physx/shapes/physx-box-shape.ts index 98836ffd46f..62988591624 100644 --- a/cocos/physics/physx/shapes/physx-box-shape.ts +++ b/cocos/physics/physx/shapes/physx-box-shape.ts @@ -29,6 +29,7 @@ import { PX } from '../physx-adapter'; import { EPhysXShapeType, PhysXShape } from './physx-shape'; import { PhysXInstance } from '../physx-instance'; +/** @mangle */ export class PhysXBoxShape extends PhysXShape implements IBoxShape { static BOX_GEOMETRY: any; diff --git a/cocos/physics/physx/shapes/physx-capsule-shape.ts b/cocos/physics/physx/shapes/physx-capsule-shape.ts index aa22f904ea1..f4821607749 100644 --- a/cocos/physics/physx/shapes/physx-capsule-shape.ts +++ b/cocos/physics/physx/shapes/physx-capsule-shape.ts @@ -29,6 +29,7 @@ import { PX } from '../physx-adapter'; import { PhysXInstance } from '../physx-instance'; import { EPhysXShapeType, PhysXShape } from './physx-shape'; +/** @mangle */ export class PhysXCapsuleShape extends PhysXShape implements ICapsuleShape { static CAPSULE_GEOMETRY: any; diff --git a/cocos/physics/physx/shapes/physx-cone-shape.ts b/cocos/physics/physx/shapes/physx-cone-shape.ts index 8caa2eba1a2..4c3a35be50e 100644 --- a/cocos/physics/physx/shapes/physx-cone-shape.ts +++ b/cocos/physics/physx/shapes/physx-cone-shape.ts @@ -30,6 +30,7 @@ import { createConvexMesh, createMeshGeometryFlags, PX, _trans } from '../physx- import { PhysXInstance } from '../physx-instance'; import { EPhysXShapeType, PhysXShape } from './physx-shape'; +/** @mangle */ export class PhysXConeShape extends PhysXShape implements IConeShape { static CONVEX_MESH: any; geometry: any; diff --git a/cocos/physics/physx/shapes/physx-cylinder-shape.ts b/cocos/physics/physx/shapes/physx-cylinder-shape.ts index f0f5fcf22c5..8ec2f2c3c1d 100644 --- a/cocos/physics/physx/shapes/physx-cylinder-shape.ts +++ b/cocos/physics/physx/shapes/physx-cylinder-shape.ts @@ -30,6 +30,7 @@ import { createConvexMesh, createMeshGeometryFlags, PX, _trans } from '../physx- import { PhysXInstance } from '../physx-instance'; import { EPhysXShapeType, PhysXShape } from './physx-shape'; +/** @mangle */ export class PhysXCylinderShape extends PhysXShape implements ICylinderShape { static CONVEX_MESH: any; geometry: any; diff --git a/cocos/physics/physx/shapes/physx-plane-shape.ts b/cocos/physics/physx/shapes/physx-plane-shape.ts index 569424ad85f..3012637b514 100644 --- a/cocos/physics/physx/shapes/physx-plane-shape.ts +++ b/cocos/physics/physx/shapes/physx-plane-shape.ts @@ -29,6 +29,7 @@ import { getTempTransform, PX, _trans } from '../physx-adapter'; import { PhysXInstance } from '../physx-instance'; import { EPhysXShapeType, PhysXShape } from './physx-shape'; +/** @mangle */ export class PhysXPlaneShape extends PhysXShape implements IPlaneShape { static PLANE_GEOMETRY: any; diff --git a/cocos/physics/physx/shapes/physx-shape.ts b/cocos/physics/physx/shapes/physx-shape.ts index 79bf1521f5a..d370f492a03 100644 --- a/cocos/physics/physx/shapes/physx-shape.ts +++ b/cocos/physics/physx/shapes/physx-shape.ts @@ -46,6 +46,7 @@ export enum EPhysXShapeType { MESH, } +/** @mangle */ export class PhysXShape implements IBaseShape { private static _MESH_SCALE: any; static get MESH_SCALE (): any { diff --git a/cocos/physics/physx/shapes/physx-sphere-shape.ts b/cocos/physics/physx/shapes/physx-sphere-shape.ts index 8c492487436..17dcc11660f 100644 --- a/cocos/physics/physx/shapes/physx-sphere-shape.ts +++ b/cocos/physics/physx/shapes/physx-sphere-shape.ts @@ -29,6 +29,7 @@ import { PX } from '../physx-adapter'; import { PhysXInstance } from '../physx-instance'; import { EPhysXShapeType, PhysXShape } from './physx-shape'; +/** @mangle */ export class PhysXSphereShape extends PhysXShape implements ISphereShape { static SPHERE_GEOMETRY: any; diff --git a/cocos/physics/physx/shapes/physx-terrain-shape.ts b/cocos/physics/physx/shapes/physx-terrain-shape.ts index 960300e8abc..8efc3169862 100644 --- a/cocos/physics/physx/shapes/physx-terrain-shape.ts +++ b/cocos/physics/physx/shapes/physx-terrain-shape.ts @@ -30,6 +30,7 @@ import { createHeightField, createHeightFieldGeometry, getTempTransform, PX } fr import { PhysXInstance } from '../physx-instance'; import { EPhysXShapeType, PhysXShape } from './physx-shape'; +/** @mangle */ export class PhysXTerrainShape extends PhysXShape implements ITerrainShape { static heightScale = 1 / 512; diff --git a/cocos/physics/physx/shapes/physx-trimesh-shape.ts b/cocos/physics/physx/shapes/physx-trimesh-shape.ts index b5cd90fba66..ee752d15741 100644 --- a/cocos/physics/physx/shapes/physx-trimesh-shape.ts +++ b/cocos/physics/physx/shapes/physx-trimesh-shape.ts @@ -31,6 +31,7 @@ import { addReference, createConvexMesh, createMeshGeometryFlags, createTriangle import { EPhysXShapeType, PhysXShape } from './physx-shape'; import { PhysXInstance } from '../physx-instance'; +/** @mangle */ export class PhysXTrimeshShape extends PhysXShape implements ITrimeshShape { geometry: any;