@absolutejs/rapier3d 0.5.0 → 0.6.0
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 +98 -9
- package/absolutejs/README.md +50 -9
- package/dist/provenance.json +4 -4
- package/dist/rapier.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# AbsoluteJS Rapier 3D
|
|
2
2
|
|
|
3
|
-
A focused distribution of Rapier 0.21.0 / engine 0.36.0 with
|
|
4
|
-
|
|
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
|
|
5
5
|
clustered solver manifolds are distinct. The upstream JavaScript contact query
|
|
6
6
|
only exposes the former, which can have no solver-contact entries even when the
|
|
7
7
|
solver is resolving contact. This package exposes the latter separately.
|
|
@@ -29,21 +29,23 @@ Nested read-only solver queries are supported; callback exceptions release query
|
|
|
29
29
|
wrappers before propagating. Solver distances are the engine's cached contact
|
|
30
30
|
update distances, not a continuous or post-step exact penetration guarantee.
|
|
31
31
|
|
|
32
|
-
`contactPair` retains its existing geometric behavior.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
motion
|
|
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.
|
|
36
36
|
|
|
37
37
|
The ESM package includes WASM initialization and requires no separate asset URL.
|
|
38
|
-
Concurrent `init()` calls share initialization.
|
|
38
|
+
Concurrent `init()` calls share initialization. The package targets 3D f32
|
|
39
39
|
web/Node/Bun; it does not claim a 2D, f64, CommonJS or SIMD distribution.
|
|
40
40
|
|
|
41
41
|
## Build and provenance
|
|
42
42
|
|
|
43
43
|
Source base: dimforge/rapier commit
|
|
44
44
|
`b716d375efc0201003f0cd9ef7168eee0b62c177`. Upstream Apache-2.0 licensing is retained.
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
The distribution adds binding queries, package build/test tooling, and CCD profiler
|
|
46
|
+
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.
|
|
47
49
|
|
|
48
50
|
Use Bun 1.4.4+absolute.1, Rust 1.94.0 with `wasm32-unknown-unknown`, and Python 3.12.
|
|
49
51
|
Run `bun install --frozen-lockfile`, then `bash absolutejs/scripts/build-native.sh`.
|
|
@@ -52,6 +54,17 @@ wasm-bindgen 0.2.129 CLI archive is checksum verified before extraction. Caches
|
|
|
52
54
|
generated build output are reproducible; modified source and selected test
|
|
53
55
|
receipts are committed. `dist/provenance.json` records the resulting WASM hash.
|
|
54
56
|
|
|
57
|
+
API packaging verifies the post-bindgen native bytes against
|
|
58
|
+
`absolutejs/native-kernel.json` before writing the distribution. A shared Cargo
|
|
59
|
+
cache containing a research kernel therefore fails closed. Rebuild stable native
|
|
60
|
+
source after research builds. Do not update the qualification hash merely to make
|
|
61
|
+
a build pass: a changed kernel requires physical qualification and a recorded
|
|
62
|
+
release decision. API-only releases retain the qualified native hash.
|
|
63
|
+
See `absolutejs/research/native-build-guard/` for positive and negative controls.
|
|
64
|
+
|
|
65
|
+
The build copies this canonical documentation to the root README used by npm,
|
|
66
|
+
so published package documentation stays synchronized.
|
|
67
|
+
|
|
55
68
|
Run `bun test absolutejs/tests` after building. Tests compare the official pinned
|
|
56
69
|
release's motion against this build, exercise actual clustered contacts, nested
|
|
57
70
|
queries and exception cleanup. Browser-worker validation is separate from native
|
|
@@ -110,3 +123,79 @@ across all passes in a step. The TOI timer also accumulates instead of resetting
|
|
|
110
123
|
for every clamp pass. Both are recorded only with profiling enabled. The timing
|
|
111
124
|
fix leaves contact equations and trajectories unchanged; package tests compare
|
|
112
125
|
profiled/unprofiled poses and official upstream trajectories.
|
|
126
|
+
|
|
127
|
+
## Contact policy controls (0.4)
|
|
128
|
+
|
|
129
|
+
The following existing native settings are now exposed through
|
|
130
|
+
`world.integrationParameters`. Defaults and solver algorithms are unchanged.
|
|
131
|
+
|
|
132
|
+
| Property | Default | Meaning |
|
|
133
|
+
| --- | --- | --- |
|
|
134
|
+
| `contactRecycling` | `true` | Reuse contact manifolds while relative poses stay within the native reuse bounds. |
|
|
135
|
+
| `normalizedContactRecycleDistance` | `0.05` | Relative-pose drift bound, multiplied by `lengthUnit`; zero prevents recycling. |
|
|
136
|
+
| `warmstartCoefficient` | `1` | Fraction of cached impulses reused by the solver, from zero to one. |
|
|
137
|
+
|
|
138
|
+
Change settings between simulation steps. The boolean setter rejects coercible
|
|
139
|
+
non-booleans; numeric setters reject non-finite/out-of-range input, including f32
|
|
140
|
+
overflow for the distance. Native snapshots preserve all three settings.
|
|
141
|
+
|
|
142
|
+
These controls support explicit diagnosis and application-specific qualification.
|
|
143
|
+
Disabling recycling increases contact-generation work and can change contact
|
|
144
|
+
features; disabling warm starting changes convergence. Neither is a general fix
|
|
145
|
+
for penetration. Evaluate the entire requested simulation horizon and geometric
|
|
146
|
+
intersections, alongside live/cached contact diagnostics. A process that exits
|
|
147
|
+
successfully after an early physical guard is not a completed physical test.
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
## Current-body shape contact queries (0.5.0)
|
|
151
|
+
|
|
152
|
+
```ts
|
|
153
|
+
const contact = firstCollider.contactColliderAtCurrentBodyPoses(secondCollider, 0);
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
This additive query composes each collider's local pose with its current parent
|
|
157
|
+
body pose. It observes direct body edits before the next world step without
|
|
158
|
+
propagating poses, stepping the simulation, or altering cached solver contacts.
|
|
159
|
+
Parentless colliders use their own world pose. The optional third argument reuses
|
|
160
|
+
a `ShapeContact` result. Prediction must be finite and nonnegative, in world units.
|
|
161
|
+
|
|
162
|
+
Use this for bounded explicit diagnostics, not every render/physics tick. It
|
|
163
|
+
allocates shape queries and returns a world-space native shape contact, not a
|
|
164
|
+
solver manifold, continuous sweep or authored-material overlap bound. Collision
|
|
165
|
+
filters, hooks and contact skin are not applied. Native unsupported shape pairs
|
|
166
|
+
can return null as well as separated pairs; null is not a general disjointness
|
|
167
|
+
proof. Existing `contactCollider` retains its stored-collider-pose semantics.
|
|
168
|
+
|
|
169
|
+
The distinction matters for rotating contacts: projecting current anchors onto a
|
|
170
|
+
stored normal can report no penetration while a fresh shape query finds overlap.
|
|
171
|
+
Both observations are useful, but answer different questions. Release 0.5.0 keeps
|
|
172
|
+
the 0.4.0 native kernel byte-for-byte unchanged; it does not include the private
|
|
173
|
+
relative-motion, EPA or clamp-graph solver experiments.
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
## Prescribed velocity-driven paths (0.6)
|
|
177
|
+
|
|
178
|
+
Velocity-driven kinematic bodies now evaluate their prescribed center-of-mass
|
|
179
|
+
translation and rotation from the start of each solver pass. This removes angular
|
|
180
|
+
phase error from repeatedly linearizing the prescribed rotation and limits
|
|
181
|
+
substep-dependent accumulation drift. Existing linear/angular speed caps still
|
|
182
|
+
apply. Dynamic bodies, position-driven endpoints, multibody integration and
|
|
183
|
+
soft-frame proxies retain their prior integration paths.
|
|
184
|
+
|
|
185
|
+
No API changes are required. This changes motion involving velocity-driven
|
|
186
|
+
kinematic bodies, including the contact response of bodies they touch. Floating
|
|
187
|
+
point rounding remains; this is not a general contact or continuous-collision
|
|
188
|
+
accuracy guarantee. Native qualification records, independent analytic path
|
|
189
|
+
controls, negative tests against 0.5.0, and bounded CPU observations are retained
|
|
190
|
+
in `absolutejs/research/kinematic-precision/`. The private tagged contact research
|
|
191
|
+
is excluded from this release.
|
|
192
|
+
|
|
193
|
+
Direct rotation evaluation adds CPU work for velocity-driven kinematic bodies.
|
|
194
|
+
Profile kinematic-heavy scenes; increasing solver subdivisions is not a free
|
|
195
|
+
accuracy improvement. The recorded CPU probes are not browser FPS guarantees.
|
|
196
|
+
|
|
197
|
+
Native builds use pinned Rust and wasm-bindgen versions and remap checkout/cache
|
|
198
|
+
paths to stable virtual prefixes before checking the qualified WASM checksum.
|
|
199
|
+
Custom compiler flags are preserved, but their output must still match the
|
|
200
|
+
qualified kernel. A checksum mismatch stops API packaging; it does not silently
|
|
201
|
+
adopt a different native solver.
|
package/absolutejs/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# AbsoluteJS Rapier 3D
|
|
2
2
|
|
|
3
|
-
A focused distribution of Rapier 0.21.0 / engine 0.36.0 with
|
|
4
|
-
|
|
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
|
|
5
5
|
clustered solver manifolds are distinct. The upstream JavaScript contact query
|
|
6
6
|
only exposes the former, which can have no solver-contact entries even when the
|
|
7
7
|
solver is resolving contact. This package exposes the latter separately.
|
|
@@ -29,21 +29,23 @@ Nested read-only solver queries are supported; callback exceptions release query
|
|
|
29
29
|
wrappers before propagating. Solver distances are the engine's cached contact
|
|
30
30
|
update distances, not a continuous or post-step exact penetration guarantee.
|
|
31
31
|
|
|
32
|
-
`contactPair` retains its existing geometric behavior.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
motion
|
|
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.
|
|
36
36
|
|
|
37
37
|
The ESM package includes WASM initialization and requires no separate asset URL.
|
|
38
|
-
Concurrent `init()` calls share initialization.
|
|
38
|
+
Concurrent `init()` calls share initialization. The package targets 3D f32
|
|
39
39
|
web/Node/Bun; it does not claim a 2D, f64, CommonJS or SIMD distribution.
|
|
40
40
|
|
|
41
41
|
## Build and provenance
|
|
42
42
|
|
|
43
43
|
Source base: dimforge/rapier commit
|
|
44
44
|
`b716d375efc0201003f0cd9ef7168eee0b62c177`. Upstream Apache-2.0 licensing is retained.
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
The distribution adds binding queries, package build/test tooling, and CCD profiler
|
|
46
|
+
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.
|
|
47
49
|
|
|
48
50
|
Use Bun 1.4.4+absolute.1, Rust 1.94.0 with `wasm32-unknown-unknown`, and Python 3.12.
|
|
49
51
|
Run `bun install --frozen-lockfile`, then `bash absolutejs/scripts/build-native.sh`.
|
|
@@ -52,6 +54,17 @@ wasm-bindgen 0.2.129 CLI archive is checksum verified before extraction. Caches
|
|
|
52
54
|
generated build output are reproducible; modified source and selected test
|
|
53
55
|
receipts are committed. `dist/provenance.json` records the resulting WASM hash.
|
|
54
56
|
|
|
57
|
+
API packaging verifies the post-bindgen native bytes against
|
|
58
|
+
`absolutejs/native-kernel.json` before writing the distribution. A shared Cargo
|
|
59
|
+
cache containing a research kernel therefore fails closed. Rebuild stable native
|
|
60
|
+
source after research builds. Do not update the qualification hash merely to make
|
|
61
|
+
a build pass: a changed kernel requires physical qualification and a recorded
|
|
62
|
+
release decision. API-only releases retain the qualified native hash.
|
|
63
|
+
See `absolutejs/research/native-build-guard/` for positive and negative controls.
|
|
64
|
+
|
|
65
|
+
The build copies this canonical documentation to the root README used by npm,
|
|
66
|
+
so published package documentation stays synchronized.
|
|
67
|
+
|
|
55
68
|
Run `bun test absolutejs/tests` after building. Tests compare the official pinned
|
|
56
69
|
release's motion against this build, exercise actual clustered contacts, nested
|
|
57
70
|
queries and exception cleanup. Browser-worker validation is separate from native
|
|
@@ -158,3 +171,31 @@ stored normal can report no penetration while a fresh shape query finds overlap.
|
|
|
158
171
|
Both observations are useful, but answer different questions. Release 0.5.0 keeps
|
|
159
172
|
the 0.4.0 native kernel byte-for-byte unchanged; it does not include the private
|
|
160
173
|
relative-motion, EPA or clamp-graph solver experiments.
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
## Prescribed velocity-driven paths (0.6)
|
|
177
|
+
|
|
178
|
+
Velocity-driven kinematic bodies now evaluate their prescribed center-of-mass
|
|
179
|
+
translation and rotation from the start of each solver pass. This removes angular
|
|
180
|
+
phase error from repeatedly linearizing the prescribed rotation and limits
|
|
181
|
+
substep-dependent accumulation drift. Existing linear/angular speed caps still
|
|
182
|
+
apply. Dynamic bodies, position-driven endpoints, multibody integration and
|
|
183
|
+
soft-frame proxies retain their prior integration paths.
|
|
184
|
+
|
|
185
|
+
No API changes are required. This changes motion involving velocity-driven
|
|
186
|
+
kinematic bodies, including the contact response of bodies they touch. Floating
|
|
187
|
+
point rounding remains; this is not a general contact or continuous-collision
|
|
188
|
+
accuracy guarantee. Native qualification records, independent analytic path
|
|
189
|
+
controls, negative tests against 0.5.0, and bounded CPU observations are retained
|
|
190
|
+
in `absolutejs/research/kinematic-precision/`. The private tagged contact research
|
|
191
|
+
is excluded from this release.
|
|
192
|
+
|
|
193
|
+
Direct rotation evaluation adds CPU work for velocity-driven kinematic bodies.
|
|
194
|
+
Profile kinematic-heavy scenes; increasing solver subdivisions is not a free
|
|
195
|
+
accuracy improvement. The recorded CPU probes are not browser FPS guarantees.
|
|
196
|
+
|
|
197
|
+
Native builds use pinned Rust and wasm-bindgen versions and remap checkout/cache
|
|
198
|
+
paths to stable virtual prefixes before checking the qualified WASM checksum.
|
|
199
|
+
Custom compiler flags are preserved, but their output must still match the
|
|
200
|
+
qualified kernel. A checksum mismatch stops API packaging; it does not silently
|
|
201
|
+
adopt a different native solver.
|
package/dist/provenance.json
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"engine": "0.36.0",
|
|
4
4
|
"bindings": "0.21.0",
|
|
5
5
|
"bindgen": "0.2.129",
|
|
6
|
-
"wasmSha256": "
|
|
7
|
-
"wasmBytes":
|
|
8
|
-
"solverChanges":
|
|
9
|
-
"addition": "
|
|
6
|
+
"wasmSha256": "17f66b696ecebb8180f8ab01fe1a4773c3565e4e56b3e7db74e51183590b06f4",
|
|
7
|
+
"wasmBytes": 3291678,
|
|
8
|
+
"solverChanges": true,
|
|
9
|
+
"addition": "Direct velocity-driven kinematic pose evaluation; current-body shape and solver-contact diagnostics"
|
|
10
10
|
}
|