n-text

native. n-text

Creates dynamic 2D text on the entity. The text will wrap automatically based on the width and height provided. This text will be clearer than texture-based text and more performant than geometry-based test.

Properties:
Name Type Default Description
text string

The text to be drawn.

fontSize number 10

The height of the letters. 10pt ~= 1m

width number 10

The width of the text area in meters. If the text is wider than this value, the overflow will be wrapped to the next line.

height number 1

The height of the text area in meters. If the text is taller than this value, the overflow will be cut off.

horizontalAlign string middle

The horizontal anchor point for the text. Can be left, middle, or right.

verticalAlign string middle

The vertical anchor point for the text. Can be top, middle, or bottom.