advanced library
Internal ECS APIs.
Classes
- AccessConflict
- A detected access conflict between two systems in the same schedule that have no ordering relationship and touch the same component in a conflicting way.
- App
- Runs a World through named schedules.
- AppBuilder
- Registers app systems and data.
- AppDiagnostics
- Opt-in diagnostics configuration for an App.
-
AxisInput<
T> -
Analog input values, keyed by axis type
T. -
ButtonInput<
T> -
Held button state, keyed by action type
T. - Commands
- Queues structural world changes.
- ComponentStore
-
CurrentState<
S extends Object> -
The active value of the state machine for
S. - DespawnAfter
- Despawns an entity after remaining seconds.
- DespawnAfterSystem
- Advances all DespawnAfter timers.
- DespawnOnExit
- Despawns an entity when its state ends.
- Disposable
- A resource that needs cleanup.
- EcsFrameLoop
- Runs frame schedules and updates time.
- Entity
- A lightweight, generational handle to an entity.
- EntityCommands
- Fluent deferred commands targeting one entity.
- EntityDetailSnapshot
- Component details for one entity.
- EntityQuery
- EntityRegistry
- Allocates and validates Entity handles.
- EntitySnapshot
- A live entity summary.
-
EventChannel<
T> - A buffered event channel with independent readers.
- EventChannelSnapshot
- One event channel: its event type name, buffered-event count, and whether the most recent maintenance pass found a lagging reader.
- EventCursorHost
- Stores event readers for one system.
-
EventReader<
T> - A cursor-based reader over an EventChannel.
-
EventWriter<
T> - A handle that appends events to an EventChannel.
- FixedTime
- Fixed-step timing, updated each fixed update before the physics step.
- FrameTime
- Per-frame timing, updated at the start of each rendered frame.
- GameBuilder
- Registers game features.
- GameClock
- The global gameplay clock for pause, slow motion, and hitstop.
- GameStopwatch
- Counts up without a target.
- GameTimer
- Counts up to a duration, reporting completion once or repeatedly.
-
InputBuffer<
T> - Keeps recent input actions in order.
- InspectorSnapshot
- A summary of one world.
-
Machine<
S> - Stores the current state, time in state, and transition edges.
- Name
- A readable entity label.
-
NextState<
S extends Object> -
Where systems queue a transition for the state machine of
S. -
ObjectComponentStore<
T> - ObserverDispatch
- The value World.runningSystem holds while observer callbacks run.
- ObserverRegistry
- Stores observers for one world.
- OnEnter
- The one-shot schedule run when the state machine transitions to value (including the initial value during App.start).
- OnExit
- The one-shot schedule run when the state machine transitions away from value.
-
OptionalSingle<
A> - OwnedBy
- Despawns this entity when owner dies.
- Plugin
- Registers one app feature.
-
Query1<
A> -
Query2<
A, B> -
Query3<
A, B, C> -
Query4<
A, B, C, D> -
QueryView1<
A extends Object> - A query over one component type.
-
QueryView2<
A extends Object, B extends Object> - A query over two component types.
-
QueryView3<
A extends Object, B extends Object, C extends Object> - A query over three component types.
-
QueryView4<
A extends Object, B extends Object, C extends Object, D extends Object> - A query over four component types.
- RemoveAfterTracker
- Tracks component removal deadlines.
-
Repeat<
L extends Step< L> > - Re-enters child times times, or forever when times is null.
- Resources
- Stores one resource per type.
- ResourceSnapshot
-
One resource: its type name and, when the instance overrides
Object.toString(same default-Instance offilter asdebugDescribe), that rendering. -
Routine<
L extends Step< L> > - Where one entity is in its plan.
- SceneDashBundle
- Inserts a group of components.
- ScheduleLabel
- A stable identifier for a schedule (a named phase of the frame).
- Schedules
- Built in frame schedules.
-
Select<
L extends Step< L> > - Runs children until one succeeds. Fails when every child fails.
-
Sequence<
L extends Step< L> > - Runs children in order. Fails on the first child that fails.
-
Single<
A> - SlowSystemEvent
- Emitted when a system's run exceeds the configured slow-system threshold.
- SnapshotCollector
- Collects InspectorSnapshot data on demand.
- SpawnQueue
- Stores pending spawns for one world.
- StateScheduleLabel
- A schedule that belongs to a state value's enter/exit lifecycle.
-
Step<
L extends Step< L> > - A node in a plan.
- StoreRegistry
- Maps component types to stores.
- StoreSnapshot
- A component or tag store: its type name and dense row count.
- SystemAccess
- Component types read and written by a system.
- SystemAccessProvider
- Provides access data for a system.
- SystemAdapter
- Runs one system.
- SystemDescriptor
- Describes a schedulable system.
- SystemLabel
- A stable identifier for a single registered system.
- SystemProfiler
- Collects system timings by schedule.
- SystemRef
- Stable identity for a system.
- SystemSet
- A named system phase.
- SystemSnapshot
- Timing for one system and schedule.
- SystemTiming
- A reusable, read-only timing record for a single (system, schedule) pair, accumulated across frames.
- Tag
- A marker for presence-only components.
- TagStore
- TestGame
- Runs game logic without Flutter.
- World
- Stores entities, components, resources, and events.
Enums
- AccessConflictPolicy
-
How the app reacts to detected AccessConflicts during
start(). - ButtonEdge
- The transition a button crossed when its pressed state was updated.
- ConflictKind
- The kind of access hazard between two unordered systems.
- StepResult
- What a driver reports about the leaf it just ran.
Extensions
- AppBuilderSystems on AppBuilder
- Adds systems as a group.
- ClassicWorldQueries on World
- Query constructors that return query classes.
- RunConditionOps on RunCondition
- Short-circuiting composition of RunConditions.
- WorldDebugDescribe on World
- One-line entity descriptions for logs and assertion messages.
- WorldSurface on World
Functions
-
advanceInputBuffers(
Iterable< Object> resources, double unscaledDt) → void - Advances every automatic input buffer.
-
every(
double seconds) → RunCondition -
Passes once every
secondsof game time. -
hasEvents<
T> () → RunCondition -
Passes while the event channel for
Thas buffered events. -
hasResource<
T extends Object> () → RunCondition -
Passes while a resource of type
Tis registered. -
inState<
S extends Object> (S value) → RunCondition -
A run condition that passes while the state machine for
Sis atvalue. -
not(
RunCondition condition) → RunCondition -
A condition that passes when
conditiondoes not.
Typedefs
-
ComponentObserver<
T> = void Function(World world, Entity entity, T component) - Runs after a component is added or removed.
- EntityQueryCallback = void Function(Entity entity)
- EntityQueryUntilCallback = bool Function(Entity entity)
- Feature = void Function(GameBuilder game)
- Registers one game feature.
-
Query1Callback<
A> = void Function(Entity entity, A a) -
Query1UntilCallback<
A> = bool Function(Entity entity, A a) -
Query2Callback<
A, B> = void Function(Entity entity, A a, B b) -
Query2UntilCallback<
A, B> = bool Function(Entity entity, A a, B b) -
Query3Callback<
A, B, C> = void Function(Entity entity, A a, B b, C c) -
Query3UntilCallback<
A, B, C> = bool Function(Entity entity, A a, B b, C c) -
Query4Callback<
A, B, C, D> = void Function(Entity entity, A a, B b, C c, D d) -
Query4UntilCallback<
A, B, C, D> = bool Function(Entity entity, A a, B b, C c, D d) - RunCondition = bool Function(World world)
- Decides whether a system runs.
- WorldSystem = void Function(World world)
- A system that updates the world.