Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused physX function and update wasm with NO_DYNAMIC_EXECUTION #2490

Merged
merged 3 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions packages/design/src/physics/IDynamicCollider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,12 @@ export interface IDynamicCollider extends ICollider {
*/
getWorldTransform(outPosition: Vector3, outRotation: Quaternion): void;

/**
* Get the linear damping coefficient.
*/
getLinearDamping(): number;

/**
* Sets the linear damping coefficient.
* @param value - Linear damping coefficient
*/
setLinearDamping(value: number): void;

/**
* Get the angular damping coefficient.
*/
getAngularDamping(): number;
/**
* Sets the angular damping coefficient.
* @param value - Angular damping coefficient
Expand Down
20 changes: 0 additions & 20 deletions packages/physics-lite/src/LiteDynamicCollider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,6 @@ export class LiteDynamicCollider extends LiteCollider implements IDynamicCollide
throw "Physics-lite don't support isSleeping. Use Physics-PhysX instead!";
}

/**
* {@inheritDoc IDynamicCollider.getAngularDamping }
*/
getAngularDamping(): number {
throw "Physics-lite don't support getAngularDamping. Use Physics-PhysX instead!";
}

/**
* {@inheritDoc IDynamicCollider.setAngularDamping }
*/
Expand Down Expand Up @@ -147,12 +140,6 @@ export class LiteDynamicCollider extends LiteCollider implements IDynamicCollide
Logger.error("Physics-lite don't support setIsKinematic. Use Physics-PhysX instead!");
}

/**
* {@inheritDoc IDynamicCollider.setLinearDamping }
*/
getLinearDamping(): number {
throw "Physics-lite don't support getLinearDamping. Use Physics-PhysX instead!";
}
/**
* {@inheritDoc IDynamicCollider.setLinearDamping }
*/
Expand Down Expand Up @@ -189,13 +176,6 @@ export class LiteDynamicCollider extends LiteCollider implements IDynamicCollide
Logger.error("Physics-lite don't support setMaxAngularVelocity. Use Physics-PhysX instead!");
}

/**
* {@inheritDoc IDynamicCollider.setMaxDepenetrationVelocity }
*/
getMaxDepenetrationVelocity(): number {
throw "Physics-lite don't support getMaxDepenetrationVelocity. Use Physics-PhysX instead!";
}

/**
* {@inheritDoc IDynamicCollider.setMaxDepenetrationVelocity }
*/
Expand Down
58 changes: 58 additions & 0 deletions packages/physics-physx/libs/physx.release.downgrade.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/physics-physx/libs/physx.release.js

Large diffs are not rendered by default.

60 changes: 0 additions & 60 deletions packages/physics-physx/libs/physx.release.js.js

This file was deleted.

Binary file modified packages/physics-physx/libs/physx.release.wasm
Binary file not shown.
21 changes: 0 additions & 21 deletions packages/physics-physx/src/PhysXDynamicCollider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,13 @@ export class PhysXDynamicCollider extends PhysXCollider implements IDynamicColli
this._pxActor = physXPhysics._pxPhysics.createRigidDynamic(transform);
}

/**
* {@inheritDoc IDynamicCollider.getLinearDamping }
*/
getLinearDamping(): number {
return this._pxActor.getLinearDamping();
}

/**
* {@inheritDoc IDynamicCollider.setLinearDamping }
*/
setLinearDamping(value: number): void {
this._pxActor.setLinearDamping(value);
}

/**
* {@inheritDoc IDynamicCollider.getAngularDamping }
*/
getAngularDamping(): number {
return this._pxActor.getAngularDamping();
}

/**
* {@inheritDoc IDynamicCollider.setAngularDamping }
*/
Expand Down Expand Up @@ -148,13 +134,6 @@ export class PhysXDynamicCollider extends PhysXCollider implements IDynamicColli
this._pxActor.setMaxAngularVelocity(MathUtil.degreeToRadian(value));
}

/**
* {@inheritDoc IDynamicCollider.getMaxDepenetrationVelocity }
*/
getMaxDepenetrationVelocity(): number {
return this._pxActor.getMaxDepenetrationVelocity();
}

/**
* {@inheritDoc IDynamicCollider.setMaxDepenetrationVelocity }
*/
Expand Down
4 changes: 2 additions & 2 deletions packages/physics-physx/src/PhysXPhysics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@
}

if (runtimeMode == PhysXRuntimeMode.JavaScript) {
script.src = `https://mdn.alipayobjects.com/rms/afts/file/A*rnDeR58NNGoAAAAAAAAAAAAAARQnAQ/physx.release.js.js`;
script.src = `https://mdn.alipayobjects.com/rms/afts/file/A*CfV8RrDQk5oAAAAAAAAAAAAAARQnAQ/physx.release.downgrade.js`;

Check warning on line 93 in packages/physics-physx/src/PhysXPhysics.ts

View check run for this annotation

Codecov / codecov/patch

packages/physics-physx/src/PhysXPhysics.ts#L93

Added line #L93 was not covered by tests
} else if (runtimeMode == PhysXRuntimeMode.WebAssembly) {
script.src = `https://mdn.alipayobjects.com/rms/afts/file/A*04GyRKeSJw4AAAAAAAAAAAAAARQnAQ/physx.release.js`;
script.src = `https://mdn.alipayobjects.com/rms/afts/file/A*LRfCQ4VcCFQAAAAAAAAAAAAAARQnAQ/physx.release.js`;
}
});

Expand Down
Loading