@latticexyz/recs / Component
Interface: Component
Type of component returned by defineComponent.
Type parameters
Name | Type |
---|---|
S | extends Schema = Schema |
M | extends Metadata = Metadata |
T | undefined |
Hierarchy
-
Component
Table of contents
Properties
Properties
entities
• entities: () => IterableIterator
<EntityIndex
>
Type declaration
▸ (): IterableIterator
<EntityIndex
>
Returns
IterableIterator
<EntityIndex
>
Defined in
types.ts:82 (opens in a new tab)
id
• id: string
Defined in
types.ts:78 (opens in a new tab)
metadata
• metadata: M
Defined in
types.ts:81 (opens in a new tab)
schema
• schema: S
Defined in
types.ts:80 (opens in a new tab)
update$
• update$: Subject
<ComponentUpdate
& { observers
: any
}
Defined in
types.ts:85 (opens in a new tab)
values
• values: { [key in string | number | symbol]: Map<EntityIndex, ValueType<T>[S[key]]> }
Defined in
types.ts:79 (opens in a new tab)
world
• world: World