class_cpuparticles2d.rst 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the CPUParticles2D.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_CPUParticles2D:
  6. CPUParticles2D
  7. ==============
  8. **Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. CPU-based 2D particle emitter.
  10. Description
  11. -----------
  12. CPU-based 2D particle node used to create a variety of particle systems and effects.
  13. See also :ref:`GPUParticles2D<class_GPUParticles2D>`, which provides the same functionality with hardware acceleration, but may not run on older devices.
  14. Tutorials
  15. ---------
  16. - :doc:`Particle systems (2D) <../tutorials/2d/particle_systems_2d>`
  17. Properties
  18. ----------
  19. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  20. | :ref:`int<class_int>` | :ref:`amount<class_CPUParticles2D_property_amount>` | ``8`` |
  21. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  22. | :ref:`Curve<class_Curve>` | :ref:`angle_curve<class_CPUParticles2D_property_angle_curve>` | |
  23. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  24. | :ref:`float<class_float>` | :ref:`angle_max<class_CPUParticles2D_property_angle_max>` | ``0.0`` |
  25. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  26. | :ref:`float<class_float>` | :ref:`angle_min<class_CPUParticles2D_property_angle_min>` | ``0.0`` |
  27. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  28. | :ref:`Curve<class_Curve>` | :ref:`angular_velocity_curve<class_CPUParticles2D_property_angular_velocity_curve>` | |
  29. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  30. | :ref:`float<class_float>` | :ref:`angular_velocity_max<class_CPUParticles2D_property_angular_velocity_max>` | ``0.0`` |
  31. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  32. | :ref:`float<class_float>` | :ref:`angular_velocity_min<class_CPUParticles2D_property_angular_velocity_min>` | ``0.0`` |
  33. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  34. | :ref:`Curve<class_Curve>` | :ref:`anim_offset_curve<class_CPUParticles2D_property_anim_offset_curve>` | |
  35. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  36. | :ref:`float<class_float>` | :ref:`anim_offset_max<class_CPUParticles2D_property_anim_offset_max>` | ``0.0`` |
  37. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  38. | :ref:`float<class_float>` | :ref:`anim_offset_min<class_CPUParticles2D_property_anim_offset_min>` | ``0.0`` |
  39. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  40. | :ref:`Curve<class_Curve>` | :ref:`anim_speed_curve<class_CPUParticles2D_property_anim_speed_curve>` | |
  41. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  42. | :ref:`float<class_float>` | :ref:`anim_speed_max<class_CPUParticles2D_property_anim_speed_max>` | ``0.0`` |
  43. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  44. | :ref:`float<class_float>` | :ref:`anim_speed_min<class_CPUParticles2D_property_anim_speed_min>` | ``0.0`` |
  45. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  46. | :ref:`Color<class_Color>` | :ref:`color<class_CPUParticles2D_property_color>` | ``Color(1, 1, 1, 1)`` |
  47. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  48. | :ref:`Gradient<class_Gradient>` | :ref:`color_ramp<class_CPUParticles2D_property_color_ramp>` | |
  49. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  50. | :ref:`Curve<class_Curve>` | :ref:`damping_curve<class_CPUParticles2D_property_damping_curve>` | |
  51. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  52. | :ref:`float<class_float>` | :ref:`damping_max<class_CPUParticles2D_property_damping_max>` | ``0.0`` |
  53. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  54. | :ref:`float<class_float>` | :ref:`damping_min<class_CPUParticles2D_property_damping_min>` | ``0.0`` |
  55. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  56. | :ref:`Vector2<class_Vector2>` | :ref:`direction<class_CPUParticles2D_property_direction>` | ``Vector2(1, 0)`` |
  57. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  58. | :ref:`DrawOrder<enum_CPUParticles2D_DrawOrder>` | :ref:`draw_order<class_CPUParticles2D_property_draw_order>` | ``0`` |
  59. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  60. | :ref:`PackedColorArray<class_PackedColorArray>` | :ref:`emission_colors<class_CPUParticles2D_property_emission_colors>` | |
  61. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  62. | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`emission_normals<class_CPUParticles2D_property_emission_normals>` | |
  63. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  64. | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`emission_points<class_CPUParticles2D_property_emission_points>` | |
  65. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  66. | :ref:`Vector2<class_Vector2>` | :ref:`emission_rect_extents<class_CPUParticles2D_property_emission_rect_extents>` | |
  67. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  68. | :ref:`EmissionShape<enum_CPUParticles2D_EmissionShape>` | :ref:`emission_shape<class_CPUParticles2D_property_emission_shape>` | ``0`` |
  69. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  70. | :ref:`float<class_float>` | :ref:`emission_sphere_radius<class_CPUParticles2D_property_emission_sphere_radius>` | |
  71. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  72. | :ref:`bool<class_bool>` | :ref:`emitting<class_CPUParticles2D_property_emitting>` | ``true`` |
  73. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  74. | :ref:`float<class_float>` | :ref:`explosiveness<class_CPUParticles2D_property_explosiveness>` | ``0.0`` |
  75. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  76. | :ref:`int<class_int>` | :ref:`fixed_fps<class_CPUParticles2D_property_fixed_fps>` | ``0`` |
  77. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  78. | :ref:`bool<class_bool>` | :ref:`fract_delta<class_CPUParticles2D_property_fract_delta>` | ``true`` |
  79. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  80. | :ref:`Vector2<class_Vector2>` | :ref:`gravity<class_CPUParticles2D_property_gravity>` | ``Vector2(0, 980)`` |
  81. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  82. | :ref:`Curve<class_Curve>` | :ref:`hue_variation_curve<class_CPUParticles2D_property_hue_variation_curve>` | |
  83. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  84. | :ref:`float<class_float>` | :ref:`hue_variation_max<class_CPUParticles2D_property_hue_variation_max>` | ``0.0`` |
  85. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  86. | :ref:`float<class_float>` | :ref:`hue_variation_min<class_CPUParticles2D_property_hue_variation_min>` | ``0.0`` |
  87. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  88. | :ref:`float<class_float>` | :ref:`initial_velocity_max<class_CPUParticles2D_property_initial_velocity_max>` | ``0.0`` |
  89. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  90. | :ref:`float<class_float>` | :ref:`initial_velocity_min<class_CPUParticles2D_property_initial_velocity_min>` | ``0.0`` |
  91. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  92. | :ref:`float<class_float>` | :ref:`lifetime<class_CPUParticles2D_property_lifetime>` | ``1.0`` |
  93. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  94. | :ref:`float<class_float>` | :ref:`lifetime_randomness<class_CPUParticles2D_property_lifetime_randomness>` | ``0.0`` |
  95. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  96. | :ref:`Curve<class_Curve>` | :ref:`linear_accel_curve<class_CPUParticles2D_property_linear_accel_curve>` | |
  97. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  98. | :ref:`float<class_float>` | :ref:`linear_accel_max<class_CPUParticles2D_property_linear_accel_max>` | ``0.0`` |
  99. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  100. | :ref:`float<class_float>` | :ref:`linear_accel_min<class_CPUParticles2D_property_linear_accel_min>` | ``0.0`` |
  101. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  102. | :ref:`bool<class_bool>` | :ref:`local_coords<class_CPUParticles2D_property_local_coords>` | ``true`` |
  103. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  104. | :ref:`bool<class_bool>` | :ref:`one_shot<class_CPUParticles2D_property_one_shot>` | ``false`` |
  105. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  106. | :ref:`Curve<class_Curve>` | :ref:`orbit_velocity_curve<class_CPUParticles2D_property_orbit_velocity_curve>` | |
  107. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  108. | :ref:`float<class_float>` | :ref:`orbit_velocity_max<class_CPUParticles2D_property_orbit_velocity_max>` | ``0.0`` |
  109. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  110. | :ref:`float<class_float>` | :ref:`orbit_velocity_min<class_CPUParticles2D_property_orbit_velocity_min>` | ``0.0`` |
  111. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  112. | :ref:`bool<class_bool>` | :ref:`particle_flag_align_y<class_CPUParticles2D_property_particle_flag_align_y>` | ``false`` |
  113. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  114. | :ref:`float<class_float>` | :ref:`preprocess<class_CPUParticles2D_property_preprocess>` | ``0.0`` |
  115. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  116. | :ref:`Curve<class_Curve>` | :ref:`radial_accel_curve<class_CPUParticles2D_property_radial_accel_curve>` | |
  117. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  118. | :ref:`float<class_float>` | :ref:`radial_accel_max<class_CPUParticles2D_property_radial_accel_max>` | ``0.0`` |
  119. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  120. | :ref:`float<class_float>` | :ref:`radial_accel_min<class_CPUParticles2D_property_radial_accel_min>` | ``0.0`` |
  121. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  122. | :ref:`float<class_float>` | :ref:`randomness<class_CPUParticles2D_property_randomness>` | ``0.0`` |
  123. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  124. | :ref:`Curve<class_Curve>` | :ref:`scale_amount_curve<class_CPUParticles2D_property_scale_amount_curve>` | |
  125. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  126. | :ref:`float<class_float>` | :ref:`scale_amount_max<class_CPUParticles2D_property_scale_amount_max>` | ``1.0`` |
  127. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  128. | :ref:`float<class_float>` | :ref:`scale_amount_min<class_CPUParticles2D_property_scale_amount_min>` | ``1.0`` |
  129. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  130. | :ref:`Curve<class_Curve>` | :ref:`scale_curve_x<class_CPUParticles2D_property_scale_curve_x>` | |
  131. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  132. | :ref:`Curve<class_Curve>` | :ref:`scale_curve_y<class_CPUParticles2D_property_scale_curve_y>` | |
  133. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  134. | :ref:`float<class_float>` | :ref:`speed_scale<class_CPUParticles2D_property_speed_scale>` | ``1.0`` |
  135. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  136. | :ref:`bool<class_bool>` | :ref:`split_scale<class_CPUParticles2D_property_split_scale>` | ``false`` |
  137. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  138. | :ref:`float<class_float>` | :ref:`spread<class_CPUParticles2D_property_spread>` | ``45.0`` |
  139. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  140. | :ref:`Curve<class_Curve>` | :ref:`tangential_accel_curve<class_CPUParticles2D_property_tangential_accel_curve>` | |
  141. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  142. | :ref:`float<class_float>` | :ref:`tangential_accel_max<class_CPUParticles2D_property_tangential_accel_max>` | ``0.0`` |
  143. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  144. | :ref:`float<class_float>` | :ref:`tangential_accel_min<class_CPUParticles2D_property_tangential_accel_min>` | ``0.0`` |
  145. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  146. | :ref:`Texture2D<class_Texture2D>` | :ref:`texture<class_CPUParticles2D_property_texture>` | |
  147. +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+
  148. Methods
  149. -------
  150. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  151. | void | :ref:`convert_from_particles<class_CPUParticles2D_method_convert_from_particles>` **(** :ref:`Node<class_Node>` particles **)** |
  152. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  153. | :ref:`Curve<class_Curve>` | :ref:`get_param_curve<class_CPUParticles2D_method_get_param_curve>` **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param **)** |const| |
  154. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  155. | :ref:`float<class_float>` | :ref:`get_param_max<class_CPUParticles2D_method_get_param_max>` **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param **)** |const| |
  156. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  157. | :ref:`float<class_float>` | :ref:`get_param_min<class_CPUParticles2D_method_get_param_min>` **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param **)** |const| |
  158. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  159. | :ref:`bool<class_bool>` | :ref:`get_particle_flag<class_CPUParticles2D_method_get_particle_flag>` **(** :ref:`ParticleFlags<enum_CPUParticles2D_ParticleFlags>` particle_flag **)** |const| |
  160. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  161. | void | :ref:`restart<class_CPUParticles2D_method_restart>` **(** **)** |
  162. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  163. | void | :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param, :ref:`Curve<class_Curve>` curve **)** |
  164. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  165. | void | :ref:`set_param_max<class_CPUParticles2D_method_set_param_max>` **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param, :ref:`float<class_float>` value **)** |
  166. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  167. | void | :ref:`set_param_min<class_CPUParticles2D_method_set_param_min>` **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param, :ref:`float<class_float>` value **)** |
  168. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  169. | void | :ref:`set_particle_flag<class_CPUParticles2D_method_set_particle_flag>` **(** :ref:`ParticleFlags<enum_CPUParticles2D_ParticleFlags>` particle_flag, :ref:`bool<class_bool>` enable **)** |
  170. +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  171. Enumerations
  172. ------------
  173. .. _enum_CPUParticles2D_DrawOrder:
  174. .. _class_CPUParticles2D_constant_DRAW_ORDER_INDEX:
  175. .. _class_CPUParticles2D_constant_DRAW_ORDER_LIFETIME:
  176. enum **DrawOrder**:
  177. - **DRAW_ORDER_INDEX** = **0** --- Particles are drawn in the order emitted.
  178. - **DRAW_ORDER_LIFETIME** = **1** --- Particles are drawn in order of remaining lifetime.
  179. ----
  180. .. _enum_CPUParticles2D_Parameter:
  181. .. _class_CPUParticles2D_constant_PARAM_INITIAL_LINEAR_VELOCITY:
  182. .. _class_CPUParticles2D_constant_PARAM_ANGULAR_VELOCITY:
  183. .. _class_CPUParticles2D_constant_PARAM_ORBIT_VELOCITY:
  184. .. _class_CPUParticles2D_constant_PARAM_LINEAR_ACCEL:
  185. .. _class_CPUParticles2D_constant_PARAM_RADIAL_ACCEL:
  186. .. _class_CPUParticles2D_constant_PARAM_TANGENTIAL_ACCEL:
  187. .. _class_CPUParticles2D_constant_PARAM_DAMPING:
  188. .. _class_CPUParticles2D_constant_PARAM_ANGLE:
  189. .. _class_CPUParticles2D_constant_PARAM_SCALE:
  190. .. _class_CPUParticles2D_constant_PARAM_HUE_VARIATION:
  191. .. _class_CPUParticles2D_constant_PARAM_ANIM_SPEED:
  192. .. _class_CPUParticles2D_constant_PARAM_ANIM_OFFSET:
  193. .. _class_CPUParticles2D_constant_PARAM_MAX:
  194. enum **Parameter**:
  195. - **PARAM_INITIAL_LINEAR_VELOCITY** = **0** --- Use with :ref:`set_param_min<class_CPUParticles2D_method_set_param_min>`, :ref:`set_param_max<class_CPUParticles2D_method_set_param_max>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set initial velocity properties.
  196. - **PARAM_ANGULAR_VELOCITY** = **1** --- Use with :ref:`set_param_min<class_CPUParticles2D_method_set_param_min>`, :ref:`set_param_max<class_CPUParticles2D_method_set_param_max>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set angular velocity properties.
  197. - **PARAM_ORBIT_VELOCITY** = **2** --- Use with :ref:`set_param_min<class_CPUParticles2D_method_set_param_min>`, :ref:`set_param_max<class_CPUParticles2D_method_set_param_max>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set orbital velocity properties.
  198. - **PARAM_LINEAR_ACCEL** = **3** --- Use with :ref:`set_param_min<class_CPUParticles2D_method_set_param_min>`, :ref:`set_param_max<class_CPUParticles2D_method_set_param_max>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set linear acceleration properties.
  199. - **PARAM_RADIAL_ACCEL** = **4** --- Use with :ref:`set_param_min<class_CPUParticles2D_method_set_param_min>`, :ref:`set_param_max<class_CPUParticles2D_method_set_param_max>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set radial acceleration properties.
  200. - **PARAM_TANGENTIAL_ACCEL** = **5** --- Use with :ref:`set_param_min<class_CPUParticles2D_method_set_param_min>`, :ref:`set_param_max<class_CPUParticles2D_method_set_param_max>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set tangential acceleration properties.
  201. - **PARAM_DAMPING** = **6** --- Use with :ref:`set_param_min<class_CPUParticles2D_method_set_param_min>`, :ref:`set_param_max<class_CPUParticles2D_method_set_param_max>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set damping properties.
  202. - **PARAM_ANGLE** = **7** --- Use with :ref:`set_param_min<class_CPUParticles2D_method_set_param_min>`, :ref:`set_param_max<class_CPUParticles2D_method_set_param_max>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set angle properties.
  203. - **PARAM_SCALE** = **8** --- Use with :ref:`set_param_min<class_CPUParticles2D_method_set_param_min>`, :ref:`set_param_max<class_CPUParticles2D_method_set_param_max>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set scale properties.
  204. - **PARAM_HUE_VARIATION** = **9** --- Use with :ref:`set_param_min<class_CPUParticles2D_method_set_param_min>`, :ref:`set_param_max<class_CPUParticles2D_method_set_param_max>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set hue variation properties.
  205. - **PARAM_ANIM_SPEED** = **10** --- Use with :ref:`set_param_min<class_CPUParticles2D_method_set_param_min>`, :ref:`set_param_max<class_CPUParticles2D_method_set_param_max>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set animation speed properties.
  206. - **PARAM_ANIM_OFFSET** = **11** --- Use with :ref:`set_param_min<class_CPUParticles2D_method_set_param_min>`, :ref:`set_param_max<class_CPUParticles2D_method_set_param_max>`, and :ref:`set_param_curve<class_CPUParticles2D_method_set_param_curve>` to set animation offset properties.
  207. - **PARAM_MAX** = **12** --- Represents the size of the :ref:`Parameter<enum_CPUParticles2D_Parameter>` enum.
  208. ----
  209. .. _enum_CPUParticles2D_ParticleFlags:
  210. .. _class_CPUParticles2D_constant_PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY:
  211. .. _class_CPUParticles2D_constant_PARTICLE_FLAG_ROTATE_Y:
  212. .. _class_CPUParticles2D_constant_PARTICLE_FLAG_DISABLE_Z:
  213. .. _class_CPUParticles2D_constant_PARTICLE_FLAG_MAX:
  214. enum **ParticleFlags**:
  215. - **PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY** = **0** --- Use with :ref:`set_particle_flag<class_CPUParticles2D_method_set_particle_flag>` to set :ref:`particle_flag_align_y<class_CPUParticles2D_property_particle_flag_align_y>`.
  216. - **PARTICLE_FLAG_ROTATE_Y** = **1** --- Present for consistency with 3D particle nodes, not used in 2D.
  217. - **PARTICLE_FLAG_DISABLE_Z** = **2** --- Present for consistency with 3D particle nodes, not used in 2D.
  218. - **PARTICLE_FLAG_MAX** = **3** --- Represents the size of the :ref:`ParticleFlags<enum_CPUParticles2D_ParticleFlags>` enum.
  219. ----
  220. .. _enum_CPUParticles2D_EmissionShape:
  221. .. _class_CPUParticles2D_constant_EMISSION_SHAPE_POINT:
  222. .. _class_CPUParticles2D_constant_EMISSION_SHAPE_SPHERE:
  223. .. _class_CPUParticles2D_constant_EMISSION_SHAPE_RECTANGLE:
  224. .. _class_CPUParticles2D_constant_EMISSION_SHAPE_POINTS:
  225. .. _class_CPUParticles2D_constant_EMISSION_SHAPE_DIRECTED_POINTS:
  226. .. _class_CPUParticles2D_constant_EMISSION_SHAPE_MAX:
  227. enum **EmissionShape**:
  228. - **EMISSION_SHAPE_POINT** = **0** --- All particles will be emitted from a single point.
  229. - **EMISSION_SHAPE_SPHERE** = **1** --- Particles will be emitted on the surface of a sphere flattened to two dimensions.
  230. - **EMISSION_SHAPE_RECTANGLE** = **2** --- Particles will be emitted in the area of a rectangle.
  231. - **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>`.
  232. - **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>`.
  233. - **EMISSION_SHAPE_MAX** = **5** --- Represents the size of the :ref:`EmissionShape<enum_CPUParticles2D_EmissionShape>` enum.
  234. Property Descriptions
  235. ---------------------
  236. .. _class_CPUParticles2D_property_amount:
  237. - :ref:`int<class_int>` **amount**
  238. +-----------+-------------------+
  239. | *Default* | ``8`` |
  240. +-----------+-------------------+
  241. | *Setter* | set_amount(value) |
  242. +-----------+-------------------+
  243. | *Getter* | get_amount() |
  244. +-----------+-------------------+
  245. Number of particles emitted in one emission cycle.
  246. ----
  247. .. _class_CPUParticles2D_property_angle_curve:
  248. - :ref:`Curve<class_Curve>` **angle_curve**
  249. +----------+------------------------+
  250. | *Setter* | set_param_curve(value) |
  251. +----------+------------------------+
  252. | *Getter* | get_param_curve() |
  253. +----------+------------------------+
  254. Each particle's rotation will be animated along this :ref:`Curve<class_Curve>`.
  255. ----
  256. .. _class_CPUParticles2D_property_angle_max:
  257. - :ref:`float<class_float>` **angle_max**
  258. +-----------+----------------------+
  259. | *Default* | ``0.0`` |
  260. +-----------+----------------------+
  261. | *Setter* | set_param_max(value) |
  262. +-----------+----------------------+
  263. | *Getter* | get_param_max() |
  264. +-----------+----------------------+
  265. ----
  266. .. _class_CPUParticles2D_property_angle_min:
  267. - :ref:`float<class_float>` **angle_min**
  268. +-----------+----------------------+
  269. | *Default* | ``0.0`` |
  270. +-----------+----------------------+
  271. | *Setter* | set_param_min(value) |
  272. +-----------+----------------------+
  273. | *Getter* | get_param_min() |
  274. +-----------+----------------------+
  275. ----
  276. .. _class_CPUParticles2D_property_angular_velocity_curve:
  277. - :ref:`Curve<class_Curve>` **angular_velocity_curve**
  278. +----------+------------------------+
  279. | *Setter* | set_param_curve(value) |
  280. +----------+------------------------+
  281. | *Getter* | get_param_curve() |
  282. +----------+------------------------+
  283. Each particle's angular velocity will vary along this :ref:`Curve<class_Curve>`.
  284. ----
  285. .. _class_CPUParticles2D_property_angular_velocity_max:
  286. - :ref:`float<class_float>` **angular_velocity_max**
  287. +-----------+----------------------+
  288. | *Default* | ``0.0`` |
  289. +-----------+----------------------+
  290. | *Setter* | set_param_max(value) |
  291. +-----------+----------------------+
  292. | *Getter* | get_param_max() |
  293. +-----------+----------------------+
  294. ----
  295. .. _class_CPUParticles2D_property_angular_velocity_min:
  296. - :ref:`float<class_float>` **angular_velocity_min**
  297. +-----------+----------------------+
  298. | *Default* | ``0.0`` |
  299. +-----------+----------------------+
  300. | *Setter* | set_param_min(value) |
  301. +-----------+----------------------+
  302. | *Getter* | get_param_min() |
  303. +-----------+----------------------+
  304. ----
  305. .. _class_CPUParticles2D_property_anim_offset_curve:
  306. - :ref:`Curve<class_Curve>` **anim_offset_curve**
  307. +----------+------------------------+
  308. | *Setter* | set_param_curve(value) |
  309. +----------+------------------------+
  310. | *Getter* | get_param_curve() |
  311. +----------+------------------------+
  312. Each particle's animation offset will vary along this :ref:`Curve<class_Curve>`.
  313. ----
  314. .. _class_CPUParticles2D_property_anim_offset_max:
  315. - :ref:`float<class_float>` **anim_offset_max**
  316. +-----------+----------------------+
  317. | *Default* | ``0.0`` |
  318. +-----------+----------------------+
  319. | *Setter* | set_param_max(value) |
  320. +-----------+----------------------+
  321. | *Getter* | get_param_max() |
  322. +-----------+----------------------+
  323. ----
  324. .. _class_CPUParticles2D_property_anim_offset_min:
  325. - :ref:`float<class_float>` **anim_offset_min**
  326. +-----------+----------------------+
  327. | *Default* | ``0.0`` |
  328. +-----------+----------------------+
  329. | *Setter* | set_param_min(value) |
  330. +-----------+----------------------+
  331. | *Getter* | get_param_min() |
  332. +-----------+----------------------+
  333. ----
  334. .. _class_CPUParticles2D_property_anim_speed_curve:
  335. - :ref:`Curve<class_Curve>` **anim_speed_curve**
  336. +----------+------------------------+
  337. | *Setter* | set_param_curve(value) |
  338. +----------+------------------------+
  339. | *Getter* | get_param_curve() |
  340. +----------+------------------------+
  341. Each particle's animation speed will vary along this :ref:`Curve<class_Curve>`.
  342. ----
  343. .. _class_CPUParticles2D_property_anim_speed_max:
  344. - :ref:`float<class_float>` **anim_speed_max**
  345. +-----------+----------------------+
  346. | *Default* | ``0.0`` |
  347. +-----------+----------------------+
  348. | *Setter* | set_param_max(value) |
  349. +-----------+----------------------+
  350. | *Getter* | get_param_max() |
  351. +-----------+----------------------+
  352. ----
  353. .. _class_CPUParticles2D_property_anim_speed_min:
  354. - :ref:`float<class_float>` **anim_speed_min**
  355. +-----------+----------------------+
  356. | *Default* | ``0.0`` |
  357. +-----------+----------------------+
  358. | *Setter* | set_param_min(value) |
  359. +-----------+----------------------+
  360. | *Getter* | get_param_min() |
  361. +-----------+----------------------+
  362. ----
  363. .. _class_CPUParticles2D_property_color:
  364. - :ref:`Color<class_Color>` **color**
  365. +-----------+-----------------------+
  366. | *Default* | ``Color(1, 1, 1, 1)`` |
  367. +-----------+-----------------------+
  368. | *Setter* | set_color(value) |
  369. +-----------+-----------------------+
  370. | *Getter* | get_color() |
  371. +-----------+-----------------------+
  372. Each particle's initial color. If :ref:`texture<class_CPUParticles2D_property_texture>` is defined, it will be multiplied by this color.
  373. ----
  374. .. _class_CPUParticles2D_property_color_ramp:
  375. - :ref:`Gradient<class_Gradient>` **color_ramp**
  376. +----------+-----------------------+
  377. | *Setter* | set_color_ramp(value) |
  378. +----------+-----------------------+
  379. | *Getter* | get_color_ramp() |
  380. +----------+-----------------------+
  381. Each particle's color will vary along this :ref:`Gradient<class_Gradient>` (multiplied with :ref:`color<class_CPUParticles2D_property_color>`).
  382. ----
  383. .. _class_CPUParticles2D_property_damping_curve:
  384. - :ref:`Curve<class_Curve>` **damping_curve**
  385. +----------+------------------------+
  386. | *Setter* | set_param_curve(value) |
  387. +----------+------------------------+
  388. | *Getter* | get_param_curve() |
  389. +----------+------------------------+
  390. Damping will vary along this :ref:`Curve<class_Curve>`.
  391. ----
  392. .. _class_CPUParticles2D_property_damping_max:
  393. - :ref:`float<class_float>` **damping_max**
  394. +-----------+----------------------+
  395. | *Default* | ``0.0`` |
  396. +-----------+----------------------+
  397. | *Setter* | set_param_max(value) |
  398. +-----------+----------------------+
  399. | *Getter* | get_param_max() |
  400. +-----------+----------------------+
  401. ----
  402. .. _class_CPUParticles2D_property_damping_min:
  403. - :ref:`float<class_float>` **damping_min**
  404. +-----------+----------------------+
  405. | *Default* | ``0.0`` |
  406. +-----------+----------------------+
  407. | *Setter* | set_param_min(value) |
  408. +-----------+----------------------+
  409. | *Getter* | get_param_min() |
  410. +-----------+----------------------+
  411. ----
  412. .. _class_CPUParticles2D_property_direction:
  413. - :ref:`Vector2<class_Vector2>` **direction**
  414. +-----------+----------------------+
  415. | *Default* | ``Vector2(1, 0)`` |
  416. +-----------+----------------------+
  417. | *Setter* | set_direction(value) |
  418. +-----------+----------------------+
  419. | *Getter* | get_direction() |
  420. +-----------+----------------------+
  421. Unit vector specifying the particles' emission direction.
  422. ----
  423. .. _class_CPUParticles2D_property_draw_order:
  424. - :ref:`DrawOrder<enum_CPUParticles2D_DrawOrder>` **draw_order**
  425. +-----------+-----------------------+
  426. | *Default* | ``0`` |
  427. +-----------+-----------------------+
  428. | *Setter* | set_draw_order(value) |
  429. +-----------+-----------------------+
  430. | *Getter* | get_draw_order() |
  431. +-----------+-----------------------+
  432. Particle draw order. Uses :ref:`DrawOrder<enum_CPUParticles2D_DrawOrder>` values.
  433. ----
  434. .. _class_CPUParticles2D_property_emission_colors:
  435. - :ref:`PackedColorArray<class_PackedColorArray>` **emission_colors**
  436. +----------+----------------------------+
  437. | *Setter* | set_emission_colors(value) |
  438. +----------+----------------------------+
  439. | *Getter* | get_emission_colors() |
  440. +----------+----------------------------+
  441. Sets the :ref:`Color<class_Color>`\ s to modulate particles by when using :ref:`EMISSION_SHAPE_POINTS<class_CPUParticles2D_constant_EMISSION_SHAPE_POINTS>` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS<class_CPUParticles2D_constant_EMISSION_SHAPE_DIRECTED_POINTS>`.
  442. ----
  443. .. _class_CPUParticles2D_property_emission_normals:
  444. - :ref:`PackedVector2Array<class_PackedVector2Array>` **emission_normals**
  445. +----------+-----------------------------+
  446. | *Setter* | set_emission_normals(value) |
  447. +----------+-----------------------------+
  448. | *Getter* | get_emission_normals() |
  449. +----------+-----------------------------+
  450. Sets the direction the particles will be emitted in when using :ref:`EMISSION_SHAPE_DIRECTED_POINTS<class_CPUParticles2D_constant_EMISSION_SHAPE_DIRECTED_POINTS>`.
  451. ----
  452. .. _class_CPUParticles2D_property_emission_points:
  453. - :ref:`PackedVector2Array<class_PackedVector2Array>` **emission_points**
  454. +----------+----------------------------+
  455. | *Setter* | set_emission_points(value) |
  456. +----------+----------------------------+
  457. | *Getter* | get_emission_points() |
  458. +----------+----------------------------+
  459. Sets the initial positions to spawn particles when using :ref:`EMISSION_SHAPE_POINTS<class_CPUParticles2D_constant_EMISSION_SHAPE_POINTS>` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS<class_CPUParticles2D_constant_EMISSION_SHAPE_DIRECTED_POINTS>`.
  460. ----
  461. .. _class_CPUParticles2D_property_emission_rect_extents:
  462. - :ref:`Vector2<class_Vector2>` **emission_rect_extents**
  463. +----------+----------------------------------+
  464. | *Setter* | set_emission_rect_extents(value) |
  465. +----------+----------------------------------+
  466. | *Getter* | get_emission_rect_extents() |
  467. +----------+----------------------------------+
  468. 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>`.
  469. ----
  470. .. _class_CPUParticles2D_property_emission_shape:
  471. - :ref:`EmissionShape<enum_CPUParticles2D_EmissionShape>` **emission_shape**
  472. +-----------+---------------------------+
  473. | *Default* | ``0`` |
  474. +-----------+---------------------------+
  475. | *Setter* | set_emission_shape(value) |
  476. +-----------+---------------------------+
  477. | *Getter* | get_emission_shape() |
  478. +-----------+---------------------------+
  479. Particles will be emitted inside this region. See :ref:`EmissionShape<enum_CPUParticles2D_EmissionShape>` for possible values.
  480. ----
  481. .. _class_CPUParticles2D_property_emission_sphere_radius:
  482. - :ref:`float<class_float>` **emission_sphere_radius**
  483. +----------+-----------------------------------+
  484. | *Setter* | set_emission_sphere_radius(value) |
  485. +----------+-----------------------------------+
  486. | *Getter* | get_emission_sphere_radius() |
  487. +----------+-----------------------------------+
  488. 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>`.
  489. ----
  490. .. _class_CPUParticles2D_property_emitting:
  491. - :ref:`bool<class_bool>` **emitting**
  492. +-----------+---------------------+
  493. | *Default* | ``true`` |
  494. +-----------+---------------------+
  495. | *Setter* | set_emitting(value) |
  496. +-----------+---------------------+
  497. | *Getter* | is_emitting() |
  498. +-----------+---------------------+
  499. If ``true``, particles are being emitted.
  500. ----
  501. .. _class_CPUParticles2D_property_explosiveness:
  502. - :ref:`float<class_float>` **explosiveness**
  503. +-----------+--------------------------------+
  504. | *Default* | ``0.0`` |
  505. +-----------+--------------------------------+
  506. | *Setter* | set_explosiveness_ratio(value) |
  507. +-----------+--------------------------------+
  508. | *Getter* | get_explosiveness_ratio() |
  509. +-----------+--------------------------------+
  510. 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.
  511. ----
  512. .. _class_CPUParticles2D_property_fixed_fps:
  513. - :ref:`int<class_int>` **fixed_fps**
  514. +-----------+----------------------+
  515. | *Default* | ``0`` |
  516. +-----------+----------------------+
  517. | *Setter* | set_fixed_fps(value) |
  518. +-----------+----------------------+
  519. | *Getter* | get_fixed_fps() |
  520. +-----------+----------------------+
  521. 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.
  522. ----
  523. .. _class_CPUParticles2D_property_fract_delta:
  524. - :ref:`bool<class_bool>` **fract_delta**
  525. +-----------+-----------------------------+
  526. | *Default* | ``true`` |
  527. +-----------+-----------------------------+
  528. | *Setter* | set_fractional_delta(value) |
  529. +-----------+-----------------------------+
  530. | *Getter* | get_fractional_delta() |
  531. +-----------+-----------------------------+
  532. If ``true``, results in fractional delta calculation which has a smoother particles display effect.
  533. ----
  534. .. _class_CPUParticles2D_property_gravity:
  535. - :ref:`Vector2<class_Vector2>` **gravity**
  536. +-----------+---------------------+
  537. | *Default* | ``Vector2(0, 980)`` |
  538. +-----------+---------------------+
  539. | *Setter* | set_gravity(value) |
  540. +-----------+---------------------+
  541. | *Getter* | get_gravity() |
  542. +-----------+---------------------+
  543. Gravity applied to every particle.
  544. ----
  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. ----
  554. .. _class_CPUParticles2D_property_hue_variation_max:
  555. - :ref:`float<class_float>` **hue_variation_max**
  556. +-----------+----------------------+
  557. | *Default* | ``0.0`` |
  558. +-----------+----------------------+
  559. | *Setter* | set_param_max(value) |
  560. +-----------+----------------------+
  561. | *Getter* | get_param_max() |
  562. +-----------+----------------------+
  563. ----
  564. .. _class_CPUParticles2D_property_hue_variation_min:
  565. - :ref:`float<class_float>` **hue_variation_min**
  566. +-----------+----------------------+
  567. | *Default* | ``0.0`` |
  568. +-----------+----------------------+
  569. | *Setter* | set_param_min(value) |
  570. +-----------+----------------------+
  571. | *Getter* | get_param_min() |
  572. +-----------+----------------------+
  573. ----
  574. .. _class_CPUParticles2D_property_initial_velocity_max:
  575. - :ref:`float<class_float>` **initial_velocity_max**
  576. +-----------+----------------------+
  577. | *Default* | ``0.0`` |
  578. +-----------+----------------------+
  579. | *Setter* | set_param_max(value) |
  580. +-----------+----------------------+
  581. | *Getter* | get_param_max() |
  582. +-----------+----------------------+
  583. ----
  584. .. _class_CPUParticles2D_property_initial_velocity_min:
  585. - :ref:`float<class_float>` **initial_velocity_min**
  586. +-----------+----------------------+
  587. | *Default* | ``0.0`` |
  588. +-----------+----------------------+
  589. | *Setter* | set_param_min(value) |
  590. +-----------+----------------------+
  591. | *Getter* | get_param_min() |
  592. +-----------+----------------------+
  593. ----
  594. .. _class_CPUParticles2D_property_lifetime:
  595. - :ref:`float<class_float>` **lifetime**
  596. +-----------+---------------------+
  597. | *Default* | ``1.0`` |
  598. +-----------+---------------------+
  599. | *Setter* | set_lifetime(value) |
  600. +-----------+---------------------+
  601. | *Getter* | get_lifetime() |
  602. +-----------+---------------------+
  603. Amount of time each particle will exist.
  604. ----
  605. .. _class_CPUParticles2D_property_lifetime_randomness:
  606. - :ref:`float<class_float>` **lifetime_randomness**
  607. +-----------+--------------------------------+
  608. | *Default* | ``0.0`` |
  609. +-----------+--------------------------------+
  610. | *Setter* | set_lifetime_randomness(value) |
  611. +-----------+--------------------------------+
  612. | *Getter* | get_lifetime_randomness() |
  613. +-----------+--------------------------------+
  614. Particle lifetime randomness ratio.
  615. ----
  616. .. _class_CPUParticles2D_property_linear_accel_curve:
  617. - :ref:`Curve<class_Curve>` **linear_accel_curve**
  618. +----------+------------------------+
  619. | *Setter* | set_param_curve(value) |
  620. +----------+------------------------+
  621. | *Getter* | get_param_curve() |
  622. +----------+------------------------+
  623. Each particle's linear acceleration will vary along this :ref:`Curve<class_Curve>`.
  624. ----
  625. .. _class_CPUParticles2D_property_linear_accel_max:
  626. - :ref:`float<class_float>` **linear_accel_max**
  627. +-----------+----------------------+
  628. | *Default* | ``0.0`` |
  629. +-----------+----------------------+
  630. | *Setter* | set_param_max(value) |
  631. +-----------+----------------------+
  632. | *Getter* | get_param_max() |
  633. +-----------+----------------------+
  634. ----
  635. .. _class_CPUParticles2D_property_linear_accel_min:
  636. - :ref:`float<class_float>` **linear_accel_min**
  637. +-----------+----------------------+
  638. | *Default* | ``0.0`` |
  639. +-----------+----------------------+
  640. | *Setter* | set_param_min(value) |
  641. +-----------+----------------------+
  642. | *Getter* | get_param_min() |
  643. +-----------+----------------------+
  644. ----
  645. .. _class_CPUParticles2D_property_local_coords:
  646. - :ref:`bool<class_bool>` **local_coords**
  647. +-----------+----------------------------------+
  648. | *Default* | ``true`` |
  649. +-----------+----------------------------------+
  650. | *Setter* | set_use_local_coordinates(value) |
  651. +-----------+----------------------------------+
  652. | *Getter* | get_use_local_coordinates() |
  653. +-----------+----------------------------------+
  654. If ``true``, particles use the parent node's coordinate space. If ``false``, they use global coordinates.
  655. ----
  656. .. _class_CPUParticles2D_property_one_shot:
  657. - :ref:`bool<class_bool>` **one_shot**
  658. +-----------+---------------------+
  659. | *Default* | ``false`` |
  660. +-----------+---------------------+
  661. | *Setter* | set_one_shot(value) |
  662. +-----------+---------------------+
  663. | *Getter* | get_one_shot() |
  664. +-----------+---------------------+
  665. If ``true``, only one emission cycle occurs. If set ``true`` during a cycle, emission will stop at the cycle's end.
  666. ----
  667. .. _class_CPUParticles2D_property_orbit_velocity_curve:
  668. - :ref:`Curve<class_Curve>` **orbit_velocity_curve**
  669. +----------+------------------------+
  670. | *Setter* | set_param_curve(value) |
  671. +----------+------------------------+
  672. | *Getter* | get_param_curve() |
  673. +----------+------------------------+
  674. Each particle's orbital velocity will vary along this :ref:`Curve<class_Curve>`.
  675. ----
  676. .. _class_CPUParticles2D_property_orbit_velocity_max:
  677. - :ref:`float<class_float>` **orbit_velocity_max**
  678. +-----------+----------------------+
  679. | *Default* | ``0.0`` |
  680. +-----------+----------------------+
  681. | *Setter* | set_param_max(value) |
  682. +-----------+----------------------+
  683. | *Getter* | get_param_max() |
  684. +-----------+----------------------+
  685. ----
  686. .. _class_CPUParticles2D_property_orbit_velocity_min:
  687. - :ref:`float<class_float>` **orbit_velocity_min**
  688. +-----------+----------------------+
  689. | *Default* | ``0.0`` |
  690. +-----------+----------------------+
  691. | *Setter* | set_param_min(value) |
  692. +-----------+----------------------+
  693. | *Getter* | get_param_min() |
  694. +-----------+----------------------+
  695. ----
  696. .. _class_CPUParticles2D_property_particle_flag_align_y:
  697. - :ref:`bool<class_bool>` **particle_flag_align_y**
  698. +-----------+--------------------------+
  699. | *Default* | ``false`` |
  700. +-----------+--------------------------+
  701. | *Setter* | set_particle_flag(value) |
  702. +-----------+--------------------------+
  703. | *Getter* | get_particle_flag() |
  704. +-----------+--------------------------+
  705. Align Y axis of particle with the direction of its velocity.
  706. ----
  707. .. _class_CPUParticles2D_property_preprocess:
  708. - :ref:`float<class_float>` **preprocess**
  709. +-----------+-----------------------------+
  710. | *Default* | ``0.0`` |
  711. +-----------+-----------------------------+
  712. | *Setter* | set_pre_process_time(value) |
  713. +-----------+-----------------------------+
  714. | *Getter* | get_pre_process_time() |
  715. +-----------+-----------------------------+
  716. Particle system starts as if it had already run for this many seconds.
  717. ----
  718. .. _class_CPUParticles2D_property_radial_accel_curve:
  719. - :ref:`Curve<class_Curve>` **radial_accel_curve**
  720. +----------+------------------------+
  721. | *Setter* | set_param_curve(value) |
  722. +----------+------------------------+
  723. | *Getter* | get_param_curve() |
  724. +----------+------------------------+
  725. Each particle's radial acceleration will vary along this :ref:`Curve<class_Curve>`.
  726. ----
  727. .. _class_CPUParticles2D_property_radial_accel_max:
  728. - :ref:`float<class_float>` **radial_accel_max**
  729. +-----------+----------------------+
  730. | *Default* | ``0.0`` |
  731. +-----------+----------------------+
  732. | *Setter* | set_param_max(value) |
  733. +-----------+----------------------+
  734. | *Getter* | get_param_max() |
  735. +-----------+----------------------+
  736. ----
  737. .. _class_CPUParticles2D_property_radial_accel_min:
  738. - :ref:`float<class_float>` **radial_accel_min**
  739. +-----------+----------------------+
  740. | *Default* | ``0.0`` |
  741. +-----------+----------------------+
  742. | *Setter* | set_param_min(value) |
  743. +-----------+----------------------+
  744. | *Getter* | get_param_min() |
  745. +-----------+----------------------+
  746. ----
  747. .. _class_CPUParticles2D_property_randomness:
  748. - :ref:`float<class_float>` **randomness**
  749. +-----------+-----------------------------+
  750. | *Default* | ``0.0`` |
  751. +-----------+-----------------------------+
  752. | *Setter* | set_randomness_ratio(value) |
  753. +-----------+-----------------------------+
  754. | *Getter* | get_randomness_ratio() |
  755. +-----------+-----------------------------+
  756. Emission lifetime randomness ratio.
  757. ----
  758. .. _class_CPUParticles2D_property_scale_amount_curve:
  759. - :ref:`Curve<class_Curve>` **scale_amount_curve**
  760. +----------+------------------------+
  761. | *Setter* | set_param_curve(value) |
  762. +----------+------------------------+
  763. | *Getter* | get_param_curve() |
  764. +----------+------------------------+
  765. Each particle's scale will vary along this :ref:`Curve<class_Curve>`.
  766. ----
  767. .. _class_CPUParticles2D_property_scale_amount_max:
  768. - :ref:`float<class_float>` **scale_amount_max**
  769. +-----------+----------------------+
  770. | *Default* | ``1.0`` |
  771. +-----------+----------------------+
  772. | *Setter* | set_param_max(value) |
  773. +-----------+----------------------+
  774. | *Getter* | get_param_max() |
  775. +-----------+----------------------+
  776. ----
  777. .. _class_CPUParticles2D_property_scale_amount_min:
  778. - :ref:`float<class_float>` **scale_amount_min**
  779. +-----------+----------------------+
  780. | *Default* | ``1.0`` |
  781. +-----------+----------------------+
  782. | *Setter* | set_param_min(value) |
  783. +-----------+----------------------+
  784. | *Getter* | get_param_min() |
  785. +-----------+----------------------+
  786. ----
  787. .. _class_CPUParticles2D_property_scale_curve_x:
  788. - :ref:`Curve<class_Curve>` **scale_curve_x**
  789. +----------+--------------------------+
  790. | *Setter* | set_scale_curve_x(value) |
  791. +----------+--------------------------+
  792. | *Getter* | get_scale_curve_x() |
  793. +----------+--------------------------+
  794. ----
  795. .. _class_CPUParticles2D_property_scale_curve_y:
  796. - :ref:`Curve<class_Curve>` **scale_curve_y**
  797. +----------+--------------------------+
  798. | *Setter* | set_scale_curve_y(value) |
  799. +----------+--------------------------+
  800. | *Getter* | get_scale_curve_y() |
  801. +----------+--------------------------+
  802. ----
  803. .. _class_CPUParticles2D_property_speed_scale:
  804. - :ref:`float<class_float>` **speed_scale**
  805. +-----------+------------------------+
  806. | *Default* | ``1.0`` |
  807. +-----------+------------------------+
  808. | *Setter* | set_speed_scale(value) |
  809. +-----------+------------------------+
  810. | *Getter* | get_speed_scale() |
  811. +-----------+------------------------+
  812. Particle system's running speed scaling ratio. A value of ``0`` can be used to pause the particles.
  813. ----
  814. .. _class_CPUParticles2D_property_split_scale:
  815. - :ref:`bool<class_bool>` **split_scale**
  816. +-----------+------------------------+
  817. | *Default* | ``false`` |
  818. +-----------+------------------------+
  819. | *Setter* | set_split_scale(value) |
  820. +-----------+------------------------+
  821. | *Getter* | get_split_scale() |
  822. +-----------+------------------------+
  823. ----
  824. .. _class_CPUParticles2D_property_spread:
  825. - :ref:`float<class_float>` **spread**
  826. +-----------+-------------------+
  827. | *Default* | ``45.0`` |
  828. +-----------+-------------------+
  829. | *Setter* | set_spread(value) |
  830. +-----------+-------------------+
  831. | *Getter* | get_spread() |
  832. +-----------+-------------------+
  833. Each particle's initial direction range from ``+spread`` to ``-spread`` degrees.
  834. ----
  835. .. _class_CPUParticles2D_property_tangential_accel_curve:
  836. - :ref:`Curve<class_Curve>` **tangential_accel_curve**
  837. +----------+------------------------+
  838. | *Setter* | set_param_curve(value) |
  839. +----------+------------------------+
  840. | *Getter* | get_param_curve() |
  841. +----------+------------------------+
  842. Each particle's tangential acceleration will vary along this :ref:`Curve<class_Curve>`.
  843. ----
  844. .. _class_CPUParticles2D_property_tangential_accel_max:
  845. - :ref:`float<class_float>` **tangential_accel_max**
  846. +-----------+----------------------+
  847. | *Default* | ``0.0`` |
  848. +-----------+----------------------+
  849. | *Setter* | set_param_max(value) |
  850. +-----------+----------------------+
  851. | *Getter* | get_param_max() |
  852. +-----------+----------------------+
  853. ----
  854. .. _class_CPUParticles2D_property_tangential_accel_min:
  855. - :ref:`float<class_float>` **tangential_accel_min**
  856. +-----------+----------------------+
  857. | *Default* | ``0.0`` |
  858. +-----------+----------------------+
  859. | *Setter* | set_param_min(value) |
  860. +-----------+----------------------+
  861. | *Getter* | get_param_min() |
  862. +-----------+----------------------+
  863. ----
  864. .. _class_CPUParticles2D_property_texture:
  865. - :ref:`Texture2D<class_Texture2D>` **texture**
  866. +----------+--------------------+
  867. | *Setter* | set_texture(value) |
  868. +----------+--------------------+
  869. | *Getter* | get_texture() |
  870. +----------+--------------------+
  871. Particle texture. If ``null``, particles will be squares.
  872. Method Descriptions
  873. -------------------
  874. .. _class_CPUParticles2D_method_convert_from_particles:
  875. - void **convert_from_particles** **(** :ref:`Node<class_Node>` particles **)**
  876. Sets this node's properties to match a given :ref:`GPUParticles2D<class_GPUParticles2D>` node with an assigned :ref:`ParticlesMaterial<class_ParticlesMaterial>`.
  877. ----
  878. .. _class_CPUParticles2D_method_get_param_curve:
  879. - :ref:`Curve<class_Curve>` **get_param_curve** **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param **)** |const|
  880. Returns the :ref:`Curve<class_Curve>` of the parameter specified by :ref:`Parameter<enum_CPUParticles2D_Parameter>`.
  881. ----
  882. .. _class_CPUParticles2D_method_get_param_max:
  883. - :ref:`float<class_float>` **get_param_max** **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param **)** |const|
  884. ----
  885. .. _class_CPUParticles2D_method_get_param_min:
  886. - :ref:`float<class_float>` **get_param_min** **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param **)** |const|
  887. ----
  888. .. _class_CPUParticles2D_method_get_particle_flag:
  889. - :ref:`bool<class_bool>` **get_particle_flag** **(** :ref:`ParticleFlags<enum_CPUParticles2D_ParticleFlags>` particle_flag **)** |const|
  890. Returns the enabled state of the given flag (see :ref:`ParticleFlags<enum_CPUParticles2D_ParticleFlags>` for options).
  891. ----
  892. .. _class_CPUParticles2D_method_restart:
  893. - void **restart** **(** **)**
  894. Restarts the particle emitter.
  895. ----
  896. .. _class_CPUParticles2D_method_set_param_curve:
  897. - void **set_param_curve** **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param, :ref:`Curve<class_Curve>` curve **)**
  898. Sets the :ref:`Curve<class_Curve>` of the parameter specified by :ref:`Parameter<enum_CPUParticles2D_Parameter>`.
  899. ----
  900. .. _class_CPUParticles2D_method_set_param_max:
  901. - void **set_param_max** **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param, :ref:`float<class_float>` value **)**
  902. ----
  903. .. _class_CPUParticles2D_method_set_param_min:
  904. - void **set_param_min** **(** :ref:`Parameter<enum_CPUParticles2D_Parameter>` param, :ref:`float<class_float>` value **)**
  905. ----
  906. .. _class_CPUParticles2D_method_set_particle_flag:
  907. - void **set_particle_flag** **(** :ref:`ParticleFlags<enum_CPUParticles2D_ParticleFlags>` particle_flag, :ref:`bool<class_bool>` enable **)**
  908. Enables or disables the given flag (see :ref:`ParticleFlags<enum_CPUParticles2D_ParticleFlags>` for options).
  909. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  910. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  911. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  912. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  913. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  914. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`