txt node

Summary

The txt node displays wrapped text.

The position of the node represents the center of the invisible bounds of the text. The size attribute specifies the width and height of the bounding box. The text will be wrapped to fit within the width of this box but may extend beyond the bottom.

For more information regarding the scripting of this node see the scripting reference entry for txt.

Children

This node should contain only the text to be displayed, wrapped in an XML CDATA block.

Example B.13. Use of txt node

<txt>
<![CDATA[ Text to be displayed ]]>
</txt>

Attributes

txt attributes
nametypedefaultnotes
fontsizereal number1.0the size of the font
halignleft, center, or rightlefthow the text should be aligned horizontally
valigntop, center, or bottomtophow the text should be aligned vertically
sizex y1.0 1.0the size of the bounding box of the text

Attributes common to transformable nodes
nametypedefaultnotes
positionx y z0 0 0position of the node relative to its parent (or the center of the screen or camera, see relativeto)
scalex y z1 1 1scale of the node relative to its parent (or the center of the screen or camera, see relativeto)
rotationyaw pitch roll0 0 0rotation of the node, in degrees, relative to its parent (or the center of the screen or camera, see relativeto)
relativeto"parent", "screen" or "camera"parentwhether this node is located relative to its parent node, the screen, or the camera. See Viewport-relative Content for more information.
billboardbooleanfalsebillboarded geometry always faces the camera
filldepthbufferbooleantruewhether the depth buffer is filled for this geometry

Attributes common to nodes
nametypedefaultnotes
visiblebooleantrueIf false, this node (or its children, if it has any) will not be rendered.
colorr g b a (in range 0 to 1)1 1 1 1specifies the color used to modulate this node and its children
idstring an identifier used to refer to this node