class_cpuparticles.rst 64 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385
  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. Sets the :ref:`Color<class_Color>`\ s to modulate particles by when using :ref:`EMISSION_SHAPE_POINTS<class_CPUParticles_constant_EMISSION_SHAPE_POINTS>` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS<class_CPUParticles_constant_EMISSION_SHAPE_DIRECTED_POINTS>`.
  462. ----
  463. .. _class_CPUParticles_property_emission_normals:
  464. - :ref:`PoolVector3Array<class_PoolVector3Array>` **emission_normals**
  465. +----------+-----------------------------+
  466. | *Setter* | set_emission_normals(value) |
  467. +----------+-----------------------------+
  468. | *Getter* | get_emission_normals() |
  469. +----------+-----------------------------+
  470. Sets the direction the particles will be emitted in when using :ref:`EMISSION_SHAPE_DIRECTED_POINTS<class_CPUParticles_constant_EMISSION_SHAPE_DIRECTED_POINTS>`.
  471. ----
  472. .. _class_CPUParticles_property_emission_points:
  473. - :ref:`PoolVector3Array<class_PoolVector3Array>` **emission_points**
  474. +-----------+----------------------------+
  475. | *Default* | ``PoolVector3Array( )`` |
  476. +-----------+----------------------------+
  477. | *Setter* | set_emission_points(value) |
  478. +-----------+----------------------------+
  479. | *Getter* | get_emission_points() |
  480. +-----------+----------------------------+
  481. Sets the initial positions to spawn particles when using :ref:`EMISSION_SHAPE_POINTS<class_CPUParticles_constant_EMISSION_SHAPE_POINTS>` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS<class_CPUParticles_constant_EMISSION_SHAPE_DIRECTED_POINTS>`.
  482. ----
  483. .. _class_CPUParticles_property_emission_shape:
  484. - :ref:`EmissionShape<enum_CPUParticles_EmissionShape>` **emission_shape**
  485. +-----------+---------------------------+
  486. | *Default* | ``0`` |
  487. +-----------+---------------------------+
  488. | *Setter* | set_emission_shape(value) |
  489. +-----------+---------------------------+
  490. | *Getter* | get_emission_shape() |
  491. +-----------+---------------------------+
  492. Particles will be emitted inside this region. See :ref:`EmissionShape<enum_CPUParticles_EmissionShape>` for possible values.
  493. ----
  494. .. _class_CPUParticles_property_emission_sphere_radius:
  495. - :ref:`float<class_float>` **emission_sphere_radius**
  496. +----------+-----------------------------------+
  497. | *Setter* | set_emission_sphere_radius(value) |
  498. +----------+-----------------------------------+
  499. | *Getter* | get_emission_sphere_radius() |
  500. +----------+-----------------------------------+
  501. The sphere's radius if :ref:`EmissionShape<enum_CPUParticles_EmissionShape>` is set to :ref:`EMISSION_SHAPE_SPHERE<class_CPUParticles_constant_EMISSION_SHAPE_SPHERE>`.
  502. ----
  503. .. _class_CPUParticles_property_emitting:
  504. - :ref:`bool<class_bool>` **emitting**
  505. +-----------+---------------------+
  506. | *Default* | ``true`` |
  507. +-----------+---------------------+
  508. | *Setter* | set_emitting(value) |
  509. +-----------+---------------------+
  510. | *Getter* | is_emitting() |
  511. +-----------+---------------------+
  512. If ``true``, particles are being emitted.
  513. ----
  514. .. _class_CPUParticles_property_explosiveness:
  515. - :ref:`float<class_float>` **explosiveness**
  516. +-----------+--------------------------------+
  517. | *Default* | ``0.0`` |
  518. +-----------+--------------------------------+
  519. | *Setter* | set_explosiveness_ratio(value) |
  520. +-----------+--------------------------------+
  521. | *Getter* | get_explosiveness_ratio() |
  522. +-----------+--------------------------------+
  523. 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.
  524. ----
  525. .. _class_CPUParticles_property_fixed_fps:
  526. - :ref:`int<class_int>` **fixed_fps**
  527. +-----------+----------------------+
  528. | *Default* | ``0`` |
  529. +-----------+----------------------+
  530. | *Setter* | set_fixed_fps(value) |
  531. +-----------+----------------------+
  532. | *Getter* | get_fixed_fps() |
  533. +-----------+----------------------+
  534. 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.
  535. ----
  536. .. _class_CPUParticles_property_flag_align_y:
  537. - :ref:`bool<class_bool>` **flag_align_y**
  538. +-----------+--------------------------+
  539. | *Default* | ``false`` |
  540. +-----------+--------------------------+
  541. | *Setter* | set_particle_flag(value) |
  542. +-----------+--------------------------+
  543. | *Getter* | get_particle_flag() |
  544. +-----------+--------------------------+
  545. Align Y axis of particle with the direction of its velocity.
  546. ----
  547. .. _class_CPUParticles_property_flag_disable_z:
  548. - :ref:`bool<class_bool>` **flag_disable_z**
  549. +-----------+--------------------------+
  550. | *Default* | ``false`` |
  551. +-----------+--------------------------+
  552. | *Setter* | set_particle_flag(value) |
  553. +-----------+--------------------------+
  554. | *Getter* | get_particle_flag() |
  555. +-----------+--------------------------+
  556. If ``true``, particles will not move on the z axis.
  557. ----
  558. .. _class_CPUParticles_property_flag_rotate_y:
  559. - :ref:`bool<class_bool>` **flag_rotate_y**
  560. +-----------+--------------------------+
  561. | *Default* | ``false`` |
  562. +-----------+--------------------------+
  563. | *Setter* | set_particle_flag(value) |
  564. +-----------+--------------------------+
  565. | *Getter* | get_particle_flag() |
  566. +-----------+--------------------------+
  567. If ``true``, particles rotate around Y axis by :ref:`angle<class_CPUParticles_property_angle>`.
  568. ----
  569. .. _class_CPUParticles_property_flatness:
  570. - :ref:`float<class_float>` **flatness**
  571. +-----------+---------------------+
  572. | *Default* | ``0.0`` |
  573. +-----------+---------------------+
  574. | *Setter* | set_flatness(value) |
  575. +-----------+---------------------+
  576. | *Getter* | get_flatness() |
  577. +-----------+---------------------+
  578. Amount of :ref:`spread<class_CPUParticles_property_spread>` in Y/Z plane. A value of ``1`` restricts particles to X/Z plane.
  579. ----
  580. .. _class_CPUParticles_property_fract_delta:
  581. - :ref:`bool<class_bool>` **fract_delta**
  582. +-----------+-----------------------------+
  583. | *Default* | ``true`` |
  584. +-----------+-----------------------------+
  585. | *Setter* | set_fractional_delta(value) |
  586. +-----------+-----------------------------+
  587. | *Getter* | get_fractional_delta() |
  588. +-----------+-----------------------------+
  589. If ``true``, results in fractional delta calculation which has a smoother particles display effect.
  590. ----
  591. .. _class_CPUParticles_property_gravity:
  592. - :ref:`Vector3<class_Vector3>` **gravity**
  593. +-----------+---------------------------+
  594. | *Default* | ``Vector3( 0, -9.8, 0 )`` |
  595. +-----------+---------------------------+
  596. | *Setter* | set_gravity(value) |
  597. +-----------+---------------------------+
  598. | *Getter* | get_gravity() |
  599. +-----------+---------------------------+
  600. Gravity applied to every particle.
  601. ----
  602. .. _class_CPUParticles_property_hue_variation:
  603. - :ref:`float<class_float>` **hue_variation**
  604. +-----------+------------------+
  605. | *Default* | ``0.0`` |
  606. +-----------+------------------+
  607. | *Setter* | set_param(value) |
  608. +-----------+------------------+
  609. | *Getter* | get_param() |
  610. +-----------+------------------+
  611. Initial hue variation applied to each particle.
  612. ----
  613. .. _class_CPUParticles_property_hue_variation_curve:
  614. - :ref:`Curve<class_Curve>` **hue_variation_curve**
  615. +----------+------------------------+
  616. | *Setter* | set_param_curve(value) |
  617. +----------+------------------------+
  618. | *Getter* | get_param_curve() |
  619. +----------+------------------------+
  620. Each particle's hue will vary along this :ref:`Curve<class_Curve>`.
  621. ----
  622. .. _class_CPUParticles_property_hue_variation_random:
  623. - :ref:`float<class_float>` **hue_variation_random**
  624. +-----------+-----------------------------+
  625. | *Default* | ``0.0`` |
  626. +-----------+-----------------------------+
  627. | *Setter* | set_param_randomness(value) |
  628. +-----------+-----------------------------+
  629. | *Getter* | get_param_randomness() |
  630. +-----------+-----------------------------+
  631. Hue variation randomness ratio.
  632. ----
  633. .. _class_CPUParticles_property_initial_velocity:
  634. - :ref:`float<class_float>` **initial_velocity**
  635. +-----------+------------------+
  636. | *Default* | ``0.0`` |
  637. +-----------+------------------+
  638. | *Setter* | set_param(value) |
  639. +-----------+------------------+
  640. | *Getter* | get_param() |
  641. +-----------+------------------+
  642. Initial velocity magnitude for each particle. Direction comes from :ref:`spread<class_CPUParticles_property_spread>` and the node's orientation.
  643. ----
  644. .. _class_CPUParticles_property_initial_velocity_random:
  645. - :ref:`float<class_float>` **initial_velocity_random**
  646. +-----------+-----------------------------+
  647. | *Default* | ``0.0`` |
  648. +-----------+-----------------------------+
  649. | *Setter* | set_param_randomness(value) |
  650. +-----------+-----------------------------+
  651. | *Getter* | get_param_randomness() |
  652. +-----------+-----------------------------+
  653. Initial velocity randomness ratio.
  654. ----
  655. .. _class_CPUParticles_property_lifetime:
  656. - :ref:`float<class_float>` **lifetime**
  657. +-----------+---------------------+
  658. | *Default* | ``1.0`` |
  659. +-----------+---------------------+
  660. | *Setter* | set_lifetime(value) |
  661. +-----------+---------------------+
  662. | *Getter* | get_lifetime() |
  663. +-----------+---------------------+
  664. Amount of time each particle will exist.
  665. ----
  666. .. _class_CPUParticles_property_lifetime_randomness:
  667. - :ref:`float<class_float>` **lifetime_randomness**
  668. +-----------+--------------------------------+
  669. | *Default* | ``0.0`` |
  670. +-----------+--------------------------------+
  671. | *Setter* | set_lifetime_randomness(value) |
  672. +-----------+--------------------------------+
  673. | *Getter* | get_lifetime_randomness() |
  674. +-----------+--------------------------------+
  675. Particle lifetime randomness ratio.
  676. ----
  677. .. _class_CPUParticles_property_linear_accel:
  678. - :ref:`float<class_float>` **linear_accel**
  679. +-----------+------------------+
  680. | *Default* | ``0.0`` |
  681. +-----------+------------------+
  682. | *Setter* | set_param(value) |
  683. +-----------+------------------+
  684. | *Getter* | get_param() |
  685. +-----------+------------------+
  686. Linear acceleration applied to each particle in the direction of motion.
  687. ----
  688. .. _class_CPUParticles_property_linear_accel_curve:
  689. - :ref:`Curve<class_Curve>` **linear_accel_curve**
  690. +----------+------------------------+
  691. | *Setter* | set_param_curve(value) |
  692. +----------+------------------------+
  693. | *Getter* | get_param_curve() |
  694. +----------+------------------------+
  695. Each particle's linear acceleration will vary along this :ref:`Curve<class_Curve>`.
  696. ----
  697. .. _class_CPUParticles_property_linear_accel_random:
  698. - :ref:`float<class_float>` **linear_accel_random**
  699. +-----------+-----------------------------+
  700. | *Default* | ``0.0`` |
  701. +-----------+-----------------------------+
  702. | *Setter* | set_param_randomness(value) |
  703. +-----------+-----------------------------+
  704. | *Getter* | get_param_randomness() |
  705. +-----------+-----------------------------+
  706. Linear acceleration randomness ratio.
  707. ----
  708. .. _class_CPUParticles_property_local_coords:
  709. - :ref:`bool<class_bool>` **local_coords**
  710. +-----------+----------------------------------+
  711. | *Default* | ``true`` |
  712. +-----------+----------------------------------+
  713. | *Setter* | set_use_local_coordinates(value) |
  714. +-----------+----------------------------------+
  715. | *Getter* | get_use_local_coordinates() |
  716. +-----------+----------------------------------+
  717. If ``true``, particles use the parent node's coordinate space. If ``false``, they use global coordinates.
  718. ----
  719. .. _class_CPUParticles_property_mesh:
  720. - :ref:`Mesh<class_Mesh>` **mesh**
  721. +----------+-----------------+
  722. | *Setter* | set_mesh(value) |
  723. +----------+-----------------+
  724. | *Getter* | get_mesh() |
  725. +----------+-----------------+
  726. The :ref:`Mesh<class_Mesh>` used for each particle. If ``null``, particles will be spheres.
  727. ----
  728. .. _class_CPUParticles_property_one_shot:
  729. - :ref:`bool<class_bool>` **one_shot**
  730. +-----------+---------------------+
  731. | *Default* | ``false`` |
  732. +-----------+---------------------+
  733. | *Setter* | set_one_shot(value) |
  734. +-----------+---------------------+
  735. | *Getter* | get_one_shot() |
  736. +-----------+---------------------+
  737. If ``true``, only one emission cycle occurs. If set ``true`` during a cycle, emission will stop at the cycle's end.
  738. ----
  739. .. _class_CPUParticles_property_orbit_velocity:
  740. - :ref:`float<class_float>` **orbit_velocity**
  741. +----------+------------------+
  742. | *Setter* | set_param(value) |
  743. +----------+------------------+
  744. | *Getter* | get_param() |
  745. +----------+------------------+
  746. 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.
  747. This property is only available when :ref:`flag_disable_z<class_CPUParticles_property_flag_disable_z>` is ``true``.
  748. ----
  749. .. _class_CPUParticles_property_orbit_velocity_curve:
  750. - :ref:`Curve<class_Curve>` **orbit_velocity_curve**
  751. +----------+------------------------+
  752. | *Setter* | set_param_curve(value) |
  753. +----------+------------------------+
  754. | *Getter* | get_param_curve() |
  755. +----------+------------------------+
  756. Each particle's orbital velocity will vary along this :ref:`Curve<class_Curve>`.
  757. ----
  758. .. _class_CPUParticles_property_orbit_velocity_random:
  759. - :ref:`float<class_float>` **orbit_velocity_random**
  760. +----------+-----------------------------+
  761. | *Setter* | set_param_randomness(value) |
  762. +----------+-----------------------------+
  763. | *Getter* | get_param_randomness() |
  764. +----------+-----------------------------+
  765. Orbital velocity randomness ratio.
  766. ----
  767. .. _class_CPUParticles_property_preprocess:
  768. - :ref:`float<class_float>` **preprocess**
  769. +-----------+-----------------------------+
  770. | *Default* | ``0.0`` |
  771. +-----------+-----------------------------+
  772. | *Setter* | set_pre_process_time(value) |
  773. +-----------+-----------------------------+
  774. | *Getter* | get_pre_process_time() |
  775. +-----------+-----------------------------+
  776. Particle system starts as if it had already run for this many seconds.
  777. ----
  778. .. _class_CPUParticles_property_radial_accel:
  779. - :ref:`float<class_float>` **radial_accel**
  780. +-----------+------------------+
  781. | *Default* | ``0.0`` |
  782. +-----------+------------------+
  783. | *Setter* | set_param(value) |
  784. +-----------+------------------+
  785. | *Getter* | get_param() |
  786. +-----------+------------------+
  787. Radial acceleration applied to each particle. Makes particle accelerate away from origin.
  788. ----
  789. .. _class_CPUParticles_property_radial_accel_curve:
  790. - :ref:`Curve<class_Curve>` **radial_accel_curve**
  791. +----------+------------------------+
  792. | *Setter* | set_param_curve(value) |
  793. +----------+------------------------+
  794. | *Getter* | get_param_curve() |
  795. +----------+------------------------+
  796. Each particle's radial acceleration will vary along this :ref:`Curve<class_Curve>`.
  797. ----
  798. .. _class_CPUParticles_property_radial_accel_random:
  799. - :ref:`float<class_float>` **radial_accel_random**
  800. +-----------+-----------------------------+
  801. | *Default* | ``0.0`` |
  802. +-----------+-----------------------------+
  803. | *Setter* | set_param_randomness(value) |
  804. +-----------+-----------------------------+
  805. | *Getter* | get_param_randomness() |
  806. +-----------+-----------------------------+
  807. Radial acceleration randomness ratio.
  808. ----
  809. .. _class_CPUParticles_property_randomness:
  810. - :ref:`float<class_float>` **randomness**
  811. +-----------+-----------------------------+
  812. | *Default* | ``0.0`` |
  813. +-----------+-----------------------------+
  814. | *Setter* | set_randomness_ratio(value) |
  815. +-----------+-----------------------------+
  816. | *Getter* | get_randomness_ratio() |
  817. +-----------+-----------------------------+
  818. Emission lifetime randomness ratio.
  819. ----
  820. .. _class_CPUParticles_property_scale_amount:
  821. - :ref:`float<class_float>` **scale_amount**
  822. +-----------+------------------+
  823. | *Default* | ``1.0`` |
  824. +-----------+------------------+
  825. | *Setter* | set_param(value) |
  826. +-----------+------------------+
  827. | *Getter* | get_param() |
  828. +-----------+------------------+
  829. Initial scale applied to each particle.
  830. ----
  831. .. _class_CPUParticles_property_scale_amount_curve:
  832. - :ref:`Curve<class_Curve>` **scale_amount_curve**
  833. +----------+------------------------+
  834. | *Setter* | set_param_curve(value) |
  835. +----------+------------------------+
  836. | *Getter* | get_param_curve() |
  837. +----------+------------------------+
  838. Each particle's scale will vary along this :ref:`Curve<class_Curve>`.
  839. ----
  840. .. _class_CPUParticles_property_scale_amount_random:
  841. - :ref:`float<class_float>` **scale_amount_random**
  842. +-----------+-----------------------------+
  843. | *Default* | ``0.0`` |
  844. +-----------+-----------------------------+
  845. | *Setter* | set_param_randomness(value) |
  846. +-----------+-----------------------------+
  847. | *Getter* | get_param_randomness() |
  848. +-----------+-----------------------------+
  849. Scale randomness ratio.
  850. ----
  851. .. _class_CPUParticles_property_speed_scale:
  852. - :ref:`float<class_float>` **speed_scale**
  853. +-----------+------------------------+
  854. | *Default* | ``1.0`` |
  855. +-----------+------------------------+
  856. | *Setter* | set_speed_scale(value) |
  857. +-----------+------------------------+
  858. | *Getter* | get_speed_scale() |
  859. +-----------+------------------------+
  860. Particle system's running speed scaling ratio. A value of ``0`` can be used to pause the particles.
  861. ----
  862. .. _class_CPUParticles_property_spread:
  863. - :ref:`float<class_float>` **spread**
  864. +-----------+-------------------+
  865. | *Default* | ``45.0`` |
  866. +-----------+-------------------+
  867. | *Setter* | set_spread(value) |
  868. +-----------+-------------------+
  869. | *Getter* | get_spread() |
  870. +-----------+-------------------+
  871. Each particle's initial direction range from ``+spread`` to ``-spread`` degrees. Applied to X/Z plane and Y/Z planes.
  872. ----
  873. .. _class_CPUParticles_property_tangential_accel:
  874. - :ref:`float<class_float>` **tangential_accel**
  875. +-----------+------------------+
  876. | *Default* | ``0.0`` |
  877. +-----------+------------------+
  878. | *Setter* | set_param(value) |
  879. +-----------+------------------+
  880. | *Getter* | get_param() |
  881. +-----------+------------------+
  882. Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion.
  883. ----
  884. .. _class_CPUParticles_property_tangential_accel_curve:
  885. - :ref:`Curve<class_Curve>` **tangential_accel_curve**
  886. +----------+------------------------+
  887. | *Setter* | set_param_curve(value) |
  888. +----------+------------------------+
  889. | *Getter* | get_param_curve() |
  890. +----------+------------------------+
  891. Each particle's tangential acceleration will vary along this :ref:`Curve<class_Curve>`.
  892. ----
  893. .. _class_CPUParticles_property_tangential_accel_random:
  894. - :ref:`float<class_float>` **tangential_accel_random**
  895. +-----------+-----------------------------+
  896. | *Default* | ``0.0`` |
  897. +-----------+-----------------------------+
  898. | *Setter* | set_param_randomness(value) |
  899. +-----------+-----------------------------+
  900. | *Getter* | get_param_randomness() |
  901. +-----------+-----------------------------+
  902. Tangential acceleration randomness ratio.
  903. Method Descriptions
  904. -------------------
  905. .. _class_CPUParticles_method_convert_from_particles:
  906. - void **convert_from_particles** **(** :ref:`Node<class_Node>` particles **)**
  907. Sets this node's properties to match a given :ref:`Particles<class_Particles>` node with an assigned :ref:`ParticlesMaterial<class_ParticlesMaterial>`.
  908. ----
  909. .. _class_CPUParticles_method_get_param:
  910. - :ref:`float<class_float>` **get_param** **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param **)** |const|
  911. Returns the base value of the parameter specified by :ref:`Parameter<enum_CPUParticles_Parameter>`.
  912. ----
  913. .. _class_CPUParticles_method_get_param_curve:
  914. - :ref:`Curve<class_Curve>` **get_param_curve** **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param **)** |const|
  915. Returns the :ref:`Curve<class_Curve>` of the parameter specified by :ref:`Parameter<enum_CPUParticles_Parameter>`.
  916. ----
  917. .. _class_CPUParticles_method_get_param_randomness:
  918. - :ref:`float<class_float>` **get_param_randomness** **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param **)** |const|
  919. Returns the randomness factor of the parameter specified by :ref:`Parameter<enum_CPUParticles_Parameter>`.
  920. ----
  921. .. _class_CPUParticles_method_get_particle_flag:
  922. - :ref:`bool<class_bool>` **get_particle_flag** **(** :ref:`Flags<enum_CPUParticles_Flags>` flag **)** |const|
  923. Returns the enabled state of the given flag (see :ref:`Flags<enum_CPUParticles_Flags>` for options).
  924. ----
  925. .. _class_CPUParticles_method_restart:
  926. - void **restart** **(** **)**
  927. Restarts the particle emitter.
  928. ----
  929. .. _class_CPUParticles_method_set_param:
  930. - void **set_param** **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param, :ref:`float<class_float>` value **)**
  931. Sets the base value of the parameter specified by :ref:`Parameter<enum_CPUParticles_Parameter>`.
  932. ----
  933. .. _class_CPUParticles_method_set_param_curve:
  934. - void **set_param_curve** **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param, :ref:`Curve<class_Curve>` curve **)**
  935. Sets the :ref:`Curve<class_Curve>` of the parameter specified by :ref:`Parameter<enum_CPUParticles_Parameter>`.
  936. ----
  937. .. _class_CPUParticles_method_set_param_randomness:
  938. - void **set_param_randomness** **(** :ref:`Parameter<enum_CPUParticles_Parameter>` param, :ref:`float<class_float>` randomness **)**
  939. Sets the randomness factor of the parameter specified by :ref:`Parameter<enum_CPUParticles_Parameter>`.
  940. ----
  941. .. _class_CPUParticles_method_set_particle_flag:
  942. - void **set_particle_flag** **(** :ref:`Flags<enum_CPUParticles_Flags>` flag, :ref:`bool<class_bool>` enable **)**
  943. Enables or disables the given flag (see :ref:`Flags<enum_CPUParticles_Flags>` for options).
  944. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  945. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  946. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`