-
-
Notifications
You must be signed in to change notification settings - Fork 310
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
Conversation
Important Review skippedReview was skipped as selected files did not have any reviewable changes. 💤 Files selected but had no reviewable changes (1)
You can disable this status message by setting the WalkthroughThis pull request involves removing getter methods for linear damping, angular damping, and maximum depenetration velocity across multiple physics-related files. The changes impact the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/physics-physx/src/PhysXPhysics.ts (1)
93-93
: Consider adding integrity checks and fallback URLs for external scriptsThe script URLs have been updated, but there are several security and reliability concerns:
- No integrity checks (SRI) for externally loaded scripts
- No version pinning in URLs
- No fallback URLs if the CDN is unavailable
Consider implementing the following improvements:
if (runtimeMode == PhysXRuntimeMode.JavaScript) { - script.src = `https://mdn.alipayobjects.com/rms/afts/file/A*yYWPSZFhS_0AAAAAAAAAAAAAARQnAQ/physx.no-wasm.js`; + script.src = PRIMARY_CDN + '/physx.no-wasm.js'; + script.integrity = 'sha384-...'; // Add SRI hash + script.crossOrigin = 'anonymous'; + script.onerror = () => { + script.src = FALLBACK_CDN + '/physx.no-wasm.js'; + }; } else if (runtimeMode == PhysXRuntimeMode.WebAssembly) { - script.src = `https://mdn.alipayobjects.com/rms/afts/file/A*WoEgTJ2foH4AAAAAAAAAAAAAARQnAQ/physx.release.js`; + script.src = PRIMARY_CDN + '/physx.release.js'; + script.integrity = 'sha384-...'; // Add SRI hash + script.crossOrigin = 'anonymous'; + script.onerror = () => { + script.src = FALLBACK_CDN + '/physx.release.js'; + }; }Also applies to: 95-95
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
packages/physics-physx/libs/physx.release.wasm
is excluded by!**/*.wasm
📒 Files selected for processing (4)
packages/design/src/physics/IDynamicCollider.ts
(0 hunks)packages/physics-lite/src/LiteDynamicCollider.ts
(0 hunks)packages/physics-physx/src/PhysXDynamicCollider.ts
(0 hunks)packages/physics-physx/src/PhysXPhysics.ts
(1 hunks)
💤 Files with no reviewable changes (3)
- packages/design/src/physics/IDynamicCollider.ts
- packages/physics-physx/src/PhysXDynamicCollider.ts
- packages/physics-lite/src/LiteDynamicCollider.ts
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: build (22.x, windows-latest)
- GitHub Check: codecov
- GitHub Check: e2e (22.x)
🔇 Additional comments (1)
packages/physics-physx/src/PhysXPhysics.ts (1)
93-96
: Verify compatibility with the new PhysX script versionsThe URLs point to new script versions which could introduce breaking changes. Please ensure:
- The new scripts are compatible with the current implementation
- All removed getter methods (mentioned in PR title) are properly handled
- Add tests to verify the integration still works as expected
Run the following script to check for any usage of the removed getter methods:
✅ Verification successful
Implementation is compatible with new PhysX script versions
The codebase is already adapted to work without the getter methods:
- Only setter methods are implemented in PhysXDynamicCollider
- All examples and tests use property access syntax
- No deprecated method calls found
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for any remaining references to the removed getter methods rg -i "getLinearDamping|getAngularDamping|getMaxDepenetrationVelocity"Length of output: 72
Script:
#!/bin/bash # Find all PhysX-related files fd -e ts -e js physx -i # Search for method calls in PhysX-related files ast-grep --pattern 'physx.$_($_)' # Look for test files fd -e spec.ts -e test.ts physx -iLength of output: 1362
Script:
#!/bin/bash # Check dynamic collider implementation cat packages/physics-physx/src/PhysXDynamicCollider.ts # Search for damping-related code rg -i "damping|velocity" packages/physics-physx/src/ # Look for property access patterns ast-grep --pattern '$_.linearDamping' ast-grep --pattern '$_.angularDamping'Length of output: 13395
75d1bd9
to
650f82a
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev/1.4 #2490 +/- ##
===========================================
+ Coverage 68.42% 68.89% +0.47%
===========================================
Files 923 923
Lines 95904 96007 +103
Branches 8138 8138
===========================================
+ Hits 65621 66145 +524
+ Misses 30029 29608 -421
Partials 254 254
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
no dynamic
no dynamic
NO_DYNAMIC_EXECUTION
* refactor: remove unused physx function * feat: update downgrade version
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
What is the current behavior? (You can also link to an open issue here)
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
Other information:
Summary by CodeRabbit
Refactor
Bug Fixes