Documentation
    Preparing search index...

    Function solverStatistics

    • Counts SolverStatistics in one pass per collection, from §113's DebugBodyAccess — which every PhysicsSolverAdapter satisfies structurally, so world.adapter is what you pass.

      recordSolverStatistics(app.stats, solverStatistics(world.adapter, record));
      

      out follows §7b's out-parameter convention: pass a record to reuse and this allocates nothing; omit it and one plain object is allocated (a record, not a math type — the constructionCount() allocation tests do not see it).

      Why it lives here and not in debug-draw.ts, where it shipped until 2026-08-08 (A-6): that module allocates module-level scratch math objects and freezes its staged-feature list, so a bundler keeps the whole file the moment anything in it is named — 939 B gzip, measured on examples/ui-demo, for a frame loop that wanted one integer. four's Application reports §84's activeBodies from here every frame that asks for statistics; a debug overlay is a different and much rarer thing to be paying for. The seam types stay in debug-draw.ts — a type costs nothing to import.

      Type Parameters

      • THandle
      • TColliderHandle

      Parameters

      Returns SolverStatistics