Group of objects used to manage visibility at a per-connection level. Connections can have zero or more visibility groups.
var group = Wasabi.createGroup(); var conn1 = Wasabi.addClient(socket1); var conn2 = Wasabi.addClient(socket2); conn1.addGroup(group); conn2.addGroup(group); // foo will be sent to both connections group.addObject(foo);
Add obj to this group
The NetObject to add to this group.
objwill be sent over all connections which have this group.
Remove obj from this group
objNetObject | Number
The NetObject or index to remove from this group.
objwill be removed from any connection which no longer has it through any group.
The objects contained in this group