@absolutejs/rapier3d 0.11.0 → 0.13.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 +72 -1
- package/absolutejs/README.md +72 -1
- package/dist/build-info.mjs +1 -1
- package/dist/provenance.json +5 -5
- package/dist/rapier.mjs +1 -1
- package/dist/types/pipeline/index.d.ts +1 -0
- package/dist/types/pipeline/step_profile.d.ts +65 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -232,7 +232,7 @@ before `init()`. It reports the packaged kernel; supplying custom bytes to
|
|
|
232
232
|
|
|
233
233
|
## Contact witnesses and force-free rotation (0.8)
|
|
234
234
|
|
|
235
|
-
|
|
235
|
+
Version 0.8 introduced the `absolutejs/parry` collision correction at revision
|
|
236
236
|
`dbd99a8dfce020da3698056471262435d56d3f69`, based on upstream 0.31.1.
|
|
237
237
|
Tetrahedron-to-face reduction now preserves support points needed by GJK's
|
|
238
238
|
previous-simplex calculation. Previously, an overwritten point could be combined
|
|
@@ -304,3 +304,74 @@ Residual fields are the maximum **terminal** projected normal-velocity error amo
|
|
|
304
304
|
The added diagnostics exactly preserve physical result records across 548 paired collision/free-motion cases versus 0.10.0. Profiler-on/off snapshot parity and CCD aggregation are also tested. In the 20/1/20 kg fixture, the counters reveal 164 compression passes and 256 restitution sweeps, with a terminal restitution residual near 2.15e-6 m/s. A tiny physical error can therefore coexist with an exhausted iteration budget. Treat that as useful evidence, not as zero or automatic failure of the simulation.
|
|
305
305
|
|
|
306
306
|
Unprofiled paired median costs at 1/8/32 islands were 0.65/2.49/7.09 ms versus 0.66/2.45/7.28 ms for 0.10.0 in the qualification run. These host-specific small samples do not establish a speedup or frame-rate guarantee. Query allocation occurs only when the caller requests observations.
|
|
307
|
+
|
|
308
|
+
## Bounded managed-step profiling
|
|
309
|
+
|
|
310
|
+
`createPhysicsStepProfiler(world, options)` borrows an initialized world. Call
|
|
311
|
+
`profiler.step(eventQueue?, hooks?)` wherever you would explicitly call
|
|
312
|
+
`world.step()`, then `profiler.snapshot()` to obtain an owned report. It creates no
|
|
313
|
+
render loop, listeners, transport, or ownership of the world/event queue. This is
|
|
314
|
+
suitable for workers and offline jobs as well as application-managed stepping.
|
|
315
|
+
|
|
316
|
+
```ts
|
|
317
|
+
const profiler = RAPIER.createPhysicsStepProfiler(world, {
|
|
318
|
+
sampleEvery: 32,
|
|
319
|
+
sampleStartStep: 0,
|
|
320
|
+
maxSamples: 16,
|
|
321
|
+
});
|
|
322
|
+
for (let step = 0; step < 960; step++) profiler.step();
|
|
323
|
+
const report = { engine: RAPIER.buildInfo, physics: profiler.snapshot() };
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
Every managed call records wall time spent inside `World.step`. Selected calls
|
|
327
|
+
also capture native phase timings, CCD substeps, convergence counters and world
|
|
328
|
+
units/settings. Native timings are nested: do not add solver, assembly,
|
|
329
|
+
resolution and CCD durations together. Native samples are observations of those
|
|
330
|
+
selected calls, not estimates of unsampled solver work. The summary wall-time
|
|
331
|
+
sum excludes profiler setup, native capture and report construction; it is not
|
|
332
|
+
whole-job time or an FPS measurement.
|
|
333
|
+
|
|
334
|
+
The default cadence and capacity are both 32. Sampling stops when capacity is
|
|
335
|
+
reached; `samplesOmittedForBudget` counts later eligible calls. Use
|
|
336
|
+
`sampleStartStep` to inspect a later window. Capacity is bounded to 256; zero
|
|
337
|
+
keeps wall-time accounting without enabling native profiling. A failed selected
|
|
338
|
+
call consumes a slot. There is no unbounded event queue or per-body duplication.
|
|
339
|
+
|
|
340
|
+
Each selected call restores the previous native profiler setting, including when
|
|
341
|
+
stepping throws. Unselected calls leave it alone. If profiling was already on,
|
|
342
|
+
the caller retains fresh native observations; otherwise turning it back off
|
|
343
|
+
invalidates native live queries, but the owned captured sample remains readable.
|
|
344
|
+
Original step exceptions (including non-Error values) propagate unchanged.
|
|
345
|
+
Clock and native-capture failures are counted instead of stopping a successful
|
|
346
|
+
physical step; missing/invalid observations are null, never invented zero times.
|
|
347
|
+
A custom `now` must return monotonic milliseconds and have no side effects.
|
|
348
|
+
Reports remain usable after freeing the borrowed world. Always attach the actual
|
|
349
|
+
build identity when storing or sending a report through your existing diagnostics
|
|
350
|
+
system. Sampling has a cost: use explicit application policy and measure it.
|
|
351
|
+
|
|
352
|
+
The sampler was introduced in 0.12.0 without changing the 0.11.0 native kernel.
|
|
353
|
+
Sampling itself does not change solver thresholds, contact policies or physical
|
|
354
|
+
state serialization. Later native revisions remain identified by buildInfo.
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
## Compound inertia reconstruction (0.13)
|
|
358
|
+
|
|
359
|
+
The collision dependency now pins `absolutejs/parry` revision
|
|
360
|
+
`c566aabd77be8ac7a427c2b704860c47e34657b9`. Mass-property aggregation uses a
|
|
361
|
+
scale-normalized, bounded Jacobi decomposition with double-precision workspace.
|
|
362
|
+
It corrects principal frames for small tensors and repeated or nearly repeated
|
|
363
|
+
moments. Public f32 types, mass, COM and nonnegative principal-moment policy are
|
|
364
|
+
unchanged; compound mass properties and resulting motion can change when the
|
|
365
|
+
previous decomposition was inaccurate. No JavaScript API is added.
|
|
366
|
+
|
|
367
|
+
The focused native suite covers 2,688 tensor/aggregation cases in f32 and f64.
|
|
368
|
+
The package tests also reconstruct two- and three-collider physical tensors
|
|
369
|
+
across scale, orientation and insertion order. The small-object baseline could
|
|
370
|
+
exceed 50% relative tensor error; this is a reproduced fixture, not an estimate
|
|
371
|
+
of error across all objects. Angular integration and articulated COM-transport
|
|
372
|
+
limitations are separate and remain under investigation.
|
|
373
|
+
|
|
374
|
+
This calculation runs when mass properties are recomputed. It is not a render
|
|
375
|
+
optimization: recompute after geometry/mass changes, not unnecessarily every
|
|
376
|
+
frame. Qualification records, measured cost and limits are retained under
|
|
377
|
+
`absolutejs/research/inertia-reconstruction/`.
|
package/absolutejs/README.md
CHANGED
|
@@ -232,7 +232,7 @@ before `init()`. It reports the packaged kernel; supplying custom bytes to
|
|
|
232
232
|
|
|
233
233
|
## Contact witnesses and force-free rotation (0.8)
|
|
234
234
|
|
|
235
|
-
|
|
235
|
+
Version 0.8 introduced the `absolutejs/parry` collision correction at revision
|
|
236
236
|
`dbd99a8dfce020da3698056471262435d56d3f69`, based on upstream 0.31.1.
|
|
237
237
|
Tetrahedron-to-face reduction now preserves support points needed by GJK's
|
|
238
238
|
previous-simplex calculation. Previously, an overwritten point could be combined
|
|
@@ -304,3 +304,74 @@ Residual fields are the maximum **terminal** projected normal-velocity error amo
|
|
|
304
304
|
The added diagnostics exactly preserve physical result records across 548 paired collision/free-motion cases versus 0.10.0. Profiler-on/off snapshot parity and CCD aggregation are also tested. In the 20/1/20 kg fixture, the counters reveal 164 compression passes and 256 restitution sweeps, with a terminal restitution residual near 2.15e-6 m/s. A tiny physical error can therefore coexist with an exhausted iteration budget. Treat that as useful evidence, not as zero or automatic failure of the simulation.
|
|
305
305
|
|
|
306
306
|
Unprofiled paired median costs at 1/8/32 islands were 0.65/2.49/7.09 ms versus 0.66/2.45/7.28 ms for 0.10.0 in the qualification run. These host-specific small samples do not establish a speedup or frame-rate guarantee. Query allocation occurs only when the caller requests observations.
|
|
307
|
+
|
|
308
|
+
## Bounded managed-step profiling
|
|
309
|
+
|
|
310
|
+
`createPhysicsStepProfiler(world, options)` borrows an initialized world. Call
|
|
311
|
+
`profiler.step(eventQueue?, hooks?)` wherever you would explicitly call
|
|
312
|
+
`world.step()`, then `profiler.snapshot()` to obtain an owned report. It creates no
|
|
313
|
+
render loop, listeners, transport, or ownership of the world/event queue. This is
|
|
314
|
+
suitable for workers and offline jobs as well as application-managed stepping.
|
|
315
|
+
|
|
316
|
+
```ts
|
|
317
|
+
const profiler = RAPIER.createPhysicsStepProfiler(world, {
|
|
318
|
+
sampleEvery: 32,
|
|
319
|
+
sampleStartStep: 0,
|
|
320
|
+
maxSamples: 16,
|
|
321
|
+
});
|
|
322
|
+
for (let step = 0; step < 960; step++) profiler.step();
|
|
323
|
+
const report = { engine: RAPIER.buildInfo, physics: profiler.snapshot() };
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
Every managed call records wall time spent inside `World.step`. Selected calls
|
|
327
|
+
also capture native phase timings, CCD substeps, convergence counters and world
|
|
328
|
+
units/settings. Native timings are nested: do not add solver, assembly,
|
|
329
|
+
resolution and CCD durations together. Native samples are observations of those
|
|
330
|
+
selected calls, not estimates of unsampled solver work. The summary wall-time
|
|
331
|
+
sum excludes profiler setup, native capture and report construction; it is not
|
|
332
|
+
whole-job time or an FPS measurement.
|
|
333
|
+
|
|
334
|
+
The default cadence and capacity are both 32. Sampling stops when capacity is
|
|
335
|
+
reached; `samplesOmittedForBudget` counts later eligible calls. Use
|
|
336
|
+
`sampleStartStep` to inspect a later window. Capacity is bounded to 256; zero
|
|
337
|
+
keeps wall-time accounting without enabling native profiling. A failed selected
|
|
338
|
+
call consumes a slot. There is no unbounded event queue or per-body duplication.
|
|
339
|
+
|
|
340
|
+
Each selected call restores the previous native profiler setting, including when
|
|
341
|
+
stepping throws. Unselected calls leave it alone. If profiling was already on,
|
|
342
|
+
the caller retains fresh native observations; otherwise turning it back off
|
|
343
|
+
invalidates native live queries, but the owned captured sample remains readable.
|
|
344
|
+
Original step exceptions (including non-Error values) propagate unchanged.
|
|
345
|
+
Clock and native-capture failures are counted instead of stopping a successful
|
|
346
|
+
physical step; missing/invalid observations are null, never invented zero times.
|
|
347
|
+
A custom `now` must return monotonic milliseconds and have no side effects.
|
|
348
|
+
Reports remain usable after freeing the borrowed world. Always attach the actual
|
|
349
|
+
build identity when storing or sending a report through your existing diagnostics
|
|
350
|
+
system. Sampling has a cost: use explicit application policy and measure it.
|
|
351
|
+
|
|
352
|
+
The sampler was introduced in 0.12.0 without changing the 0.11.0 native kernel.
|
|
353
|
+
Sampling itself does not change solver thresholds, contact policies or physical
|
|
354
|
+
state serialization. Later native revisions remain identified by buildInfo.
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
## Compound inertia reconstruction (0.13)
|
|
358
|
+
|
|
359
|
+
The collision dependency now pins `absolutejs/parry` revision
|
|
360
|
+
`c566aabd77be8ac7a427c2b704860c47e34657b9`. Mass-property aggregation uses a
|
|
361
|
+
scale-normalized, bounded Jacobi decomposition with double-precision workspace.
|
|
362
|
+
It corrects principal frames for small tensors and repeated or nearly repeated
|
|
363
|
+
moments. Public f32 types, mass, COM and nonnegative principal-moment policy are
|
|
364
|
+
unchanged; compound mass properties and resulting motion can change when the
|
|
365
|
+
previous decomposition was inaccurate. No JavaScript API is added.
|
|
366
|
+
|
|
367
|
+
The focused native suite covers 2,688 tensor/aggregation cases in f32 and f64.
|
|
368
|
+
The package tests also reconstruct two- and three-collider physical tensors
|
|
369
|
+
across scale, orientation and insertion order. The small-object baseline could
|
|
370
|
+
exceed 50% relative tensor error; this is a reproduced fixture, not an estimate
|
|
371
|
+
of error across all objects. Angular integration and articulated COM-transport
|
|
372
|
+
limitations are separate and remain under investigation.
|
|
373
|
+
|
|
374
|
+
This calculation runs when mass properties are recomputed. It is not a render
|
|
375
|
+
optimization: recompute after geometry/mass changes, not unnecessarily every
|
|
376
|
+
frame. Qualification records, measured cost and limits are retained under
|
|
377
|
+
`absolutejs/research/inertia-reconstruction/`.
|
package/dist/build-info.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=Object.freeze({schemaVersion:1,scope:"package",packageName:"@absolutejs/rapier3d",packageVersion:"0.
|
|
1
|
+
var e=Object.freeze({schemaVersion:1,scope:"package",packageName:"@absolutejs/rapier3d",packageVersion:"0.13.0",qualifiedKernelRelease:"0.13.0",upstream:"b716d375efc0201003f0cd9ef7168eee0b62c177",engine:"0.36.0",collisionLibraryVersion:"0.31.1",collisionSource:"git+https://github.com/absolutejs/parry?rev=c566aabd77be8ac7a427c2b704860c47e34657b9#c566aabd77be8ac7a427c2b704860c47e34657b9",bindings:"0.21.0",bindgen:"0.2.129",wasmSha256:"a6f06627b5b95ff15b87fbe45bf8dfd19eeb78b4f949a912e3fed5805fbcc62b",wasmBytes:3298974,solverChanges:!0});export{e as buildInfo};
|
package/dist/provenance.json
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"scope": "package",
|
|
4
4
|
"packageName": "@absolutejs/rapier3d",
|
|
5
|
-
"packageVersion": "0.
|
|
6
|
-
"qualifiedKernelRelease": "0.
|
|
5
|
+
"packageVersion": "0.13.0",
|
|
6
|
+
"qualifiedKernelRelease": "0.13.0",
|
|
7
7
|
"upstream": "b716d375efc0201003f0cd9ef7168eee0b62c177",
|
|
8
8
|
"engine": "0.36.0",
|
|
9
9
|
"collisionLibraryVersion": "0.31.1",
|
|
10
|
-
"collisionSource": "git+https://github.com/absolutejs/parry?rev=
|
|
10
|
+
"collisionSource": "git+https://github.com/absolutejs/parry?rev=c566aabd77be8ac7a427c2b704860c47e34657b9#c566aabd77be8ac7a427c2b704860c47e34657b9",
|
|
11
11
|
"bindings": "0.21.0",
|
|
12
12
|
"bindgen": "0.2.129",
|
|
13
|
-
"wasmSha256": "
|
|
14
|
-
"wasmBytes":
|
|
13
|
+
"wasmSha256": "a6f06627b5b95ff15b87fbe45bf8dfd19eeb78b4f949a912e3fed5805fbcc62b",
|
|
14
|
+
"wasmBytes": 3298974,
|
|
15
15
|
"solverChanges": true
|
|
16
16
|
}
|