Class: Replicator
WebSGNetworking.Replicator
A replicator for spawning and despawning nodes.
Table of contents
Constructors
Methods
Constructors
constructor
• new Replicator()
Methods
despawn
▸ despawn(node
, data?
): void
Despawns a node with the given optional data.
Parameters
Name | Type | Description |
---|---|---|
node | Node | The node to despawn. |
data? | ArrayBuffer | Optional data to send with the despawn message. |
Returns
void
Defined in
despawned
▸ despawned(): ReplicationIterator
Returns an iterator for despawned nodes.
Returns
Defined in
spawn
▸ spawn(data?
): Node
Spawns a node with the given optional data.
Parameters
Name | Type | Description |
---|---|---|
data? | ArrayBuffer | Optional data to send with the spawn message. |
Returns
Defined in
spawned
▸ spawned(): ReplicationIterator
Returns an iterator for spawned nodes.