@vrspace/babylonjs
Version:
vrspace.org babylonjs client
63 lines (62 loc) • 1.99 kB
TypeScript
export class ButtonStack {
/** @type {ServerCapabilities} */
static serverCapablities: ServerCapabilities;
constructor(scene: any, parent: any, position: any, scaling?: any);
scene: any;
parent: any;
scaling: any;
position: any;
capacity: number;
links: any[];
meshes: any[];
clickHandler: any;
/**
* Add a link button to the stack, called when ChatLog finds a link in the chat.
* Also creates buttons to enter world, open link in new tab, internal browser if available.
* @param {string} word A single word to display on the button, e.g. web site name
* @param {boolean} enterWorld Whether the link points to another world
*/
addLink(word: string, enterWorld: boolean): any;
/**
* Add a label with the link/attachment text
* @private
*/
private addLabel;
/**
* @param {Link} link world/web link
* @param {string} name Icon under /content/icons to display
* @param {*} callback function
* @private
*/
private addButton;
addAttachment(fileName: any, callback: any): any;
/**
* Called on click on a link, opens the link either in a new tab, or internal browser if available.
* This only handles click on the link itself, click on a button behavior is defined in addLink().
* @private
* @param {Link|Attachment} link
*/
private clicked;
/**
* Opens the URL in internal browser
* @private
* @param {string} url link to open
*/
private openBrowser;
browser: RemoteBrowser;
/**
* Scroll all buttons up to make space for a new one, keeps only this.capacity buttons.
* @private
*/
private scroll;
/**
* Clean up all resources
*/
dispose(): void;
/**
* XR stuff
*/
isSelectableMesh(mesh: any): any;
}
import { RemoteBrowser } from './remote-browser.js';
import { ServerCapabilities } from '../../client/openapi/model/ServerCapabilities.js';