class_cpuparticles2d.rst 64 KB

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