Athena.systems.streamer ​
Functions ​
registerCallback ​
Usage
Athena.systems.streamer.registerCallback<T
>(key
, callback
, range?
): Promise
<void
>
Register a custom callback function. When the key is updated with data it will come back through the callback.
Static
Type parameters ​
Name |
---|
T |
Parameters ​
Name | Type | Default value | Description |
---|---|---|---|
key | string | undefined | A unique key for this stream data. |
callback | (player : Player , streamedData : T []) => void | undefined | |
range | number | 100 | How far away should we look from the player's position. |
Returns ​
Promise
<void
>
Defined in ​
server/systems/streamer.ts:145
updateData ​
Usage
Athena.systems.streamer.updateData<T
>(key
, array
): Promise
<void
>
Populates Stream Data for External Process
Static
Type parameters ​
Name |
---|
T |
Parameters ​
Name | Type |
---|---|
key | string |
array | T [] |
Returns ​
Promise
<void
>