Class: Network
Constructors
constructor
• new Network(options?): Network
Parameters
| Name | Type |
|---|---|
options | Partial<NetworkOptions> |
Returns
Properties
clientInfo
• clientInfo: Object
Type declaration
| Name | Type |
|---|---|
id | string |
metadata? | Record<string, any> |
username | string |
connected
• connected: boolean = false
intercepts
• intercepts: NetIntercept[] = []
joined
• joined: boolean = false
onConnect
• onConnect: () => void
Type declaration
▸ (): void
Returns
void
onDisconnect
• onDisconnect: () => void
Type declaration
▸ (): void
Returns
void
onJoin
• onJoin: (world: string) => void
Type declaration
▸ (world): void
Parameters
| Name | Type |
|---|---|
world | string |
Returns
void
onLeave
• onLeave: (world: string) => void