A server that uses either UDP or WebRTC communication to send/receive messages to/from connected clients, and syncs registered Entities/Components to clients to whom they are in-scope.
usenaia_shared::GlobalEntity;usecrate::{RoomKey, UserKey};/// Events that drive scope re-evaluation.
/// Each variant encodes exactly the (user, entity) pairs that need attention.
pub(super)enumScopeChange{/// User was added to a room — check all entities in that room for this user.
UserEnteredRoom(UserKey, RoomKey),/// User was removed from a room — entities in that room may need despawning.
UserLeftRoom(UserKey, RoomKey),/// Entity was added to a room — check all users in that room for this entity.
EntityEnteredRoom(GlobalEntity, RoomKey),/// Explicit include/exclude via UserScope API.
ScopeToggled(UserKey, GlobalEntity,bool),}