class_spritebase3d.rst 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the SpriteBase3D.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_SpriteBase3D:
  6. SpriteBase3D
  7. ============
  8. **Inherits:** :ref:`GeometryInstance<class_GeometryInstance>` **<** :ref:`VisualInstance<class_VisualInstance>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. **Inherited By:** :ref:`AnimatedSprite3D<class_AnimatedSprite3D>`, :ref:`Sprite3D<class_Sprite3D>`
  10. **Category:** Core
  11. Brief Description
  12. -----------------
  13. 2D Sprite node in 3D environment.
  14. Properties
  15. ----------
  16. +-----------------------------------------------------+---------------------------------------------------------------+
  17. | :ref:`AlphaCutMode<enum_SpriteBase3D_AlphaCutMode>` | :ref:`alpha_cut<class_SpriteBase3D_property_alpha_cut>` |
  18. +-----------------------------------------------------+---------------------------------------------------------------+
  19. | Vector3.Axis | :ref:`axis<class_SpriteBase3D_property_axis>` |
  20. +-----------------------------------------------------+---------------------------------------------------------------+
  21. | :ref:`bool<class_bool>` | :ref:`centered<class_SpriteBase3D_property_centered>` |
  22. +-----------------------------------------------------+---------------------------------------------------------------+
  23. | :ref:`bool<class_bool>` | :ref:`double_sided<class_SpriteBase3D_property_double_sided>` |
  24. +-----------------------------------------------------+---------------------------------------------------------------+
  25. | :ref:`bool<class_bool>` | :ref:`flip_h<class_SpriteBase3D_property_flip_h>` |
  26. +-----------------------------------------------------+---------------------------------------------------------------+
  27. | :ref:`bool<class_bool>` | :ref:`flip_v<class_SpriteBase3D_property_flip_v>` |
  28. +-----------------------------------------------------+---------------------------------------------------------------+
  29. | :ref:`Color<class_Color>` | :ref:`modulate<class_SpriteBase3D_property_modulate>` |
  30. +-----------------------------------------------------+---------------------------------------------------------------+
  31. | :ref:`Vector2<class_Vector2>` | :ref:`offset<class_SpriteBase3D_property_offset>` |
  32. +-----------------------------------------------------+---------------------------------------------------------------+
  33. | :ref:`float<class_float>` | :ref:`opacity<class_SpriteBase3D_property_opacity>` |
  34. +-----------------------------------------------------+---------------------------------------------------------------+
  35. | :ref:`float<class_float>` | :ref:`pixel_size<class_SpriteBase3D_property_pixel_size>` |
  36. +-----------------------------------------------------+---------------------------------------------------------------+
  37. | :ref:`bool<class_bool>` | :ref:`shaded<class_SpriteBase3D_property_shaded>` |
  38. +-----------------------------------------------------+---------------------------------------------------------------+
  39. | :ref:`bool<class_bool>` | :ref:`transparent<class_SpriteBase3D_property_transparent>` |
  40. +-----------------------------------------------------+---------------------------------------------------------------+
  41. Methods
  42. -------
  43. +-----------------------------------------+---------------------------------------------------------------------------------------------------+
  44. | :ref:`TriangleMesh<class_TriangleMesh>` | :ref:`generate_triangle_mesh<class_SpriteBase3D_method_generate_triangle_mesh>` **(** **)** const |
  45. +-----------------------------------------+---------------------------------------------------------------------------------------------------+
  46. | :ref:`Rect2<class_Rect2>` | :ref:`get_item_rect<class_SpriteBase3D_method_get_item_rect>` **(** **)** const |
  47. +-----------------------------------------+---------------------------------------------------------------------------------------------------+
  48. Enumerations
  49. ------------
  50. .. _enum_SpriteBase3D_DrawFlags:
  51. .. _class_SpriteBase3D_constant_FLAG_TRANSPARENT:
  52. .. _class_SpriteBase3D_constant_FLAG_SHADED:
  53. .. _class_SpriteBase3D_constant_FLAG_DOUBLE_SIDED:
  54. .. _class_SpriteBase3D_constant_FLAG_MAX:
  55. enum **DrawFlags**:
  56. - **FLAG_TRANSPARENT** = **0** --- If set, the texture's transparency and the opacity are used to make those parts of the Sprite invisible.
  57. - **FLAG_SHADED** = **1** --- If set, the Light in the Environment has effects on the Sprite.
  58. - **FLAG_DOUBLE_SIDED** = **2** --- If set, texture can be seen from the back as well, if not, it is invisible when looking at it from behind.
  59. - **FLAG_MAX** = **3** --- Represents the size of the :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>` enum.
  60. ----
  61. .. _enum_SpriteBase3D_AlphaCutMode:
  62. .. _class_SpriteBase3D_constant_ALPHA_CUT_DISABLED:
  63. .. _class_SpriteBase3D_constant_ALPHA_CUT_DISCARD:
  64. .. _class_SpriteBase3D_constant_ALPHA_CUT_OPAQUE_PREPASS:
  65. enum **AlphaCutMode**:
  66. - **ALPHA_CUT_DISABLED** = **0**
  67. - **ALPHA_CUT_DISCARD** = **1**
  68. - **ALPHA_CUT_OPAQUE_PREPASS** = **2**
  69. Description
  70. -----------
  71. A node that displays 2D texture information in a 3D environment.
  72. Property Descriptions
  73. ---------------------
  74. .. _class_SpriteBase3D_property_alpha_cut:
  75. - :ref:`AlphaCutMode<enum_SpriteBase3D_AlphaCutMode>` **alpha_cut**
  76. +----------+---------------------------+
  77. | *Setter* | set_alpha_cut_mode(value) |
  78. +----------+---------------------------+
  79. | *Getter* | get_alpha_cut_mode() |
  80. +----------+---------------------------+
  81. ----
  82. .. _class_SpriteBase3D_property_axis:
  83. - Vector3.Axis **axis**
  84. +----------+-----------------+
  85. | *Setter* | set_axis(value) |
  86. +----------+-----------------+
  87. | *Getter* | get_axis() |
  88. +----------+-----------------+
  89. The direction in which the front of the texture faces.
  90. ----
  91. .. _class_SpriteBase3D_property_centered:
  92. - :ref:`bool<class_bool>` **centered**
  93. +----------+---------------------+
  94. | *Setter* | set_centered(value) |
  95. +----------+---------------------+
  96. | *Getter* | is_centered() |
  97. +----------+---------------------+
  98. If ``true``, texture will be centered. Default value: ``true``.
  99. ----
  100. .. _class_SpriteBase3D_property_double_sided:
  101. - :ref:`bool<class_bool>` **double_sided**
  102. +----------+----------------------+
  103. | *Setter* | set_draw_flag(value) |
  104. +----------+----------------------+
  105. | *Getter* | get_draw_flag() |
  106. +----------+----------------------+
  107. If ``true``, texture can be seen from the back as well, if ``false``, it is invisible when looking at it from behind. Default value: ``true``.
  108. ----
  109. .. _class_SpriteBase3D_property_flip_h:
  110. - :ref:`bool<class_bool>` **flip_h**
  111. +----------+-------------------+
  112. | *Setter* | set_flip_h(value) |
  113. +----------+-------------------+
  114. | *Getter* | is_flipped_h() |
  115. +----------+-------------------+
  116. If ``true``, texture is flipped horizontally. Default value: ``false``.
  117. ----
  118. .. _class_SpriteBase3D_property_flip_v:
  119. - :ref:`bool<class_bool>` **flip_v**
  120. +----------+-------------------+
  121. | *Setter* | set_flip_v(value) |
  122. +----------+-------------------+
  123. | *Getter* | is_flipped_v() |
  124. +----------+-------------------+
  125. If ``true``, texture is flipped vertically. Default value: ``false``.
  126. ----
  127. .. _class_SpriteBase3D_property_modulate:
  128. - :ref:`Color<class_Color>` **modulate**
  129. +----------+---------------------+
  130. | *Setter* | set_modulate(value) |
  131. +----------+---------------------+
  132. | *Getter* | get_modulate() |
  133. +----------+---------------------+
  134. A color value that gets multiplied on, could be used for mood-coloring or to simulate the color of light.
  135. ----
  136. .. _class_SpriteBase3D_property_offset:
  137. - :ref:`Vector2<class_Vector2>` **offset**
  138. +----------+-------------------+
  139. | *Setter* | set_offset(value) |
  140. +----------+-------------------+
  141. | *Getter* | get_offset() |
  142. +----------+-------------------+
  143. The texture's drawing offset.
  144. ----
  145. .. _class_SpriteBase3D_property_opacity:
  146. - :ref:`float<class_float>` **opacity**
  147. +----------+--------------------+
  148. | *Setter* | set_opacity(value) |
  149. +----------+--------------------+
  150. | *Getter* | get_opacity() |
  151. +----------+--------------------+
  152. The objects visibility on a scale from ``0`` fully invisible to ``1`` fully visible.
  153. ----
  154. .. _class_SpriteBase3D_property_pixel_size:
  155. - :ref:`float<class_float>` **pixel_size**
  156. +----------+-----------------------+
  157. | *Setter* | set_pixel_size(value) |
  158. +----------+-----------------------+
  159. | *Getter* | get_pixel_size() |
  160. +----------+-----------------------+
  161. The size of one pixel's width on the Sprite to scale it in 3D.
  162. ----
  163. .. _class_SpriteBase3D_property_shaded:
  164. - :ref:`bool<class_bool>` **shaded**
  165. +----------+----------------------+
  166. | *Setter* | set_draw_flag(value) |
  167. +----------+----------------------+
  168. | *Getter* | get_draw_flag() |
  169. +----------+----------------------+
  170. If ``true``, the :ref:`Light<class_Light>` in the :ref:`Environment<class_Environment>` has effects on the Sprite. Default value: ``false``.
  171. ----
  172. .. _class_SpriteBase3D_property_transparent:
  173. - :ref:`bool<class_bool>` **transparent**
  174. +----------+----------------------+
  175. | *Setter* | set_draw_flag(value) |
  176. +----------+----------------------+
  177. | *Getter* | get_draw_flag() |
  178. +----------+----------------------+
  179. If ``true``, the texture's transparency and the opacity are used to make those parts of the Sprite invisible. Default value: ``true``.
  180. Method Descriptions
  181. -------------------
  182. .. _class_SpriteBase3D_method_generate_triangle_mesh:
  183. - :ref:`TriangleMesh<class_TriangleMesh>` **generate_triangle_mesh** **(** **)** const
  184. ----
  185. .. _class_SpriteBase3D_method_get_item_rect:
  186. - :ref:`Rect2<class_Rect2>` **get_item_rect** **(** **)** const