class_label3d.rst 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/Label3D.xml.
  6. .. _class_Label3D:
  7. Label3D
  8. =======
  9. **Inherits:** :ref:`GeometryInstance<class_GeometryInstance>` **<** :ref:`VisualInstance<class_VisualInstance>` **<** :ref:`CullInstance<class_CullInstance>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. Displays plain text in a 3D world.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Label3D displays plain text in a 3D world. It gives you control over the horizontal and vertical alignment.
  15. .. rst-class:: classref-reftable-group
  16. Properties
  17. ----------
  18. .. table::
  19. :widths: auto
  20. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  21. | :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` | :ref:`alpha_cut<class_Label3D_property_alpha_cut>` | ``0`` |
  22. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  23. | :ref:`float<class_float>` | :ref:`alpha_scissor_threshold<class_Label3D_property_alpha_scissor_threshold>` | ``0.5`` |
  24. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  25. | :ref:`bool<class_bool>` | :ref:`autowrap<class_Label3D_property_autowrap>` | ``false`` |
  26. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  27. | :ref:`BillboardMode<enum_SpatialMaterial_BillboardMode>` | :ref:`billboard<class_Label3D_property_billboard>` | ``0`` |
  28. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`double_sided<class_Label3D_property_double_sided>` | ``true`` |
  30. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  31. | :ref:`bool<class_bool>` | :ref:`fixed_size<class_Label3D_property_fixed_size>` | ``false`` |
  32. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  33. | :ref:`Font<class_Font>` | :ref:`font<class_Label3D_property_font>` | |
  34. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  35. | :ref:`Align<enum_Label3D_Align>` | :ref:`horizontal_alignment<class_Label3D_property_horizontal_alignment>` | ``1`` |
  36. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  37. | :ref:`float<class_float>` | :ref:`line_spacing<class_Label3D_property_line_spacing>` | ``0.0`` |
  38. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  39. | :ref:`Color<class_Color>` | :ref:`modulate<class_Label3D_property_modulate>` | ``Color( 1, 1, 1, 1 )`` |
  40. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  41. | :ref:`bool<class_bool>` | :ref:`no_depth_test<class_Label3D_property_no_depth_test>` | ``false`` |
  42. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  43. | :ref:`Vector2<class_Vector2>` | :ref:`offset<class_Label3D_property_offset>` | ``Vector2( 0, 0 )`` |
  44. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  45. | :ref:`Color<class_Color>` | :ref:`outline_modulate<class_Label3D_property_outline_modulate>` | ``Color( 0, 0, 0, 1 )`` |
  46. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  47. | :ref:`int<class_int>` | :ref:`outline_render_priority<class_Label3D_property_outline_render_priority>` | ``-1`` |
  48. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  49. | :ref:`float<class_float>` | :ref:`pixel_size<class_Label3D_property_pixel_size>` | ``0.01`` |
  50. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  51. | :ref:`int<class_int>` | :ref:`render_priority<class_Label3D_property_render_priority>` | ``0`` |
  52. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  53. | :ref:`bool<class_bool>` | :ref:`shaded<class_Label3D_property_shaded>` | ``false`` |
  54. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  55. | :ref:`String<class_String>` | :ref:`text<class_Label3D_property_text>` | ``""`` |
  56. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  57. | :ref:`bool<class_bool>` | :ref:`uppercase<class_Label3D_property_uppercase>` | ``false`` |
  58. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  59. | :ref:`VAlign<enum_Label3D_VAlign>` | :ref:`vertical_alignment<class_Label3D_property_vertical_alignment>` | ``1`` |
  60. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  61. | :ref:`float<class_float>` | :ref:`width<class_Label3D_property_width>` | ``500.0`` |
  62. +----------------------------------------------------------+--------------------------------------------------------------------------------+-------------------------+
  63. .. rst-class:: classref-reftable-group
  64. Methods
  65. -------
  66. .. table::
  67. :widths: auto
  68. +-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | :ref:`TriangleMesh<class_TriangleMesh>` | :ref:`generate_triangle_mesh<class_Label3D_method_generate_triangle_mesh>` **(** **)** |const| |
  70. +-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | :ref:`bool<class_bool>` | :ref:`get_draw_flag<class_Label3D_method_get_draw_flag>` **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag **)** |const| |
  72. +-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | void | :ref:`set_draw_flag<class_Label3D_method_set_draw_flag>` **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag, :ref:`bool<class_bool>` enabled **)** |
  74. +-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
  75. .. rst-class:: classref-section-separator
  76. ----
  77. .. rst-class:: classref-descriptions-group
  78. Enumerations
  79. ------------
  80. .. _enum_Label3D_DrawFlags:
  81. .. rst-class:: classref-enumeration
  82. enum **DrawFlags**:
  83. .. _class_Label3D_constant_FLAG_SHADED:
  84. .. rst-class:: classref-enumeration-constant
  85. :ref:`DrawFlags<enum_Label3D_DrawFlags>` **FLAG_SHADED** = ``0``
  86. If set, lights in the environment affect the label.
  87. .. _class_Label3D_constant_FLAG_DOUBLE_SIDED:
  88. .. rst-class:: classref-enumeration-constant
  89. :ref:`DrawFlags<enum_Label3D_DrawFlags>` **FLAG_DOUBLE_SIDED** = ``1``
  90. If set, text can be seen from the back as well. If not, the text is invisible when looking at it from behind.
  91. .. _class_Label3D_constant_FLAG_DISABLE_DEPTH_TEST:
  92. .. rst-class:: classref-enumeration-constant
  93. :ref:`DrawFlags<enum_Label3D_DrawFlags>` **FLAG_DISABLE_DEPTH_TEST** = ``2``
  94. 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.
  95. .. _class_Label3D_constant_FLAG_FIXED_SIZE:
  96. .. rst-class:: classref-enumeration-constant
  97. :ref:`DrawFlags<enum_Label3D_DrawFlags>` **FLAG_FIXED_SIZE** = ``3``
  98. Label is scaled by depth so that it always appears the same size on screen.
  99. .. _class_Label3D_constant_FLAG_MAX:
  100. .. rst-class:: classref-enumeration-constant
  101. :ref:`DrawFlags<enum_Label3D_DrawFlags>` **FLAG_MAX** = ``4``
  102. Represents the size of the :ref:`DrawFlags<enum_Label3D_DrawFlags>` enum.
  103. .. rst-class:: classref-item-separator
  104. ----
  105. .. _enum_Label3D_AlphaCutMode:
  106. .. rst-class:: classref-enumeration
  107. enum **AlphaCutMode**:
  108. .. _class_Label3D_constant_ALPHA_CUT_DISABLED:
  109. .. rst-class:: classref-enumeration-constant
  110. :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` **ALPHA_CUT_DISABLED** = ``0``
  111. This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping.
  112. .. _class_Label3D_constant_ALPHA_CUT_DISCARD:
  113. .. rst-class:: classref-enumeration-constant
  114. :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` **ALPHA_CUT_DISCARD** = ``1``
  115. This mode only allows fully transparent or fully opaque pixels. This mode is also known as *alpha testing* or *1-bit transparency*.
  116. \ **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 SDF font.
  117. \ **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.
  118. .. _class_Label3D_constant_ALPHA_CUT_OPAQUE_PREPASS:
  119. .. rst-class:: classref-enumeration-constant
  120. :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` **ALPHA_CUT_OPAQUE_PREPASS** = ``2``
  121. 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.
  122. \ **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.
  123. .. rst-class:: classref-item-separator
  124. ----
  125. .. _enum_Label3D_Align:
  126. .. rst-class:: classref-enumeration
  127. enum **Align**:
  128. .. _class_Label3D_constant_ALIGN_LEFT:
  129. .. rst-class:: classref-enumeration-constant
  130. :ref:`Align<enum_Label3D_Align>` **ALIGN_LEFT** = ``0``
  131. Align rows to the left (default).
  132. .. _class_Label3D_constant_ALIGN_CENTER:
  133. .. rst-class:: classref-enumeration-constant
  134. :ref:`Align<enum_Label3D_Align>` **ALIGN_CENTER** = ``1``
  135. Align rows centered.
  136. .. _class_Label3D_constant_ALIGN_RIGHT:
  137. .. rst-class:: classref-enumeration-constant
  138. :ref:`Align<enum_Label3D_Align>` **ALIGN_RIGHT** = ``2``
  139. Align rows to the right.
  140. .. _class_Label3D_constant_ALIGN_FILL:
  141. .. rst-class:: classref-enumeration-constant
  142. :ref:`Align<enum_Label3D_Align>` **ALIGN_FILL** = ``3``
  143. Expand row whitespaces to fit the width.
  144. .. rst-class:: classref-item-separator
  145. ----
  146. .. _enum_Label3D_VAlign:
  147. .. rst-class:: classref-enumeration
  148. enum **VAlign**:
  149. .. _class_Label3D_constant_VALIGN_TOP:
  150. .. rst-class:: classref-enumeration-constant
  151. :ref:`VAlign<enum_Label3D_VAlign>` **VALIGN_TOP** = ``0``
  152. Align the whole text to the top.
  153. .. _class_Label3D_constant_VALIGN_CENTER:
  154. .. rst-class:: classref-enumeration-constant
  155. :ref:`VAlign<enum_Label3D_VAlign>` **VALIGN_CENTER** = ``1``
  156. Align the whole text to the center.
  157. .. _class_Label3D_constant_VALIGN_BOTTOM:
  158. .. rst-class:: classref-enumeration-constant
  159. :ref:`VAlign<enum_Label3D_VAlign>` **VALIGN_BOTTOM** = ``2``
  160. Align the whole text to the bottom.
  161. .. _class_Label3D_constant_VALIGN_FILL:
  162. .. rst-class:: classref-enumeration-constant
  163. :ref:`VAlign<enum_Label3D_VAlign>` **VALIGN_FILL** = ``3``
  164. Align the whole text by spreading the rows.
  165. .. rst-class:: classref-section-separator
  166. ----
  167. .. rst-class:: classref-descriptions-group
  168. Property Descriptions
  169. ---------------------
  170. .. _class_Label3D_property_alpha_cut:
  171. .. rst-class:: classref-property
  172. :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` **alpha_cut** = ``0``
  173. .. rst-class:: classref-property-setget
  174. - void **set_alpha_cut_mode** **(** :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` value **)**
  175. - :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` **get_alpha_cut_mode** **(** **)**
  176. The alpha cutting mode to use for the sprite. See :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` for possible values.
  177. .. rst-class:: classref-item-separator
  178. ----
  179. .. _class_Label3D_property_alpha_scissor_threshold:
  180. .. rst-class:: classref-property
  181. :ref:`float<class_float>` **alpha_scissor_threshold** = ``0.5``
  182. .. rst-class:: classref-property-setget
  183. - void **set_alpha_scissor_threshold** **(** :ref:`float<class_float>` value **)**
  184. - :ref:`float<class_float>` **get_alpha_scissor_threshold** **(** **)**
  185. Threshold at which the alpha scissor will discard values.
  186. .. rst-class:: classref-item-separator
  187. ----
  188. .. _class_Label3D_property_autowrap:
  189. .. rst-class:: classref-property
  190. :ref:`bool<class_bool>` **autowrap** = ``false``
  191. .. rst-class:: classref-property-setget
  192. - void **set_autowrap** **(** :ref:`bool<class_bool>` value **)**
  193. - :ref:`bool<class_bool>` **get_autowrap** **(** **)**
  194. If ``true``, wraps the text to the :ref:`width<class_Label3D_property_width>`.
  195. .. rst-class:: classref-item-separator
  196. ----
  197. .. _class_Label3D_property_billboard:
  198. .. rst-class:: classref-property
  199. :ref:`BillboardMode<enum_SpatialMaterial_BillboardMode>` **billboard** = ``0``
  200. .. rst-class:: classref-property-setget
  201. - void **set_billboard_mode** **(** :ref:`BillboardMode<enum_SpatialMaterial_BillboardMode>` value **)**
  202. - :ref:`BillboardMode<enum_SpatialMaterial_BillboardMode>` **get_billboard_mode** **(** **)**
  203. The billboard mode to use for the label. See :ref:`BillboardMode<enum_SpatialMaterial_BillboardMode>` for possible values.
  204. .. rst-class:: classref-item-separator
  205. ----
  206. .. _class_Label3D_property_double_sided:
  207. .. rst-class:: classref-property
  208. :ref:`bool<class_bool>` **double_sided** = ``true``
  209. .. rst-class:: classref-property-setget
  210. - void **set_draw_flag** **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag, :ref:`bool<class_bool>` enabled **)**
  211. - :ref:`bool<class_bool>` **get_draw_flag** **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag **)** |const|
  212. If ``true``, text can be seen from the back as well, if ``false``, it is invisible when looking at it from behind.
  213. .. rst-class:: classref-item-separator
  214. ----
  215. .. _class_Label3D_property_fixed_size:
  216. .. rst-class:: classref-property
  217. :ref:`bool<class_bool>` **fixed_size** = ``false``
  218. .. rst-class:: classref-property-setget
  219. - void **set_draw_flag** **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag, :ref:`bool<class_bool>` enabled **)**
  220. - :ref:`bool<class_bool>` **get_draw_flag** **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag **)** |const|
  221. If ``true``, the label is rendered at the same size regardless of distance.
  222. .. rst-class:: classref-item-separator
  223. ----
  224. .. _class_Label3D_property_font:
  225. .. rst-class:: classref-property
  226. :ref:`Font<class_Font>` **font**
  227. .. rst-class:: classref-property-setget
  228. - void **set_font** **(** :ref:`Font<class_Font>` value **)**
  229. - :ref:`Font<class_Font>` **get_font** **(** **)**
  230. :ref:`Font<class_Font>` used for the **Label3D**'s text.
  231. .. rst-class:: classref-item-separator
  232. ----
  233. .. _class_Label3D_property_horizontal_alignment:
  234. .. rst-class:: classref-property
  235. :ref:`Align<enum_Label3D_Align>` **horizontal_alignment** = ``1``
  236. .. rst-class:: classref-property-setget
  237. - void **set_horizontal_alignment** **(** :ref:`Align<enum_Label3D_Align>` value **)**
  238. - :ref:`Align<enum_Label3D_Align>` **get_horizontal_alignment** **(** **)**
  239. Controls the text's horizontal alignment. Supports left, center, right. Set it to one of the :ref:`Align<enum_Label3D_Align>` constants.
  240. .. rst-class:: classref-item-separator
  241. ----
  242. .. _class_Label3D_property_line_spacing:
  243. .. rst-class:: classref-property
  244. :ref:`float<class_float>` **line_spacing** = ``0.0``
  245. .. rst-class:: classref-property-setget
  246. - void **set_line_spacing** **(** :ref:`float<class_float>` value **)**
  247. - :ref:`float<class_float>` **get_line_spacing** **(** **)**
  248. Vertical space between lines in multiline **Label3D**.
  249. .. rst-class:: classref-item-separator
  250. ----
  251. .. _class_Label3D_property_modulate:
  252. .. rst-class:: classref-property
  253. :ref:`Color<class_Color>` **modulate** = ``Color( 1, 1, 1, 1 )``
  254. .. rst-class:: classref-property-setget
  255. - void **set_modulate** **(** :ref:`Color<class_Color>` value **)**
  256. - :ref:`Color<class_Color>` **get_modulate** **(** **)**
  257. Text :ref:`Color<class_Color>` of the **Label3D**.
  258. .. rst-class:: classref-item-separator
  259. ----
  260. .. _class_Label3D_property_no_depth_test:
  261. .. rst-class:: classref-property
  262. :ref:`bool<class_bool>` **no_depth_test** = ``false``
  263. .. rst-class:: classref-property-setget
  264. - void **set_draw_flag** **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag, :ref:`bool<class_bool>` enabled **)**
  265. - :ref:`bool<class_bool>` **get_draw_flag** **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag **)** |const|
  266. If ``true``, depth testing is disabled and the object will be drawn in render order.
  267. .. rst-class:: classref-item-separator
  268. ----
  269. .. _class_Label3D_property_offset:
  270. .. rst-class:: classref-property
  271. :ref:`Vector2<class_Vector2>` **offset** = ``Vector2( 0, 0 )``
  272. .. rst-class:: classref-property-setget
  273. - void **set_offset** **(** :ref:`Vector2<class_Vector2>` value **)**
  274. - :ref:`Vector2<class_Vector2>` **get_offset** **(** **)**
  275. The text drawing offset (in pixels).
  276. .. rst-class:: classref-item-separator
  277. ----
  278. .. _class_Label3D_property_outline_modulate:
  279. .. rst-class:: classref-property
  280. :ref:`Color<class_Color>` **outline_modulate** = ``Color( 0, 0, 0, 1 )``
  281. .. rst-class:: classref-property-setget
  282. - void **set_outline_modulate** **(** :ref:`Color<class_Color>` value **)**
  283. - :ref:`Color<class_Color>` **get_outline_modulate** **(** **)**
  284. The tint of :ref:`Font<class_Font>`'s outline.
  285. .. rst-class:: classref-item-separator
  286. ----
  287. .. _class_Label3D_property_outline_render_priority:
  288. .. rst-class:: classref-property
  289. :ref:`int<class_int>` **outline_render_priority** = ``-1``
  290. .. rst-class:: classref-property-setget
  291. - void **set_outline_render_priority** **(** :ref:`int<class_int>` value **)**
  292. - :ref:`int<class_int>` **get_outline_render_priority** **(** **)**
  293. Sets the render priority for the text outline. Higher priority objects will be sorted in front of lower priority objects.
  294. \ **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).
  295. \ **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).
  296. .. rst-class:: classref-item-separator
  297. ----
  298. .. _class_Label3D_property_pixel_size:
  299. .. rst-class:: classref-property
  300. :ref:`float<class_float>` **pixel_size** = ``0.01``
  301. .. rst-class:: classref-property-setget
  302. - void **set_pixel_size** **(** :ref:`float<class_float>` value **)**
  303. - :ref:`float<class_float>` **get_pixel_size** **(** **)**
  304. The size of one pixel's width on the label to scale it in 3D.
  305. .. rst-class:: classref-item-separator
  306. ----
  307. .. _class_Label3D_property_render_priority:
  308. .. rst-class:: classref-property
  309. :ref:`int<class_int>` **render_priority** = ``0``
  310. .. rst-class:: classref-property-setget
  311. - void **set_render_priority** **(** :ref:`int<class_int>` value **)**
  312. - :ref:`int<class_int>` **get_render_priority** **(** **)**
  313. Sets the render priority for the text. Higher priority objects will be sorted in front of lower priority objects.
  314. \ **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).
  315. \ **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).
  316. .. rst-class:: classref-item-separator
  317. ----
  318. .. _class_Label3D_property_shaded:
  319. .. rst-class:: classref-property
  320. :ref:`bool<class_bool>` **shaded** = ``false``
  321. .. rst-class:: classref-property-setget
  322. - void **set_draw_flag** **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag, :ref:`bool<class_bool>` enabled **)**
  323. - :ref:`bool<class_bool>` **get_draw_flag** **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag **)** |const|
  324. If ``true``, the :ref:`Light<class_Light>` in the :ref:`Environment<class_Environment>` has effects on the label.
  325. .. rst-class:: classref-item-separator
  326. ----
  327. .. _class_Label3D_property_text:
  328. .. rst-class:: classref-property
  329. :ref:`String<class_String>` **text** = ``""``
  330. .. rst-class:: classref-property-setget
  331. - void **set_text** **(** :ref:`String<class_String>` value **)**
  332. - :ref:`String<class_String>` **get_text** **(** **)**
  333. The text to display on screen.
  334. .. rst-class:: classref-item-separator
  335. ----
  336. .. _class_Label3D_property_uppercase:
  337. .. rst-class:: classref-property
  338. :ref:`bool<class_bool>` **uppercase** = ``false``
  339. .. rst-class:: classref-property-setget
  340. - void **set_uppercase** **(** :ref:`bool<class_bool>` value **)**
  341. - :ref:`bool<class_bool>` **is_uppercase** **(** **)**
  342. If ``true``, all the text displays as UPPERCASE.
  343. .. rst-class:: classref-item-separator
  344. ----
  345. .. _class_Label3D_property_vertical_alignment:
  346. .. rst-class:: classref-property
  347. :ref:`VAlign<enum_Label3D_VAlign>` **vertical_alignment** = ``1``
  348. .. rst-class:: classref-property-setget
  349. - void **set_vertical_alignment** **(** :ref:`VAlign<enum_Label3D_VAlign>` value **)**
  350. - :ref:`VAlign<enum_Label3D_VAlign>` **get_vertical_alignment** **(** **)**
  351. Controls the text's vertical alignment. Supports top, center, bottom. Set it to one of the :ref:`VAlign<enum_Label3D_VAlign>` constants.
  352. .. rst-class:: classref-item-separator
  353. ----
  354. .. _class_Label3D_property_width:
  355. .. rst-class:: classref-property
  356. :ref:`float<class_float>` **width** = ``500.0``
  357. .. rst-class:: classref-property-setget
  358. - void **set_width** **(** :ref:`float<class_float>` value **)**
  359. - :ref:`float<class_float>` **get_width** **(** **)**
  360. Text width (in pixels), used for autowrap and fill alignment.
  361. .. rst-class:: classref-section-separator
  362. ----
  363. .. rst-class:: classref-descriptions-group
  364. Method Descriptions
  365. -------------------
  366. .. _class_Label3D_method_generate_triangle_mesh:
  367. .. rst-class:: classref-method
  368. :ref:`TriangleMesh<class_TriangleMesh>` **generate_triangle_mesh** **(** **)** |const|
  369. 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>`).
  370. .. rst-class:: classref-item-separator
  371. ----
  372. .. _class_Label3D_method_get_draw_flag:
  373. .. rst-class:: classref-method
  374. :ref:`bool<class_bool>` **get_draw_flag** **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag **)** |const|
  375. Returns the value of the specified flag.
  376. .. rst-class:: classref-item-separator
  377. ----
  378. .. _class_Label3D_method_set_draw_flag:
  379. .. rst-class:: classref-method
  380. void **set_draw_flag** **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag, :ref:`bool<class_bool>` enabled **)**
  381. If ``true``, the specified flag will be enabled. See :ref:`DrawFlags<enum_Label3D_DrawFlags>` for a list of flags.
  382. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  383. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  384. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  385. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`