@absolutejs/rapier3d 0.7.0 → 0.8.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
@@ -1,7 +1,8 @@
1
1
  # AbsoluteJS Rapier 3D
2
2
 
3
3
  A focused distribution of Rapier 0.21.0 / engine 0.36.0 with solver-contact
4
- diagnostics, current-body geometry queries, and accurate prescribed kinematics. The engine's original geometric manifolds and its
4
+ diagnostics, current-body geometry queries, accurate prescribed kinematics, and
5
+ corrected contact-witness and force-free rotation calculations. The engine's original geometric manifolds and its
5
6
  clustered solver manifolds are distinct. The upstream JavaScript contact query
6
7
  only exposes the former, which can have no solver-contact entries even when the
7
8
  solver is resolving contact. This package exposes the latter separately.
@@ -29,10 +30,18 @@ Nested read-only solver queries are supported; callback exceptions release query
29
30
  wrappers before propagating. Solver distances are the engine's cached contact
30
31
  update distances, not a continuous or post-step exact penetration guarantee.
31
32
 
32
- `contactPair` retains its existing geometric behavior. Version 0.6 improves
33
- velocity-driven kinematic integration as described below. Contact and CCD policy
34
- defaults are unchanged; this is not a general fix for physical overlap. Runtime
35
- motion still needs independent geometric and energy checks.
33
+ `contactPair` exposes geometric manifolds; `solverContactPair` exposes solver
34
+ manifolds. Version 0.6 improves velocity-driven kinematics. Version 0.8
35
+ corrects previous-simplex witness preservation and reduces force-free rotation
36
+ roundoff, as described below. Contact and CCD policy defaults remain unchanged.
37
+ Runtime motion still needs independent geometric and energy checks.
38
+
39
+ Version 0.8.1 refreshes articulated link velocities after final solver impulses
40
+ and uses the integrated link geometry for center-of-mass velocity offsets.
41
+ This fixes stale `linvel()`/`angvel()` state and inconsistent velocities on rotating
42
+ fixed assemblies. It does not change the restitution iteration budget or provide
43
+ a general energy-conservation guarantee for off-center articulated impacts.
44
+
36
45
 
37
46
  The ESM package includes WASM initialization and requires no separate asset URL.
38
47
  Concurrent `init()` calls share initialization. The package targets 3D f32
@@ -44,8 +53,9 @@ Source base: dimforge/rapier commit
44
53
  `b716d375efc0201003f0cd9ef7168eee0b62c177`. Upstream Apache-2.0 licensing is retained.
45
54
  The distribution adds binding queries, package build/test tooling, and CCD profiler
46
55
  timer wiring. Version 0.6 also evaluates velocity-driven kinematic poses directly
47
- from each solver-pass origin; contact equations and dynamic-body integration retain
48
- the pinned source implementation.
56
+ from each solver-pass origin. Version 0.8 additionally pins the corrected
57
+ Parry collision source and applies the gyroscopic momentum increment without
58
+ reconstructing the entire angular velocity through the inertia frame.
49
59
 
50
60
  Use Bun 1.4.4+absolute.1, Rust 1.94.0 with `wasm32-unknown-unknown`, and Python 3.12.
51
61
  Run `bun install --frozen-lockfile`, then `bash absolutejs/scripts/build-native.sh`.
@@ -65,9 +75,11 @@ See `absolutejs/research/native-build-guard/` for positive and negative controls
65
75
  The build copies this canonical documentation to the root README used by npm,
66
76
  so published package documentation stays synchronized.
67
77
 
68
- Run `bun test absolutejs/tests` after building. Tests compare the official pinned
69
- release's motion against this build, exercise actual clustered contacts, nested
70
- queries and exception cleanup. Browser-worker validation is separate from native
78
+ Run `bun test absolutejs/tests` after building. Tests compare queried and unqueried
79
+ worlds under the same kernel, exercise actual clustered contacts, nested queries,
80
+ exception cleanup, captured contact regressions and analytic rotation controls.
81
+ The independent upstream-motion probe records intentional trajectory differences;
82
+ exact old floating-point rounding is not a physical acceptance criterion. Browser-worker validation is separate from native
71
83
  GPU performance testing; no GPU is required by the engine.
