🆒 TextRender
A Text Render class is useful for spawning Texts in 3D world, you can even attach it to other entities.
💂Authority
👪Inheritance
🧑💻API Source
This page is auto-generated! The Functions, Properties and Events described here are defined in our GitHub's API Repository! Feel free to commit suggestions and changes to the source .json API files!
🎒 Examples
local my_text_render = TextRender(
Vector(-100, 200, 300),
Rotator(),
"My Awesome Text",
Vector(1, 1, 1), -- Scale
Color(1, 0, 0), -- Red Color
FontType.OpenSans,
TextRenderAlignCamera.FaceCamera
)
info
If you desire your TextRender to be visible through walls, replace it's material with the nanos Default TranslucentDepth one!
SetMaterial("nanos-world::M_Default_Translucent_Lit_Depth")
.
You can also tweak it's color and other properties using the Material methods.
🛠 Constructors
Default Constructor
local my_textrender = TextRender(location, rotation, text, scale?, color?, font_type?, align_camera?)
Type | Name | Default | Description |
---|---|---|---|
Vector | location | Required parameter | No description provided |
Rotator | rotation | Required parameter | No description provided |
string | text | Required parameter | No description provided |
Vector | scale | Vector(1, 1, 1) | No description provided |
Color | color | Color(1, 1, 1, 1) | No description provided |
FontType | font_type | FontType.Roboto | No description provided |
TextRenderAlignCamera | align_camera | TextRenderAlignCamera.Unaligned | No description provided |