@absolutejs/rapier3d 0.10.0 → 0.11.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.
@@ -10,6 +10,22 @@ import { PhysicsHooks } from "./physics_hooks";
10
10
  import { DebugRenderBuffers, DebugRenderPipeline } from "./debug_render_pipeline";
11
11
  import { KinematicCharacterController, PidAxesMask, PidController } from "../control";
12
12
  import { DynamicRayCastVehicleController } from "../control";
13
+ /** Last profiled step's restricted adaptive contact solves, including CCD passes.
14
+ * Counts describe solve groups/phases, not individual contacts or physical islands.
15
+ * Residuals are projected normal velocity errors in world units per second.
16
+ */
17
+ export interface ContactConvergenceStats {
18
+ compressionSolves: number;
19
+ compressionIterations: number;
20
+ compressionLimitHits: number;
21
+ /** Maximum terminal residual across eligible compression phases. */
22
+ maxCompressionResidual: number;
23
+ restitutionSolves: number;
24
+ restitutionIterations: number;
25
+ restitutionLimitHits: number;
26
+ /** Maximum terminal residual across eligible restitution phases. */
27
+ maxRestitutionResidual: number;
28
+ }
13
29
  /**
14
30
  * The physics world.
15
31
  *
@@ -568,6 +584,13 @@ export declare class World {
568
584
  * This count does not expose internal substep durations or time of impact.
569
585
  */
570
586
  ccdSubsteps(): number | null;
587
+ /** Owned observations from the last completed profiled step; null before
588
+ * that step, after toggling profiling, when disabled, or after restoration.
589
+ * Zero solves means no eligible adaptive path, not proof of convergence.
590
+ * A limit hit means the phase exhausted its budget above tolerance.
591
+ * Reading or modifying the returned object does not affect simulation.
592
+ */
593
+ contactConvergence(): ContactConvergenceStats | null;
571
594
  /**
572
595
  * The time spent in milliseconds by the last step to run the entire simulation step.
573
596
  *
@@ -895,6 +895,7 @@ export class RawPhysicsPipeline {
895
895
  free(): void;
896
896
  [Symbol.dispose](): void;
897
897
  ccd_substeps(): number | undefined;
898
+ contact_convergence(): Float64Array | undefined;
898
899
  is_profiler_enabled(): boolean;
899
900
  constructor();
900
901
  set_profiler_enabled(enabled: boolean): void;
@@ -2402,6 +2403,7 @@ export interface InitOutput {
2402
2403
  readonly rawnarrowphase_intersection_pairs_with: (a: number, b: number, c: number) => void;
2403
2404
  readonly rawnarrowphase_new: () => number;
2404
2405
  readonly rawphysicspipeline_ccd_substeps: (a: number) => number;
2406
+ readonly rawphysicspipeline_contact_convergence: (a: number, b: number) => void;
2405
2407
  readonly rawphysicspipeline_is_profiler_enabled: (a: number) => number;
2406
2408
  readonly rawphysicspipeline_new: () => number;
2407
2409
  readonly rawphysicspipeline_set_profiler_enabled: (a: number, b: number) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/rapier3d",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Rapier 3D with corrected contact witnesses, rotation precision and solver diagnostics",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",