Skip to content

Commit f3b6f81

Browse files
committed
feat(rapier)!: remove numAdditionalFrictionIterations and bump @dimforge/rapier3d-compat
N/A BREAKING CHANGE: remove `numAdditionalFrictionIterations` input due to Rapier library dropping the property altogether
1 parent 5920c4e commit f3b6f81

File tree

5 files changed

+7
-19
lines changed

5 files changed

+7
-19
lines changed

libs/rapier/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"peerDependencies": {
2626
"@angular/common": ">=20.0.0 <21.0.0",
2727
"@angular/core": ">=20.0.0 <21.0.0",
28-
"@dimforge/rapier3d-compat": ">=0.14.0 <0.19.0",
28+
"@dimforge/rapier3d-compat": ">=0.14.0 <0.20.0",
2929
"three": ">=0.157.0 <0.183.0",
3030
"three-stdlib": "^2.0.0"
3131
},

libs/rapier/src/lib/physics.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ const defaultOptions: NgtrPhysicsOptions = {
3535
gravity: [0, -9.81, 0],
3636
allowedLinearError: 0.001,
3737
numSolverIterations: 4,
38-
numAdditionalFrictionIterations: 4,
3938
numInternalPgsIterations: 1,
4039
predictionDistance: 0.002,
4140
minIslandSize: 128,
@@ -93,7 +92,6 @@ export class NgtrPhysics {
9392
protected updateLoop = pick(this.options, 'updateLoop');
9493

9594
private numSolverIterations = pick(this.options, 'numSolverIterations');
96-
private numAdditionalFrictionIterations = pick(this.options, 'numAdditionalFrictionIterations');
9795
private numInternalPgsIterations = pick(this.options, 'numInternalPgsIterations');
9896
private allowedLinearError = pick(this.options, 'allowedLinearError');
9997
private minIslandSize = pick(this.options, 'minIslandSize');
@@ -175,7 +173,6 @@ export class NgtrPhysics {
175173

176174
world.proxy.gravity = this.vGravity();
177175
world.proxy.integrationParameters.numSolverIterations = this.numSolverIterations();
178-
world.proxy.integrationParameters.numAdditionalFrictionIterations = this.numAdditionalFrictionIterations();
179176
world.proxy.integrationParameters.numInternalPgsIterations = this.numInternalPgsIterations();
180177
world.proxy.integrationParameters.normalizedAllowedLinearError = this.allowedLinearError();
181178
world.proxy.integrationParameters.minIslandSize = this.minIslandSize();

libs/rapier/src/lib/types.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,6 @@ export interface NgtrPhysicsOptions {
3838
*/
3939
numSolverIterations: number;
4040

41-
/**
42-
* Number of addition friction resolution iteration run during the last solver sub-step.
43-
* The greater this value is, the most realistic friction will be.
44-
* However a greater number of iterations is more computationally intensive.
45-
*
46-
* @defaultValue 4
47-
*/
48-
numAdditionalFrictionIterations: number;
49-
5041
/**
5142
* Number of internal Project Gauss Seidel (PGS) iterations run at each solver iteration.
5243
* Increasing this parameter will improve stability of the simulation. It will have a lesser effect than

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"@angular/platform-browser-dynamic": "21.0.6",
110110
"@angular/platform-server": "21.0.6",
111111
"@angular/router": "21.0.6",
112-
"@dimforge/rapier3d-compat": "^0.18.2",
112+
"@dimforge/rapier3d-compat": "^0.19.3",
113113
"@monogrid/gainmap-js": "^3.1.0",
114114
"@pmndrs/cannon-worker-api": "^2.4.0",
115115
"@pmndrs/vanilla": "^1.24.1",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)