@absolutejs/rapier3d 0.13.0 → 0.14.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 +46 -0
- package/absolutejs/README.md +46 -0
- package/dist/build-info.mjs +1 -1
- package/dist/provenance.json +4 -4
- package/dist/rapier.mjs +1 -1
- package/dist/types/pipeline/step_profile.d.ts +2 -1
- package/dist/types/pipeline/world.d.ts +20 -0
- package/dist/types/rapier_wasm3d.d.ts +2 -0
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { World, ContactConvergenceStats } from "./world";
|
|
1
|
+
import type { World, ContactConvergenceStats, FreeRotationStats } from "./world";
|
|
2
2
|
import type { EventQueue } from "./event_queue";
|
|
3
3
|
import type { PhysicsHooks } from "./physics_hooks";
|
|
4
4
|
export interface PhysicsStepSample {
|
|
@@ -22,6 +22,7 @@ export interface PhysicsStepSample {
|
|
|
22
22
|
ccdMs: number;
|
|
23
23
|
};
|
|
24
24
|
convergence: ContactConvergenceStats;
|
|
25
|
+
freeRotation: FreeRotationStats;
|
|
25
26
|
} | null;
|
|
26
27
|
}
|
|
27
28
|
export interface PhysicsStepProfile {
|
|
@@ -26,6 +26,20 @@ export interface ContactConvergenceStats {
|
|
|
26
26
|
/** Maximum terminal residual across eligible restitution phases. */
|
|
27
27
|
maxRestitutionResidual: number;
|
|
28
28
|
}
|
|
29
|
+
/** Observations of isolated free-body rotation during a completed profiled step.
|
|
30
|
+
* Counts include solver substeps and CCD passes. Zero accepted steps means no
|
|
31
|
+
* admitted solve, not proof of conservation. Rejections use the existing solver
|
|
32
|
+
* path for the rest of that island solve; constrained bodies are not attempted.
|
|
33
|
+
*/
|
|
34
|
+
export interface FreeRotationStats {
|
|
35
|
+
acceptedSteps: number;
|
|
36
|
+
nonphysicalInertiaRejections: number;
|
|
37
|
+
rotationLimitRejections: number;
|
|
38
|
+
invalidOrFailedSolves: number;
|
|
39
|
+
maxNewtonIterations: number;
|
|
40
|
+
/** Maximum accepted angular-velocity equation residual in radians/second. */
|
|
41
|
+
maxResidualRadiansPerSecond: number;
|
|
42
|
+
}
|
|
29
43
|
/**
|
|
30
44
|
* The physics world.
|
|
31
45
|
*
|
|
@@ -584,6 +598,12 @@ export declare class World {
|
|
|
584
598
|
* This count does not expose internal substep durations or time of impact.
|
|
585
599
|
*/
|
|
586
600
|
ccdSubsteps(): number | null;
|
|
601
|
+
/** Owned isolated-body rotation observations from the last completed profiled
|
|
602
|
+
* step; null before that step, after toggling profiling, when disabled, or
|
|
603
|
+
* after restoration. Zero accepted steps does not establish conservation.
|
|
604
|
+
* Reading or modifying the result never changes simulation.
|
|
605
|
+
*/
|
|
606
|
+
freeRotationStats(): FreeRotationStats | null;
|
|
587
607
|
/** Owned observations from the last completed profiled step; null before
|
|
588
608
|
* that step, after toggling profiling, when disabled, or after restoration.
|
|
589
609
|
* Zero solves means no eligible adaptive path, not proof of convergence.
|
|
@@ -896,6 +896,7 @@ export class RawPhysicsPipeline {
|
|
|
896
896
|
[Symbol.dispose](): void;
|
|
897
897
|
ccd_substeps(): number | undefined;
|
|
898
898
|
contact_convergence(): Float64Array | undefined;
|
|
899
|
+
free_rotation_candidate(): Float64Array | undefined;
|
|
899
900
|
is_profiler_enabled(): boolean;
|
|
900
901
|
constructor();
|
|
901
902
|
set_profiler_enabled(enabled: boolean): void;
|
|
@@ -2404,6 +2405,7 @@ export interface InitOutput {
|
|
|
2404
2405
|
readonly rawnarrowphase_new: () => number;
|
|
2405
2406
|
readonly rawphysicspipeline_ccd_substeps: (a: number) => number;
|
|
2406
2407
|
readonly rawphysicspipeline_contact_convergence: (a: number, b: number) => void;
|
|
2408
|
+
readonly rawphysicspipeline_free_rotation_candidate: (a: number, b: number) => void;
|
|
2407
2409
|
readonly rawphysicspipeline_is_profiler_enabled: (a: number) => number;
|
|
2408
2410
|
readonly rawphysicspipeline_new: () => number;
|
|
2409
2411
|
readonly rawphysicspipeline_set_profiler_enabled: (a: number, b: number) => void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@absolutejs/rapier3d",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Rapier 3D with corrected contact witnesses
|
|
3
|
+
"version": "0.14.1",
|
|
4
|
+
"description": "Rapier 3D with matched free-body rotation, corrected contact witnesses and solver diagnostics",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|