@absolutejs/rapier3d 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,7 +12,10 @@ await RAPIER.init();
12
12
  world.solverContactPair(firstCollider, secondCollider, (manifold, flipped) => {
13
13
  for (let i = 0; i < manifold.numSolverContacts(); i++) {
14
14
  const point = manifold.solverContactPoint(i);
15
- const distance = manifold.solverContactDist(i);
15
+ const cachedDistance = manifold.solverContactDist(i);
16
+ const separation = manifold.solverContactSeparation(i);
17
+ const anchor1 = manifold.solverContactPoint1(i);
18
+ const anchor2 = manifold.solverContactPoint2(i);
16
19
  // Copy values here. The callback view expires when the callback returns.
17
20
  }
18
21
  });
@@ -55,3 +58,37 @@ queries and exception cleanup. Browser-worker validation is separate from native
55
58
  GPU performance testing; no GPU is required by the engine.
56
59
 
57
60
  This is a maintained AbsoluteJS distribution, not an official Dimforge release.
61
+
62
+ ## Live anchors and explicit clustering control (0.2)
63
+
64
+ `solverContactPoint1/2` return the native solver anchors transformed by current body
65
+ poses. `solverContactSeparation` projects their difference onto the stored world
66
+ solver normal. Negative means overlapping anchors; invalid indices return null.
67
+ Anchor values include contact skin and hook offsets, so they are not necessarily
68
+ points on the visible material surface. The normal is from the contact update;
69
+ this is not a new narrow-phase query or a continuous material penetration bound.
70
+ The old cached `solverContactDist` remains explicitly separate.
71
+
72
+ `world.integrationParameters.contactClustering` exposes the existing engine switch.
73
+ It defaults to true, exactly as upstream. Set it only between steps; disabling it
74
+ may increase solver workload and is not a general penetration fix. Snapshot restore
75
+ preserves the setting. The game is not instructed to turn it off by this release.
76
+
77
+ The independent every-step cube/cavity audit demonstrates the distinction: about
78
+ 0.459mm current penetration is visible in live anchors when the cached distance is
79
+ zero. Disabling clustering retains about 0.469mm peak penetration in that case.
80
+ Neither extra telemetry nor changing clustering is presented as a physics cure.
81
+
82
+ `minCcdDt` exposes the engine's minimum CCD substep duration in seconds. Its
83
+ upstream default stays `1/60/100`, even when the outer timestep is changed.
84
+ The setter rejects negative, non-finite and f32-overflowing values. Smaller values
85
+ can introduce instability; changing it is an explicit experiment, not an automatic
86
+ quality preset. Both controls are retained through native snapshot serialization.
87
+
88
+ ## Restored collider ownership (0.2.1)
89
+
90
+ Snapshot restoration now preserves `null` for an unowned collider's `parent()`.
91
+ Previously an absent native handle could be coerced to body zero during JavaScript
92
+ wrapper reconstruction. Real body-zero and fixed-body attachments remain intact.
93
+ This changes wrapper metadata only; native ownership, WASM and solver behavior are
94
+ unchanged. Repeated snapshot restoration and browser workers are regression tested.
@@ -12,7 +12,10 @@ await RAPIER.init();
12
12
  world.solverContactPair(firstCollider, secondCollider, (manifold, flipped) => {
13
13
  for (let i = 0; i < manifold.numSolverContacts(); i++) {
14
14
  const point = manifold.solverContactPoint(i);
15
- const distance = manifold.solverContactDist(i);
15
+ const cachedDistance = manifold.solverContactDist(i);
16
+ const separation = manifold.solverContactSeparation(i);
17
+ const anchor1 = manifold.solverContactPoint1(i);
18
+ const anchor2 = manifold.solverContactPoint2(i);
16
19
  // Copy values here. The callback view expires when the callback returns.
17
20
  }
18
21
  });
@@ -55,3 +58,37 @@ queries and exception cleanup. Browser-worker validation is separate from native
55
58
  GPU performance testing; no GPU is required by the engine.
56
59
 
57
60
  This is a maintained AbsoluteJS distribution, not an official Dimforge release.
61
+
62
+ ## Live anchors and explicit clustering control (0.2)
63
+
64
+ `solverContactPoint1/2` return the native solver anchors transformed by current body
65
+ poses. `solverContactSeparation` projects their difference onto the stored world
66
+ solver normal. Negative means overlapping anchors; invalid indices return null.
67
+ Anchor values include contact skin and hook offsets, so they are not necessarily
68
+ points on the visible material surface. The normal is from the contact update;
69
+ this is not a new narrow-phase query or a continuous material penetration bound.
70
+ The old cached `solverContactDist` remains explicitly separate.
71
+
72
+ `world.integrationParameters.contactClustering` exposes the existing engine switch.
73
+ It defaults to true, exactly as upstream. Set it only between steps; disabling it
74
+ may increase solver workload and is not a general penetration fix. Snapshot restore
75
+ preserves the setting. The game is not instructed to turn it off by this release.
76
+
77
+ The independent every-step cube/cavity audit demonstrates the distinction: about
78
+ 0.459mm current penetration is visible in live anchors when the cached distance is
79
+ zero. Disabling clustering retains about 0.469mm peak penetration in that case.
80
+ Neither extra telemetry nor changing clustering is presented as a physics cure.
81
+
82
+ `minCcdDt` exposes the engine's minimum CCD substep duration in seconds. Its
83
+ upstream default stays `1/60/100`, even when the outer timestep is changed.
84
+ The setter rejects negative, non-finite and f32-overflowing values. Smaller values
85
+ can introduce instability; changing it is an explicit experiment, not an automatic
86
+ quality preset. Both controls are retained through native snapshot serialization.
87
+
88
+ ## Restored collider ownership (0.2.1)
89
+
90
+ Snapshot restoration now preserves `null` for an unowned collider's `parent()`.
91
+ Previously an absent native handle could be coerced to body zero during JavaScript
92
+ wrapper reconstruction. Real body-zero and fixed-body attachments remain intact.
93
+ This changes wrapper metadata only; native ownership, WASM and solver behavior are
94
+ unchanged. Repeated snapshot restoration and browser workers are regression tested.
@@ -3,8 +3,8 @@
3
3
  "engine": "0.36.0",
4
4
  "bindings": "0.21.0",
5
5
  "bindgen": "0.2.129",
6
- "wasmSha256": "2b2be5df0023f15b0dfc54629019f8e370365b90d8669be98fd67cc49230a5d5",
7
- "wasmBytes": 3295710,
6
+ "wasmSha256": "91d68ed4f46fa1febbaf82abb7e8018150a3ad982560381df700e009997e6721",
7
+ "wasmBytes": 3297510,
8
8
  "solverChanges": false,
9
- "addition": "Separate clustered solverContactPair query"
9
+ "addition": "Live solver anchors, explicit diagnostic controls, and correct restored collider ownership"
10
10
  }