Skip to content

makeEntityScopedQueue

makeEntityScopedQueue(entity, options?): ScopedProcessQueue

Defined in: ProcessQueue.ts:69

Scoped queue that routes through the entity’s ProcessComponent. Auto-adds one if the entity doesn’t already have it. cancelAll() only cancels the processes this queue enqueued, so sharing the underlying ProcessComponent with user code stays safe.

options.clock picks the clock for every process the queue enqueues (default "frame", rendered-frame time; see ProcessClock). "fixed" schedules them on the fixed timestep through ProcessFixedUpdateSystem. The clock is read when the queue is created, so run(p) takes none. A process already scheduled on that ProcessComponent keeps the clock it was scheduled with.

One queue carries one clock. Work on the other clock needs a second queue, with its own cancelAll().

Entity

ProcessClock

ScopedProcessQueue