Interface: BaseLayer
game/layers.BaseLayer
The properties that are added onto a processed LayerOptions to create a Layer
Properties
emit
• emit: <K>(...args
: [K
, ...Parameters<LayerEvents[K]>[]]) => void
Type declaration
▸ <K
>(...args
): void
A function to emit a LayerEvents event to this layer.
Type parameters
Name | Type |
---|---|
K | extends keyof LayerEvents |
Parameters
Name | Type |
---|---|
...args | [K , ...Parameters<LayerEvents[K]>[]] |
Returns
void
Defined in
profectus/src/game/layers.tsx:157
emitter
• emitter: Emitter
<LayerEvents
>
An emitter for sending LayerEvents events for this layer.
Defined in
profectus/src/game/layers.tsx:153
id
• id: string
The ID of the layer. Populated from the createLayer parameters. Used for saving and tracking open tabs.
Defined in
profectus/src/game/layers.tsx:149
minimized
• minimized: Persistent
<boolean
>
A persistent ref tracking if the tab is minimized or not.
Defined in
profectus/src/game/layers.tsx:151
nodes
• nodes: Ref
<Record
<string
, undefined
| FeatureNode
>>
A map of FeatureNodes present in this layer's ContextComponent component.
Defined in
profectus/src/game/layers.tsx:159
on
• on: (...args
: [event: keyof LayerEvents, cb: Function | Function | Function]) => Unsubscribe
Type declaration
▸ (...args
): Unsubscribe
A function to register an event listener on emitter.
Parameters
Name | Type |
---|---|
...args | [event: keyof LayerEvents, cb: Function | Function | Function] |
Returns
Unsubscribe