Skip to content

Commit 6167789

Browse files
feat: update rapier3d compat to 0.19.2 (#774)
* fix: upgrade version * fix: add deprecation tag * fix: add changelog * fix: remove references * fix: removal of newline * feat: remove 'numAdditionalFrictionIterations' prop * chore: changeset --------- Co-authored-by: “Isaac <isaac@isaacmason.com>
1 parent c13b7ae commit 6167789

File tree

4 files changed

+22
-18
lines changed

4 files changed

+22
-18
lines changed

.changeset/lucky-buckets-act.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
"@react-three/rapier": minor
3+
---
4+
5+
feat: bump @dimforge/rapier3d-compat from v0.15.0 to v0.19.2 (@driescroons)
6+
7+
See the rapier.js changelog for details: https://github.com/dimforge/rapier.js/blob/master/CHANGELOG.md
8+
9+
Notable upstream rapier.js fixes:
10+
- Fixed kinematic bodies not waking up when setting velocity
11+
- Fixed slow-moving kinematic bodies falling asleep
12+
- Fixed point-projection on voxel shapes
13+
14+
**Breaking Changes:**
15+
- Removed `numAdditionalFrictionIterations` from IntegrationParameters (legacy PGS solver method)
16+
- Removed legacy PGS solver methods: `switchToStandardPgsSolver`, `switchToSmallStepsPgsSolver`, `switchToSmallStepsPgsSolverWithoutWarmstart`
17+
- Renamed `RigidBody.invPrincipalInertiaSqrt` and `.effectiveWorldInvInertiaSqrt` methods to remove the `Sqrt` suffix

packages/react-three-rapier/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"three": ">=0.159.0"
2626
},
2727
"dependencies": {
28-
"@dimforge/rapier3d-compat": "0.15.0",
28+
"@dimforge/rapier3d-compat": "0.19.2",
2929
"suspend-react": "^0.1.3",
3030
"three-stdlib": "^2.35.12"
3131
},

packages/react-three-rapier/src/components/Physics.tsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -271,15 +271,6 @@ export interface PhysicsProps {
271271
*/
272272
numSolverIterations?: number;
273273

274-
/**
275-
* Number of addition friction resolution iteration run during the last solver sub-step.
276-
* The greater this value is, the most realistic friction will be.
277-
* However a greater number of iterations is more computationally intensive.
278-
*
279-
* @defaultValue 4
280-
*/
281-
numAdditionalFrictionIterations?: number;
282-
283274
/**
284275
* Number of internal Project Gauss Seidel (PGS) iterations run at each solver iteration.
285276
* Increasing this parameter will improve stability of the simulation. It will have a lesser effect than
@@ -417,7 +408,6 @@ export const Physics: FC<PhysicsProps> = (props) => {
417408
allowedLinearError = 0.001,
418409
predictionDistance = 0.002,
419410
numSolverIterations = 4,
420-
numAdditionalFrictionIterations = 4,
421411
numInternalPgsIterations = 1,
422412
minIslandSize = 128,
423413
maxCcdSubsteps = 1,
@@ -461,8 +451,6 @@ export const Physics: FC<PhysicsProps> = (props) => {
461451
worldProxy.gravity = vector3ToRapierVector(gravity);
462452

463453
worldProxy.integrationParameters.numSolverIterations = numSolverIterations;
464-
worldProxy.integrationParameters.numAdditionalFrictionIterations =
465-
numAdditionalFrictionIterations;
466454
worldProxy.integrationParameters.numInternalPgsIterations =
467455
numInternalPgsIterations;
468456

@@ -479,7 +467,6 @@ export const Physics: FC<PhysicsProps> = (props) => {
479467
worldProxy,
480468
...gravity,
481469
numSolverIterations,
482-
numAdditionalFrictionIterations,
483470
numInternalPgsIterations,
484471
allowedLinearError,
485472
minIslandSize,

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,10 +1369,10 @@
13691369
resolved "https://registry.yarnpkg.com/@csstools/css-tokenizer/-/css-tokenizer-3.0.3.tgz#a5502c8539265fecbd873c1e395a890339f119c2"
13701370
integrity sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==
13711371

1372-
"@dimforge/rapier3d-compat@0.15.0":
1373-
version "0.15.0"
1374-
resolved "https://registry.yarnpkg.com/@dimforge/rapier3d-compat/-/rapier3d-compat-0.15.0.tgz#53fc00c2655d12baf723ecc9ca9e972e412c2800"
1375-
integrity sha512-TRH9rmF6RJqvKt0xis6VkToJHz4Pf54IfYhKGWn7zkpTWPwVyQ4p9kjwrdm6jOfGn72MBrIbttzvDB/ZOqE7sg==
1372+
"@dimforge/rapier3d-compat@0.19.2":
1373+
version "0.19.2"
1374+
resolved "https://registry.yarnpkg.com/@dimforge/rapier3d-compat/-/rapier3d-compat-0.19.2.tgz#3eaa0557398ea2ffb19f6d94802e718b95ddad66"
1375+
integrity sha512-AZHL1jqUF55QJkJyU1yKeh4ImX2J93bVLIezT1+o0FZqTix6O06MOaqpKoJ4MmbDCsoZmwO+qc471/SDMDm2AA==
13761376

13771377
"@esbuild/aix-ppc64@0.24.2":
13781378
version "0.24.2"

0 commit comments

Comments
 (0)