Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

SystemHandles

SystemHandles<Input, Motion, Rules, Physics> = FlatSystemHandles<PhaseHandles<"input", Input> & PhaseHandles<"motion", Motion> & PhaseHandles<"rules", Rules> & PhaseHandles<"physics", Physics>> & string extends keyof Input | keyof Motion | keyof Rules | keyof Physics ? Readonly<Record<string, SystemHandle>> : unknown

A plugin’s handle per system, by key, each typed by its phase, its predicted and its runsOn. A phase whose record is built at run time adds a handle of any phase under any key, and leaves the other phases’ handles typed.

Type Parameter Default type
Input AnyPhaseShape
Motion AnyPhaseShape
Rules AnyPhaseShape
Physics AnyPhaseShape