72
84
 
73
85
  This is a maintained AbsoluteJS distribution, not an official Dimforge release.
@@ -216,3 +228,35 @@ export. Package and kernel releases can differ when an API-only upgrade reuses
216
228
  a qualified kernel. The lightweight subpath contains metadata only and works
217
229
  before `init()`. It reports the packaged kernel; supplying custom bytes to
218
230
  `init(input)` does not change that identity and must be recorded separately.
231
+
232
+
233
+ ## Contact witnesses and force-free rotation (0.8)
234
+
235
+ The collision dependency is pinned to `absolutejs/parry` revision
236
+ `dbd99a8dfce020da3698056471262435d56d3f69`, based on upstream 0.31.1.
237
+ Tetrahedron-to-face reduction now preserves support points needed by GJK's
238
+ previous-simplex calculation. Previously, an overwritten point could be combined
239
+ with its old barycentric weight, inventing a deep contact. A captured floor/hull
240
+ case reported -14.719921 cm despite separation; the corrected native replay
241
+ reports a small positive separation. Snapshot decoding and query read-only
242
+ behavior remain byte-exact. No contact tolerance, CCD default or game rejection
243
+ threshold is changed by this correction.
244
+
245
+ The rotation correction applies only the computed gyroscopic momentum increment.
246
+ Principal-axis and isotropic force-free bodies therefore avoid artificial spin-up
247
+ from repeatedly reconstructing the entire velocity through inertia and its inverse.
248
+ Genuine asymmetric precession remains active and is checked against a converged
249
+ double-precision Euler/RK4 reference.
250
+
251
+ In the recorded 336-case, 0.1-second free-spin matrix, worst relative energy error
252
+ falls from about 0.004033 to 0.000562. One tilted long-box control has about
253
+ 1.305 ppm more energy error. These measurements cover specific shapes, rates and
254
+ iteration budgets; they are not a universal energy-error bound, a performance
255
+ claim, or a substitute for coupled-contact acceptance. f32 conditioning and time
256
+ integration errors remain.
257
+
258
+ `buildInfo.collisionLibraryVersion` and `buildInfo.collisionSource` identify the
259
+ exact locked collision library alongside the native WASM hash. They are lightweight
260
+ serialized strings and require no WASM initialization. Packaging rejects ambiguous
261
+ multiple Parry source entries. Release qualification evidence and retained experiment
262
+ results are recorded in `absolutejs/research/simplex-gyro/`.
@@ -1,7 +1,8 @@
1
1
  # AbsoluteJS Rapier 3D
2
2
 
3
3
  A focused distribution of Rapier 0.21.0 / engine 0.36.0 with solver-contact
4
- diagnostics, current-body geometry queries, and accurate prescribed kinematics. The engine's original geometric manifolds and its
4
+ diagnostics, current-body geometry queries, accurate prescribed kinematics, and
5
+ corrected contact-witness and force-free rotation calculations. The engine's original geometric manifolds and its
5
6
  clustered solver manifolds are distinct. The upstream JavaScript contact query
6
7
  only exposes the former, which can have no solver-contact entries even when the
7
8
  solver is resolving contact. This package exposes the latter separately.
@@ -29,10 +30,18 @@ Nested read-only solver queries are supported; callback exceptions release query
29
30
  wrappers before propagating. Solver distances are the engine's cached contact
30
31
  update distances, not a continuous or post-step exact penetration guarantee.
31
32
 
