Home Reference Source
import GlText from './ui/gldraw/gltext.js'
public class | source

GlText

draw text using msdf font texture, using GlRectInstancer

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get

height: *

public set
public set
public get

text: *

public set
public get

width: *

public set

x

public set

y

public set

z

Private Members
private

_align: number

private

_color: number[]

private

_font: *

private

_height: number

private
private

_rects: *[]

private

_scale: number

private

_string: *

private
private

_visible: boolean

private

_width: number

private

_x: number

private

_y: number

private

_z: number

Method Summary

Public Methods
public
public
public

setColor(r: *, g: *, b: *, a: *)

public

setOpacity(a: *)

public
public

setPosition(x: *, y: *, z: *)

Private Methods
private

_map(x: *): *

Public Constructors

public constructor() source

Public Members

public get height: * source

public set scale source

public set text source

public get text: * source

public set visible source

public get width: * source

public set x source

public set y source

public set z source

Private Members

private _align: number source

private _color: number[] source

private _font: * source

private _height: number source

private _parentRect: * source

private _rects: *[] source

private _scale: number source

private _string: * source

private _textWriter: * source

private _visible: boolean source

private _width: number source

private _x: number source

private _y: number source

private _z: number source

Public Methods

public dispose() source

public rebuild() source

public setColor(r: *, g: *, b: *, a: *) source

Params:

NameTypeAttributeDescription
r *
g *
b *
a *

public setOpacity(a: *) source

Params:

NameTypeAttributeDescription
a *

public setParentRect(r: *) source

Params:

NameTypeAttributeDescription
r *

public setPosition(x: *, y: *, z: *) source

Params:

NameTypeAttributeDescription
x *
y *
z *

Private Methods

private _map(x: *): * source

Params:

NameTypeAttributeDescription
x *

Return:

*