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

InputTrait

const InputTrait: LocalTrait<Trait<{ angles: () => number[]; axes: () => number[]; buttons: number; changes: () => number[]; vectors: () => number[]; }>>

What the player last sent the character, a step’s input: the inputs the game declares, the character’s move, heading and jump among them where it lists characters(). Each character holds its own, so a room steps every player’s at once. Kept by the room and the player’s own page, and streamed to nobody. What another page draws of it, the character’s strafe and aim, travels in its PoseTrait, and an input declared seenByAll in its SeenInputTrait.