class_cpuparticles.rst 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the CPUParticles.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_CPUParticles:
  6. CPUParticles
  7. ============
  8. **Inherits:** :ref:`GeometryInstance<class_GeometryInstance>` **<** :ref:`VisualInstance<class_VisualInstance>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. CPU-based 3D particle emitter.
  10. Description
  11. -----------
  12. CPU-based 3D particle node used to create a variety of particle systems and effects.
  13. See also :ref:`Particles<class_Particles>`, which provides the same functionality with hardware acceleration, but may not run on older devices.
  14. Properties
  15. ----------
  16. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  17. | :ref:`int<class_int>` | :ref:`amount<class_CPUParticles_property_amount>` | ``8`` |
  18. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  19. | :ref:`float<class_float>` | :ref:`angle<class_CPUParticles_property_angle>` | ``0.0`` |
  20. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  21. | :ref:`Curve<class_Curve>` | :ref:`angle_curve<class_CPUParticles_property_angle_curve>` | |
  22. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  23. | :ref:`float<class_float>` | :ref:`angle_random<class_CPUParticles_property_angle_random>` | ``0.0`` |
  24. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  25. | :ref:`float<class_float>` | :ref:`angular_velocity<class_CPUParticles_property_angular_velocity>` | ``0.0`` |
  26. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  27. | :ref:`Curve<class_Curve>` | :ref:`angular_velocity_curve<class_CPUParticles_property_angular_velocity_curve>` | |
  28. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  29. | :ref:`float<class_float>` | :ref:`angular_velocity_random<class_CPUParticles_property_angular_velocity_random>` | ``0.0`` |
  30. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  31. | :ref:`float<class_float>` | :ref:`anim_offset<class_CPUParticles_property_anim_offset>` | ``0.0`` |
  32. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  33. | :ref:`Curve<class_Curve>` | :ref:`anim_offset_curve<class_CPUParticles_property_anim_offset_curve>` | |
  34. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  35. | :ref:`float<class_float>` | :ref:`anim_offset_random<class_CPUParticles_property_anim_offset_random>` | ``0.0`` |
  36. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  37. | :ref:`float<class_float>` | :ref:`anim_speed<class_CPUParticles_property_anim_speed>` | ``0.0`` |
  38. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  39. | :ref:`Curve<class_Curve>` | :ref:`anim_speed_curve<class_CPUParticles_property_anim_speed_curve>` | |
  40. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  41. | :ref:`float<class_float>` | :ref:`anim_speed_random<class_CPUParticles_property_anim_speed_random>` | ``0.0`` |
  42. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  43. | :ref:`Color<class_Color>` | :ref:`color<class_CPUParticles_property_color>` | ``Color( 1, 1, 1, 1 )`` |
  44. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  45. | :ref:`Gradient<class_Gradient>` | :ref:`color_ramp<class_CPUParticles_property_color_ramp>` | |
  46. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  47. | :ref:`float<class_float>` | :ref:`damping<class_CPUParticles_property_damping>` | ``0.0`` |
  48. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  49. | :ref:`Curve<class_Curve>` | :ref:`damping_curve<class_CPUParticles_property_damping_curve>` | |
  50. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  51. | :ref:`float<class_float>` | :ref:`damping_random<class_CPUParticles_property_damping_random>` | ``0.0`` |
  52. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  53. | :ref:`Vector3<class_Vector3>` | :ref:`direction<class_CPUParticles_property_direction>` | ``Vector3( 1, 0, 0 )`` |
  54. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  55. | :ref:`DrawOrder<enum_CPUParticles_DrawOrder>` | :ref:`draw_order<class_CPUParticles_property_draw_order>` | ``0`` |
  56. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  57. | :ref:`Vector3<class_Vector3>` | :ref:`emission_box_extents<class_CPUParticles_property_emission_box_extents>` | |
  58. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  59. | :ref:`PoolColorArray<class_PoolColorArray>` | :ref:`emission_colors<class_CPUParticles_property_emission_colors>` | ``PoolColorArray( )`` |
  60. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  61. | :ref:`PoolVector3Array<class_PoolVector3Array>` | :ref:`emission_normals<class_CPUParticles_property_emission_normals>` | |
  62. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  63. | :ref:`PoolVector3Array<class_PoolVector3Array>` | :ref:`emission_points<class_CPUParticles_property_emission_points>` | ``PoolVector3Array( )`` |
  64. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  65. | :ref:`EmissionShape<enum_CPUParticles_EmissionShape>` | :ref:`emission_shape<class_CPUParticles_property_emission_shape>` | ``0`` |
  66. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  67. | :ref:`float<class_float>` | :ref:`emission_sphere_radius<class_CPUParticles_property_emission_sphere_radius>` | |
  68. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  69. | :ref:`bool<class_bool>` | :ref:`emitting<class_CPUParticles_property_emitting>` | ``true`` |
  70. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  71. | :ref:`float<class_float>` | :ref:`explosiveness<class_CPUParticles_property_explosiveness>` | ``0.0`` |
  72. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  73. | :ref:`int<class_int>` | :ref:`fixed_fps<class_CPUParticles_property_fixed_fps>` | ``0`` |
  74. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  75. | :ref:`bool<class_bool>` | :ref:`flag_align_y<class_CPUParticles_property_flag_align_y>` | ``false`` |
  76. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  77. | :ref:`bool<class_bool>` | :ref:`flag_disable_z<class_CPUParticles_property_flag_disable_z>` | ``false`` |
  78. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  79. | :ref:`bool<class_bool>` | :ref:`flag_rotate_y<class_CPUParticles_property_flag_rotate_y>` | ``false`` |
  80. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  81. | :ref:`float<class_float>` | :ref:`flatness<class_CPUParticles_property_flatness>` | ``0.0`` |
  82. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  83. | :ref:`bool<class_bool>` | :ref:`fract_delta<class_CPUParticles_property_fract_delta>` | ``true`` |
  84. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  85. | :ref:`Vector3<class_Vector3>` | :ref:`gravity<class_CPUParticles_property_gravity>` | ``Vector3( 0, -9.8, 0 )`` |
  86. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  87. | :ref:`float<class_float>` | :ref:`hue_variation<class_CPUParticles_property_hue_variation>` | ``0.0`` |
  88. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  89. | :ref:`Curve<class_Curve>` | :ref:`hue_variation_curve<class_CPUParticles_property_hue_variation_curve>` | |
  90. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  91. | :ref:`float<class_float>` | :ref:`hue_variation_random<class_CPUParticles_property_hue_variation_random>` | ``0.0`` |
  92. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  93. | :ref:`float<class_float>` | :ref:`initial_velocity<class_CPUParticles_property_initial_velocity>` | ``0.0`` |
  94. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  95. | :ref:`float<class_float>` | :ref:`initial_velocity_random<class_CPUParticles_property_initial_velocity_random>` | ``0.0`` |
  96. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  97. | :ref:`float<class_float>` | :ref:`lifetime<class_CPUParticles_property_lifetime>` | ``1.0`` |
  98. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  99. | :ref:`float<class_float>` | :ref:`lifetime_randomness<class_CPUParticles_property_lifetime_randomness>` | ``0.0`` |
  100. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  101. | :ref:`float<class_float>` | :ref:`linear_accel<class_CPUParticles_property_linear_accel>` | ``0.0`` |
  102. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  103. | :ref:`Curve<class_Curve>` | :ref:`linear_accel_curve<class_CPUParticles_property_linear_accel_curve>` | |
  104. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  105. | :ref:`float<class_float>` | :ref:`linear_accel_random<class_CPUParticles_property_linear_accel_random>` | ``0.0`` |
  106. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  107. | :ref:`bool<class_bool>` | :ref:`local_coords<class_CPUParticles_property_local_coords>` | ``true`` |
  108. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  109. | :ref:`Mesh<class_Mesh>` | :ref:`mesh<class_CPUParticles_property_mesh>` | |
  110. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  111. | :ref:`bool<class_bool>` | :ref:`one_shot<class_CPUParticles_property_one_shot>` | ``false`` |
  112. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  113. | :ref:`float<class_float>` | :ref:`orbit_velocity<class_CPUParticles_property_orbit_velocity>` | |
  114. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  115. | :ref:`Curve<class_Curve>` | :ref:`orbit_velocity_curve<class_CPUParticles_property_orbit_velocity_curve>` | |
  116. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  117. | :ref:`float<class_float>` | :ref:`orbit_velocity_random<class_CPUParticles_property_orbit_velocity_random>` | |
  118. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  119. | :ref:`float<class_float>` | :ref:`preprocess<class_CPUParticles_property_preprocess>` | ``0.0`` |
  120. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  121. | :ref:`float<class_float>` | :ref:`radial_accel<class_CPUParticles_property_radial_accel>` | ``0.0`` |
  122. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  123. | :ref:`Curve<class_Curve>` | :ref:`radial_accel_curve<class_CPUParticles_property_radial_accel_curve>` | |
  124. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  125. | :ref:`float<class_float>` | :ref:`radial_accel_random<class_CPUParticles_property_radial_accel_random>` | ``0.0`` |
  126. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  127. | :ref:`float<class_float>` | :ref:`randomness<class_CPUParticles_property_randomness>` | ``0.0`` |
  128. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  129. | :ref:`float<class_float>` | :ref:`scale_amount<class_CPUParticles_property_scale_amount>` | ``1.0`` |
  130. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  131. | :ref:`Curve<class_Curve>` | :ref:`scale_amount_curve<class_CPUParticles_property_scale_amount_curve>` | |
  132. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  133. | :ref:`float<class_float>` | :ref:`scale_amount_random<class_CPUParticles_property_scale_amount_random>` | ``0.0`` |
  134. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  135. | :ref:`float<class_float>` | :ref:`speed_scale<class_CPUParticles_property_speed_scale>` | ``1.0`` |
  136. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  137. | :ref:`float<class_float>` | :ref:`spread<class_CPUParticles_property_spread>` | ``45.0`` |
  138. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  139. | :ref:`float<class_float>` | :ref:`tangential_accel<class_CPUParticles_property_tangential_accel>` | ``0.0`` |
  140. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  141. | :ref:`Curve<class_Curve>` | :ref:`tangential_accel_curve<class_CPUParticles_property_tangential_accel_curve>` | |
  142. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  143. | :ref:`float<class_float>` | :ref:`tangential_accel_random<class_CPUParticles_property_tangential_accel_random>` | ``0.0`` |
  144. +-------------------------------------------------------+-------------------------------------------------------------------------------------+---------------------------+
  145. Methods
  146. -------
  147. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | void | :ref:`convert_from_particles<class_CPUParticles_method_convert_from_particles>` **(** :ref:`Node<class_Node>` particles **)** |
  149. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | :ref:`float<class_float>` | :ref:`get_param<class_CPUParticles_method_get_param>` **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param **)** const |
  151. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | :ref:`Curve<class_Curve>` | :ref:`get_param_curve<class_CPUParticles_method_get_param_curve>` **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param **)** const |
  153. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | :ref:`float<class_float>` | :ref:`get_param_randomness<class_CPUParticles_method_get_param_randomness>` **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param **)** const |
  155. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | :ref:`bool<class_bool>` | :ref:`get_particle_flag<class_CPUParticles_method_get_particle_flag>` **(** :ref:`Flags<enum_CPUParticles_Flags>` flag **)** const |
  157. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | void | :ref:`restart<class_CPUParticles_method_restart>` **(** **)** |
  159. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | void | :ref:`set_param<class_CPUParticles_method_set_param>` **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param, :ref:`float<class_float>` value **)** |
  161. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | void | :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param, :ref:`Curve<class_Curve>` curve **)** |
  163. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | void | :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>` **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param, :ref:`float<class_float>` randomness **)** |
  165. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | void | :ref:`set_particle_flag<class_CPUParticles_method_set_particle_flag>` **(** :ref:`Flags<enum_CPUParticles_Flags>` flag, :ref:`bool<class_bool>` enable **)** |
  167. +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. Enumerations
  169. ------------
  170. .. _enum_CPUParticles_DrawOrder:
  171. .. _class_CPUParticles_constant_DRAW_ORDER_INDEX:
  172. .. _class_CPUParticles_constant_DRAW_ORDER_LIFETIME:
  173. .. _class_CPUParticles_constant_DRAW_ORDER_VIEW_DEPTH:
  174. enum **DrawOrder**:
  175. - **DRAW_ORDER_INDEX** = **0** --- Particles are drawn in the order emitted.
  176. - **DRAW_ORDER_LIFETIME** = **1** --- Particles are drawn in order of remaining lifetime.
  177. - **DRAW_ORDER_VIEW_DEPTH** = **2** --- Particles are drawn in order of depth.
  178. ----
  179. .. _enum_CPUParticles_Parameter:
  180. .. _class_CPUParticles_constant_PARAM_INITIAL_LINEAR_VELOCITY:
  181. .. _class_CPUParticles_constant_PARAM_ANGULAR_VELOCITY:
  182. .. _class_CPUParticles_constant_PARAM_ORBIT_VELOCITY:
  183. .. _class_CPUParticles_constant_PARAM_LINEAR_ACCEL:
  184. .. _class_CPUParticles_constant_PARAM_RADIAL_ACCEL:
  185. .. _class_CPUParticles_constant_PARAM_TANGENTIAL_ACCEL:
  186. .. _class_CPUParticles_constant_PARAM_DAMPING:
  187. .. _class_CPUParticles_constant_PARAM_ANGLE:
  188. .. _class_CPUParticles_constant_PARAM_SCALE:
  189. .. _class_CPUParticles_constant_PARAM_HUE_VARIATION:
  190. .. _class_CPUParticles_constant_PARAM_ANIM_SPEED:
  191. .. _class_CPUParticles_constant_PARAM_ANIM_OFFSET:
  192. .. _class_CPUParticles_constant_PARAM_MAX:
  193. enum **Parameter**:
  194. - **PARAM_INITIAL_LINEAR_VELOCITY** = **0** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set initial velocity properties.
  195. - **PARAM_ANGULAR_VELOCITY** = **1** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set angular velocity properties.
  196. - **PARAM_ORBIT_VELOCITY** = **2** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set orbital velocity properties.
  197. - **PARAM_LINEAR_ACCEL** = **3** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set linear acceleration properties.
  198. - **PARAM_RADIAL_ACCEL** = **4** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set radial acceleration properties.
  199. - **PARAM_TANGENTIAL_ACCEL** = **5** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set tangential acceleration properties.
  200. - **PARAM_DAMPING** = **6** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set damping properties.
  201. - **PARAM_ANGLE** = **7** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set angle properties.
  202. - **PARAM_SCALE** = **8** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set scale properties.
  203. - **PARAM_HUE_VARIATION** = **9** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set hue variation properties.
  204. - **PARAM_ANIM_SPEED** = **10** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set animation speed properties.
  205. - **PARAM_ANIM_OFFSET** = **11** --- Use with :ref:`set_param<class_CPUParticles_method_set_param>`, :ref:`set_param_randomness<class_CPUParticles_method_set_param_randomness>`, and :ref:`set_param_curve<class_CPUParticles_method_set_param_curve>` to set animation offset properties.
  206. - **PARAM_MAX** = **12** --- Represents the size of the :ref:`Parameter<enum_CPUParticles_Parameter>` enum.
  207. ----
  208. .. _enum_CPUParticles_Flags:
  209. .. _class_CPUParticles_constant_FLAG_ALIGN_Y_TO_VELOCITY:
  210. .. _class_CPUParticles_constant_FLAG_ROTATE_Y:
  211. .. _class_CPUParticles_constant_FLAG_DISABLE_Z:
  212. .. _class_CPUParticles_constant_FLAG_MAX:
  213. enum **Flags**:
  214. - **FLAG_ALIGN_Y_TO_VELOCITY** = **0** --- Use with :ref:`set_particle_flag<class_CPUParticles_method_set_particle_flag>` to set :ref:`flag_align_y<class_CPUParticles_property_flag_align_y>`.
  215. - **FLAG_ROTATE_Y** = **1** --- Use with :ref:`set_particle_flag<class_CPUParticles_method_set_particle_flag>` to set :ref:`flag_rotate_y<class_CPUParticles_property_flag_rotate_y>`.
  216. - **FLAG_DISABLE_Z** = **2** --- Use with :ref:`set_particle_flag<class_CPUParticles_method_set_particle_flag>` to set :ref:`flag_disable_z<class_CPUParticles_property_flag_disable_z>`.
  217. - **FLAG_MAX** = **3** --- Represents the size of the :ref:`Flags<enum_CPUParticles_Flags>` enum.
  218. ----
  219. .. _enum_CPUParticles_EmissionShape:
  220. .. _class_CPUParticles_constant_EMISSION_SHAPE_POINT:
  221. .. _class_CPUParticles_constant_EMISSION_SHAPE_SPHERE:
  222. .. _class_CPUParticles_constant_EMISSION_SHAPE_BOX:
  223. .. _class_CPUParticles_constant_EMISSION_SHAPE_POINTS:
  224. .. _class_CPUParticles_constant_EMISSION_SHAPE_DIRECTED_POINTS:
  225. .. _class_CPUParticles_constant_EMISSION_SHAPE_MAX:
  226. enum **EmissionShape**:
  227. - **EMISSION_SHAPE_POINT** = **0** --- All particles will be emitted from a single point.
  228. - **EMISSION_SHAPE_SPHERE** = **1** --- Particles will be emitted in the volume of a sphere.
  229. - **EMISSION_SHAPE_BOX** = **2** --- Particles will be emitted in the volume of a box.
  230. - **EMISSION_SHAPE_POINTS** = **3** --- Particles will be emitted at a position chosen randomly among :ref:`emission_points<class_CPUParticles_property_emission_points>`. Particle color will be modulated by :ref:`emission_colors<class_CPUParticles_property_emission_colors>`.
  231. - **EMISSION_SHAPE_DIRECTED_POINTS** = **4** --- Particles will be emitted at a position chosen randomly among :ref:`emission_points<class_CPUParticles_property_emission_points>`. Particle velocity and rotation will be set based on :ref:`emission_normals<class_CPUParticles_property_emission_normals>`. Particle color will be modulated by :ref:`emission_colors<class_CPUParticles_property_emission_colors>`.
  232. - **EMISSION_SHAPE_MAX** = **5** --- Represents the size of the :ref:`EmissionShape<enum_CPUParticles_EmissionShape>` enum.
  233. Property Descriptions
  234. ---------------------
  235. .. _class_CPUParticles_property_amount:
  236. - :ref:`int<class_int>` **amount**
  237. +-----------+-------------------+
  238. | *Default* | ``8`` |
  239. +-----------+-------------------+
  240. | *Setter* | set_amount(value) |
  241. +-----------+-------------------+
  242. | *Getter* | get_amount() |
  243. +-----------+-------------------+
  244. Number of particles emitted in one emission cycle.
  245. ----
  246. .. _class_CPUParticles_property_angle:
  247. - :ref:`float<class_float>` **angle**
  248. +-----------+------------------+
  249. | *Default* | ``0.0`` |
  250. +-----------+------------------+
  251. | *Setter* | set_param(value) |
  252. +-----------+------------------+
  253. | *Getter* | get_param() |
  254. +-----------+------------------+
  255. Initial rotation applied to each particle, in degrees.
  256. ----
  257. .. _class_CPUParticles_property_angle_curve:
  258. - :ref:`Curve<class_Curve>` **angle_curve**
  259. +----------+------------------------+
  260. | *Setter* | set_param_curve(value) |
  261. +----------+------------------------+
  262. | *Getter* | get_param_curve() |
  263. +----------+------------------------+
  264. Each particle's rotation will be animated along this :ref:`Curve<class_Curve>`.
  265. ----
  266. .. _class_CPUParticles_property_angle_random:
  267. - :ref:`float<class_float>` **angle_random**
  268. +-----------+-----------------------------+
  269. | *Default* | ``0.0`` |
  270. +-----------+-----------------------------+
  271. | *Setter* | set_param_randomness(value) |
  272. +-----------+-----------------------------+
  273. | *Getter* | get_param_randomness() |
  274. +-----------+-----------------------------+
  275. Rotation randomness ratio.
  276. ----
  277. .. _class_CPUParticles_property_angular_velocity:
  278. - :ref:`float<class_float>` **angular_velocity**
  279. +-----------+------------------+
  280. | *Default* | ``0.0`` |
  281. +-----------+------------------+
  282. | *Setter* | set_param(value) |
  283. +-----------+------------------+
  284. | *Getter* | get_param() |
  285. +-----------+------------------+
  286. Initial angular velocity applied to each particle. Sets the speed of rotation of the particle.
  287. ----
  288. .. _class_CPUParticles_property_angular_velocity_curve:
  289. - :ref:`Curve<class_Curve>` **angular_velocity_curve**
  290. +----------+------------------------+
  291. | *Setter* | set_param_curve(value) |
  292. +----------+------------------------+
  293. | *Getter* | get_param_curve() |
  294. +----------+------------------------+
  295. Each particle's angular velocity will vary along this :ref:`Curve<class_Curve>`.
  296. ----
  297. .. _class_CPUParticles_property_angular_velocity_random:
  298. - :ref:`float<class_float>` **angular_velocity_random**
  299. +-----------+-----------------------------+
  300. | *Default* | ``0.0`` |
  301. +-----------+-----------------------------+
  302. | *Setter* | set_param_randomness(value) |
  303. +-----------+-----------------------------+
  304. | *Getter* | get_param_randomness() |
  305. +-----------+-----------------------------+
  306. Angular velocity randomness ratio.
  307. ----
  308. .. _class_CPUParticles_property_anim_offset:
  309. - :ref:`float<class_float>` **anim_offset**
  310. +-----------+------------------+
  311. | *Default* | ``0.0`` |
  312. +-----------+------------------+
  313. | *Setter* | set_param(value) |
  314. +-----------+------------------+
  315. | *Getter* | get_param() |
  316. +-----------+------------------+
  317. Particle animation offset.
  318. ----
  319. .. _class_CPUParticles_property_anim_offset_curve:
  320. - :ref:`Curve<class_Curve>` **anim_offset_curve**
  321. +----------+------------------------+
  322. | *Setter* | set_param_curve(value) |
  323. +----------+------------------------+
  324. | *Getter* | get_param_curve() |
  325. +----------+------------------------+
  326. Each particle's animation offset will vary along this :ref:`Curve<class_Curve>`.
  327. ----
  328. .. _class_CPUParticles_property_anim_offset_random:
  329. - :ref:`float<class_float>` **anim_offset_random**
  330. +-----------+-----------------------------+
  331. | *Default* | ``0.0`` |
  332. +-----------+-----------------------------+
  333. | *Setter* | set_param_randomness(value) |
  334. +-----------+-----------------------------+
  335. | *Getter* | get_param_randomness() |
  336. +-----------+-----------------------------+
  337. Animation offset randomness ratio.
  338. ----
  339. .. _class_CPUParticles_property_anim_speed:
  340. - :ref:`float<class_float>` **anim_speed**
  341. +-----------+------------------+
  342. | *Default* | ``0.0`` |
  343. +-----------+------------------+
  344. | *Setter* | set_param(value) |
  345. +-----------+------------------+
  346. | *Getter* | get_param() |
  347. +-----------+------------------+
  348. Particle animation speed.
  349. ----
  350. .. _class_CPUParticles_property_anim_speed_curve:
  351. - :ref:`Curve<class_Curve>` **anim_speed_curve**
  352. +----------+------------------------+
  353. | *Setter* | set_param_curve(value) |
  354. +----------+------------------------+
  355. | *Getter* | get_param_curve() |
  356. +----------+------------------------+
  357. Each particle's animation speed will vary along this :ref:`Curve<class_Curve>`.
  358. ----
  359. .. _class_CPUParticles_property_anim_speed_random:
  360. - :ref:`float<class_float>` **anim_speed_random**
  361. +-----------+-----------------------------+
  362. | *Default* | ``0.0`` |
  363. +-----------+-----------------------------+
  364. | *Setter* | set_param_randomness(value) |
  365. +-----------+-----------------------------+
  366. | *Getter* | get_param_randomness() |
  367. +-----------+-----------------------------+
  368. Animation speed randomness ratio.
  369. ----
  370. .. _class_CPUParticles_property_color:
  371. - :ref:`Color<class_Color>` **color**
  372. +-----------+-------------------------+
  373. | *Default* | ``Color( 1, 1, 1, 1 )`` |
  374. +-----------+-------------------------+
  375. | *Setter* | set_color(value) |
  376. +-----------+-------------------------+
  377. | *Getter* | get_color() |
  378. +-----------+-------------------------+
  379. Unused for 3D particles.
  380. ----
  381. .. _class_CPUParticles_property_color_ramp:
  382. - :ref:`Gradient<class_Gradient>` **color_ramp**
  383. +----------+-----------------------+
  384. | *Setter* | set_color_ramp(value) |
  385. +----------+-----------------------+
  386. | *Getter* | get_color_ramp() |
  387. +----------+-----------------------+
  388. Unused for 3D particles.
  389. ----
  390. .. _class_CPUParticles_property_damping:
  391. - :ref:`float<class_float>` **damping**
  392. +-----------+------------------+
  393. | *Default* | ``0.0`` |
  394. +-----------+------------------+
  395. | *Setter* | set_param(value) |
  396. +-----------+------------------+
  397. | *Getter* | get_param() |
  398. +-----------+------------------+
  399. The rate at which particles lose velocity.
  400. ----
  401. .. _class_CPUParticles_property_damping_curve:
  402. - :ref:`Curve<class_Curve>` **damping_curve**
  403. +----------+------------------------+
  404. | *Setter* | set_param_curve(value) |
  405. +----------+------------------------+
  406. | *Getter* | get_param_curve() |
  407. +----------+------------------------+
  408. Damping will vary along this :ref:`Curve<class_Curve>`.
  409. ----
  410. .. _class_CPUParticles_property_damping_random:
  411. - :ref:`float<class_float>` **damping_random**
  412. +-----------+-----------------------------+
  413. | *Default* | ``0.0`` |
  414. +-----------+-----------------------------+
  415. | *Setter* | set_param_randomness(value) |
  416. +-----------+-----------------------------+
  417. | *Getter* | get_param_randomness() |
  418. +-----------+-----------------------------+
  419. Damping randomness ratio.
  420. ----
  421. .. _class_CPUParticles_property_direction:
  422. - :ref:`Vector3<class_Vector3>` **direction**
  423. +-----------+------------------------+
  424. | *Default* | ``Vector3( 1, 0, 0 )`` |
  425. +-----------+------------------------+
  426. | *Setter* | set_direction(value) |
  427. +-----------+------------------------+
  428. | *Getter* | get_direction() |
  429. +-----------+------------------------+
  430. Unit vector specifying the particles' emission direction.
  431. ----
  432. .. _class_CPUParticles_property_draw_order:
  433. - :ref:`DrawOrder<enum_CPUParticles_DrawOrder>` **draw_order**
  434. +-----------+-----------------------+
  435. | *Default* | ``0`` |
  436. +-----------+-----------------------+
  437. | *Setter* | set_draw_order(value) |
  438. +-----------+-----------------------+
  439. | *Getter* | get_draw_order() |
  440. +-----------+-----------------------+
  441. Particle draw order. Uses :ref:`DrawOrder<enum_CPUParticles_DrawOrder>` values.
  442. ----
  443. .. _class_CPUParticles_property_emission_box_extents:
  444. - :ref:`Vector3<class_Vector3>` **emission_box_extents**
  445. +----------+---------------------------------+
  446. | *Setter* | set_emission_box_extents(value) |
  447. +----------+---------------------------------+
  448. | *Getter* | get_emission_box_extents() |
  449. +----------+---------------------------------+
  450. The rectangle's extents if :ref:`emission_shape<class_CPUParticles_property_emission_shape>` is set to :ref:`EMISSION_SHAPE_BOX<class_CPUParticles_constant_EMISSION_SHAPE_BOX>`.
  451. ----
  452. .. _class_CPUParticles_property_emission_colors:
  453. - :ref:`PoolColorArray<class_PoolColorArray>` **emission_colors**
  454. +-----------+----------------------------+
  455. | *Default* | ``PoolColorArray( )`` |
  456. +-----------+----------------------------+
  457. | *Setter* | set_emission_colors(value) |
  458. +-----------+----------------------------+
  459. | *Getter* | get_emission_colors() |
  460. +-----------+----------------------------+
  461. ----
  462. .. _class_CPUParticles_property_emission_normals:
  463. - :ref:`PoolVector3Array<class_PoolVector3Array>` **emission_normals**
  464. +----------+-----------------------------+
  465. | *Setter* | set_emission_normals(value) |
  466. +----------+-----------------------------+
  467. | *Getter* | get_emission_normals() |
  468. +----------+-----------------------------+
  469. ----
  470. .. _class_CPUParticles_property_emission_points:
  471. - :ref:`PoolVector3Array<class_PoolVector3Array>` **emission_points**
  472. +-----------+----------------------------+
  473. | *Default* | ``PoolVector3Array( )`` |
  474. +-----------+----------------------------+
  475. | *Setter* | set_emission_points(value) |
  476. +-----------+----------------------------+
  477. | *Getter* | get_emission_points() |
  478. +-----------+----------------------------+
  479. ----
  480. .. _class_CPUParticles_property_emission_shape:
  481. - :ref:`EmissionShape<enum_CPUParticles_EmissionShape>` **emission_shape**
  482. +-----------+---------------------------+
  483. | *Default* | ``0`` |
  484. +-----------+---------------------------+
  485. | *Setter* | set_emission_shape(value) |
  486. +-----------+---------------------------+
  487. | *Getter* | get_emission_shape() |
  488. +-----------+---------------------------+
  489. Particles will be emitted inside this region. See :ref:`EmissionShape<enum_CPUParticles_EmissionShape>` for possible values.
  490. ----
  491. .. _class_CPUParticles_property_emission_sphere_radius:
  492. - :ref:`float<class_float>` **emission_sphere_radius**
  493. +----------+-----------------------------------+
  494. | *Setter* | set_emission_sphere_radius(value) |
  495. +----------+-----------------------------------+
  496. | *Getter* | get_emission_sphere_radius() |
  497. +----------+-----------------------------------+
  498. The sphere's radius if :ref:`EmissionShape<enum_CPUParticles_EmissionShape>` is set to :ref:`EMISSION_SHAPE_SPHERE<class_CPUParticles_constant_EMISSION_SHAPE_SPHERE>`.
  499. ----
  500. .. _class_CPUParticles_property_emitting:
  501. - :ref:`bool<class_bool>` **emitting**
  502. +-----------+---------------------+
  503. | *Default* | ``true`` |
  504. +-----------+---------------------+
  505. | *Setter* | set_emitting(value) |
  506. +-----------+---------------------+
  507. | *Getter* | is_emitting() |
  508. +-----------+---------------------+
  509. If ``true``, particles are being emitted.
  510. ----
  511. .. _class_CPUParticles_property_explosiveness:
  512. - :ref:`float<class_float>` **explosiveness**
  513. +-----------+--------------------------------+
  514. | *Default* | ``0.0`` |
  515. +-----------+--------------------------------+
  516. | *Setter* | set_explosiveness_ratio(value) |
  517. +-----------+--------------------------------+
  518. | *Getter* | get_explosiveness_ratio() |
  519. +-----------+--------------------------------+
  520. 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.
  521. ----
  522. .. _class_CPUParticles_property_fixed_fps:
  523. - :ref:`int<class_int>` **fixed_fps**
  524. +-----------+----------------------+
  525. | *Default* | ``0`` |
  526. +-----------+----------------------+
  527. | *Setter* | set_fixed_fps(value) |
  528. +-----------+----------------------+
  529. | *Getter* | get_fixed_fps() |
  530. +-----------+----------------------+
  531. 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 particle system itself.
  532. ----
  533. .. _class_CPUParticles_property_flag_align_y:
  534. - :ref:`bool<class_bool>` **flag_align_y**
  535. +-----------+--------------------------+
  536. | *Default* | ``false`` |
  537. +-----------+--------------------------+
  538. | *Setter* | set_particle_flag(value) |
  539. +-----------+--------------------------+
  540. | *Getter* | get_particle_flag() |
  541. +-----------+--------------------------+
  542. Align Y axis of particle with the direction of its velocity.
  543. ----
  544. .. _class_CPUParticles_property_flag_disable_z:
  545. - :ref:`bool<class_bool>` **flag_disable_z**
  546. +-----------+--------------------------+
  547. | *Default* | ``false`` |
  548. +-----------+--------------------------+
  549. | *Setter* | set_particle_flag(value) |
  550. +-----------+--------------------------+
  551. | *Getter* | get_particle_flag() |
  552. +-----------+--------------------------+
  553. If ``true``, particles will not move on the z axis.
  554. ----
  555. .. _class_CPUParticles_property_flag_rotate_y:
  556. - :ref:`bool<class_bool>` **flag_rotate_y**
  557. +-----------+--------------------------+
  558. | *Default* | ``false`` |
  559. +-----------+--------------------------+
  560. | *Setter* | set_particle_flag(value) |
  561. +-----------+--------------------------+
  562. | *Getter* | get_particle_flag() |
  563. +-----------+--------------------------+
  564. If ``true``, particles rotate around Y axis by :ref:`angle<class_CPUParticles_property_angle>`.
  565. ----
  566. .. _class_CPUParticles_property_flatness:
  567. - :ref:`float<class_float>` **flatness**
  568. +-----------+---------------------+
  569. | *Default* | ``0.0`` |
  570. +-----------+---------------------+
  571. | *Setter* | set_flatness(value) |
  572. +-----------+---------------------+
  573. | *Getter* | get_flatness() |
  574. +-----------+---------------------+
  575. Amount of :ref:`spread<class_CPUParticles_property_spread>` in Y/Z plane. A value of ``1`` restricts particles to X/Z plane.
  576. ----
  577. .. _class_CPUParticles_property_fract_delta:
  578. - :ref:`bool<class_bool>` **fract_delta**
  579. +-----------+-----------------------------+
  580. | *Default* | ``true`` |
  581. +-----------+-----------------------------+
  582. | *Setter* | set_fractional_delta(value) |
  583. +-----------+-----------------------------+
  584. | *Getter* | get_fractional_delta() |
  585. +-----------+-----------------------------+
  586. If ``true``, results in fractional delta calculation which has a smoother particles display effect.
  587. ----
  588. .. _class_CPUParticles_property_gravity:
  589. - :ref:`Vector3<class_Vector3>` **gravity**
  590. +-----------+---------------------------+
  591. | *Default* | ``Vector3( 0, -9.8, 0 )`` |
  592. +-----------+---------------------------+
  593. | *Setter* | set_gravity(value) |
  594. +-----------+---------------------------+
  595. | *Getter* | get_gravity() |
  596. +-----------+---------------------------+
  597. Gravity applied to every particle.
  598. ----
  599. .. _class_CPUParticles_property_hue_variation:
  600. - :ref:`float<class_float>` **hue_variation**
  601. +-----------+------------------+
  602. | *Default* | ``0.0`` |
  603. +-----------+------------------+
  604. | *Setter* | set_param(value) |
  605. +-----------+------------------+
  606. | *Getter* | get_param() |
  607. +-----------+------------------+
  608. Initial hue variation applied to each particle.
  609. ----
  610. .. _class_CPUParticles_property_hue_variation_curve:
  611. - :ref:`Curve<class_Curve>` **hue_variation_curve**
  612. +----------+------------------------+
  613. | *Setter* | set_param_curve(value) |
  614. +----------+------------------------+
  615. | *Getter* | get_param_curve() |
  616. +----------+------------------------+
  617. Each particle's hue will vary along this :ref:`Curve<class_Curve>`.
  618. ----
  619. .. _class_CPUParticles_property_hue_variation_random:
  620. - :ref:`float<class_float>` **hue_variation_random**
  621. +-----------+-----------------------------+
  622. | *Default* | ``0.0`` |
  623. +-----------+-----------------------------+
  624. | *Setter* | set_param_randomness(value) |
  625. +-----------+-----------------------------+
  626. | *Getter* | get_param_randomness() |
  627. +-----------+-----------------------------+
  628. Hue variation randomness ratio.
  629. ----
  630. .. _class_CPUParticles_property_initial_velocity:
  631. - :ref:`float<class_float>` **initial_velocity**
  632. +-----------+------------------+
  633. | *Default* | ``0.0`` |
  634. +-----------+------------------+
  635. | *Setter* | set_param(value) |
  636. +-----------+------------------+
  637. | *Getter* | get_param() |
  638. +-----------+------------------+
  639. Initial velocity magnitude for each particle. Direction comes from :ref:`spread<class_CPUParticles_property_spread>` and the node's orientation.
  640. ----
  641. .. _class_CPUParticles_property_initial_velocity_random:
  642. - :ref:`float<class_float>` **initial_velocity_random**
  643. +-----------+-----------------------------+
  644. | *Default* | ``0.0`` |
  645. +-----------+-----------------------------+
  646. | *Setter* | set_param_randomness(value) |
  647. +-----------+-----------------------------+
  648. | *Getter* | get_param_randomness() |
  649. +-----------+-----------------------------+
  650. Initial velocity randomness ratio.
  651. ----
  652. .. _class_CPUParticles_property_lifetime:
  653. - :ref:`float<class_float>` **lifetime**
  654. +-----------+---------------------+
  655. | *Default* | ``1.0`` |
  656. +-----------+---------------------+
  657. | *Setter* | set_lifetime(value) |
  658. +-----------+---------------------+
  659. | *Getter* | get_lifetime() |
  660. +-----------+---------------------+
  661. Amount of time each particle will exist.
  662. ----
  663. .. _class_CPUParticles_property_lifetime_randomness:
  664. - :ref:`float<class_float>` **lifetime_randomness**
  665. +-----------+--------------------------------+
  666. | *Default* | ``0.0`` |
  667. +-----------+--------------------------------+
  668. | *Setter* | set_lifetime_randomness(value) |
  669. +-----------+--------------------------------+
  670. | *Getter* | get_lifetime_randomness() |
  671. +-----------+--------------------------------+
  672. Particle lifetime randomness ratio.
  673. ----
  674. .. _class_CPUParticles_property_linear_accel:
  675. - :ref:`float<class_float>` **linear_accel**
  676. +-----------+------------------+
  677. | *Default* | ``0.0`` |
  678. +-----------+------------------+
  679. | *Setter* | set_param(value) |
  680. +-----------+------------------+
  681. | *Getter* | get_param() |
  682. +-----------+------------------+
  683. Linear acceleration applied to each particle in the direction of motion.
  684. ----
  685. .. _class_CPUParticles_property_linear_accel_curve:
  686. - :ref:`Curve<class_Curve>` **linear_accel_curve**
  687. +----------+------------------------+
  688. | *Setter* | set_param_curve(value) |
  689. +----------+------------------------+
  690. | *Getter* | get_param_curve() |
  691. +----------+------------------------+
  692. Each particle's linear acceleration will vary along this :ref:`Curve<class_Curve>`.
  693. ----
  694. .. _class_CPUParticles_property_linear_accel_random:
  695. - :ref:`float<class_float>` **linear_accel_random**
  696. +-----------+-----------------------------+
  697. | *Default* | ``0.0`` |
  698. +-----------+-----------------------------+
  699. | *Setter* | set_param_randomness(value) |
  700. +-----------+-----------------------------+
  701. | *Getter* | get_param_randomness() |
  702. +-----------+-----------------------------+
  703. Linear acceleration randomness ratio.
  704. ----
  705. .. _class_CPUParticles_property_local_coords:
  706. - :ref:`bool<class_bool>` **local_coords**
  707. +-----------+----------------------------------+
  708. | *Default* | ``true`` |
  709. +-----------+----------------------------------+
  710. | *Setter* | set_use_local_coordinates(value) |
  711. +-----------+----------------------------------+
  712. | *Getter* | get_use_local_coordinates() |
  713. +-----------+----------------------------------+
  714. If ``true``, particles use the parent node's coordinate space. If ``false``, they use global coordinates.
  715. ----
  716. .. _class_CPUParticles_property_mesh:
  717. - :ref:`Mesh<class_Mesh>` **mesh**
  718. +----------+-----------------+
  719. | *Setter* | set_mesh(value) |
  720. +----------+-----------------+
  721. | *Getter* | get_mesh() |
  722. +----------+-----------------+
  723. The :ref:`Mesh<class_Mesh>` used for each particle. If ``null``, particles will be spheres.
  724. ----
  725. .. _class_CPUParticles_property_one_shot:
  726. - :ref:`bool<class_bool>` **one_shot**
  727. +-----------+---------------------+
  728. | *Default* | ``false`` |
  729. +-----------+---------------------+
  730. | *Setter* | set_one_shot(value) |
  731. +-----------+---------------------+
  732. | *Getter* | get_one_shot() |
  733. +-----------+---------------------+
  734. If ``true``, only one emission cycle occurs. If set ``true`` during a cycle, emission will stop at the cycle's end.
  735. ----
  736. .. _class_CPUParticles_property_orbit_velocity:
  737. - :ref:`float<class_float>` **orbit_velocity**
  738. +----------+------------------+
  739. | *Setter* | set_param(value) |
  740. +----------+------------------+
  741. | *Getter* | get_param() |
  742. +----------+------------------+
  743. Orbital velocity applied to each particle. Makes the particles circle around origin in the local XY plane. Specified in number of full rotations around origin per second.
  744. This property is only available when :ref:`flag_disable_z<class_CPUParticles_property_flag_disable_z>` is ``true``.
  745. ----
  746. .. _class_CPUParticles_property_orbit_velocity_curve:
  747. - :ref:`Curve<class_Curve>` **orbit_velocity_curve**
  748. +----------+------------------------+
  749. | *Setter* | set_param_curve(value) |
  750. +----------+------------------------+
  751. | *Getter* | get_param_curve() |
  752. +----------+------------------------+
  753. Each particle's orbital velocity will vary along this :ref:`Curve<class_Curve>`.
  754. ----
  755. .. _class_CPUParticles_property_orbit_velocity_random:
  756. - :ref:`float<class_float>` **orbit_velocity_random**
  757. +----------+-----------------------------+
  758. | *Setter* | set_param_randomness(value) |
  759. +----------+-----------------------------+
  760. | *Getter* | get_param_randomness() |
  761. +----------+-----------------------------+
  762. Orbital velocity randomness ratio.
  763. ----
  764. .. _class_CPUParticles_property_preprocess:
  765. - :ref:`float<class_float>` **preprocess**
  766. +-----------+-----------------------------+
  767. | *Default* | ``0.0`` |
  768. +-----------+-----------------------------+
  769. | *Setter* | set_pre_process_time(value) |
  770. +-----------+-----------------------------+
  771. | *Getter* | get_pre_process_time() |
  772. +-----------+-----------------------------+
  773. Particle system starts as if it had already run for this many seconds.
  774. ----
  775. .. _class_CPUParticles_property_radial_accel:
  776. - :ref:`float<class_float>` **radial_accel**
  777. +-----------+------------------+
  778. | *Default* | ``0.0`` |
  779. +-----------+------------------+
  780. | *Setter* | set_param(value) |
  781. +-----------+------------------+
  782. | *Getter* | get_param() |
  783. +-----------+------------------+
  784. Radial acceleration applied to each particle. Makes particle accelerate away from origin.
  785. ----
  786. .. _class_CPUParticles_property_radial_accel_curve:
  787. - :ref:`Curve<class_Curve>` **radial_accel_curve**
  788. +----------+------------------------+
  789. | *Setter* | set_param_curve(value) |
  790. +----------+------------------------+
  791. | *Getter* | get_param_curve() |
  792. +----------+------------------------+
  793. Each particle's radial acceleration will vary along this :ref:`Curve<class_Curve>`.
  794. ----
  795. .. _class_CPUParticles_property_radial_accel_random:
  796. - :ref:`float<class_float>` **radial_accel_random**
  797. +-----------+-----------------------------+
  798. | *Default* | ``0.0`` |
  799. +-----------+-----------------------------+
  800. | *Setter* | set_param_randomness(value) |
  801. +-----------+-----------------------------+
  802. | *Getter* | get_param_randomness() |
  803. +-----------+-----------------------------+
  804. Radial acceleration randomness ratio.
  805. ----
  806. .. _class_CPUParticles_property_randomness:
  807. - :ref:`float<class_float>` **randomness**
  808. +-----------+-----------------------------+
  809. | *Default* | ``0.0`` |
  810. +-----------+-----------------------------+
  811. | *Setter* | set_randomness_ratio(value) |
  812. +-----------+-----------------------------+
  813. | *Getter* | get_randomness_ratio() |
  814. +-----------+-----------------------------+
  815. Emission lifetime randomness ratio.
  816. ----
  817. .. _class_CPUParticles_property_scale_amount:
  818. - :ref:`float<class_float>` **scale_amount**
  819. +-----------+------------------+
  820. | *Default* | ``1.0`` |
  821. +-----------+------------------+
  822. | *Setter* | set_param(value) |
  823. +-----------+------------------+
  824. | *Getter* | get_param() |
  825. +-----------+------------------+
  826. Initial scale applied to each particle.
  827. ----
  828. .. _class_CPUParticles_property_scale_amount_curve:
  829. - :ref:`Curve<class_Curve>` **scale_amount_curve**
  830. +----------+------------------------+
  831. | *Setter* | set_param_curve(value) |
  832. +----------+------------------------+
  833. | *Getter* | get_param_curve() |
  834. +----------+------------------------+
  835. Each particle's scale will vary along this :ref:`Curve<class_Curve>`.
  836. ----
  837. .. _class_CPUParticles_property_scale_amount_random:
  838. - :ref:`float<class_float>` **scale_amount_random**
  839. +-----------+-----------------------------+
  840. | *Default* | ``0.0`` |
  841. +-----------+-----------------------------+
  842. | *Setter* | set_param_randomness(value) |
  843. +-----------+-----------------------------+
  844. | *Getter* | get_param_randomness() |
  845. +-----------+-----------------------------+
  846. Scale randomness ratio.
  847. ----
  848. .. _class_CPUParticles_property_speed_scale:
  849. - :ref:`float<class_float>` **speed_scale**
  850. +-----------+------------------------+
  851. | *Default* | ``1.0`` |
  852. +-----------+------------------------+
  853. | *Setter* | set_speed_scale(value) |
  854. +-----------+------------------------+
  855. | *Getter* | get_speed_scale() |
  856. +-----------+------------------------+
  857. Particle system's running speed scaling ratio. A value of ``0`` can be used to pause the particles.
  858. ----
  859. .. _class_CPUParticles_property_spread:
  860. - :ref:`float<class_float>` **spread**
  861. +-----------+-------------------+
  862. | *Default* | ``45.0`` |
  863. +-----------+-------------------+
  864. | *Setter* | set_spread(value) |
  865. +-----------+-------------------+
  866. | *Getter* | get_spread() |
  867. +-----------+-------------------+
  868. Each particle's initial direction range from ``+spread`` to ``-spread`` degrees. Applied to X/Z plane and Y/Z planes.
  869. ----
  870. .. _class_CPUParticles_property_tangential_accel:
  871. - :ref:`float<class_float>` **tangential_accel**
  872. +-----------+------------------+
  873. | *Default* | ``0.0`` |
  874. +-----------+------------------+
  875. | *Setter* | set_param(value) |
  876. +-----------+------------------+
  877. | *Getter* | get_param() |
  878. +-----------+------------------+
  879. Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion.
  880. ----
  881. .. _class_CPUParticles_property_tangential_accel_curve:
  882. - :ref:`Curve<class_Curve>` **tangential_accel_curve**
  883. +----------+------------------------+
  884. | *Setter* | set_param_curve(value) |
  885. +----------+------------------------+
  886. | *Getter* | get_param_curve() |
  887. +----------+------------------------+
  888. Each particle's tangential acceleration will vary along this :ref:`Curve<class_Curve>`.
  889. ----
  890. .. _class_CPUParticles_property_tangential_accel_random:
  891. - :ref:`float<class_float>` **tangential_accel_random**
  892. +-----------+-----------------------------+
  893. | *Default* | ``0.0`` |
  894. +-----------+-----------------------------+
  895. | *Setter* | set_param_randomness(value) |
  896. +-----------+-----------------------------+
  897. | *Getter* | get_param_randomness() |
  898. +-----------+-----------------------------+
  899. Tangential acceleration randomness ratio.
  900. Method Descriptions
  901. -------------------
  902. .. _class_CPUParticles_method_convert_from_particles:
  903. - void **convert_from_particles** **(** :ref:`Node<class_Node>` particles **)**
  904. Sets this node's properties to match a given :ref:`Particles<class_Particles>` node with an assigned :ref:`ParticlesMaterial<class_ParticlesMaterial>`.
  905. ----
  906. .. _class_CPUParticles_method_get_param:
  907. - :ref:`float<class_float>` **get_param** **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param **)** const
  908. ----
  909. .. _class_CPUParticles_method_get_param_curve:
  910. - :ref:`Curve<class_Curve>` **get_param_curve** **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param **)** const
  911. ----
  912. .. _class_CPUParticles_method_get_param_randomness:
  913. - :ref:`float<class_float>` **get_param_randomness** **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param **)** const
  914. ----
  915. .. _class_CPUParticles_method_get_particle_flag:
  916. - :ref:`bool<class_bool>` **get_particle_flag** **(** :ref:`Flags<enum_CPUParticles_Flags>` flag **)** const
  917. ----
  918. .. _class_CPUParticles_method_restart:
  919. - void **restart** **(** **)**
  920. Restarts the particle emitter.
  921. ----
  922. .. _class_CPUParticles_method_set_param:
  923. - void **set_param** **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param, :ref:`float<class_float>` value **)**
  924. ----
  925. .. _class_CPUParticles_method_set_param_curve:
  926. - void **set_param_curve** **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param, :ref:`Curve<class_Curve>` curve **)**
  927. ----
  928. .. _class_CPUParticles_method_set_param_randomness:
  929. - void **set_param_randomness** **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param, :ref:`float<class_float>` randomness **)**
  930. ----
  931. .. _class_CPUParticles_method_set_particle_flag:
  932. - void **set_particle_flag** **(** :ref:`Flags<enum_CPUParticles_Flags>` flag, :ref:`bool<class_bool>` enable **)**