nanos world API Reference Unofficial documentation
Constructor Shared

TextRender.Default Constructor

Syntax

Lua
TextRender(location, rotation, text, word_size = 26, color = Color.WHITE, rendering_type = TextRenderRenderingType.Lit, horizontal_alignment = TextRenderHorizontalAlignment.Center, vertical_alignment = TextRenderVerticalAlignment.Center, font_asset = "", cast_shadow = false)

Parameters

Name Type Default Description
location Vector
rotation Rotator
text string
word_size optional float 26 Text size
color optional Color Color.WHITE
rendering_type optional TextRenderRenderingType TextRenderRenderingType.Lit To make it unlit, always face the camera or always visible through walls
horizontal_alignment optional TextRenderHorizontalAlignment TextRenderHorizontalAlignment.Center
vertical_alignment optional TextRenderVerticalAlignment TextRenderVerticalAlignment.Center
font_asset optional string "" The font asset to use for the text. Note the font must be a offline cached, distance field font
cast_shadow optional boolean false Controls whether it should cast shadow or not