@vrspace/babylonjs
Version:
vrspace.org babylonjs client
48 lines (47 loc) • 1.47 kB
TypeScript
/**
Text label somewhere in space.
CHECKME position of the label is actually center of the text plane
*/
export class Label {
/** hack for calculating position/required texture size*/
static fontRatio: number;
/**
@param text label text
@param position Vector3 to put label at - center of the label!
@param parent optional parent node
*/
constructor(text: any, position: any, parent: any);
/** Label text */
text: any;
/** Label position */
position: any;
/** Parent node */
parent: any;
/** text color, default white */
color: string;
/** Label height, default 1 */
height: number;
/** default none (null), may be "transparent", "white", "rgba(50,50,200,0.5)" etc */
background: any;
/** background border thickness, default 0 (no border)*/
border: number;
/** background corner radius, default 0 */
cornerRadius: number;
/** horizontal text alignment, default left */
horizontalAlignment: any;
/** vertical text alignment, default top */
verticalAlignment: any;
/** hack for calculating position */
fontRatio: any;
/** Set text after display() */
setText(text: any): void;
/** Change background color after display() */
setBackground(string: any): void;
/** Change text color after display() */
setColor(string: any): void;
display(): void;
textBlock: any;
textPlane: any;
texture: any;
dispose(): void;
}