class_label3d.rst 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839
  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. | :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` | :ref:`billboard<class_Label3D_property_billboard>` | ``0`` |
  40. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  41. | :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` | cast_shadow | ``0`` (overrides :ref:`GeometryInstance3D<class_GeometryInstance3D_property_cast_shadow>`) |
  42. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  43. | :ref:`bool<class_bool>` | :ref:`double_sided<class_Label3D_property_double_sided>` | ``true`` |
  44. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  45. | :ref:`bool<class_bool>` | :ref:`fixed_size<class_Label3D_property_fixed_size>` | ``false`` |
  46. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  47. | :ref:`Font<class_Font>` | :ref:`font<class_Label3D_property_font>` | |
  48. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  49. | :ref:`int<class_int>` | :ref:`font_size<class_Label3D_property_font_size>` | ``32`` |
  50. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  51. | :ref:`GIMode<enum_GeometryInstance3D_GIMode>` | gi_mode | ``0`` (overrides :ref:`GeometryInstance3D<class_GeometryInstance3D_property_gi_mode>`) |
  52. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  53. | :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`horizontal_alignment<class_Label3D_property_horizontal_alignment>` | ``1`` |
  54. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  55. | |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] | :ref:`justification_flags<class_Label3D_property_justification_flags>` | ``163`` |
  56. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  57. | :ref:`String<class_String>` | :ref:`language<class_Label3D_property_language>` | ``""`` |
  58. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  59. | :ref:`float<class_float>` | :ref:`line_spacing<class_Label3D_property_line_spacing>` | ``0.0`` |
  60. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  61. | :ref:`Color<class_Color>` | :ref:`modulate<class_Label3D_property_modulate>` | ``Color(1, 1, 1, 1)`` |
  62. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  63. | :ref:`bool<class_bool>` | :ref:`no_depth_test<class_Label3D_property_no_depth_test>` | ``false`` |
  64. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  65. | :ref:`Vector2<class_Vector2>` | :ref:`offset<class_Label3D_property_offset>` | ``Vector2(0, 0)`` |
  66. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  67. | :ref:`Color<class_Color>` | :ref:`outline_modulate<class_Label3D_property_outline_modulate>` | ``Color(0, 0, 0, 1)`` |
  68. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  69. | :ref:`int<class_int>` | :ref:`outline_render_priority<class_Label3D_property_outline_render_priority>` | ``-1`` |
  70. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  71. | :ref:`int<class_int>` | :ref:`outline_size<class_Label3D_property_outline_size>` | ``12`` |
  72. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  73. | :ref:`float<class_float>` | :ref:`pixel_size<class_Label3D_property_pixel_size>` | ``0.005`` |
  74. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  75. | :ref:`int<class_int>` | :ref:`render_priority<class_Label3D_property_render_priority>` | ``0`` |
  76. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  77. | :ref:`bool<class_bool>` | :ref:`shaded<class_Label3D_property_shaded>` | ``false`` |
  78. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  79. | :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` | :ref:`structured_text_bidi_override<class_Label3D_property_structured_text_bidi_override>` | ``0`` |
  80. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  81. | :ref:`Array<class_Array>` | :ref:`structured_text_bidi_override_options<class_Label3D_property_structured_text_bidi_override_options>` | ``[]`` |
  82. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  83. | :ref:`String<class_String>` | :ref:`text<class_Label3D_property_text>` | ``""`` |
  84. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  85. | :ref:`Direction<enum_TextServer_Direction>` | :ref:`text_direction<class_Label3D_property_text_direction>` | ``0`` |
  86. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  87. | :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` | :ref:`texture_filter<class_Label3D_property_texture_filter>` | ``3`` |
  88. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  89. | :ref:`bool<class_bool>` | :ref:`uppercase<class_Label3D_property_uppercase>` | ``false`` |
  90. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  91. | :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` | :ref:`vertical_alignment<class_Label3D_property_vertical_alignment>` | ``1`` |
  92. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  93. | :ref:`float<class_float>` | :ref:`width<class_Label3D_property_width>` | ``500.0`` |
  94. +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+
  95. .. rst-class:: classref-reftable-group
  96. Methods
  97. -------
  98. .. table::
  99. :widths: auto
  100. +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | :ref:`TriangleMesh<class_TriangleMesh>` | :ref:`generate_triangle_mesh<class_Label3D_method_generate_triangle_mesh>`\ (\ ) |const| |
  102. +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | :ref:`bool<class_bool>` | :ref:`get_draw_flag<class_Label3D_method_get_draw_flag>`\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`\ ) |const| |
  104. +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | |void| | :ref:`set_draw_flag<class_Label3D_method_set_draw_flag>`\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ ) |
  106. +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  107. .. rst-class:: classref-section-separator
  108. ----
  109. .. rst-class:: classref-descriptions-group
  110. Enumerations
  111. ------------
  112. .. _enum_Label3D_DrawFlags:
  113. .. rst-class:: classref-enumeration
  114. enum **DrawFlags**: :ref:`🔗<enum_Label3D_DrawFlags>`
  115. .. _class_Label3D_constant_FLAG_SHADED:
  116. .. rst-class:: classref-enumeration-constant
  117. :ref:`DrawFlags<enum_Label3D_DrawFlags>` **FLAG_SHADED** = ``0``
  118. If set, lights in the environment affect the label.
  119. .. _class_Label3D_constant_FLAG_DOUBLE_SIDED:
  120. .. rst-class:: classref-enumeration-constant
  121. :ref:`DrawFlags<enum_Label3D_DrawFlags>` **FLAG_DOUBLE_SIDED** = ``1``
  122. If set, text can be seen from the back as well. If not, the text is invisible when looking at it from behind.
  123. .. _class_Label3D_constant_FLAG_DISABLE_DEPTH_TEST:
  124. .. rst-class:: classref-enumeration-constant
  125. :ref:`DrawFlags<enum_Label3D_DrawFlags>` **FLAG_DISABLE_DEPTH_TEST** = ``2``
  126. 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.
  127. .. _class_Label3D_constant_FLAG_FIXED_SIZE:
  128. .. rst-class:: classref-enumeration-constant
  129. :ref:`DrawFlags<enum_Label3D_DrawFlags>` **FLAG_FIXED_SIZE** = ``3``
  130. Label is scaled by depth so that it always appears the same size on screen.
  131. .. _class_Label3D_constant_FLAG_MAX:
  132. .. rst-class:: classref-enumeration-constant
  133. :ref:`DrawFlags<enum_Label3D_DrawFlags>` **FLAG_MAX** = ``4``
  134. Represents the size of the :ref:`DrawFlags<enum_Label3D_DrawFlags>` enum.
  135. .. rst-class:: classref-item-separator
  136. ----
  137. .. _enum_Label3D_AlphaCutMode:
  138. .. rst-class:: classref-enumeration
  139. enum **AlphaCutMode**: :ref:`🔗<enum_Label3D_AlphaCutMode>`
  140. .. _class_Label3D_constant_ALPHA_CUT_DISABLED:
  141. .. rst-class:: classref-enumeration-constant
  142. :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` **ALPHA_CUT_DISABLED** = ``0``
  143. 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.
  144. .. _class_Label3D_constant_ALPHA_CUT_DISCARD:
  145. .. rst-class:: classref-enumeration-constant
  146. :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` **ALPHA_CUT_DISCARD** = ``1``
  147. 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*.
  148. \ **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.
  149. \ **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.
  150. .. _class_Label3D_constant_ALPHA_CUT_OPAQUE_PREPASS:
  151. .. rst-class:: classref-enumeration-constant
  152. :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` **ALPHA_CUT_OPAQUE_PREPASS** = ``2``
  153. 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.
  154. \ **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.
  155. .. _class_Label3D_constant_ALPHA_CUT_HASH:
  156. .. rst-class:: classref-enumeration-constant
  157. :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` **ALPHA_CUT_HASH** = ``3``
  158. This mode draws cuts off all values below a spatially-deterministic threshold, the rest will remain opaque.
  159. .. rst-class:: classref-section-separator
  160. ----
  161. .. rst-class:: classref-descriptions-group
  162. Property Descriptions
  163. ---------------------
  164. .. _class_Label3D_property_alpha_antialiasing_edge:
  165. .. rst-class:: classref-property
  166. :ref:`float<class_float>` **alpha_antialiasing_edge** = ``0.0`` :ref:`🔗<class_Label3D_property_alpha_antialiasing_edge>`
  167. .. rst-class:: classref-property-setget
  168. - |void| **set_alpha_antialiasing_edge**\ (\ value\: :ref:`float<class_float>`\ )
  169. - :ref:`float<class_float>` **get_alpha_antialiasing_edge**\ (\ )
  170. Threshold at which antialiasing will be applied on the alpha channel.
  171. .. rst-class:: classref-item-separator
  172. ----
  173. .. _class_Label3D_property_alpha_antialiasing_mode:
  174. .. rst-class:: classref-property
  175. :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` **alpha_antialiasing_mode** = ``0`` :ref:`🔗<class_Label3D_property_alpha_antialiasing_mode>`
  176. .. rst-class:: classref-property-setget
  177. - |void| **set_alpha_antialiasing**\ (\ value\: :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>`\ )
  178. - :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` **get_alpha_antialiasing**\ (\ )
  179. The type of alpha antialiasing to apply. See :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>`.
  180. .. rst-class:: classref-item-separator
  181. ----
  182. .. _class_Label3D_property_alpha_cut:
  183. .. rst-class:: classref-property
  184. :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` **alpha_cut** = ``0`` :ref:`🔗<class_Label3D_property_alpha_cut>`
  185. .. rst-class:: classref-property-setget
  186. - |void| **set_alpha_cut_mode**\ (\ value\: :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>`\ )
  187. - :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` **get_alpha_cut_mode**\ (\ )
  188. The alpha cutting mode to use for the sprite. See :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` for possible values.
  189. .. rst-class:: classref-item-separator
  190. ----
  191. .. _class_Label3D_property_alpha_hash_scale:
  192. .. rst-class:: classref-property
  193. :ref:`float<class_float>` **alpha_hash_scale** = ``1.0`` :ref:`🔗<class_Label3D_property_alpha_hash_scale>`
  194. .. rst-class:: classref-property-setget
  195. - |void| **set_alpha_hash_scale**\ (\ value\: :ref:`float<class_float>`\ )
  196. - :ref:`float<class_float>` **get_alpha_hash_scale**\ (\ )
  197. The hashing scale for Alpha Hash. Recommended values between ``0`` and ``2``.
  198. .. rst-class:: classref-item-separator
  199. ----
  200. .. _class_Label3D_property_alpha_scissor_threshold:
  201. .. rst-class:: classref-property
  202. :ref:`float<class_float>` **alpha_scissor_threshold** = ``0.5`` :ref:`🔗<class_Label3D_property_alpha_scissor_threshold>`
  203. .. rst-class:: classref-property-setget
  204. - |void| **set_alpha_scissor_threshold**\ (\ value\: :ref:`float<class_float>`\ )
  205. - :ref:`float<class_float>` **get_alpha_scissor_threshold**\ (\ )
  206. Threshold at which the alpha scissor will discard values.
  207. .. rst-class:: classref-item-separator
  208. ----
  209. .. _class_Label3D_property_autowrap_mode:
  210. .. rst-class:: classref-property
  211. :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **autowrap_mode** = ``0`` :ref:`🔗<class_Label3D_property_autowrap_mode>`
  212. .. rst-class:: classref-property-setget
  213. - |void| **set_autowrap_mode**\ (\ value\: :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`\ )
  214. - :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **get_autowrap_mode**\ (\ )
  215. 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. To see how each mode behaves, see :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`.
  216. .. rst-class:: classref-item-separator
  217. ----
  218. .. _class_Label3D_property_billboard:
  219. .. rst-class:: classref-property
  220. :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` **billboard** = ``0`` :ref:`🔗<class_Label3D_property_billboard>`
  221. .. rst-class:: classref-property-setget
  222. - |void| **set_billboard_mode**\ (\ value\: :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>`\ )
  223. - :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` **get_billboard_mode**\ (\ )
  224. The billboard mode to use for the label. See :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` for possible values.
  225. .. rst-class:: classref-item-separator
  226. ----
  227. .. _class_Label3D_property_double_sided:
  228. .. rst-class:: classref-property
  229. :ref:`bool<class_bool>` **double_sided** = ``true`` :ref:`🔗<class_Label3D_property_double_sided>`
  230. .. rst-class:: classref-property-setget
  231. - |void| **set_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ )
  232. - :ref:`bool<class_bool>` **get_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`\ ) |const|
  233. If ``true``, text can be seen from the back as well, if ``false``, it is invisible when looking at it from behind.
  234. .. rst-class:: classref-item-separator
  235. ----
  236. .. _class_Label3D_property_fixed_size:
  237. .. rst-class:: classref-property
  238. :ref:`bool<class_bool>` **fixed_size** = ``false`` :ref:`🔗<class_Label3D_property_fixed_size>`
  239. .. rst-class:: classref-property-setget
  240. - |void| **set_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ )
  241. - :ref:`bool<class_bool>` **get_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`\ ) |const|
  242. If ``true``, the label is rendered at the same size regardless of distance.
  243. .. rst-class:: classref-item-separator
  244. ----
  245. .. _class_Label3D_property_font:
  246. .. rst-class:: classref-property
  247. :ref:`Font<class_Font>` **font** :ref:`🔗<class_Label3D_property_font>`
  248. .. rst-class:: classref-property-setget
  249. - |void| **set_font**\ (\ value\: :ref:`Font<class_Font>`\ )
  250. - :ref:`Font<class_Font>` **get_font**\ (\ )
  251. Font configuration used to display text.
  252. .. rst-class:: classref-item-separator
  253. ----
  254. .. _class_Label3D_property_font_size:
  255. .. rst-class:: classref-property
  256. :ref:`int<class_int>` **font_size** = ``32`` :ref:`🔗<class_Label3D_property_font_size>`
  257. .. rst-class:: classref-property-setget
  258. - |void| **set_font_size**\ (\ value\: :ref:`int<class_int>`\ )
  259. - :ref:`int<class_int>` **get_font_size**\ (\ )
  260. 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.
  261. Higher font sizes require more time to render new characters, which can cause stuttering during gameplay.
  262. .. rst-class:: classref-item-separator
  263. ----
  264. .. _class_Label3D_property_horizontal_alignment:
  265. .. rst-class:: classref-property
  266. :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **horizontal_alignment** = ``1`` :ref:`🔗<class_Label3D_property_horizontal_alignment>`
  267. .. rst-class:: classref-property-setget
  268. - |void| **set_horizontal_alignment**\ (\ value\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ )
  269. - :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_horizontal_alignment**\ (\ )
  270. Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` constants.
  271. .. rst-class:: classref-item-separator
  272. ----
  273. .. _class_Label3D_property_justification_flags:
  274. .. rst-class:: classref-property
  275. |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] **justification_flags** = ``163`` :ref:`🔗<class_Label3D_property_justification_flags>`
  276. .. rst-class:: classref-property-setget
  277. - |void| **set_justification_flags**\ (\ value\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\]\ )
  278. - |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] **get_justification_flags**\ (\ )
  279. Line fill alignment rules. See :ref:`JustificationFlag<enum_TextServer_JustificationFlag>` for more information.
  280. .. rst-class:: classref-item-separator
  281. ----
  282. .. _class_Label3D_property_language:
  283. .. rst-class:: classref-property
  284. :ref:`String<class_String>` **language** = ``""`` :ref:`🔗<class_Label3D_property_language>`
  285. .. rst-class:: classref-property-setget
  286. - |void| **set_language**\ (\ value\: :ref:`String<class_String>`\ )
  287. - :ref:`String<class_String>` **get_language**\ (\ )
  288. Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
  289. .. rst-class:: classref-item-separator
  290. ----
  291. .. _class_Label3D_property_line_spacing:
  292. .. rst-class:: classref-property
  293. :ref:`float<class_float>` **line_spacing** = ``0.0`` :ref:`🔗<class_Label3D_property_line_spacing>`
  294. .. rst-class:: classref-property-setget
  295. - |void| **set_line_spacing**\ (\ value\: :ref:`float<class_float>`\ )
  296. - :ref:`float<class_float>` **get_line_spacing**\ (\ )
  297. Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative.
  298. .. rst-class:: classref-item-separator
  299. ----
  300. .. _class_Label3D_property_modulate:
  301. .. rst-class:: classref-property
  302. :ref:`Color<class_Color>` **modulate** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_Label3D_property_modulate>`
  303. .. rst-class:: classref-property-setget
  304. - |void| **set_modulate**\ (\ value\: :ref:`Color<class_Color>`\ )
  305. - :ref:`Color<class_Color>` **get_modulate**\ (\ )
  306. Text :ref:`Color<class_Color>` of the **Label3D**.
  307. .. rst-class:: classref-item-separator
  308. ----
  309. .. _class_Label3D_property_no_depth_test:
  310. .. rst-class:: classref-property
  311. :ref:`bool<class_bool>` **no_depth_test** = ``false`` :ref:`🔗<class_Label3D_property_no_depth_test>`
  312. .. rst-class:: classref-property-setget
  313. - |void| **set_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ )
  314. - :ref:`bool<class_bool>` **get_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`\ ) |const|
  315. If ``true``, depth testing is disabled and the object will be drawn in render order.
  316. .. rst-class:: classref-item-separator
  317. ----
  318. .. _class_Label3D_property_offset:
  319. .. rst-class:: classref-property
  320. :ref:`Vector2<class_Vector2>` **offset** = ``Vector2(0, 0)`` :ref:`🔗<class_Label3D_property_offset>`
  321. .. rst-class:: classref-property-setget
  322. - |void| **set_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ )
  323. - :ref:`Vector2<class_Vector2>` **get_offset**\ (\ )
  324. The text drawing offset (in pixels).
  325. .. rst-class:: classref-item-separator
  326. ----
  327. .. _class_Label3D_property_outline_modulate:
  328. .. rst-class:: classref-property
  329. :ref:`Color<class_Color>` **outline_modulate** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Label3D_property_outline_modulate>`
  330. .. rst-class:: classref-property-setget
  331. - |void| **set_outline_modulate**\ (\ value\: :ref:`Color<class_Color>`\ )
  332. - :ref:`Color<class_Color>` **get_outline_modulate**\ (\ )
  333. The tint of text outline.
  334. .. rst-class:: classref-item-separator
  335. ----
  336. .. _class_Label3D_property_outline_render_priority:
  337. .. rst-class:: classref-property
  338. :ref:`int<class_int>` **outline_render_priority** = ``-1`` :ref:`🔗<class_Label3D_property_outline_render_priority>`
  339. .. rst-class:: classref-property-setget
  340. - |void| **set_outline_render_priority**\ (\ value\: :ref:`int<class_int>`\ )
  341. - :ref:`int<class_int>` **get_outline_render_priority**\ (\ )
  342. Sets the render priority for the text outline. Higher priority objects will be sorted in front of lower priority objects.
  343. \ **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).
  344. \ **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).
  345. .. rst-class:: classref-item-separator
  346. ----
  347. .. _class_Label3D_property_outline_size:
  348. .. rst-class:: classref-property
  349. :ref:`int<class_int>` **outline_size** = ``12`` :ref:`🔗<class_Label3D_property_outline_size>`
  350. .. rst-class:: classref-property-setget
  351. - |void| **set_outline_size**\ (\ value\: :ref:`int<class_int>`\ )
  352. - :ref:`int<class_int>` **get_outline_size**\ (\ )
  353. Text outline size.
  354. .. rst-class:: classref-item-separator
  355. ----
  356. .. _class_Label3D_property_pixel_size:
  357. .. rst-class:: classref-property
  358. :ref:`float<class_float>` **pixel_size** = ``0.005`` :ref:`🔗<class_Label3D_property_pixel_size>`
  359. .. rst-class:: classref-property-setget
  360. - |void| **set_pixel_size**\ (\ value\: :ref:`float<class_float>`\ )
  361. - :ref:`float<class_float>` **get_pixel_size**\ (\ )
  362. 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.
  363. .. rst-class:: classref-item-separator
  364. ----
  365. .. _class_Label3D_property_render_priority:
  366. .. rst-class:: classref-property
  367. :ref:`int<class_int>` **render_priority** = ``0`` :ref:`🔗<class_Label3D_property_render_priority>`
  368. .. rst-class:: classref-property-setget
  369. - |void| **set_render_priority**\ (\ value\: :ref:`int<class_int>`\ )
  370. - :ref:`int<class_int>` **get_render_priority**\ (\ )
  371. Sets the render priority for the text. Higher priority objects will be sorted in front of lower priority objects.
  372. \ **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).
  373. \ **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).
  374. .. rst-class:: classref-item-separator
  375. ----
  376. .. _class_Label3D_property_shaded:
  377. .. rst-class:: classref-property
  378. :ref:`bool<class_bool>` **shaded** = ``false`` :ref:`🔗<class_Label3D_property_shaded>`
  379. .. rst-class:: classref-property-setget
  380. - |void| **set_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ )
  381. - :ref:`bool<class_bool>` **get_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`\ ) |const|
  382. If ``true``, the :ref:`Light3D<class_Light3D>` in the :ref:`Environment<class_Environment>` has effects on the label.
  383. .. rst-class:: classref-item-separator
  384. ----
  385. .. _class_Label3D_property_structured_text_bidi_override:
  386. .. rst-class:: classref-property
  387. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **structured_text_bidi_override** = ``0`` :ref:`🔗<class_Label3D_property_structured_text_bidi_override>`
  388. .. rst-class:: classref-property-setget
  389. - |void| **set_structured_text_bidi_override**\ (\ value\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`\ )
  390. - :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override**\ (\ )
  391. Set BiDi algorithm override for the structured text.
  392. .. rst-class:: classref-item-separator
  393. ----
  394. .. _class_Label3D_property_structured_text_bidi_override_options:
  395. .. rst-class:: classref-property
  396. :ref:`Array<class_Array>` **structured_text_bidi_override_options** = ``[]`` :ref:`🔗<class_Label3D_property_structured_text_bidi_override_options>`
  397. .. rst-class:: classref-property-setget
  398. - |void| **set_structured_text_bidi_override_options**\ (\ value\: :ref:`Array<class_Array>`\ )
  399. - :ref:`Array<class_Array>` **get_structured_text_bidi_override_options**\ (\ )
  400. Set additional options for BiDi override.
  401. .. rst-class:: classref-item-separator
  402. ----
  403. .. _class_Label3D_property_text:
  404. .. rst-class:: classref-property
  405. :ref:`String<class_String>` **text** = ``""`` :ref:`🔗<class_Label3D_property_text>`
  406. .. rst-class:: classref-property-setget
  407. - |void| **set_text**\ (\ value\: :ref:`String<class_String>`\ )
  408. - :ref:`String<class_String>` **get_text**\ (\ )
  409. The text to display on screen.
  410. .. rst-class:: classref-item-separator
  411. ----
  412. .. _class_Label3D_property_text_direction:
  413. .. rst-class:: classref-property
  414. :ref:`Direction<enum_TextServer_Direction>` **text_direction** = ``0`` :ref:`🔗<class_Label3D_property_text_direction>`
  415. .. rst-class:: classref-property-setget
  416. - |void| **set_text_direction**\ (\ value\: :ref:`Direction<enum_TextServer_Direction>`\ )
  417. - :ref:`Direction<enum_TextServer_Direction>` **get_text_direction**\ (\ )
  418. Base text writing direction.
  419. .. rst-class:: classref-item-separator
  420. ----
  421. .. _class_Label3D_property_texture_filter:
  422. .. rst-class:: classref-property
  423. :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` **texture_filter** = ``3`` :ref:`🔗<class_Label3D_property_texture_filter>`
  424. .. rst-class:: classref-property-setget
  425. - |void| **set_texture_filter**\ (\ value\: :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>`\ )
  426. - :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` **get_texture_filter**\ (\ )
  427. Filter flags for the texture. See :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` for options.
  428. .. rst-class:: classref-item-separator
  429. ----
  430. .. _class_Label3D_property_uppercase:
  431. .. rst-class:: classref-property
  432. :ref:`bool<class_bool>` **uppercase** = ``false`` :ref:`🔗<class_Label3D_property_uppercase>`
  433. .. rst-class:: classref-property-setget
  434. - |void| **set_uppercase**\ (\ value\: :ref:`bool<class_bool>`\ )
  435. - :ref:`bool<class_bool>` **is_uppercase**\ (\ )
  436. If ``true``, all the text displays as UPPERCASE.
  437. .. rst-class:: classref-item-separator
  438. ----
  439. .. _class_Label3D_property_vertical_alignment:
  440. .. rst-class:: classref-property
  441. :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **vertical_alignment** = ``1`` :ref:`🔗<class_Label3D_property_vertical_alignment>`
  442. .. rst-class:: classref-property-setget
  443. - |void| **set_vertical_alignment**\ (\ value\: :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>`\ )
  444. - :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **get_vertical_alignment**\ (\ )
  445. Controls the text's vertical alignment. Supports top, center, bottom. Set it to one of the :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` constants.
  446. .. rst-class:: classref-item-separator
  447. ----
  448. .. _class_Label3D_property_width:
  449. .. rst-class:: classref-property
  450. :ref:`float<class_float>` **width** = ``500.0`` :ref:`🔗<class_Label3D_property_width>`
  451. .. rst-class:: classref-property-setget
  452. - |void| **set_width**\ (\ value\: :ref:`float<class_float>`\ )
  453. - :ref:`float<class_float>` **get_width**\ (\ )
  454. Text width (in pixels), used for autowrap and fill alignment.
  455. .. rst-class:: classref-section-separator
  456. ----
  457. .. rst-class:: classref-descriptions-group
  458. Method Descriptions
  459. -------------------
  460. .. _class_Label3D_method_generate_triangle_mesh:
  461. .. rst-class:: classref-method
  462. :ref:`TriangleMesh<class_TriangleMesh>` **generate_triangle_mesh**\ (\ ) |const| :ref:`🔗<class_Label3D_method_generate_triangle_mesh>`
  463. 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>`).
  464. .. rst-class:: classref-item-separator
  465. ----
  466. .. _class_Label3D_method_get_draw_flag:
  467. .. rst-class:: classref-method
  468. :ref:`bool<class_bool>` **get_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`\ ) |const| :ref:`🔗<class_Label3D_method_get_draw_flag>`
  469. Returns the value of the specified flag.
  470. .. rst-class:: classref-item-separator
  471. ----
  472. .. _class_Label3D_method_set_draw_flag:
  473. .. rst-class:: classref-method
  474. |void| **set_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Label3D_method_set_draw_flag>`
  475. If ``true``, the specified flag will be enabled. See :ref:`DrawFlags<enum_Label3D_DrawFlags>` for a list of flags.
  476. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  477. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  478. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  479. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  480. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  481. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  482. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  483. .. |void| replace:: :abbr:`void (No return value.)`