Class: NameTag
A class that allows you to create a name tag mesh. This name tag mesh also supports colored text using the ColorText syntax. Name tags can be treated like any other mesh.

Hierarchy
-
↳
NameTag
Constructors
constructor
• new NameTag(text, options?): NameTag
Parameters
| Name | Type |
|---|---|
text | string |
options | Partial<NameTagOptions> |
Returns
Overrides
Accessors
backgroundColor
• get backgroundColor(): string | false
Get the background color of the sprite text.
Returns
string | false
Inherited from
SpriteText.backgroundColor
• set backgroundColor(color): void
Set the background color of the sprite text. This will regenerate the sprite.
Parameters
| Name | Type |
|---|---|
color | string | false |
Returns
void
Inherited from
SpriteText.backgroundColor
borderColor
• get borderColor(): string
Get the border color of the sprite text.
Returns
string
Inherited from
SpriteText.borderColor
• set borderColor(borderColor): void
Set the border color of the sprite text. This will regenerate the sprite.
Parameters
| Name | Type |
|---|---|
borderColor | string |
Returns
void
Inherited from
SpriteText.borderColor
borderRadius
• get borderRadius(): number
Get the border radius of the sprite text.
Returns
number
Inherited from
SpriteText.borderRadius
• set borderRadius(borderRadius): void
Set the border radius of the sprite text. This will regenerate the sprite.
Parameters
| Name | Type |
|---|---|
borderRadius | number |
Returns
void
Inherited from
SpriteText.borderRadius
borderWidth
• get borderWidth(): number
Get the border width of the sprite text.
Returns
number
Inherited from
SpriteText.borderWidth
• set borderWidth(borderWidth): void
Set the border width of the sprite text. This will regenerate the sprite.
Parameters
| Name | Type |
|---|---|
borderWidth | number |
Returns
void
Inherited from
SpriteText.borderWidth
fontFace
• get fontFace(): string
Get the font face of the sprite text.
Returns
string
Inherited from
SpriteText.fontFace
• set fontFace(fontFace): void
Set the font face of the sprite text. This will regenerate the sprite.
Parameters
| Name | Type |
|---|---|
fontFace | string |
Returns
void
Inherited from
SpriteText.fontFace
fontSize
• get fontSize(): number
Get the font size of the sprite text.
Returns
number
Inherited from
SpriteText.fontSize
• set fontSize(fontSize): void
Set the font size of the sprite text. This will regenerate the sprite.
Parameters
| Name | Type |
|---|---|
fontSize | number |
Returns
void
Inherited from
SpriteText.fontSize
fontWeight
• get fontWeight(): string
Get the font weight of the sprite text.
Returns
string
Inherited from
SpriteText.fontWeight
• set fontWeight(fontWeight): void
Set the font weight of the sprite text. This will regenerate the sprite.
Parameters
| Name | Type |
|---|---|
fontWeight | string |
Returns
void