32
- `contactPair` retains its existing geometric behavior. Version 0.6 improves
33
- velocity-driven kinematic integration as described below. Contact and CCD policy
34
- defaults are unchanged; this is not a general fix for physical overlap. Runtime
35
- motion still needs independent geometric and energy checks.
33
+ `contactPair` exposes geometric manifolds; `solverContactPair` exposes solver
34
+ manifolds. Version 0.6 improves velocity-driven kinematics. Version 0.8
35
+ corrects previous-simplex witness preservation and reduces force-free rotation
36
+ roundoff, as described below. Contact and CCD policy defaults remain unchanged.
37
+ Runtime motion still needs independent geometric and energy checks.
38
+
39
+ Version 0.8.1 refreshes articulated link velocities after final solver impulses
40
+ and uses the integrated link geometry for center-of-mass velocity offsets.
41
+ This fixes stale `linvel()`/`angvel()` state and inconsistent velocities on rotating
42
+ fixed assemblies. It does not change the restitution iteration budget or provide
43
+ a general energy-conservation guarantee for off-center articulated impacts.
44
+
36
45
 
37
46
  The ESM package includes WASM initialization and requires no separate asset URL.
38
47
  Concurrent `init()` calls share initialization. The package targets 3D f32
@@ -44,8 +53,9 @@ Source base: dimforge/rapier commit
44
53
  `b716d375efc0201003f0cd9ef7168eee0b62c177`. Upstream Apache-2.0 licensing is retained.
45
54
  The distribution adds binding queries, package build/test tooling, and CCD profiler
46
55
  timer wiring. Version 0.6 also evaluates velocity-driven kinematic poses directly
47
- from each solver-pass origin; contact equations and dynamic-body integration retain
48
- the pinned source implementation.
56
+ from each solver-pass origin. Version 0.8 additionally pins the corrected
57
+ Parry collision source and applies the gyroscopic momentum increment without
58
+ reconstructing the entire angular velocity through the inertia frame.
49
59
 
50
60
  Use Bun 1.4.4+absolute.1, Rust 1.94.0 with `wasm32-unknown-unknown`, and Python 3.12.
51
61
  Run `bun install --frozen-lockfile`, then `bash absolutejs/scripts/build-native.sh`.
@@ -65,9 +75,11 @@ See `absolutejs/research/native-build-guard/` for positive and negative controls
65
75
  The build copies this canonical documentation to the root README used by npm,
66
76
  so published package documentation stays synchronized.
67
77
 
68
- Run `bun test absolutejs/tests` after building. Tests compare the official pinned
69
- release's motion against this build, exercise actual clustered contacts, nested
70
- queries and exception cleanup. Browser-worker validation is separate from native
78
+ Run `bun test absolutejs/tests` after building. Tests compare queried and unqueried
79
+ worlds under the same kernel, exercise actual clustered contacts, nested queries,
80
+ exception cleanup, captured contact regressions and analytic rotation controls.
81
+ The independent upstream-motion probe records intentional trajectory differences;
82
+ exact old floating-point rounding is not a physical acceptance criterion. Browser-worker validation is separate from native
71
83
  GPU performance testing; no GPU is required by the engine.
72
84
 
73
85
  This is a maintained AbsoluteJS distribution, not an official Dimforge release.
@@ -216,3 +228,35 @@ export. Package and kernel releases can differ when an API-only upgrade reuses
216
228
  a qualified kernel. The lightweight subpath contains metadata only and works
217
229
  before `init()`. It reports the packaged kernel; supplying custom bytes to
218
230
  `init(input)` does not change that identity and must be recorded separately.
