UNPKG

xverse-components-utils

Version:

xverse components utils

76 lines (75 loc) 1.82 kB
import type { EFPSStatus } from '@xverse/core'; import { EventEmitter } from '@xverse/matrix-shared-utils'; import { IUpdateRoom, IRoomError } from 'xverse-components-room'; import type { IAppError } from 'xverse-components-store'; import type { BaseAvatar } from 'xverse-components-avatar'; export interface IBaseEventBusEvents { emitChangeRoom: { roomKey: string; }; emitUpdateRoom: IUpdateRoom; avatarInitSuc: { avatarId: string; }; avatarChanged: { avatar: BaseAvatar; targetAvatarId: string; }; otherAvatarClick: { userId: string; }; otherAvatarLongPress: { userId: string; }; otherAvatarLoaded: { userId: string; }; bubbleClick: { userId: string; }; bubbleDispose: { userId: string; assetUrl?: string; }; headTipsClick: { userId: string; }; badNetEmitted: { good: boolean; }; fpsStatusChanged: { curFpsStatus: EFPSStatus; }; /** * @description 触发创建3D world */ emitCreate3DWorld: void; /** * @description 3D world创建完成 */ created3DWorld: void | IAppError; /** * @description 3D room创建完成 */ createdRoom: string | IRoomError; /** * @description 3D room更新完成 */ updatedRoom: string | IRoomError; roomStartPreload: void; roomEndPreload: void; roomBeforeEnter: void; emitCreateWorld: void; poorNet: { code: number; message: string; }; enterOB: void; reQueue: void; toggleState: void; } export declare class BaseEventBus extends EventEmitter<IBaseEventBusEvents> { static instance: BaseEventBus; private constructor(); static getInstance(): BaseEventBus; }