API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classSystemRegistry
Phase-dispatching registry of Systems, shared by `Scene` (as `scene.systems`) and `Application` (as `app.systems`). Each system participates only in the scheduler phases it implements (`preFrame`/`fixedUpdate`/`update`/`draw`); within a phase, systems run in ascending `order` (ties keep registration order) and are destroyed in reverse registration order when the registry is destroyed. SystemRegistrationOptions.before/SystemRegistrationOptions.after layer a dependency graph on top of `order`, additive rather than a replacement: `order`/registration sequence still decide ties among registrations the graph doesn't relate to each other. A `before`/`after` reference to a system outside the current phase - a different phase, or never registered - is silently a no-op there, not an error. A cycle throws once the affected phase list is next sorted. Structural mutations are frame-scoped: a system added during a frame - whether from outside or from another system's own callback - does not participate in any phase until the *next* frame, in any phase. Removing a system during a callback marks it inactive immediately, so it is skipped by every later phase and every later fixed step in the *same* frame; the structural delete and the single SystemRegistry.onRemove dispatch are finalized at the frame boundary, or at once if the same system is added again before that boundary. Outside a frame - before the first SystemRegistry._beginFrame or after its matching SystemRegistry._endFrame - `add()`/`remove()` apply immediately.
import { SystemRegistry } from '@codexo/exojs'Phase-dispatching registry of Systems, shared by `Scene` (as `scene.systems`) and `Application` (as `app.systems`). Each system participates only in the scheduler phases it implements (`preFrame`/`fixedUpdate`/`update`/`draw`); within a phase, systems run in ascending `order` (ties keep registration order) and are destroyed in reverse registration order when the registry is destroyed.
SystemRegistrationOptions.before/SystemRegistrationOptions.after layer a dependency graph on top of `order`, additive rather than a replacement: `order`/registration sequence still decide ties among registrations the graph doesn't relate to each other. A `before`/`after` reference to a system outside the current phase - a different phase, or never registered - is silently a no-op there, not an error. A cycle throws once the affected phase list is next sorted.
Structural mutations are frame-scoped: a system added during a frame - whether from outside or from another system's own callback - does not participate in any phase until the *next* frame, in any phase. Removing a system during a callback marks it inactive immediately, so it is skipped by every later phase and every later fixed step in the *same* frame; the structural delete and the single SystemRegistry.onRemove dispatch are finalized at the frame boundary, or at once if the same system is added again before that boundary. Outside a frame - before the first SystemRegistry._beginFrame or after its matching SystemRegistry._endFrame - `add()`/`remove()` apply immediately.
new(): SystemRegistryadd(system: T, options?: SystemRegistrationOptionsOptions accepted by SystemRegistry.add.): Tdestroy(): voidsize: number