UNPKG

@vrspace/babylonjs

Version:

vrspace.org babylonjs client

125 lines (124 loc) 3.92 kB
/** * Chat log with TextArea and TextAreaInput, attached by to HUD. * By default alligned to left side of the screen. */ export class ChatLog extends TextArea { static instanceCount: number; static instances: {}; /** @type {ChatLog} */ static activeInstance: ChatLog; static instanceId(name: any, title: any): string; /** * @param {string} title * @param {string} [name="ChatLog"] * @return {ChatLog} */ static findInstance(title: string, name?: string): ChatLog; /** * @param {*} scene * @param {string} title * @param {string} [name="ChatLog"] * @return {ChatLog} */ static getInstance(scene: any, title?: string, name?: string): ChatLog; constructor(scene: any, title: any, name?: string); input: ChatLogInput; inputPrefix: string; showLinks: boolean; minimizeInput: boolean; minimizeTitle: boolean; autoHide: boolean; baseAnchor: number; verticalAnchor: number; anchor: number; buttonStack: ButtonStack; listeners: any[]; /** @type {GroupsApi} */ groupApi: GroupsApi; instanceId(): string; resizeHandler: () => void; /** * CHECKME this may make things easier but introduces dependency on the client * @param {GroupMessage} groupMessage */ addAttachment(groupMessage: GroupMessage): void; /** * CHECKME this may make things easier but introduces dependency on the client * @param {GroupMessage} groupMessage */ logMessage(groupMessage: GroupMessage): void; /** * Log something written by someone. * @param {String} who who wrote that * @param {String} what what they wrote * @param {object} link world link * @param {boolean} local FIXME not used */ log(who: string, what: string, link: object, local: boolean): void; /** * Move to left side of the screen */ leftSide(): void; /** * Move to right side of the screen */ rightSide(): void; /** * Move either left or right, whatever is the current anchor */ moveToAnchor(): void; /** * Handle window resize, recalculates the current anchor and positions appropriatelly. * @private */ private handleResize; /** @private */ private hasLink; /** @private */ private processLinks; /** @private */ private showLink; /** @private */ private setActiveInstance; /** @private */ private clearActiveInstance; /** * Share a world: notifies all the listeners (world or group) with the world name, content and link */ shareWorld(worldName: any, href: any): void; /** * Notify all chatlog listeners that the text has changed. * @private */ private notifyListeners; /** * Add a listener to be called when input text is changed. * Listeners are current world, groups, i.e. whatever this chat is for. */ addListener(listener: any): void; /** Remove a listener */ removeListener(listener: any): void; } import { TextArea } from './text-area.js'; declare class ChatLogInput extends TextAreaInput { constructor(textArea: any, inputName?: string, titleText?: any); attachments: boolean; attachButton: any; attached: any[]; maxAttachments: number; createPanel(): void; parentPanel: any; attachmentsPanel: any; createPlane(size: any, textureWidth: any, textureHeight: any, panel?: any): void; inputFocused(input: any, focused: any): void; attach(): void; upload(input: any): void; checkAttachments(): void; detach(button: any, fileName: any): void; getAttachments(): any[]; } import { ButtonStack } from './button-stack.js'; import { GroupsApi } from '../../client/openapi/api/GroupsApi.js'; import { GroupMessage } from '../../client/vrspace.js'; import { TextAreaInput } from './text-area-input.js'; export {};