class_label3d.rst 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858
  1. :github_url: hide
  2. .. meta::
  3. :keywords: text
  4. .. DO NOT EDIT THIS FILE!!!
  5. .. Generated automatically from Godot engine sources.
  6. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  7. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/Label3D.xml.
  8. .. _class_Label3D:
  9. Label3D
  10. =======
  11. **Inherits:** :ref:`GeometryInstance3D<class_GeometryInstance3D>` **<** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  12. A node for displaying plain text in 3D space.
  13. .. rst-class:: classref-introduction-group
  14. Description
  15. -----------
  16. A node for displaying plain text in 3D space. By adjusting various properties of this node, you can configure things such as the text's appearance and whether it always faces the camera.
  17. .. rst-class:: classref-introduction-group
  18. Tutorials
  19. ---------
  20. - :doc:`3D text <../tutorials/3d/3d_text>`
  21. .. rst-class:: classref-reftable-group
  22. Properties
  23. ----------
  24. .. table::
  25. :widths: auto
  26. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  27. | :ref:`float<class_float>` | :ref:`alpha_antialiasing_edge<class_Label3D_property_alpha_antialiasing_edge>` | ``0.0`` |
  28. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  29. | :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` | :ref:`alpha_antialiasing_mode<class_Label3D_property_alpha_antialiasing_mode>` | ``0`` |
  30. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  31. | :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` | :ref:`alpha_cut<class_Label3D_property_alpha_cut>` | ``0`` |
  32. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  33. | :ref:`float<class_float>` | :ref:`alpha_hash_scale<class_Label3D_property_alpha_hash_scale>` | ``1.0`` |
  34. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  35. | :ref:`float<class_float>` | :ref:`alpha_scissor_threshold<class_Label3D_property_alpha_scissor_threshold>` | ``0.5`` |
  36. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  37. | :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` | :ref:`autowrap_mode<class_Label3D_property_autowrap_mode>` | ``0`` |
  38. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  39. | |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] | :ref:`autowrap_trim_flags<class_Label3D_property_autowrap_trim_flags>` | ``192`` |
  40. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  41. | :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` | :ref:`billboard<class_Label3D_property_billboard>` | ``0`` |
  42. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  43. | :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` | cast_shadow | ``0`` (overrides :ref:`GeometryInstance3D<class_GeometryInstance3D_property_cast_shadow>`) |
  44. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  45. | :ref:`bool<class_bool>` | :ref:`double_sided<class_Label3D_property_double_sided>` | ``true`` |
  46. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  47. | :ref:`bool<class_bool>` | :ref:`fixed_size<class_Label3D_property_fixed_size>` | ``false`` |
  48. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  49. | :ref:`Font<class_Font>` | :ref:`font<class_Label3D_property_font>` | |
  50. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  51. | :ref:`int<class_int>` | :ref:`font_size<class_Label3D_property_font_size>` | ``32`` |
  52. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  53. | :ref:`GIMode<enum_GeometryInstance3D_GIMode>` | gi_mode | ``0`` (overrides :ref:`GeometryInstance3D<class_GeometryInstance3D_property_gi_mode>`) |
  54. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  55. | :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`horizontal_alignment<class_Label3D_property_horizontal_alignment>` | ``1`` |
  56. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  57. | |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] | :ref:`justification_flags<class_Label3D_property_justification_flags>` | ``163`` |
  58. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  59. | :ref:`String<class_String>` | :ref:`language<class_Label3D_property_language>` | ``""`` |
  60. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  61. | :ref:`float<class_float>` | :ref:`line_spacing<class_Label3D_property_line_spacing>` | ``0.0`` |
  62. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  63. | :ref:`Color<class_Color>` | :ref:`modulate<class_Label3D_property_modulate>` | ``Color(1, 1, 1, 1)`` |
  64. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  65. | :ref:`bool<class_bool>` | :ref:`no_depth_test<class_Label3D_property_no_depth_test>` | ``false`` |
  66. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  67. | :ref:`Vector2<class_Vector2>` | :ref:`offset<class_Label3D_property_offset>` | ``Vector2(0, 0)`` |
  68. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  69. | :ref:`Color<class_Color>` | :ref:`outline_modulate<class_Label3D_property_outline_modulate>` | ``Color(0, 0, 0, 1)`` |
  70. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  71. | :ref:`int<class_int>` | :ref:`outline_render_priority<class_Label3D_property_outline_render_priority>` | ``-1`` |
  72. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  73. | :ref:`int<class_int>` | :ref:`outline_size<class_Label3D_property_outline_size>` | ``12`` |
  74. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  75. | :ref:`float<class_float>` | :ref:`pixel_size<class_Label3D_property_pixel_size>` | ``0.005`` |
  76. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  77. | :ref:`int<class_int>` | :ref:`render_priority<class_Label3D_property_render_priority>` | ``0`` |
  78. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  79. | :ref:`bool<class_bool>` | :ref:`shaded<class_Label3D_property_shaded>` | ``false`` |
  80. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  81. | :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` | :ref:`structured_text_bidi_override<class_Label3D_property_structured_text_bidi_override>` | ``0`` |
  82. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  83. | :ref:`Array<class_Array>` | :ref:`structured_text_bidi_override_options<class_Label3D_property_structured_text_bidi_override_options>` | ``[]`` |
  84. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  85. | :ref:`String<class_String>` | :ref:`text<class_Label3D_property_text>` | ``""`` |
  86. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  87. | :ref:`Direction<enum_TextServer_Direction>` | :ref:`text_direction<class_Label3D_property_text_direction>` | ``0`` |
  88. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  89. | :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` | :ref:`texture_filter<class_Label3D_property_texture_filter>` | ``3`` |
  90. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  91. | :ref:`bool<class_bool>` | :ref:`uppercase<class_Label3D_property_uppercase>` | ``false`` |
  92. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  93. | :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` | :ref:`vertical_alignment<class_Label3D_property_vertical_alignment>` | ``1`` |
  94. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  95. | :ref:`float<class_float>` | :ref:`width<class_Label3D_property_width>` | ``500.0`` |
  96. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  97. .. rst-class:: classref-reftable-group
  98. Methods
  99. -------
  100. .. table::
  101. :widths: auto
  102. +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | :ref:`TriangleMesh<class_TriangleMesh>` | :ref:`generate_triangle_mesh<class_Label3D_method_generate_triangle_mesh>`\ (\ ) |const| |
  104. +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | :ref:`bool<class_bool>` | :ref:`get_draw_flag<class_Label3D_method_get_draw_flag>`\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`\ ) |const| |
  106. +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  107. | |void| | :ref:`set_draw_flag<class_Label3D_method_set_draw_flag>`\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ ) |
  108. +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  109. .. rst-class:: classref-section-separator
  110. ----
  111. .. rst-class:: classref-descriptions-group
  112. Enumerations
  113. ------------
  114. .. _enum_Label3D_DrawFlags:
  115. .. rst-class:: classref-enumeration
  116. enum **DrawFlags**: :ref:`🔗<enum_Label3D_DrawFlags>`
  117. .. _class_Label3D_constant_FLAG_SHADED:
  118. .. rst-class:: classref-enumeration-constant
  119. :ref:`DrawFlags<enum_Label3D_DrawFlags>` **FLAG_SHADED** = ``0``
  120. If set, lights in the environment affect the label.
  121. .. _class_Label3D_constant_FLAG_DOUBLE_SIDED:
  122. .. rst-class:: classref-enumeration-constant
  123. :ref:`DrawFlags<enum_Label3D_DrawFlags>` **FLAG_DOUBLE_SIDED** = ``1``
  124. If set, text can be seen from the back as well. If not, the text is invisible when looking at it from behind.
  125. .. _class_Label3D_constant_FLAG_DISABLE_DEPTH_TEST:
  126. .. rst-class:: classref-enumeration-constant
  127. :ref:`DrawFlags<enum_Label3D_DrawFlags>` **FLAG_DISABLE_DEPTH_TEST** = ``2``
  128. Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it.
  129. .. _class_Label3D_constant_FLAG_FIXED_SIZE:
  130. .. rst-class:: classref-enumeration-constant
  131. :ref:`DrawFlags<enum_Label3D_DrawFlags>` **FLAG_FIXED_SIZE** = ``3``
  132. Label is scaled by depth so that it always appears the same size on screen.
  133. .. _class_Label3D_constant_FLAG_MAX:
  134. .. rst-class:: classref-enumeration-constant
  135. :ref:`DrawFlags<enum_Label3D_DrawFlags>` **FLAG_MAX** = ``4``
  136. Represents the size of the :ref:`DrawFlags<enum_Label3D_DrawFlags>` enum.
  137. .. rst-class:: classref-item-separator
  138. ----
  139. .. _enum_Label3D_AlphaCutMode:
  140. .. rst-class:: classref-enumeration
  141. enum **AlphaCutMode**: :ref:`🔗<enum_Label3D_AlphaCutMode>`
  142. .. _class_Label3D_constant_ALPHA_CUT_DISABLED:
  143. .. rst-class:: classref-enumeration-constant
  144. :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` **ALPHA_CUT_DISABLED** = ``0``
  145. This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping. :ref:`GeometryInstance3D.cast_shadow<class_GeometryInstance3D_property_cast_shadow>` has no effect when this transparency mode is used; the **Label3D** will never cast shadows.
  146. .. _class_Label3D_constant_ALPHA_CUT_DISCARD:
  147. .. rst-class:: classref-enumeration-constant
  148. :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` **ALPHA_CUT_DISCARD** = ``1``
  149. This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see :ref:`ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa<class_ProjectSettings_property_rendering/anti_aliasing/quality/screen_space_aa>`). This mode is also known as *alpha testing* or *1-bit transparency*.
  150. \ **Note:** This mode might have issues with anti-aliased fonts and outlines, try adjusting :ref:`alpha_scissor_threshold<class_Label3D_property_alpha_scissor_threshold>` or using MSDF font.
  151. \ **Note:** When using text with overlapping glyphs (e.g., cursive scripts), this mode might have transparency sorting issues between the main text and the outline.
  152. .. _class_Label3D_constant_ALPHA_CUT_OPAQUE_PREPASS:
  153. .. rst-class:: classref-enumeration-constant
  154. :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` **ALPHA_CUT_OPAQUE_PREPASS** = ``2``
  155. This mode draws fully opaque pixels in the depth prepass. This is slower than :ref:`ALPHA_CUT_DISABLED<class_Label3D_constant_ALPHA_CUT_DISABLED>` or :ref:`ALPHA_CUT_DISCARD<class_Label3D_constant_ALPHA_CUT_DISCARD>`, but it allows displaying translucent areas and smooth edges while using proper sorting.
  156. \ **Note:** When using text with overlapping glyphs (e.g., cursive scripts), this mode might have transparency sorting issues between the main text and the outline.
  157. .. _class_Label3D_constant_ALPHA_CUT_HASH:
  158. .. rst-class:: classref-enumeration-constant
  159. :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` **ALPHA_CUT_HASH** = ``3``
  160. This mode draws cuts off all values below a spatially-deterministic threshold, the rest will remain opaque.
  161. .. rst-class:: classref-section-separator
  162. ----
  163. .. rst-class:: classref-descriptions-group
  164. Property Descriptions
  165. ---------------------
  166. .. _class_Label3D_property_alpha_antialiasing_edge:
  167. .. rst-class:: classref-property
  168. :ref:`float<class_float>` **alpha_antialiasing_edge** = ``0.0`` :ref:`🔗<class_Label3D_property_alpha_antialiasing_edge>`
  169. .. rst-class:: classref-property-setget
  170. - |void| **set_alpha_antialiasing_edge**\ (\ value\: :ref:`float<class_float>`\ )
  171. - :ref:`float<class_float>` **get_alpha_antialiasing_edge**\ (\ )
  172. Threshold at which antialiasing will be applied on the alpha channel.
  173. .. rst-class:: classref-item-separator
  174. ----
  175. .. _class_Label3D_property_alpha_antialiasing_mode:
  176. .. rst-class:: classref-property
  177. :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` **alpha_antialiasing_mode** = ``0`` :ref:`🔗<class_Label3D_property_alpha_antialiasing_mode>`
  178. .. rst-class:: classref-property-setget
  179. - |void| **set_alpha_antialiasing**\ (\ value\: :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>`\ )
  180. - :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` **get_alpha_antialiasing**\ (\ )
  181. The type of alpha antialiasing to apply.
  182. .. rst-class:: classref-item-separator
  183. ----
  184. .. _class_Label3D_property_alpha_cut:
  185. .. rst-class:: classref-property
  186. :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` **alpha_cut** = ``0`` :ref:`🔗<class_Label3D_property_alpha_cut>`
  187. .. rst-class:: classref-property-setget
  188. - |void| **set_alpha_cut_mode**\ (\ value\: :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>`\ )
  189. - :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` **get_alpha_cut_mode**\ (\ )
  190. The alpha cutting mode to use for the sprite.
  191. .. rst-class:: classref-item-separator
  192. ----
  193. .. _class_Label3D_property_alpha_hash_scale:
  194. .. rst-class:: classref-property
  195. :ref:`float<class_float>` **alpha_hash_scale** = ``1.0`` :ref:`🔗<class_Label3D_property_alpha_hash_scale>`
  196. .. rst-class:: classref-property-setget
  197. - |void| **set_alpha_hash_scale**\ (\ value\: :ref:`float<class_float>`\ )
  198. - :ref:`float<class_float>` **get_alpha_hash_scale**\ (\ )
  199. The hashing scale for Alpha Hash. Recommended values between ``0`` and ``2``.
  200. .. rst-class:: classref-item-separator
  201. ----
  202. .. _class_Label3D_property_alpha_scissor_threshold:
  203. .. rst-class:: classref-property
  204. :ref:`float<class_float>` **alpha_scissor_threshold** = ``0.5`` :ref:`🔗<class_Label3D_property_alpha_scissor_threshold>`
  205. .. rst-class:: classref-property-setget
  206. - |void| **set_alpha_scissor_threshold**\ (\ value\: :ref:`float<class_float>`\ )
  207. - :ref:`float<class_float>` **get_alpha_scissor_threshold**\ (\ )
  208. Threshold at which the alpha scissor will discard values.
  209. .. rst-class:: classref-item-separator
  210. ----
  211. .. _class_Label3D_property_autowrap_mode:
  212. .. rst-class:: classref-property
  213. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **autowrap_mode** = ``0`` :ref:`🔗<class_Label3D_property_autowrap_mode>`
  214. .. rst-class:: classref-property-setget
  215. - |void| **set_autowrap_mode**\ (\ value\: :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`\ )
  216. - :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **get_autowrap_mode**\ (\ )
  217. If set to something other than :ref:`TextServer.AUTOWRAP_OFF<class_TextServer_constant_AUTOWRAP_OFF>`, the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text.
  218. .. rst-class:: classref-item-separator
  219. ----
  220. .. _class_Label3D_property_autowrap_trim_flags:
  221. .. rst-class:: classref-property
  222. |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] **autowrap_trim_flags** = ``192`` :ref:`🔗<class_Label3D_property_autowrap_trim_flags>`
  223. .. rst-class:: classref-property-setget
  224. - |void| **set_autowrap_trim_flags**\ (\ value\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\]\ )
  225. - |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] **get_autowrap_trim_flags**\ (\ )
  226. Autowrap space trimming flags. See :ref:`TextServer.BREAK_TRIM_START_EDGE_SPACES<class_TextServer_constant_BREAK_TRIM_START_EDGE_SPACES>` and :ref:`TextServer.BREAK_TRIM_END_EDGE_SPACES<class_TextServer_constant_BREAK_TRIM_END_EDGE_SPACES>` for more info.
  227. .. rst-class:: classref-item-separator
  228. ----
  229. .. _class_Label3D_property_billboard:
  230. .. rst-class:: classref-property
  231. :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` **billboard** = ``0`` :ref:`🔗<class_Label3D_property_billboard>`
  232. .. rst-class:: classref-property-setget
  233. - |void| **set_billboard_mode**\ (\ value\: :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>`\ )
  234. - :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` **get_billboard_mode**\ (\ )
  235. The billboard mode to use for the label.
  236. .. rst-class:: classref-item-separator
  237. ----
  238. .. _class_Label3D_property_double_sided:
  239. .. rst-class:: classref-property
  240. :ref:`bool<class_bool>` **double_sided** = ``true`` :ref:`🔗<class_Label3D_property_double_sided>`
  241. .. rst-class:: classref-property-setget
  242. - |void| **set_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ )
  243. - :ref:`bool<class_bool>` **get_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`\ ) |const|
  244. If ``true``, text can be seen from the back as well, if ``false``, it is invisible when looking at it from behind.
  245. .. rst-class:: classref-item-separator
  246. ----
  247. .. _class_Label3D_property_fixed_size:
  248. .. rst-class:: classref-property
  249. :ref:`bool<class_bool>` **fixed_size** = ``false`` :ref:`🔗<class_Label3D_property_fixed_size>`
  250. .. rst-class:: classref-property-setget
  251. - |void| **set_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ )
  252. - :ref:`bool<class_bool>` **get_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`\ ) |const|
  253. If ``true``, the label is rendered at the same size regardless of distance. The label's size on screen is the same as if the camera was ``1.0`` units away from the label's origin, regardless of the actual distance from the camera. The :ref:`Camera3D<class_Camera3D>`'s field of view (or :ref:`Camera3D.size<class_Camera3D_property_size>` when in orthogonal/frustum mode) still affects the size the label is drawn at.
  254. .. rst-class:: classref-item-separator
  255. ----
  256. .. _class_Label3D_property_font:
  257. .. rst-class:: classref-property
  258. :ref:`Font<class_Font>` **font** :ref:`🔗<class_Label3D_property_font>`
  259. .. rst-class:: classref-property-setget
  260. - |void| **set_font**\ (\ value\: :ref:`Font<class_Font>`\ )
  261. - :ref:`Font<class_Font>` **get_font**\ (\ )
  262. Font configuration used to display text.
  263. .. rst-class:: classref-item-separator
  264. ----
  265. .. _class_Label3D_property_font_size:
  266. .. rst-class:: classref-property
  267. :ref:`int<class_int>` **font_size** = ``32`` :ref:`🔗<class_Label3D_property_font_size>`
  268. .. rst-class:: classref-property-setget
  269. - |void| **set_font_size**\ (\ value\: :ref:`int<class_int>`\ )
  270. - :ref:`int<class_int>` **get_font_size**\ (\ )
  271. Font size of the **Label3D**'s text. To make the font look more detailed when up close, increase :ref:`font_size<class_Label3D_property_font_size>` while decreasing :ref:`pixel_size<class_Label3D_property_pixel_size>` at the same time.
  272. Higher font sizes require more time to render new characters, which can cause stuttering during gameplay.
  273. .. rst-class:: classref-item-separator
  274. ----
  275. .. _class_Label3D_property_horizontal_alignment:
  276. .. rst-class:: classref-property
  277. :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **horizontal_alignment** = ``1`` :ref:`🔗<class_Label3D_property_horizontal_alignment>`
  278. .. rst-class:: classref-property-setget
  279. - |void| **set_horizontal_alignment**\ (\ value\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ )
  280. - :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_horizontal_alignment**\ (\ )
  281. Controls the text's horizontal alignment. Supports left, center, right, and fill (also known as justify).
  282. .. rst-class:: classref-item-separator
  283. ----
  284. .. _class_Label3D_property_justification_flags:
  285. .. rst-class:: classref-property
  286. |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] **justification_flags** = ``163`` :ref:`🔗<class_Label3D_property_justification_flags>`
  287. .. rst-class:: classref-property-setget
  288. - |void| **set_justification_flags**\ (\ value\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\]\ )
  289. - |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] **get_justification_flags**\ (\ )
  290. Line fill alignment rules.
  291. .. rst-class:: classref-item-separator
  292. ----
  293. .. _class_Label3D_property_language:
  294. .. rst-class:: classref-property
  295. :ref:`String<class_String>` **language** = ``""`` :ref:`🔗<class_Label3D_property_language>`
  296. .. rst-class:: classref-property-setget
  297. - |void| **set_language**\ (\ value\: :ref:`String<class_String>`\ )
  298. - :ref:`String<class_String>` **get_language**\ (\ )
  299. Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
  300. .. rst-class:: classref-item-separator
  301. ----
  302. .. _class_Label3D_property_line_spacing:
  303. .. rst-class:: classref-property
  304. :ref:`float<class_float>` **line_spacing** = ``0.0`` :ref:`🔗<class_Label3D_property_line_spacing>`
  305. .. rst-class:: classref-property-setget
  306. - |void| **set_line_spacing**\ (\ value\: :ref:`float<class_float>`\ )
  307. - :ref:`float<class_float>` **get_line_spacing**\ (\ )
  308. Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative.
  309. .. rst-class:: classref-item-separator
  310. ----
  311. .. _class_Label3D_property_modulate:
  312. .. rst-class:: classref-property
  313. :ref:`Color<class_Color>` **modulate** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_Label3D_property_modulate>`
  314. .. rst-class:: classref-property-setget
  315. - |void| **set_modulate**\ (\ value\: :ref:`Color<class_Color>`\ )
  316. - :ref:`Color<class_Color>` **get_modulate**\ (\ )
  317. Text :ref:`Color<class_Color>` of the **Label3D**.
  318. .. rst-class:: classref-item-separator
  319. ----
  320. .. _class_Label3D_property_no_depth_test:
  321. .. rst-class:: classref-property
  322. :ref:`bool<class_bool>` **no_depth_test** = ``false`` :ref:`🔗<class_Label3D_property_no_depth_test>`
  323. .. rst-class:: classref-property-setget
  324. - |void| **set_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ )
  325. - :ref:`bool<class_bool>` **get_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`\ ) |const|
  326. If ``true``, depth testing is disabled and the object will be drawn in render order.
  327. .. rst-class:: classref-item-separator
  328. ----
  329. .. _class_Label3D_property_offset:
  330. .. rst-class:: classref-property
  331. :ref:`Vector2<class_Vector2>` **offset** = ``Vector2(0, 0)`` :ref:`🔗<class_Label3D_property_offset>`
  332. .. rst-class:: classref-property-setget
  333. - |void| **set_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ )
  334. - :ref:`Vector2<class_Vector2>` **get_offset**\ (\ )
  335. The text drawing offset (in pixels).
  336. .. rst-class:: classref-item-separator
  337. ----
  338. .. _class_Label3D_property_outline_modulate:
  339. .. rst-class:: classref-property
  340. :ref:`Color<class_Color>` **outline_modulate** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Label3D_property_outline_modulate>`
  341. .. rst-class:: classref-property-setget
  342. - |void| **set_outline_modulate**\ (\ value\: :ref:`Color<class_Color>`\ )
  343. - :ref:`Color<class_Color>` **get_outline_modulate**\ (\ )
  344. The tint of text outline.
  345. .. rst-class:: classref-item-separator
  346. ----
  347. .. _class_Label3D_property_outline_render_priority:
  348. .. rst-class:: classref-property
  349. :ref:`int<class_int>` **outline_render_priority** = ``-1`` :ref:`🔗<class_Label3D_property_outline_render_priority>`
  350. .. rst-class:: classref-property-setget
  351. - |void| **set_outline_render_priority**\ (\ value\: :ref:`int<class_int>`\ )
  352. - :ref:`int<class_int>` **get_outline_render_priority**\ (\ )
  353. Sets the render priority for the text outline. Higher priority objects will be sorted in front of lower priority objects.
  354. \ **Note:** This only applies if :ref:`alpha_cut<class_Label3D_property_alpha_cut>` is set to :ref:`ALPHA_CUT_DISABLED<class_Label3D_constant_ALPHA_CUT_DISABLED>` (default value).
  355. \ **Note:** This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).
  356. .. rst-class:: classref-item-separator
  357. ----
  358. .. _class_Label3D_property_outline_size:
  359. .. rst-class:: classref-property
  360. :ref:`int<class_int>` **outline_size** = ``12`` :ref:`🔗<class_Label3D_property_outline_size>`
  361. .. rst-class:: classref-property-setget
  362. - |void| **set_outline_size**\ (\ value\: :ref:`int<class_int>`\ )
  363. - :ref:`int<class_int>` **get_outline_size**\ (\ )
  364. Text outline size.
  365. .. rst-class:: classref-item-separator
  366. ----
  367. .. _class_Label3D_property_pixel_size:
  368. .. rst-class:: classref-property
  369. :ref:`float<class_float>` **pixel_size** = ``0.005`` :ref:`🔗<class_Label3D_property_pixel_size>`
  370. .. rst-class:: classref-property-setget
  371. - |void| **set_pixel_size**\ (\ value\: :ref:`float<class_float>`\ )
  372. - :ref:`float<class_float>` **get_pixel_size**\ (\ )
  373. The size of one pixel's width on the label to scale it in 3D. To make the font look more detailed when up close, increase :ref:`font_size<class_Label3D_property_font_size>` while decreasing :ref:`pixel_size<class_Label3D_property_pixel_size>` at the same time.
  374. .. rst-class:: classref-item-separator
  375. ----
  376. .. _class_Label3D_property_render_priority:
  377. .. rst-class:: classref-property
  378. :ref:`int<class_int>` **render_priority** = ``0`` :ref:`🔗<class_Label3D_property_render_priority>`
  379. .. rst-class:: classref-property-setget
  380. - |void| **set_render_priority**\ (\ value\: :ref:`int<class_int>`\ )
  381. - :ref:`int<class_int>` **get_render_priority**\ (\ )
  382. Sets the render priority for the text. Higher priority objects will be sorted in front of lower priority objects.
  383. \ **Note:** This only applies if :ref:`alpha_cut<class_Label3D_property_alpha_cut>` is set to :ref:`ALPHA_CUT_DISABLED<class_Label3D_constant_ALPHA_CUT_DISABLED>` (default value).
  384. \ **Note:** This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).
  385. .. rst-class:: classref-item-separator
  386. ----
  387. .. _class_Label3D_property_shaded:
  388. .. rst-class:: classref-property
  389. :ref:`bool<class_bool>` **shaded** = ``false`` :ref:`🔗<class_Label3D_property_shaded>`
  390. .. rst-class:: classref-property-setget
  391. - |void| **set_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ )
  392. - :ref:`bool<class_bool>` **get_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`\ ) |const|
  393. If ``true``, the :ref:`Light3D<class_Light3D>` in the :ref:`Environment<class_Environment>` has effects on the label.
  394. .. rst-class:: classref-item-separator
  395. ----
  396. .. _class_Label3D_property_structured_text_bidi_override:
  397. .. rst-class:: classref-property
  398. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **structured_text_bidi_override** = ``0`` :ref:`🔗<class_Label3D_property_structured_text_bidi_override>`
  399. .. rst-class:: classref-property-setget
  400. - |void| **set_structured_text_bidi_override**\ (\ value\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`\ )
  401. - :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override**\ (\ )
  402. Set BiDi algorithm override for the structured text.
  403. .. rst-class:: classref-item-separator
  404. ----
  405. .. _class_Label3D_property_structured_text_bidi_override_options:
  406. .. rst-class:: classref-property
  407. :ref:`Array<class_Array>` **structured_text_bidi_override_options** = ``[]`` :ref:`🔗<class_Label3D_property_structured_text_bidi_override_options>`
  408. .. rst-class:: classref-property-setget
  409. - |void| **set_structured_text_bidi_override_options**\ (\ value\: :ref:`Array<class_Array>`\ )
  410. - :ref:`Array<class_Array>` **get_structured_text_bidi_override_options**\ (\ )
  411. Set additional options for BiDi override.
  412. .. rst-class:: classref-item-separator
  413. ----
  414. .. _class_Label3D_property_text:
  415. .. rst-class:: classref-property
  416. :ref:`String<class_String>` **text** = ``""`` :ref:`🔗<class_Label3D_property_text>`
  417. .. rst-class:: classref-property-setget
  418. - |void| **set_text**\ (\ value\: :ref:`String<class_String>`\ )
  419. - :ref:`String<class_String>` **get_text**\ (\ )
  420. The text to display on screen.
  421. .. rst-class:: classref-item-separator
  422. ----
  423. .. _class_Label3D_property_text_direction:
  424. .. rst-class:: classref-property
  425. :ref:`Direction<enum_TextServer_Direction>` **text_direction** = ``0`` :ref:`🔗<class_Label3D_property_text_direction>`
  426. .. rst-class:: classref-property-setget
  427. - |void| **set_text_direction**\ (\ value\: :ref:`Direction<enum_TextServer_Direction>`\ )
  428. - :ref:`Direction<enum_TextServer_Direction>` **get_text_direction**\ (\ )
  429. Base text writing direction.
  430. .. rst-class:: classref-item-separator
  431. ----
  432. .. _class_Label3D_property_texture_filter:
  433. .. rst-class:: classref-property
  434. :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` **texture_filter** = ``3`` :ref:`🔗<class_Label3D_property_texture_filter>`
  435. .. rst-class:: classref-property-setget
  436. - |void| **set_texture_filter**\ (\ value\: :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>`\ )
  437. - :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` **get_texture_filter**\ (\ )
  438. Filter flags for the texture.
  439. .. rst-class:: classref-item-separator
  440. ----
  441. .. _class_Label3D_property_uppercase:
  442. .. rst-class:: classref-property
  443. :ref:`bool<class_bool>` **uppercase** = ``false`` :ref:`🔗<class_Label3D_property_uppercase>`
  444. .. rst-class:: classref-property-setget
  445. - |void| **set_uppercase**\ (\ value\: :ref:`bool<class_bool>`\ )
  446. - :ref:`bool<class_bool>` **is_uppercase**\ (\ )
  447. If ``true``, all the text displays as UPPERCASE.
  448. .. rst-class:: classref-item-separator
  449. ----
  450. .. _class_Label3D_property_vertical_alignment:
  451. .. rst-class:: classref-property
  452. :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **vertical_alignment** = ``1`` :ref:`🔗<class_Label3D_property_vertical_alignment>`
  453. .. rst-class:: classref-property-setget
  454. - |void| **set_vertical_alignment**\ (\ value\: :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>`\ )
  455. - :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **get_vertical_alignment**\ (\ )
  456. Controls the text's vertical alignment. Supports top, center, and bottom.
  457. .. rst-class:: classref-item-separator
  458. ----
  459. .. _class_Label3D_property_width:
  460. .. rst-class:: classref-property
  461. :ref:`float<class_float>` **width** = ``500.0`` :ref:`🔗<class_Label3D_property_width>`
  462. .. rst-class:: classref-property-setget
  463. - |void| **set_width**\ (\ value\: :ref:`float<class_float>`\ )
  464. - :ref:`float<class_float>` **get_width**\ (\ )
  465. Text width (in pixels), used for autowrap and fill alignment.
  466. .. rst-class:: classref-section-separator
  467. ----
  468. .. rst-class:: classref-descriptions-group
  469. Method Descriptions
  470. -------------------
  471. .. _class_Label3D_method_generate_triangle_mesh:
  472. .. rst-class:: classref-method
  473. :ref:`TriangleMesh<class_TriangleMesh>` **generate_triangle_mesh**\ (\ ) |const| :ref:`🔗<class_Label3D_method_generate_triangle_mesh>`
  474. Returns a :ref:`TriangleMesh<class_TriangleMesh>` with the label's vertices following its current configuration (such as its :ref:`pixel_size<class_Label3D_property_pixel_size>`).
  475. .. rst-class:: classref-item-separator
  476. ----
  477. .. _class_Label3D_method_get_draw_flag:
  478. .. rst-class:: classref-method
  479. :ref:`bool<class_bool>` **get_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`\ ) |const| :ref:`🔗<class_Label3D_method_get_draw_flag>`
  480. Returns the value of the specified flag.
  481. .. rst-class:: classref-item-separator
  482. ----
  483. .. _class_Label3D_method_set_draw_flag:
  484. .. rst-class:: classref-method
  485. |void| **set_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Label3D_method_set_draw_flag>`
  486. If ``true``, the specified ``flag`` will be enabled.
  487. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  488. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  489. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  490. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  491. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  492. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  493. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  494. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  495. .. |void| replace:: :abbr:`void (No return value.)`