Skip to content
On this page

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
NameType
Kextends keyof LayerEvents
Parameters
NameType
...args[K, ...Parameters<LayerEvents[K]>[]]
Returns

void

Defined in

profectus/src/game/layers.tsx:148


emitter

emitter: Emitter<LayerEvents>

An emitter for sending LayerEvents events for this layer.

Defined in

profectus/src/game/layers.tsx:144


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:140


minimized

minimized: Persistent<boolean>

A persistent ref tracking if the tab is minimized or not.

Defined in

profectus/src/game/layers.tsx:142


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:150


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
NameType
...args[event: keyof LayerEvents, cb: Function | Function | Function]
Returns

Unsubscribe

Defined in

profectus/src/game/layers.tsx:146