231
+
232
+
233
+ ## Contact witnesses and force-free rotation (0.8)
234
+
235
+ The collision dependency is pinned to `absolutejs/parry` revision
236
+ `dbd99a8dfce020da3698056471262435d56d3f69`, based on upstream 0.31.1.
237
+ Tetrahedron-to-face reduction now preserves support points needed by GJK's
238
+ previous-simplex calculation. Previously, an overwritten point could be combined
239
+ with its old barycentric weight, inventing a deep contact. A captured floor/hull
240
+ case reported -14.719921 cm despite separation; the corrected native replay
241
+ reports a small positive separation. Snapshot decoding and query read-only
242
+ behavior remain byte-exact. No contact tolerance, CCD default or game rejection
243
+ threshold is changed by this correction.
244
+
245
+ The rotation correction applies only the computed gyroscopic momentum increment.
246
+ Principal-axis and isotropic force-free bodies therefore avoid artificial spin-up
247
+ from repeatedly reconstructing the entire velocity through inertia and its inverse.
248
+ Genuine asymmetric precession remains active and is checked against a converged
249
+ double-precision Euler/RK4 reference.
250
+
251
+ In the recorded 336-case, 0.1-second free-spin matrix, worst relative energy error
252
+ falls from about 0.004033 to 0.000562. One tilted long-box control has about
253
+ 1.305 ppm more energy error. These measurements cover specific shapes, rates and
254
+ iteration budgets; they are not a universal energy-error bound, a performance
255
+ claim, or a substitute for coupled-contact acceptance. f32 conditioning and time
256
+ integration errors remain.
257
+
258
+ `buildInfo.collisionLibraryVersion` and `buildInfo.collisionSource` identify the
259
+ exact locked collision library alongside the native WASM hash. They are lightweight
260
+ serialized strings and require no WASM initialization. Packaging rejects ambiguous
261
+ multiple Parry source entries. Release qualification evidence and retained experiment
262
+ results are recorded in `absolutejs/research/simplex-gyro/`.
@@ -1 +1 @@
1
- var e=Object.freeze({schemaVersion:1,scope:"package",packageName:"@absolutejs/rapier3d",packageVersion:"0.7.0",qualifiedKernelRelease:"0.6.0",upstream:"b716d375efc0201003f0cd9ef7168eee0b62c177",engine:"0.36.0",bindings:"0.21.0",bindgen:"0.2.129",wasmSha256:"17f66b696ecebb8180f8ab01fe1a4773c3565e4e56b3e7db74e51183590b06f4",wasmBytes:3291678,solverChanges:!0});export{e as buildInfo};
1
+ var e=Object.freeze({schemaVersion:1,scope:"package",packageName:"@absolutejs/rapier3d",packageVersion:"0.8.1",qualifiedKernelRelease:"0.8.1",upstream:"b716d375efc0201003f0cd9ef7168eee0b62c177",engine:"0.36.0",collisionLibraryVersion:"0.31.1",collisionSource:"git+https://github.com/absolutejs/parry?rev=dbd99a8dfce020da3698056471262435d56d3f69#dbd99a8dfce020da3698056471262435d56d3f69",bindings:"0.21.0",bindgen:"0.2.129",wasmSha256:"3a9f1a21f01b4868952cd997cf9b47d83f3e4fdd714d42f43b3cdd57912d6303",wasmBytes:3293062,solverChanges:!0});export{e as buildInfo};
@@ -2,13 +2,15 @@
2
2
  "schemaVersion": 1,
3
3
  "scope": "package",
4
4
  "packageName": "@absolutejs/rapier3d",
5
- "packageVersion": "0.7.0",
6
- "qualifiedKernelRelease": "0.6.0",
5
+ "packageVersion": "0.8.1",
6
+ "qualifiedKernelRelease": "0.8.1",
7
7
  "upstream": "b716d375efc0201003f0cd9ef7168eee0b62c177",
8
8
  "engine": "0.36.0",
9
+ "collisionLibraryVersion": "0.31.1",
10
+ "collisionSource": "git+https://github.com/absolutejs/parry?rev=dbd99a8dfce020da3698056471262435d56d3f69#dbd99a8dfce020da3698056471262435d56d3f69",
9
11
  "bindings": "0.21.0",
10
12
  "bindgen": "0.2.129",
11
- "wasmSha256": "17f66b696ecebb8180f8ab01fe1a4773c3565e4e56b3e7db74e51183590b06f4",
12
- "wasmBytes": 3291678,
13
+ "wasmSha256": "3a9f1a21f01b4868952cd997cf9b47d83f3e4fdd714d42f43b3cdd57912d6303",
14
+ "wasmBytes": 3293062,
13
15
  "solverChanges": true
14
16
  }