Skip to content

@modoki/engine / index / registerProjection

Function: registerProjection() ​

registerProjection(name, store, syncFn, priority?): void

Register a projection. Runs syncFn at PROJECTION priority on the first frame after the store changes or the scene swaps (the syncFn should resolve its target entities lazily — they exist by the first post-swap frame).

Parameters ​

name ​

string

store ​

SubscribableStore

syncFn ​

(world) => void

priority? ​

number = SYSTEM_PRIORITY.PROJECTION

Returns ​

void

Built with Modoki.