Profectus / game/layers / BaseLayer
Interface: BaseLayer ​
The properties that are added onto a processed LayerOptions to create a Layer
Extended by ​
Properties ​
emit() ​
emit: <
K
>(...args
) =>void
A function to emit a LayerEvents event to this layer.
Type Parameters ​
• K extends keyof LayerEvents
Parameters ​
args ​
...[K
, ...Parameters<LayerEvents[K]>[]
]
Returns ​
void
Defined in ​
profectus/src/game/layers.tsx:159
emitter ​
emitter:
Emitter
<LayerEvents
>
An emitter for sending LayerEvents events for this layer.
Defined in ​
profectus/src/game/layers.tsx:155
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:151
minimized ​
minimized:
Persistent
<boolean
>
A persistent ref tracking if the tab is minimized or not.
Defined in ​
profectus/src/game/layers.tsx:153
nodes ​
nodes:
Ref
<Record
<string
,undefined
|FeatureNode
>,Record
<string
,undefined
|FeatureNode
>>
A map of FeatureNodes present in this layer's Context component.
Defined in ​
profectus/src/game/layers.tsx:161
on() ​
on: (...
args
) =>Unsubscribe
A function to register an event listener on emitter.
Parameters ​
args ​
...[keyof LayerEvents
, (diff
) => void
| (diff
) => void
| (diff
) => void
]
Returns ​
Unsubscribe