class_cpuparticles2d.rst 82 KB

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