@latticexyz/recs / Component
#
Interface: Component<S, M, T>
Type of component returned by defineComponent.
#
Type parameters
#
Hierarchy
Component
#
Table of contents
#
Properties
entities id metadata schema update$ values world
#
Properties
#
entities
• entities: () => IterableIterator
<EntityIndex
>
#
Type declaration
▸ (): IterableIterator
<EntityIndex
>
#
Returns
IterableIterator
<EntityIndex
>
#
Defined in
#
id
• id: string
#
Defined in
#
metadata
• metadata: M
#
Defined in
#
schema
• schema: S
#
Defined in
#
update$
• update$: Subject
<ComponentUpdate
<S
, T
>> & { observers
: any
}
#
Defined in
#
values
• values: { [key in string | number | symbol]: Map<EntityIndex, ValueType<T>[S[key]]> }
#
Defined in
#
world
• world: World