🆒 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 |
🗿 Static Functions
Inherited Entity Static Functions
TextRender inherits from Base Entity Class, sharing it's methods and functions:
Base Entityscripting-reference/classes/base-classes/Entity
Base Entityscripting-reference/classes/base-classes/Entity
Returns | Name | Description | |
---|---|---|---|
table of Base Entity | GetAll | Returns a table containing all Entities of the class this is called on | |
Base Entity | GetByIndex | Returns a specific Entity of this class at an index | |
integer | GetCount | Returns how many Entities of this class exist | |
table of table | GetInheritedClasses | Gets a list of all directly inherited classes from this Class created with the Inheriting System | |
iterator | GetPairs | Returns an iterator with all Entities of this class to be used with pairs() | |
table or nil | GetParentClass | Gets the parent class if this Class was created with the Inheriting System | |
table | Inherit | Inherits this class with the Inheriting System | |
boolean | IsChildOf | Gets if this Class is child of another class if this Class was created with the Inheriting System | |
function | Subscribe | Subscribes to an Event for all entities of this Class | |
function | SubscribeRemote | Subscribes to a custom event called from server | |
Unsubscribe | Unsubscribes all callbacks from this Event in this Class within this Package, or only the callback passed |