export class ViewersRegister {
  constructor(scene) {
    this.scene = scene;
    this._viewers_by_id = new Map();
  }
  registerViewer(viewer) {
    this._viewers_by_id.set(viewer.id(), viewer);
  }
  unregisterViewer(viewer) {
    this._viewers_by_id.delete(viewer.id());
  }
  traverseViewers(callback) {
    this._viewers_by_id.forEach(callback);
  }
}
