class_cpuparticles2d.rst 61 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the CPUParticles2D.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_CPUParticles2D:
  5. CPUParticles2D
  6. ==============
  7. **Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. CPU-based 2D particle emitter.
  12. Properties
  13. ----------
  14. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  15. | :ref:`int<class_int>` | :ref:`amount<class_CPUParticles2D_property_amount>` | 8 |
  16. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  17. | :ref:`float<class_float>` | :ref:`angle<class_CPUParticles2D_property_angle>` | 0.0 |
  18. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  19. | :ref:`Curve<class_Curve>` | :ref:`angle_curve<class_CPUParticles2D_property_angle_curve>` | |
  20. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  21. | :ref:`float<class_float>` | :ref:`angle_random<class_CPUParticles2D_property_angle_random>` | 0.0 |
  22. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  23. | :ref:`float<class_float>` | :ref:`angular_velocity<class_CPUParticles2D_property_angular_velocity>` | 0.0 |
  24. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  25. | :ref:`Curve<class_Curve>` | :ref:`angular_velocity_curve<class_CPUParticles2D_property_angular_velocity_curve>` | |
  26. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  27. | :ref:`float<class_float>` | :ref:`angular_velocity_random<class_CPUParticles2D_property_angular_velocity_random>` | 0.0 |
  28. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  29. | :ref:`float<class_float>` | :ref:`anim_offset<class_CPUParticles2D_property_anim_offset>` | 0.0 |
  30. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  31. | :ref:`Curve<class_Curve>` | :ref:`anim_offset_curve<class_CPUParticles2D_property_anim_offset_curve>` | |
  32. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  33. | :ref:`float<class_float>` | :ref:`anim_offset_random<class_CPUParticles2D_property_anim_offset_random>` | 0.0 |
  34. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  35. | :ref:`float<class_float>` | :ref:`anim_speed<class_CPUParticles2D_property_anim_speed>` | 0.0 |
  36. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  37. | :ref:`Curve<class_Curve>` | :ref:`anim_speed_curve<class_CPUParticles2D_property_anim_speed_curve>` | |
  38. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  39. | :ref:`float<class_float>` | :ref:`anim_speed_random<class_CPUParticles2D_property_anim_speed_random>` | 0.0 |
  40. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  41. | :ref:`Color<class_Color>` | :ref:`color<class_CPUParticles2D_property_color>` | Color( 1, 1, 1, 1 ) |
  42. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  43. | :ref:`Gradient<class_Gradient>` | :ref:`color_ramp<class_CPUParticles2D_property_color_ramp>` | |
  44. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  45. | :ref:`float<class_float>` | :ref:`damping<class_CPUParticles2D_property_damping>` | 0.0 |
  46. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  47. | :ref:`Curve<class_Curve>` | :ref:`damping_curve<class_CPUParticles2D_property_damping_curve>` | |
  48. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  49. | :ref:`float<class_float>` | :ref:`damping_random<class_CPUParticles2D_property_damping_random>` | 0.0 |
  50. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  51. | :ref:`Vector2<class_Vector2>` | :ref:`direction<class_CPUParticles2D_property_direction>` | Vector2( 1, 0 ) |
  52. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  53. | :ref:`DrawOrder<enum_CPUParticles2D_DrawOrder>` | :ref:`draw_order<class_CPUParticles2D_property_draw_order>` | 0 |
  54. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  55. | :ref:`PoolColorArray<class_PoolColorArray>` | :ref:`emission_colors<class_CPUParticles2D_property_emission_colors>` | |
  56. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  57. | :ref:`PoolVector2Array<class_PoolVector2Array>` | :ref:`emission_normals<class_CPUParticles2D_property_emission_normals>` | |
  58. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  59. | :ref:`PoolVector2Array<class_PoolVector2Array>` | :ref:`emission_points<class_CPUParticles2D_property_emission_points>` | |
  60. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  61. | :ref:`Vector2<class_Vector2>` | :ref:`emission_rect_extents<class_CPUParticles2D_property_emission_rect_extents>` | |
  62. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  63. | :ref:`EmissionShape<enum_CPUParticles2D_EmissionShape>` | :ref:`emission_shape<class_CPUParticles2D_property_emission_shape>` | 0 |
  64. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  65. | :ref:`float<class_float>` | :ref:`emission_sphere_radius<class_CPUParticles2D_property_emission_sphere_radius>` | |
  66. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  67. | :ref:`bool<class_bool>` | :ref:`emitting<class_CPUParticles2D_property_emitting>` | true |
  68. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  69. | :ref:`float<class_float>` | :ref:`explosiveness<class_CPUParticles2D_property_explosiveness>` | 0.0 |
  70. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  71. | :ref:`int<class_int>` | :ref:`fixed_fps<class_CPUParticles2D_property_fixed_fps>` | 0 |
  72. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  73. | :ref:`bool<class_bool>` | :ref:`flag_align_y<class_CPUParticles2D_property_flag_align_y>` | false |
  74. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  75. | :ref:`float<class_float>` | :ref:`flatness<class_CPUParticles2D_property_flatness>` | 0.0 |
  76. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  77. | :ref:`bool<class_bool>` | :ref:`fract_delta<class_CPUParticles2D_property_fract_delta>` | true |
  78. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  79. | :ref:`Vector2<class_Vector2>` | :ref:`gravity<class_CPUParticles2D_property_gravity>` | Vector2( 0, 98 ) |
  80. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  81. | :ref:`float<class_float>` | :ref:`hue_variation<class_CPUParticles2D_property_hue_variation>` | 0.0 |
  82. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  83. | :ref:`Curve<class_Curve>` | :ref:`hue_variation_curve<class_CPUParticles2D_property_hue_variation_curve>` | |
  84. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  85. | :ref:`float<class_float>` | :ref:`hue_variation_random<class_CPUParticles2D_property_hue_variation_random>` | 0.0 |
  86. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  87. | :ref:`float<class_float>` | :ref:`initial_velocity<class_CPUParticles2D_property_initial_velocity>` | 0.0 |
  88. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  89. | :ref:`float<class_float>` | :ref:`initial_velocity_random<class_CPUParticles2D_property_initial_velocity_random>` | 0.0 |
  90. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  91. | :ref:`float<class_float>` | :ref:`lifetime<class_CPUParticles2D_property_lifetime>` | 1.0 |
  92. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  93. | :ref:`float<class_float>` | :ref:`lifetime_randomness<class_CPUParticles2D_property_lifetime_randomness>` | 0.0 |
  94. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  95. | :ref:`float<class_float>` | :ref:`linear_accel<class_CPUParticles2D_property_linear_accel>` | 0.0 |
  96. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  97. | :ref:`Curve<class_Curve>` | :ref:`linear_accel_curve<class_CPUParticles2D_property_linear_accel_curve>` | |
  98. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  99. | :ref:`float<class_float>` | :ref:`linear_accel_random<class_CPUParticles2D_property_linear_accel_random>` | 0.0 |
  100. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  101. | :ref:`bool<class_bool>` | :ref:`local_coords<class_CPUParticles2D_property_local_coords>` | true |
  102. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  103. | :ref:`Texture<class_Texture>` | :ref:`normalmap<class_CPUParticles2D_property_normalmap>` | |
  104. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  105. | :ref:`bool<class_bool>` | :ref:`one_shot<class_CPUParticles2D_property_one_shot>` | false |
  106. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  107. | :ref:`float<class_float>` | :ref:`orbit_velocity<class_CPUParticles2D_property_orbit_velocity>` | 0.0 |
  108. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  109. | :ref:`Curve<class_Curve>` | :ref:`orbit_velocity_curve<class_CPUParticles2D_property_orbit_velocity_curve>` | |
  110. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  111. | :ref:`float<class_float>` | :ref:`orbit_velocity_random<class_CPUParticles2D_property_orbit_velocity_random>` | 0.0 |
  112. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  113. | :ref:`float<class_float>` | :ref:`preprocess<class_CPUParticles2D_property_preprocess>` | 0.0 |
  114. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  115. | :ref:`float<class_float>` | :ref:`radial_accel<class_CPUParticles2D_property_radial_accel>` | 0.0 |
  116. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  117. | :ref:`Curve<class_Curve>` | :ref:`radial_accel_curve<class_CPUParticles2D_property_radial_accel_curve>` | |
  118. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  119. | :ref:`float<class_float>` | :ref:`radial_accel_random<class_CPUParticles2D_property_radial_accel_random>` | 0.0 |
  120. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  121. | :ref:`float<class_float>` | :ref:`randomness<class_CPUParticles2D_property_randomness>` | 0.0 |
  122. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  123. | :ref:`float<class_float>` | :ref:`scale_amount<class_CPUParticles2D_property_scale_amount>` | 1.0 |
  124. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  125. | :ref:`Curve<class_Curve>` | :ref:`scale_amount_curve<class_CPUParticles2D_property_scale_amount_curve>` | |
  126. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  127. | :ref:`float<class_float>` | :ref:`scale_amount_random<class_CPUParticles2D_property_scale_amount_random>` | 0.0 |
  128. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  129. | :ref:`float<class_float>` | :ref:`speed_scale<class_CPUParticles2D_property_speed_scale>` | 1.0 |
  130. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  131. | :ref:`float<class_float>` | :ref:`spread<class_CPUParticles2D_property_spread>` | 45.0 |
  132. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  133. | :ref:`float<class_float>` | :ref:`tangential_accel<class_CPUParticles2D_property_tangential_accel>` | 0.0 |
  134. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  135. | :ref:`Curve<class_Curve>` | :ref:`tangential_accel_curve<class_CPUParticles2D_property_tangential_accel_curve>` | |
  136. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  137. | :ref:`float<class_float>` | :ref:`tangential_accel_random<class_CPUParticles2D_property_tangential_accel_random>` | 0.0 |
  138. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  139. | :ref:`Texture<class_Texture>` | :ref:`texture<class_CPUParticles2D_property_texture>` | |
  140. +---------------------------------------------------------+---------------------------------------------------------------------------------------+---------------------+
  141. Methods
  142. -------
  143. +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | void | :ref:`convert_from_particles<class_CPUParticles2D_method_convert_from_particles>` **(** :ref:`Node<class_Node>` particles **)** |
  145. +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | :ref:`float<class_float>` | :ref:`get_param<class_CPUParticles2D_method_get_param>` **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param **)** const |
  147. +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | :ref:`Curve<class_Curve>` | :ref:`get_param_curve<class_CPUParticles2D_method_get_param_curve>` **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param **)** const |
  149. +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | :ref:`float<class_float>` | :ref:`get_param_randomness<class_CPUParticles2D_method_get_param_randomness>` **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param **)** const |
  151. +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | :ref:`bool<class_bool>` | :ref:`get_particle_flag<class_CPUParticles2D_method_get_particle_flag>` **(** :ref:`Flags<enum_CPUParticles2D_Flags>` flag **)** const |
  153. +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | void | :ref:`restart<class_CPUParticles2D_method_restart>` **(** **)** |
  155. +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | void | :ref:`set_param<class_CPUParticles2D_method_set_param>` **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param, :ref:`float<class_float>` value **)** |
  157. +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | void | :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param, :ref:`Curve<class_Curve>` curve **)** |
  159. +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | void | :ref:`set_param_randomness<class_CPUParticles2D_method_set_param_randomness>` **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param, :ref:`float<class_float>` randomness **)** |
  161. +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | void | :ref:`set_particle_flag<class_CPUParticles2D_method_set_particle_flag>` **(** :ref:`Flags<enum_CPUParticles2D_Flags>` flag, :ref:`bool<class_bool>` enable **)** |
  163. +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. Enumerations
  165. ------------
  166. .. _enum_CPUParticles2D_DrawOrder:
  167. .. _class_CPUParticles2D_constant_DRAW_ORDER_INDEX:
  168. .. _class_CPUParticles2D_constant_DRAW_ORDER_LIFETIME:
  169. enum **DrawOrder**:
  170. - **DRAW_ORDER_INDEX** = **0** --- Particles are drawn in the order emitted.
  171. - **DRAW_ORDER_LIFETIME** = **1** --- Particles are drawn in order of remaining lifetime.
  172. .. _enum_CPUParticles2D_Parameter:
  173. .. _class_CPUParticles2D_constant_PARAM_INITIAL_LINEAR_VELOCITY:
  174. .. _class_CPUParticles2D_constant_PARAM_ANGULAR_VELOCITY:
  175. .. _class_CPUParticles2D_constant_PARAM_ORBIT_VELOCITY:
  176. .. _class_CPUParticles2D_constant_PARAM_LINEAR_ACCEL:
  177. .. _class_CPUParticles2D_constant_PARAM_RADIAL_ACCEL:
  178. .. _class_CPUParticles2D_constant_PARAM_TANGENTIAL_ACCEL:
  179. .. _class_CPUParticles2D_constant_PARAM_DAMPING:
  180. .. _class_CPUParticles2D_constant_PARAM_ANGLE:
  181. .. _class_CPUParticles2D_constant_PARAM_SCALE:
  182. .. _class_CPUParticles2D_constant_PARAM_HUE_VARIATION:
  183. .. _class_CPUParticles2D_constant_PARAM_ANIM_SPEED:
  184. .. _class_CPUParticles2D_constant_PARAM_ANIM_OFFSET:
  185. .. _class_CPUParticles2D_constant_PARAM_MAX:
  186. enum **Parameter**:
  187. - **PARAM_INITIAL_LINEAR_VELOCITY** = **0** --- Use with :ref:`set_param<class_CPUParticles2D_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles2D_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set initial velocity properties.
  188. - **PARAM_ANGULAR_VELOCITY** = **1** --- Use with :ref:`set_param<class_CPUParticles2D_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles2D_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set angular velocity properties.
  189. - **PARAM_ORBIT_VELOCITY** = **2** --- Use with :ref:`set_param<class_CPUParticles2D_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles2D_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set orbital velocity properties.
  190. - **PARAM_LINEAR_ACCEL** = **3** --- Use with :ref:`set_param<class_CPUParticles2D_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles2D_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set linear acceleration properties.
  191. - **PARAM_RADIAL_ACCEL** = **4** --- Use with :ref:`set_param<class_CPUParticles2D_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles2D_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set radial acceleration properties.
  192. - **PARAM_TANGENTIAL_ACCEL** = **5** --- Use with :ref:`set_param<class_CPUParticles2D_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles2D_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set tangential acceleration properties.
  193. - **PARAM_DAMPING** = **6** --- Use with :ref:`set_param<class_CPUParticles2D_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles2D_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set damping properties.
  194. - **PARAM_ANGLE** = **7** --- Use with :ref:`set_param<class_CPUParticles2D_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles2D_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set angle properties.
  195. - **PARAM_SCALE** = **8** --- Use with :ref:`set_param<class_CPUParticles2D_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles2D_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set scale properties.
  196. - **PARAM_HUE_VARIATION** = **9** --- Use with :ref:`set_param<class_CPUParticles2D_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles2D_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set hue variation properties.
  197. - **PARAM_ANIM_SPEED** = **10** --- Use with :ref:`set_param<class_CPUParticles2D_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles2D_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set animation speed properties.
  198. - **PARAM_ANIM_OFFSET** = **11** --- Use with :ref:`set_param<class_CPUParticles2D_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles2D_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set animation offset properties.
  199. - **PARAM_MAX** = **12** --- Represents the size of the :ref:`Parameter<enum_CPUParticles2D_Parameter>` enum.
  200. .. _enum_CPUParticles2D_Flags:
  201. .. _class_CPUParticles2D_constant_FLAG_ALIGN_Y_TO_VELOCITY:
  202. .. _class_CPUParticles2D_constant_FLAG_ROTATE_Y:
  203. .. _class_CPUParticles2D_constant_FLAG_DISABLE_Z:
  204. .. _class_CPUParticles2D_constant_FLAG_MAX:
  205. enum **Flags**:
  206. - **FLAG_ALIGN_Y_TO_VELOCITY** = **0** --- Use with :ref:`set_particle_flag<class_CPUParticles2D_method_set_particle_flag>` to set :ref:`flag_align_y<class_CPUParticles2D_property_flag_align_y>`.
  207. - **FLAG_ROTATE_Y** = **1** --- Present for consistency with 3D particle nodes, not used in 2D.
  208. - **FLAG_DISABLE_Z** = **2** --- Present for consistency with 3D particle nodes, not used in 2D.
  209. - **FLAG_MAX** = **3** --- Represents the size of the :ref:`Flags<enum_CPUParticles2D_Flags>` enum.
  210. .. _enum_CPUParticles2D_EmissionShape:
  211. .. _class_CPUParticles2D_constant_EMISSION_SHAPE_POINT:
  212. .. _class_CPUParticles2D_constant_EMISSION_SHAPE_SPHERE:
  213. .. _class_CPUParticles2D_constant_EMISSION_SHAPE_RECTANGLE:
  214. .. _class_CPUParticles2D_constant_EMISSION_SHAPE_POINTS:
  215. .. _class_CPUParticles2D_constant_EMISSION_SHAPE_DIRECTED_POINTS:
  216. enum **EmissionShape**:
  217. - **EMISSION_SHAPE_POINT** = **0** --- All particles will be emitted from a single point.
  218. - **EMISSION_SHAPE_SPHERE** = **1** --- Particles will be emitted on the surface of a sphere flattened to two dimensions.
  219. - **EMISSION_SHAPE_RECTANGLE** = **2** --- Particles will be emitted in the area of a rectangle.
  220. - **EMISSION_SHAPE_POINTS** = **3** --- Particles will be emitted at a position chosen randomly among :ref:`emission_points<class_CPUParticles2D_property_emission_points>`. Particle color will be modulated by :ref:`emission_colors<class_CPUParticles2D_property_emission_colors>`.
  221. - **EMISSION_SHAPE_DIRECTED_POINTS** = **4** --- Particles will be emitted at a position chosen randomly among :ref:`emission_points<class_CPUParticles2D_property_emission_points>`. Particle velocity and rotation will be set based on :ref:`emission_normals<class_CPUParticles2D_property_emission_normals>`. Particle color will be modulated by :ref:`emission_colors<class_CPUParticles2D_property_emission_colors>`.
  222. Description
  223. -----------
  224. CPU-based 2D particle node used to create a variety of particle systems and effects.
  225. See also :ref:`Particles2D<class_Particles2D>`, which provides the same functionality with hardware acceleration, but may not run on older devices.
  226. Tutorials
  227. ---------
  228. - :doc:`../tutorials/2d/particle_systems_2d`
  229. Property Descriptions
  230. ---------------------
  231. .. _class_CPUParticles2D_property_amount:
  232. - :ref:`int<class_int>` **amount**
  233. +-----------+-------------------+
  234. | *Default* | 8 |
  235. +-----------+-------------------+
  236. | *Setter* | set_amount(value) |
  237. +-----------+-------------------+
  238. | *Getter* | get_amount() |
  239. +-----------+-------------------+
  240. Number of particles emitted in one emission cycle.
  241. .. _class_CPUParticles2D_property_angle:
  242. - :ref:`float<class_float>` **angle**
  243. +-----------+------------------+
  244. | *Default* | 0.0 |
  245. +-----------+------------------+
  246. | *Setter* | set_param(value) |
  247. +-----------+------------------+
  248. | *Getter* | get_param() |
  249. +-----------+------------------+
  250. Initial rotation applied to each particle, in degrees.
  251. .. _class_CPUParticles2D_property_angle_curve:
  252. - :ref:`Curve<class_Curve>` **angle_curve**
  253. +----------+------------------------+
  254. | *Setter* | set_param_curve(value) |
  255. +----------+------------------------+
  256. | *Getter* | get_param_curve() |
  257. +----------+------------------------+
  258. Each particle's rotation will be animated along this :ref:`Curve<class_Curve>`.
  259. .. _class_CPUParticles2D_property_angle_random:
  260. - :ref:`float<class_float>` **angle_random**
  261. +-----------+-----------------------------+
  262. | *Default* | 0.0 |
  263. +-----------+-----------------------------+
  264. | *Setter* | set_param_randomness(value) |
  265. +-----------+-----------------------------+
  266. | *Getter* | get_param_randomness() |
  267. +-----------+-----------------------------+
  268. Rotation randomness ratio.
  269. .. _class_CPUParticles2D_property_angular_velocity:
  270. - :ref:`float<class_float>` **angular_velocity**
  271. +-----------+------------------+
  272. | *Default* | 0.0 |
  273. +-----------+------------------+
  274. | *Setter* | set_param(value) |
  275. +-----------+------------------+
  276. | *Getter* | get_param() |
  277. +-----------+------------------+
  278. Initial angular velocity applied to each particle. Sets the speed of rotation of the particle.
  279. .. _class_CPUParticles2D_property_angular_velocity_curve:
  280. - :ref:`Curve<class_Curve>` **angular_velocity_curve**
  281. +----------+------------------------+
  282. | *Setter* | set_param_curve(value) |
  283. +----------+------------------------+
  284. | *Getter* | get_param_curve() |
  285. +----------+------------------------+
  286. Each particle's angular velocity will vary along this :ref:`Curve<class_Curve>`.
  287. .. _class_CPUParticles2D_property_angular_velocity_random:
  288. - :ref:`float<class_float>` **angular_velocity_random**
  289. +-----------+-----------------------------+
  290. | *Default* | 0.0 |
  291. +-----------+-----------------------------+
  292. | *Setter* | set_param_randomness(value) |
  293. +-----------+-----------------------------+
  294. | *Getter* | get_param_randomness() |
  295. +-----------+-----------------------------+
  296. Angular velocity randomness ratio.
  297. .. _class_CPUParticles2D_property_anim_offset:
  298. - :ref:`float<class_float>` **anim_offset**
  299. +-----------+------------------+
  300. | *Default* | 0.0 |
  301. +-----------+------------------+
  302. | *Setter* | set_param(value) |
  303. +-----------+------------------+
  304. | *Getter* | get_param() |
  305. +-----------+------------------+
  306. Particle animation offset.
  307. .. _class_CPUParticles2D_property_anim_offset_curve:
  308. - :ref:`Curve<class_Curve>` **anim_offset_curve**
  309. +----------+------------------------+
  310. | *Setter* | set_param_curve(value) |
  311. +----------+------------------------+
  312. | *Getter* | get_param_curve() |
  313. +----------+------------------------+
  314. Each particle's animation offset will vary along this :ref:`Curve<class_Curve>`.
  315. .. _class_CPUParticles2D_property_anim_offset_random:
  316. - :ref:`float<class_float>` **anim_offset_random**
  317. +-----------+-----------------------------+
  318. | *Default* | 0.0 |
  319. +-----------+-----------------------------+
  320. | *Setter* | set_param_randomness(value) |
  321. +-----------+-----------------------------+
  322. | *Getter* | get_param_randomness() |
  323. +-----------+-----------------------------+
  324. Animation offset randomness ratio.
  325. .. _class_CPUParticles2D_property_anim_speed:
  326. - :ref:`float<class_float>` **anim_speed**
  327. +-----------+------------------+
  328. | *Default* | 0.0 |
  329. +-----------+------------------+
  330. | *Setter* | set_param(value) |
  331. +-----------+------------------+
  332. | *Getter* | get_param() |
  333. +-----------+------------------+
  334. Particle animation speed.
  335. .. _class_CPUParticles2D_property_anim_speed_curve:
  336. - :ref:`Curve<class_Curve>` **anim_speed_curve**
  337. +----------+------------------------+
  338. | *Setter* | set_param_curve(value) |
  339. +----------+------------------------+
  340. | *Getter* | get_param_curve() |
  341. +----------+------------------------+
  342. Each particle's animation speed will vary along this :ref:`Curve<class_Curve>`.
  343. .. _class_CPUParticles2D_property_anim_speed_random:
  344. - :ref:`float<class_float>` **anim_speed_random**
  345. +-----------+-----------------------------+
  346. | *Default* | 0.0 |
  347. +-----------+-----------------------------+
  348. | *Setter* | set_param_randomness(value) |
  349. +-----------+-----------------------------+
  350. | *Getter* | get_param_randomness() |
  351. +-----------+-----------------------------+
  352. Animation speed randomness ratio.
  353. .. _class_CPUParticles2D_property_color:
  354. - :ref:`Color<class_Color>` **color**
  355. +-----------+---------------------+
  356. | *Default* | Color( 1, 1, 1, 1 ) |
  357. +-----------+---------------------+
  358. | *Setter* | set_color(value) |
  359. +-----------+---------------------+
  360. | *Getter* | get_color() |
  361. +-----------+---------------------+
  362. Each particle's initial color. If :ref:`texture<class_CPUParticles2D_property_texture>` is defined, it will be multiplied by this color.
  363. .. _class_CPUParticles2D_property_color_ramp:
  364. - :ref:`Gradient<class_Gradient>` **color_ramp**
  365. +----------+-----------------------+
  366. | *Setter* | set_color_ramp(value) |
  367. +----------+-----------------------+
  368. | *Getter* | get_color_ramp() |
  369. +----------+-----------------------+
  370. Each particle's color will vary along this :ref:`Gradient<class_Gradient>`.
  371. .. _class_CPUParticles2D_property_damping:
  372. - :ref:`float<class_float>` **damping**
  373. +-----------+------------------+
  374. | *Default* | 0.0 |
  375. +-----------+------------------+
  376. | *Setter* | set_param(value) |
  377. +-----------+------------------+
  378. | *Getter* | get_param() |
  379. +-----------+------------------+
  380. The rate at which particles lose velocity.
  381. .. _class_CPUParticles2D_property_damping_curve:
  382. - :ref:`Curve<class_Curve>` **damping_curve**
  383. +----------+------------------------+
  384. | *Setter* | set_param_curve(value) |
  385. +----------+------------------------+
  386. | *Getter* | get_param_curve() |
  387. +----------+------------------------+
  388. Damping will vary along this :ref:`Curve<class_Curve>`.
  389. .. _class_CPUParticles2D_property_damping_random:
  390. - :ref:`float<class_float>` **damping_random**
  391. +-----------+-----------------------------+
  392. | *Default* | 0.0 |
  393. +-----------+-----------------------------+
  394. | *Setter* | set_param_randomness(value) |
  395. +-----------+-----------------------------+
  396. | *Getter* | get_param_randomness() |
  397. +-----------+-----------------------------+
  398. Damping randomness ratio.
  399. .. _class_CPUParticles2D_property_direction:
  400. - :ref:`Vector2<class_Vector2>` **direction**
  401. +-----------+----------------------+
  402. | *Default* | Vector2( 1, 0 ) |
  403. +-----------+----------------------+
  404. | *Setter* | set_direction(value) |
  405. +-----------+----------------------+
  406. | *Getter* | get_direction() |
  407. +-----------+----------------------+
  408. Unit vector specifying the particles' emission direction.
  409. .. _class_CPUParticles2D_property_draw_order:
  410. - :ref:`DrawOrder<enum_CPUParticles2D_DrawOrder>` **draw_order**
  411. +-----------+-----------------------+
  412. | *Default* | 0 |
  413. +-----------+-----------------------+
  414. | *Setter* | set_draw_order(value) |
  415. +-----------+-----------------------+
  416. | *Getter* | get_draw_order() |
  417. +-----------+-----------------------+
  418. Particle draw order. Uses :ref:`DrawOrder<enum_CPUParticles2D_DrawOrder>` values.
  419. .. _class_CPUParticles2D_property_emission_colors:
  420. - :ref:`PoolColorArray<class_PoolColorArray>` **emission_colors**
  421. +----------+----------------------------+
  422. | *Setter* | set_emission_colors(value) |
  423. +----------+----------------------------+
  424. | *Getter* | get_emission_colors() |
  425. +----------+----------------------------+
  426. .. _class_CPUParticles2D_property_emission_normals:
  427. - :ref:`PoolVector2Array<class_PoolVector2Array>` **emission_normals**
  428. +----------+-----------------------------+
  429. | *Setter* | set_emission_normals(value) |
  430. +----------+-----------------------------+
  431. | *Getter* | get_emission_normals() |
  432. +----------+-----------------------------+
  433. .. _class_CPUParticles2D_property_emission_points:
  434. - :ref:`PoolVector2Array<class_PoolVector2Array>` **emission_points**
  435. +----------+----------------------------+
  436. | *Setter* | set_emission_points(value) |
  437. +----------+----------------------------+
  438. | *Getter* | get_emission_points() |
  439. +----------+----------------------------+
  440. .. _class_CPUParticles2D_property_emission_rect_extents:
  441. - :ref:`Vector2<class_Vector2>` **emission_rect_extents**
  442. +----------+----------------------------------+
  443. | *Setter* | set_emission_rect_extents(value) |
  444. +----------+----------------------------------+
  445. | *Getter* | get_emission_rect_extents() |
  446. +----------+----------------------------------+
  447. The rectangle's extents if :ref:`emission_shape<class_CPUParticles2D_property_emission_shape>` is set to :ref:`EMISSION_SHAPE_RECTANGLE<class_CPUParticles2D_constant_EMISSION_SHAPE_RECTANGLE>`.
  448. .. _class_CPUParticles2D_property_emission_shape:
  449. - :ref:`EmissionShape<enum_CPUParticles2D_EmissionShape>` **emission_shape**
  450. +-----------+---------------------------+
  451. | *Default* | 0 |
  452. +-----------+---------------------------+
  453. | *Setter* | set_emission_shape(value) |
  454. +-----------+---------------------------+
  455. | *Getter* | get_emission_shape() |
  456. +-----------+---------------------------+
  457. Particles will be emitted inside this region. See :ref:`EmissionShape<enum_CPUParticles2D_EmissionShape>` for possible values.
  458. .. _class_CPUParticles2D_property_emission_sphere_radius:
  459. - :ref:`float<class_float>` **emission_sphere_radius**
  460. +----------+-----------------------------------+
  461. | *Setter* | set_emission_sphere_radius(value) |
  462. +----------+-----------------------------------+
  463. | *Getter* | get_emission_sphere_radius() |
  464. +----------+-----------------------------------+
  465. The sphere's radius if :ref:`emission_shape<class_CPUParticles2D_property_emission_shape>` is set to :ref:`EMISSION_SHAPE_SPHERE<class_CPUParticles2D_constant_EMISSION_SHAPE_SPHERE>`.
  466. .. _class_CPUParticles2D_property_emitting:
  467. - :ref:`bool<class_bool>` **emitting**
  468. +-----------+---------------------+
  469. | *Default* | true |
  470. +-----------+---------------------+
  471. | *Setter* | set_emitting(value) |
  472. +-----------+---------------------+
  473. | *Getter* | is_emitting() |
  474. +-----------+---------------------+
  475. If ``true``, particles are being emitted.
  476. .. _class_CPUParticles2D_property_explosiveness:
  477. - :ref:`float<class_float>` **explosiveness**
  478. +-----------+--------------------------------+
  479. | *Default* | 0.0 |
  480. +-----------+--------------------------------+
  481. | *Setter* | set_explosiveness_ratio(value) |
  482. +-----------+--------------------------------+
  483. | *Getter* | get_explosiveness_ratio() |
  484. +-----------+--------------------------------+
  485. How rapidly particles in an emission cycle are emitted. If greater than ``0``, there will be a gap in emissions before the next cycle begins.
  486. .. _class_CPUParticles2D_property_fixed_fps:
  487. - :ref:`int<class_int>` **fixed_fps**
  488. +-----------+----------------------+
  489. | *Default* | 0 |
  490. +-----------+----------------------+
  491. | *Setter* | set_fixed_fps(value) |
  492. +-----------+----------------------+
  493. | *Getter* | get_fixed_fps() |
  494. +-----------+----------------------+
  495. The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself.
  496. .. _class_CPUParticles2D_property_flag_align_y:
  497. - :ref:`bool<class_bool>` **flag_align_y**
  498. +-----------+--------------------------+
  499. | *Default* | false |
  500. +-----------+--------------------------+
  501. | *Setter* | set_particle_flag(value) |
  502. +-----------+--------------------------+
  503. | *Getter* | get_particle_flag() |
  504. +-----------+--------------------------+
  505. Align Y axis of particle with the direction of its velocity.
  506. .. _class_CPUParticles2D_property_flatness:
  507. - :ref:`float<class_float>` **flatness**
  508. +-----------+---------------------+
  509. | *Default* | 0.0 |
  510. +-----------+---------------------+
  511. | *Setter* | set_flatness(value) |
  512. +-----------+---------------------+
  513. | *Getter* | get_flatness() |
  514. +-----------+---------------------+
  515. .. _class_CPUParticles2D_property_fract_delta:
  516. - :ref:`bool<class_bool>` **fract_delta**
  517. +-----------+-----------------------------+
  518. | *Default* | true |
  519. +-----------+-----------------------------+
  520. | *Setter* | set_fractional_delta(value) |
  521. +-----------+-----------------------------+
  522. | *Getter* | get_fractional_delta() |
  523. +-----------+-----------------------------+
  524. If ``true``, results in fractional delta calculation which has a smoother particles display effect.
  525. .. _class_CPUParticles2D_property_gravity:
  526. - :ref:`Vector2<class_Vector2>` **gravity**
  527. +-----------+--------------------+
  528. | *Default* | Vector2( 0, 98 ) |
  529. +-----------+--------------------+
  530. | *Setter* | set_gravity(value) |
  531. +-----------+--------------------+
  532. | *Getter* | get_gravity() |
  533. +-----------+--------------------+
  534. Gravity applied to every particle.
  535. .. _class_CPUParticles2D_property_hue_variation:
  536. - :ref:`float<class_float>` **hue_variation**
  537. +-----------+------------------+
  538. | *Default* | 0.0 |
  539. +-----------+------------------+
  540. | *Setter* | set_param(value) |
  541. +-----------+------------------+
  542. | *Getter* | get_param() |
  543. +-----------+------------------+
  544. Initial hue variation applied to each particle.
  545. .. _class_CPUParticles2D_property_hue_variation_curve:
  546. - :ref:`Curve<class_Curve>` **hue_variation_curve**
  547. +----------+------------------------+
  548. | *Setter* | set_param_curve(value) |
  549. +----------+------------------------+
  550. | *Getter* | get_param_curve() |
  551. +----------+------------------------+
  552. Each particle's hue will vary along this :ref:`Curve<class_Curve>`.
  553. .. _class_CPUParticles2D_property_hue_variation_random:
  554. - :ref:`float<class_float>` **hue_variation_random**
  555. +-----------+-----------------------------+
  556. | *Default* | 0.0 |
  557. +-----------+-----------------------------+
  558. | *Setter* | set_param_randomness(value) |
  559. +-----------+-----------------------------+
  560. | *Getter* | get_param_randomness() |
  561. +-----------+-----------------------------+
  562. Hue variation randomness ratio.
  563. .. _class_CPUParticles2D_property_initial_velocity:
  564. - :ref:`float<class_float>` **initial_velocity**
  565. +-----------+------------------+
  566. | *Default* | 0.0 |
  567. +-----------+------------------+
  568. | *Setter* | set_param(value) |
  569. +-----------+------------------+
  570. | *Getter* | get_param() |
  571. +-----------+------------------+
  572. Initial velocity magnitude for each particle. Direction comes from :ref:`spread<class_CPUParticles2D_property_spread>` and the node's orientation.
  573. .. _class_CPUParticles2D_property_initial_velocity_random:
  574. - :ref:`float<class_float>` **initial_velocity_random**
  575. +-----------+-----------------------------+
  576. | *Default* | 0.0 |
  577. +-----------+-----------------------------+
  578. | *Setter* | set_param_randomness(value) |
  579. +-----------+-----------------------------+
  580. | *Getter* | get_param_randomness() |
  581. +-----------+-----------------------------+
  582. Initial velocity randomness ratio.
  583. .. _class_CPUParticles2D_property_lifetime:
  584. - :ref:`float<class_float>` **lifetime**
  585. +-----------+---------------------+
  586. | *Default* | 1.0 |
  587. +-----------+---------------------+
  588. | *Setter* | set_lifetime(value) |
  589. +-----------+---------------------+
  590. | *Getter* | get_lifetime() |
  591. +-----------+---------------------+
  592. Amount of time each particle will exist.
  593. .. _class_CPUParticles2D_property_lifetime_randomness:
  594. - :ref:`float<class_float>` **lifetime_randomness**
  595. +-----------+--------------------------------+
  596. | *Default* | 0.0 |
  597. +-----------+--------------------------------+
  598. | *Setter* | set_lifetime_randomness(value) |
  599. +-----------+--------------------------------+
  600. | *Getter* | get_lifetime_randomness() |
  601. +-----------+--------------------------------+
  602. Particle lifetime randomness ratio.
  603. .. _class_CPUParticles2D_property_linear_accel:
  604. - :ref:`float<class_float>` **linear_accel**
  605. +-----------+------------------+
  606. | *Default* | 0.0 |
  607. +-----------+------------------+
  608. | *Setter* | set_param(value) |
  609. +-----------+------------------+
  610. | *Getter* | get_param() |
  611. +-----------+------------------+
  612. Linear acceleration applied to each particle in the direction of motion.
  613. .. _class_CPUParticles2D_property_linear_accel_curve:
  614. - :ref:`Curve<class_Curve>` **linear_accel_curve**
  615. +----------+------------------------+
  616. | *Setter* | set_param_curve(value) |
  617. +----------+------------------------+
  618. | *Getter* | get_param_curve() |
  619. +----------+------------------------+
  620. Each particle's linear acceleration will vary along this :ref:`Curve<class_Curve>`.
  621. .. _class_CPUParticles2D_property_linear_accel_random:
  622. - :ref:`float<class_float>` **linear_accel_random**
  623. +-----------+-----------------------------+
  624. | *Default* | 0.0 |
  625. +-----------+-----------------------------+
  626. | *Setter* | set_param_randomness(value) |
  627. +-----------+-----------------------------+
  628. | *Getter* | get_param_randomness() |
  629. +-----------+-----------------------------+
  630. Linear acceleration randomness ratio.
  631. .. _class_CPUParticles2D_property_local_coords:
  632. - :ref:`bool<class_bool>` **local_coords**
  633. +-----------+----------------------------------+
  634. | *Default* | true |
  635. +-----------+----------------------------------+
  636. | *Setter* | set_use_local_coordinates(value) |
  637. +-----------+----------------------------------+
  638. | *Getter* | get_use_local_coordinates() |
  639. +-----------+----------------------------------+
  640. If ``true``, particles use the parent node's coordinate space. If ``false``, they use global coordinates.
  641. .. _class_CPUParticles2D_property_normalmap:
  642. - :ref:`Texture<class_Texture>` **normalmap**
  643. +----------+----------------------+
  644. | *Setter* | set_normalmap(value) |
  645. +----------+----------------------+
  646. | *Getter* | get_normalmap() |
  647. +----------+----------------------+
  648. Normal map to be used for the :ref:`texture<class_CPUParticles2D_property_texture>` property.
  649. .. _class_CPUParticles2D_property_one_shot:
  650. - :ref:`bool<class_bool>` **one_shot**
  651. +-----------+---------------------+
  652. | *Default* | false |
  653. +-----------+---------------------+
  654. | *Setter* | set_one_shot(value) |
  655. +-----------+---------------------+
  656. | *Getter* | get_one_shot() |
  657. +-----------+---------------------+
  658. If ``true``, only one emission cycle occurs. If set ``true`` during a cycle, emission will stop at the cycle's end.
  659. .. _class_CPUParticles2D_property_orbit_velocity:
  660. - :ref:`float<class_float>` **orbit_velocity**
  661. +-----------+------------------+
  662. | *Default* | 0.0 |
  663. +-----------+------------------+
  664. | *Setter* | set_param(value) |
  665. +-----------+------------------+
  666. | *Getter* | get_param() |
  667. +-----------+------------------+
  668. Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second.
  669. .. _class_CPUParticles2D_property_orbit_velocity_curve:
  670. - :ref:`Curve<class_Curve>` **orbit_velocity_curve**
  671. +----------+------------------------+
  672. | *Setter* | set_param_curve(value) |
  673. +----------+------------------------+
  674. | *Getter* | get_param_curve() |
  675. +----------+------------------------+
  676. Each particle's orbital velocity will vary along this :ref:`Curve<class_Curve>`.
  677. .. _class_CPUParticles2D_property_orbit_velocity_random:
  678. - :ref:`float<class_float>` **orbit_velocity_random**
  679. +-----------+-----------------------------+
  680. | *Default* | 0.0 |
  681. +-----------+-----------------------------+
  682. | *Setter* | set_param_randomness(value) |
  683. +-----------+-----------------------------+
  684. | *Getter* | get_param_randomness() |
  685. +-----------+-----------------------------+
  686. Orbital velocity randomness ratio.
  687. .. _class_CPUParticles2D_property_preprocess:
  688. - :ref:`float<class_float>` **preprocess**
  689. +-----------+-----------------------------+
  690. | *Default* | 0.0 |
  691. +-----------+-----------------------------+
  692. | *Setter* | set_pre_process_time(value) |
  693. +-----------+-----------------------------+
  694. | *Getter* | get_pre_process_time() |
  695. +-----------+-----------------------------+
  696. Particle system starts as if it had already run for this many seconds.
  697. .. _class_CPUParticles2D_property_radial_accel:
  698. - :ref:`float<class_float>` **radial_accel**
  699. +-----------+------------------+
  700. | *Default* | 0.0 |
  701. +-----------+------------------+
  702. | *Setter* | set_param(value) |
  703. +-----------+------------------+
  704. | *Getter* | get_param() |
  705. +-----------+------------------+
  706. Radial acceleration applied to each particle. Makes particle accelerate away from origin.
  707. .. _class_CPUParticles2D_property_radial_accel_curve:
  708. - :ref:`Curve<class_Curve>` **radial_accel_curve**
  709. +----------+------------------------+
  710. | *Setter* | set_param_curve(value) |
  711. +----------+------------------------+
  712. | *Getter* | get_param_curve() |
  713. +----------+------------------------+
  714. Each particle's radial acceleration will vary along this :ref:`Curve<class_Curve>`.
  715. .. _class_CPUParticles2D_property_radial_accel_random:
  716. - :ref:`float<class_float>` **radial_accel_random**
  717. +-----------+-----------------------------+
  718. | *Default* | 0.0 |
  719. +-----------+-----------------------------+
  720. | *Setter* | set_param_randomness(value) |
  721. +-----------+-----------------------------+
  722. | *Getter* | get_param_randomness() |
  723. +-----------+-----------------------------+
  724. Radial acceleration randomness ratio.
  725. .. _class_CPUParticles2D_property_randomness:
  726. - :ref:`float<class_float>` **randomness**
  727. +-----------+-----------------------------+
  728. | *Default* | 0.0 |
  729. +-----------+-----------------------------+
  730. | *Setter* | set_randomness_ratio(value) |
  731. +-----------+-----------------------------+
  732. | *Getter* | get_randomness_ratio() |
  733. +-----------+-----------------------------+
  734. Emission lifetime randomness ratio.
  735. .. _class_CPUParticles2D_property_scale_amount:
  736. - :ref:`float<class_float>` **scale_amount**
  737. +-----------+------------------+
  738. | *Default* | 1.0 |
  739. +-----------+------------------+
  740. | *Setter* | set_param(value) |
  741. +-----------+------------------+
  742. | *Getter* | get_param() |
  743. +-----------+------------------+
  744. Initial scale applied to each particle.
  745. .. _class_CPUParticles2D_property_scale_amount_curve:
  746. - :ref:`Curve<class_Curve>` **scale_amount_curve**
  747. +----------+------------------------+
  748. | *Setter* | set_param_curve(value) |
  749. +----------+------------------------+
  750. | *Getter* | get_param_curve() |
  751. +----------+------------------------+
  752. Each particle's scale will vary along this :ref:`Curve<class_Curve>`.
  753. .. _class_CPUParticles2D_property_scale_amount_random:
  754. - :ref:`float<class_float>` **scale_amount_random**
  755. +-----------+-----------------------------+
  756. | *Default* | 0.0 |
  757. +-----------+-----------------------------+
  758. | *Setter* | set_param_randomness(value) |
  759. +-----------+-----------------------------+
  760. | *Getter* | get_param_randomness() |
  761. +-----------+-----------------------------+
  762. Scale randomness ratio.
  763. .. _class_CPUParticles2D_property_speed_scale:
  764. - :ref:`float<class_float>` **speed_scale**
  765. +-----------+------------------------+
  766. | *Default* | 1.0 |
  767. +-----------+------------------------+
  768. | *Setter* | set_speed_scale(value) |
  769. +-----------+------------------------+
  770. | *Getter* | get_speed_scale() |
  771. +-----------+------------------------+
  772. Particle system's running speed scaling ratio. A value of ``0`` can be used to pause the particles.
  773. .. _class_CPUParticles2D_property_spread:
  774. - :ref:`float<class_float>` **spread**
  775. +-----------+-------------------+
  776. | *Default* | 45.0 |
  777. +-----------+-------------------+
  778. | *Setter* | set_spread(value) |
  779. +-----------+-------------------+
  780. | *Getter* | get_spread() |
  781. +-----------+-------------------+
  782. Each particle's initial direction range from ``+spread`` to ``-spread`` degrees.
  783. .. _class_CPUParticles2D_property_tangential_accel:
  784. - :ref:`float<class_float>` **tangential_accel**
  785. +-----------+------------------+
  786. | *Default* | 0.0 |
  787. +-----------+------------------+
  788. | *Setter* | set_param(value) |
  789. +-----------+------------------+
  790. | *Getter* | get_param() |
  791. +-----------+------------------+
  792. Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion.
  793. .. _class_CPUParticles2D_property_tangential_accel_curve:
  794. - :ref:`Curve<class_Curve>` **tangential_accel_curve**
  795. +----------+------------------------+
  796. | *Setter* | set_param_curve(value) |
  797. +----------+------------------------+
  798. | *Getter* | get_param_curve() |
  799. +----------+------------------------+
  800. Each particle's tangential acceleration will vary along this :ref:`Curve<class_Curve>`.
  801. .. _class_CPUParticles2D_property_tangential_accel_random:
  802. - :ref:`float<class_float>` **tangential_accel_random**
  803. +-----------+-----------------------------+
  804. | *Default* | 0.0 |
  805. +-----------+-----------------------------+
  806. | *Setter* | set_param_randomness(value) |
  807. +-----------+-----------------------------+
  808. | *Getter* | get_param_randomness() |
  809. +-----------+-----------------------------+
  810. Tangential acceleration randomness ratio.
  811. .. _class_CPUParticles2D_property_texture:
  812. - :ref:`Texture<class_Texture>` **texture**
  813. +----------+--------------------+
  814. | *Setter* | set_texture(value) |
  815. +----------+--------------------+
  816. | *Getter* | get_texture() |
  817. +----------+--------------------+
  818. Particle texture. If ``null``, particles will be squares.
  819. Method Descriptions
  820. -------------------
  821. .. _class_CPUParticles2D_method_convert_from_particles:
  822. - void **convert_from_particles** **(** :ref:`Node<class_Node>` particles **)**
  823. Sets this node's properties to match a given :ref:`Particles2D<class_Particles2D>` node with an assigned :ref:`ParticlesMaterial<class_ParticlesMaterial>`.
  824. .. _class_CPUParticles2D_method_get_param:
  825. - :ref:`float<class_float>` **get_param** **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param **)** const
  826. .. _class_CPUParticles2D_method_get_param_curve:
  827. - :ref:`Curve<class_Curve>` **get_param_curve** **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param **)** const
  828. .. _class_CPUParticles2D_method_get_param_randomness:
  829. - :ref:`float<class_float>` **get_param_randomness** **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param **)** const
  830. .. _class_CPUParticles2D_method_get_particle_flag:
  831. - :ref:`bool<class_bool>` **get_particle_flag** **(** :ref:`Flags<enum_CPUParticles2D_Flags>` flag **)** const
  832. .. _class_CPUParticles2D_method_restart:
  833. - void **restart** **(** **)**
  834. Restarts the particle emitter.
  835. .. _class_CPUParticles2D_method_set_param:
  836. - void **set_param** **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param, :ref:`float<class_float>` value **)**
  837. .. _class_CPUParticles2D_method_set_param_curve:
  838. - void **set_param_curve** **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param, :ref:`Curve<class_Curve>` curve **)**
  839. .. _class_CPUParticles2D_method_set_param_randomness:
  840. - void **set_param_randomness** **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param, :ref:`float<class_float>` randomness **)**
  841. .. _class_CPUParticles2D_method_set_particle_flag:
  842. - void **set_particle_flag** **(** :ref:`Flags<enum_CPUParticles2D_Flags>` flag, :ref:`bool<class_bool>` enable **)**