TextMesh.xml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="TextMesh" inherits="PrimitiveMesh" version="3.6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. Generate an [PrimitiveMesh] from the text.
  5. </brief_description>
  6. <description>
  7. Generate an [PrimitiveMesh] from the text.
  8. TextMesh can be generated only when using dynamic fonts with vector glyph contours. Bitmap fonts (including bitmap data in the TrueType/OpenType containers, like color emoji fonts) are not supported.
  9. The UV layout is arranged in 4 horizontal strips, top to bottom: 40% of the height for the front face, 40% for the back face, 10% for the outer edges and 10% for the inner edges.
  10. </description>
  11. <tutorials>
  12. </tutorials>
  13. <methods>
  14. </methods>
  15. <members>
  16. <member name="curve_step" type="float" setter="set_curve_step" getter="get_curve_step" default="0.5">
  17. Step (in pixels) used to approximate Bézier curves.
  18. </member>
  19. <member name="depth" type="float" setter="set_depth" getter="get_depth" default="0.05">
  20. Depths of the mesh, if set to [code]0.0[/code] only front surface, is generated, and UV layout is changed to use full texture for the front face only.
  21. </member>
  22. <member name="font" type="Font" setter="set_font" getter="get_font">
  23. [Font] used for the [TextMesh]'s text.
  24. </member>
  25. <member name="horizontal_alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="TextMesh.Align" default="1">
  26. Controls the text's horizontal alignment. Supports left, center and right. Set it to one of the [enum Align] constants.
  27. </member>
  28. <member name="pixel_size" type="float" setter="set_pixel_size" getter="get_pixel_size" default="0.01">
  29. The size of one pixel's width on the text to scale it in 3D.
  30. </member>
  31. <member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
  32. The text to generate mesh from.
  33. </member>
  34. <member name="uppercase" type="bool" setter="set_uppercase" getter="is_uppercase" default="false">
  35. If [code]true[/code], all the text displays as UPPERCASE.
  36. </member>
  37. </members>
  38. <constants>
  39. <constant name="ALIGN_LEFT" value="0" enum="Align">
  40. Align rows to the left (default).
  41. </constant>
  42. <constant name="ALIGN_CENTER" value="1" enum="Align">
  43. Align rows centered.
  44. </constant>
  45. <constant name="ALIGN_RIGHT" value="2" enum="Align">
  46. Align rows to the right.
  47. </constant>
  48. </constants>
  49. </class>