Graphics RenderingRender NodesLabelOn this pageLabel Description: A node for rendering text using a TrueType font. Class Object: Label Class. Inherits from: Node. Label.TextAlign Type: Enumeration. Description: Enumeration for text alignment setting. Signature: enum TextAlign "Left" "Center" "Right"end alphaRef Type: Field. Description: The alpha threshold value. Pixels with alpha values below this value will not be drawn. Only works with label.effect = SpriteEffect("builtin:vs_sprite", "builtin:fs_spritealphatest"). Signature: alphaRef: number textWidth Type: Field. Description: The width of the text used for text wrapping. Set to Label.AutomaticWidth to disable wrapping. Default is Label.AutomaticWidth. Signature: textWidth: number lineGap Type: Field. Description: The gap in pixels between lines of text. Signature: lineGap: number spacing Type: Field. Description: The gap in pixels between characters. Signature: spacing: number outlineWidth Type: Field. Description: The outline width in normalized SDF distance units, not pixels. Only works with SDF labels. A typical visible outline uses 0.12 to 0.18; values are clamped to the supported range of 0 to 0.25. Signature: outlineWidth: number outlineColor Type: Field. Description: The color of the outline, only works with SDF label. Signature: outlineColor: Color smooth Type: Field. Description: The lower and upper normalized SDF thresholds used to smooth the text edge. Each component is clamped to 0 to 1 and the lower value is kept below the upper value. Automatic smoothing is used by default; for manual tuning, values around 0.5 to 0.8 are recommended. Signature: smooth: Vec2 text Type: Field. Description: The text to be rendered. Signature: text: string blendFunc Type: Field. Description: The blend function used to render the text. Signature: blendFunc: BlendFunc depthWrite Type: Field. Description: Whether depth writing is enabled. (Default is false) Signature: depthWrite: boolean batched Type: Field. Description: Whether the label is using batched rendering. When using batched rendering the label:getCharacter() function will no longer work, and getting better rendering performance. (Default is true) Signature: batched: boolean effect Type: Field. Description: The sprite effect used to render the text. Signature: effect: SpriteEffect alignment Type: Field. Description: The text alignment setting. Signature: alignment: TextAlign characterCount Type: Readonly Field. Description: The number of characters in the label. Signature: const characterCount: integer getCharacter Type: Function. Description: Returns the sprite for the character at the specified index. Signature: getCharacter: function(self: Label, index: integer): Sprite | nil Parameters: ParameterTypeDescriptionindexintegerThe index of the character sprite to retrieve. Returns: Return TypeDescriptionSprite|nilThe sprite for the character, or nil if the index is out of range.