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

Trait

Trait<S> = StoreTrait<S>

A trait: a kind of data an entity or the world holds, made with defineTrait or the engine’s trait. It is the store’s own trait alone: a trait declared predicted is a PredictedTrait and an engine trait a CoreTrait, which a read such as readTrait takes beside it. As koota’s Trait.

Type Parameter Default type
S extends Schema any