SpriteBase3D.xml 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="SpriteBase3D" inherits="GeometryInstance" category="Core" version="3.1.2">
  3. <brief_description>
  4. 2D Sprite node in 3D environment.
  5. </brief_description>
  6. <description>
  7. A node that displays 2D texture information in a 3D environment.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="generate_triangle_mesh" qualifiers="const">
  13. <return type="TriangleMesh">
  14. </return>
  15. <description>
  16. </description>
  17. </method>
  18. <method name="get_item_rect" qualifiers="const">
  19. <return type="Rect2">
  20. </return>
  21. <description>
  22. </description>
  23. </method>
  24. </methods>
  25. <members>
  26. <member name="alpha_cut" type="int" setter="set_alpha_cut_mode" getter="get_alpha_cut_mode" enum="SpriteBase3D.AlphaCutMode">
  27. </member>
  28. <member name="axis" type="int" setter="set_axis" getter="get_axis" enum="Vector3.Axis">
  29. The direction in which the front of the texture faces.
  30. </member>
  31. <member name="centered" type="bool" setter="set_centered" getter="is_centered">
  32. If [code]true[/code], texture will be centered. Default value: [code]true[/code].
  33. </member>
  34. <member name="double_sided" type="bool" setter="set_draw_flag" getter="get_draw_flag">
  35. If [code]true[/code], texture can be seen from the back as well, if [code]false[/code], it is invisible when looking at it from behind. Default value: [code]true[/code].
  36. </member>
  37. <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h">
  38. If [code]true[/code], texture is flipped horizontally. Default value: [code]false[/code].
  39. </member>
  40. <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v">
  41. If [code]true[/code], texture is flipped vertically. Default value: [code]false[/code].
  42. </member>
  43. <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate">
  44. A color value that gets multiplied on, could be used for mood-coloring or to simulate the color of light.
  45. </member>
  46. <member name="offset" type="Vector2" setter="set_offset" getter="get_offset">
  47. The texture's drawing offset.
  48. </member>
  49. <member name="opacity" type="float" setter="set_opacity" getter="get_opacity">
  50. The objects visibility on a scale from [code]0[/code] fully invisible to [code]1[/code] fully visible.
  51. </member>
  52. <member name="pixel_size" type="float" setter="set_pixel_size" getter="get_pixel_size">
  53. The size of one pixel's width on the Sprite to scale it in 3D.
  54. </member>
  55. <member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag">
  56. If [code]true[/code], the [Light] in the [Environment] has effects on the Sprite. Default value: [code]false[/code].
  57. </member>
  58. <member name="transparent" type="bool" setter="set_draw_flag" getter="get_draw_flag">
  59. If [code]true[/code], the texture's transparency and the opacity are used to make those parts of the Sprite invisible. Default value: [code]true[/code].
  60. </member>
  61. </members>
  62. <constants>
  63. <constant name="FLAG_TRANSPARENT" value="0" enum="DrawFlags">
  64. If set, the texture's transparency and the opacity are used to make those parts of the Sprite invisible.
  65. </constant>
  66. <constant name="FLAG_SHADED" value="1" enum="DrawFlags">
  67. If set, the Light in the Environment has effects on the Sprite.
  68. </constant>
  69. <constant name="FLAG_DOUBLE_SIDED" value="2" enum="DrawFlags">
  70. If set, texture can be seen from the back as well, if not, it is invisible when looking at it from behind.
  71. </constant>
  72. <constant name="FLAG_MAX" value="3" enum="DrawFlags">
  73. Represents the size of the [enum DrawFlags] enum.
  74. </constant>
  75. <constant name="ALPHA_CUT_DISABLED" value="0" enum="AlphaCutMode">
  76. </constant>
  77. <constant name="ALPHA_CUT_DISCARD" value="1" enum="AlphaCutMode">
  78. </constant>
  79. <constant name="ALPHA_CUT_OPAQUE_PREPASS" value="2" enum="AlphaCutMode">
  80. </constant>
  81. </constants>
  82. </class>