class_spritebase3d.rst 9.8 KB

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