Declares a new component.
A function returning the components default value.
This is the value the component has when added to an Entity
.
The component declaration.
Declares a new component.
A unique identifier. If a string
is provided,
you'll need to ensure that it is unique manually.
A function returning the components default value.
This is the value the component has when added to an Entity
.
The component declaration.
Generated using TypeDoc
The result returned when you call
Query.collect
, consisting of multipleSet
s ofEntity
s:entities
contains all entities matching the query at the timeQuery.collect
was called.added
is only present if the query was constructed withtrackAdded: true
and contains all entities newly matching the query, since the last timeQuery.collect
was called.removed
is only present if the query was constructed withtrackRemoved: true
and contains all entities no longer matching the query, since the last timeQuery.collect
was called.mutated
is only present if the query was constructed with theQueryProps.trackMutated
option and contains all entities with changes to any of the components listed inQueryProps.trackMutated
, since the last timeQuery.collect
was called.The result of a
Query
with all tracking options enabled looks like this: