Skip to content

API Type PhysicsBackendRegistration

github-actions[bot] edited this page Nov 30, 2026 · 3 revisions

Type Alias: PhysicsBackendRegistration

type PhysicsBackendRegistration = 
  | {
  dimension: "2d";
  id: string;
  title?: string;
  load(): Promise<PhysicsBackend2D>;
  prefetch?(): Promise<unknown>;
}
  | {
  dimension: "3d";
  id: string;
  title?: string;
  load(): Promise<PhysicsBackend3D>;
  prefetch?(): Promise<unknown>;
};

Defined in: src/plugins/physics/runtime/backend.ts:377

A backend a plugin contributes. load is a dynamic import, so the backend (and its WebAssembly) loads only when a World needs it. prefetch, if given, fetches that code without starting it (the editor calls it once idle, ADR 0146).

Clone this wiki locally