Class: TextRender
TextRender is all of the information required to a character, alongside additional information that could be useful for the rendering process/shaders.
Table of contents
Constructors
Properties
Constructors
constructor
+ new TextRender(family
: string, weight
: string, buffer
: number, radius
: number, cutoff
: number, size
: number, color
: Color, zOrder
: number, align
: TextAlignment): TextRender
Parameters:
Name | Type |
---|---|
family |
string |
weight |
string |
buffer |
number |
radius |
number |
cutoff |
number |
size |
number |
color |
Color |
zOrder |
number |
align |
TextAlignment |
Returns: TextRender
Properties
align
• align: TextAlignment
Text Alignment.
buffer
• buffer: number
Whitespace buffer around a glyph in the atlas in pixels.
color
• color: Color
Color of the text.
cutoff
• cutoff: number
How much of the radius (relative) is used for the inside part the glyph.
family
• family: string
CSS Font Family.
radius
• radius: number
How many pixels around the glyph shape in the atlas to use for encoding distance.
size
• size: number
CSS font size in pixels.
weight
• weight: string
CSS Font Weight.
zOrder
• zOrder: number
Order which the text should appear, if it should appear infront/behind other objects, the higher the value the more precedence it is given and will appear in front of objects with a lower value.