class_particlesmaterial.rst 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the ParticlesMaterial.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_ParticlesMaterial:
  5. ParticlesMaterial
  6. =================
  7. **Inherits:** :ref:`Material<class_Material>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Particle properties for :ref:`Particles<class_Particles>` and :ref:`Particles2D<class_Particles2D>` nodes.
  12. Properties
  13. ----------
  14. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  15. | :ref:`float<class_float>` | :ref:`angle<class_ParticlesMaterial_property_angle>` |
  16. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  17. | :ref:`Texture<class_Texture>` | :ref:`angle_curve<class_ParticlesMaterial_property_angle_curve>` |
  18. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  19. | :ref:`float<class_float>` | :ref:`angle_random<class_ParticlesMaterial_property_angle_random>` |
  20. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  21. | :ref:`float<class_float>` | :ref:`angular_velocity<class_ParticlesMaterial_property_angular_velocity>` |
  22. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  23. | :ref:`Texture<class_Texture>` | :ref:`angular_velocity_curve<class_ParticlesMaterial_property_angular_velocity_curve>` |
  24. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  25. | :ref:`float<class_float>` | :ref:`angular_velocity_random<class_ParticlesMaterial_property_angular_velocity_random>` |
  26. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  27. | :ref:`float<class_float>` | :ref:`anim_offset<class_ParticlesMaterial_property_anim_offset>` |
  28. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  29. | :ref:`Texture<class_Texture>` | :ref:`anim_offset_curve<class_ParticlesMaterial_property_anim_offset_curve>` |
  30. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  31. | :ref:`float<class_float>` | :ref:`anim_offset_random<class_ParticlesMaterial_property_anim_offset_random>` |
  32. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  33. | :ref:`float<class_float>` | :ref:`anim_speed<class_ParticlesMaterial_property_anim_speed>` |
  34. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  35. | :ref:`Texture<class_Texture>` | :ref:`anim_speed_curve<class_ParticlesMaterial_property_anim_speed_curve>` |
  36. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  37. | :ref:`float<class_float>` | :ref:`anim_speed_random<class_ParticlesMaterial_property_anim_speed_random>` |
  38. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  39. | :ref:`Color<class_Color>` | :ref:`color<class_ParticlesMaterial_property_color>` |
  40. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  41. | :ref:`Texture<class_Texture>` | :ref:`color_ramp<class_ParticlesMaterial_property_color_ramp>` |
  42. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  43. | :ref:`float<class_float>` | :ref:`damping<class_ParticlesMaterial_property_damping>` |
  44. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  45. | :ref:`Texture<class_Texture>` | :ref:`damping_curve<class_ParticlesMaterial_property_damping_curve>` |
  46. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  47. | :ref:`float<class_float>` | :ref:`damping_random<class_ParticlesMaterial_property_damping_random>` |
  48. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  49. | :ref:`Vector3<class_Vector3>` | :ref:`emission_box_extents<class_ParticlesMaterial_property_emission_box_extents>` |
  50. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  51. | :ref:`Texture<class_Texture>` | :ref:`emission_color_texture<class_ParticlesMaterial_property_emission_color_texture>` |
  52. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  53. | :ref:`Texture<class_Texture>` | :ref:`emission_normal_texture<class_ParticlesMaterial_property_emission_normal_texture>` |
  54. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  55. | :ref:`int<class_int>` | :ref:`emission_point_count<class_ParticlesMaterial_property_emission_point_count>` |
  56. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  57. | :ref:`Texture<class_Texture>` | :ref:`emission_point_texture<class_ParticlesMaterial_property_emission_point_texture>` |
  58. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  59. | :ref:`EmissionShape<enum_ParticlesMaterial_EmissionShape>` | :ref:`emission_shape<class_ParticlesMaterial_property_emission_shape>` |
  60. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  61. | :ref:`float<class_float>` | :ref:`emission_sphere_radius<class_ParticlesMaterial_property_emission_sphere_radius>` |
  62. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  63. | :ref:`bool<class_bool>` | :ref:`flag_align_y<class_ParticlesMaterial_property_flag_align_y>` |
  64. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  65. | :ref:`bool<class_bool>` | :ref:`flag_disable_z<class_ParticlesMaterial_property_flag_disable_z>` |
  66. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  67. | :ref:`bool<class_bool>` | :ref:`flag_rotate_y<class_ParticlesMaterial_property_flag_rotate_y>` |
  68. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  69. | :ref:`float<class_float>` | :ref:`flatness<class_ParticlesMaterial_property_flatness>` |
  70. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  71. | :ref:`Vector3<class_Vector3>` | :ref:`gravity<class_ParticlesMaterial_property_gravity>` |
  72. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  73. | :ref:`float<class_float>` | :ref:`hue_variation<class_ParticlesMaterial_property_hue_variation>` |
  74. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  75. | :ref:`Texture<class_Texture>` | :ref:`hue_variation_curve<class_ParticlesMaterial_property_hue_variation_curve>` |
  76. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  77. | :ref:`float<class_float>` | :ref:`hue_variation_random<class_ParticlesMaterial_property_hue_variation_random>` |
  78. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  79. | :ref:`float<class_float>` | :ref:`initial_velocity<class_ParticlesMaterial_property_initial_velocity>` |
  80. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  81. | :ref:`float<class_float>` | :ref:`initial_velocity_random<class_ParticlesMaterial_property_initial_velocity_random>` |
  82. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  83. | :ref:`float<class_float>` | :ref:`linear_accel<class_ParticlesMaterial_property_linear_accel>` |
  84. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  85. | :ref:`Texture<class_Texture>` | :ref:`linear_accel_curve<class_ParticlesMaterial_property_linear_accel_curve>` |
  86. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  87. | :ref:`float<class_float>` | :ref:`linear_accel_random<class_ParticlesMaterial_property_linear_accel_random>` |
  88. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  89. | :ref:`float<class_float>` | :ref:`orbit_velocity<class_ParticlesMaterial_property_orbit_velocity>` |
  90. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  91. | :ref:`Texture<class_Texture>` | :ref:`orbit_velocity_curve<class_ParticlesMaterial_property_orbit_velocity_curve>` |
  92. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  93. | :ref:`float<class_float>` | :ref:`orbit_velocity_random<class_ParticlesMaterial_property_orbit_velocity_random>` |
  94. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  95. | :ref:`float<class_float>` | :ref:`radial_accel<class_ParticlesMaterial_property_radial_accel>` |
  96. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  97. | :ref:`Texture<class_Texture>` | :ref:`radial_accel_curve<class_ParticlesMaterial_property_radial_accel_curve>` |
  98. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  99. | :ref:`float<class_float>` | :ref:`radial_accel_random<class_ParticlesMaterial_property_radial_accel_random>` |
  100. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  101. | :ref:`float<class_float>` | :ref:`scale<class_ParticlesMaterial_property_scale>` |
  102. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  103. | :ref:`Texture<class_Texture>` | :ref:`scale_curve<class_ParticlesMaterial_property_scale_curve>` |
  104. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  105. | :ref:`float<class_float>` | :ref:`scale_random<class_ParticlesMaterial_property_scale_random>` |
  106. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  107. | :ref:`float<class_float>` | :ref:`spread<class_ParticlesMaterial_property_spread>` |
  108. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  109. | :ref:`float<class_float>` | :ref:`tangential_accel<class_ParticlesMaterial_property_tangential_accel>` |
  110. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  111. | :ref:`Texture<class_Texture>` | :ref:`tangential_accel_curve<class_ParticlesMaterial_property_tangential_accel_curve>` |
  112. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  113. | :ref:`float<class_float>` | :ref:`tangential_accel_random<class_ParticlesMaterial_property_tangential_accel_random>` |
  114. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  115. | :ref:`GradientTexture<class_GradientTexture>` | :ref:`trail_color_modifier<class_ParticlesMaterial_property_trail_color_modifier>` |
  116. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  117. | :ref:`int<class_int>` | :ref:`trail_divisor<class_ParticlesMaterial_property_trail_divisor>` |
  118. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  119. | :ref:`CurveTexture<class_CurveTexture>` | :ref:`trail_size_modifier<class_ParticlesMaterial_property_trail_size_modifier>` |
  120. +------------------------------------------------------------+------------------------------------------------------------------------------------------+
  121. Enumerations
  122. ------------
  123. .. _enum_ParticlesMaterial_Parameter:
  124. .. _class_ParticlesMaterial_constant_PARAM_INITIAL_LINEAR_VELOCITY:
  125. .. _class_ParticlesMaterial_constant_PARAM_ANGULAR_VELOCITY:
  126. .. _class_ParticlesMaterial_constant_PARAM_ORBIT_VELOCITY:
  127. .. _class_ParticlesMaterial_constant_PARAM_LINEAR_ACCEL:
  128. .. _class_ParticlesMaterial_constant_PARAM_RADIAL_ACCEL:
  129. .. _class_ParticlesMaterial_constant_PARAM_TANGENTIAL_ACCEL:
  130. .. _class_ParticlesMaterial_constant_PARAM_DAMPING:
  131. .. _class_ParticlesMaterial_constant_PARAM_ANGLE:
  132. .. _class_ParticlesMaterial_constant_PARAM_SCALE:
  133. .. _class_ParticlesMaterial_constant_PARAM_HUE_VARIATION:
  134. .. _class_ParticlesMaterial_constant_PARAM_ANIM_SPEED:
  135. .. _class_ParticlesMaterial_constant_PARAM_ANIM_OFFSET:
  136. .. _class_ParticlesMaterial_constant_PARAM_MAX:
  137. enum **Parameter**:
  138. - **PARAM_INITIAL_LINEAR_VELOCITY** = **0** --- Use with :ref:`set_param<class_ParticlesMaterial_method_set_param>`, :ref:`set_param_randomness<class_ParticlesMaterial_method_set_param_randomness>`, and :ref:`set_param_texture<class_ParticlesMaterial_method_set_param_texture>` to set initial velocity properties.
  139. - **PARAM_ANGULAR_VELOCITY** = **1** --- Use with :ref:`set_param<class_ParticlesMaterial_method_set_param>`, :ref:`set_param_randomness<class_ParticlesMaterial_method_set_param_randomness>`, and :ref:`set_param_texture<class_ParticlesMaterial_method_set_param_texture>` to set angular velocity properties.
  140. - **PARAM_ORBIT_VELOCITY** = **2** --- Use with :ref:`set_param<class_ParticlesMaterial_method_set_param>`, :ref:`set_param_randomness<class_ParticlesMaterial_method_set_param_randomness>`, and :ref:`set_param_texture<class_ParticlesMaterial_method_set_param_texture>` to set orbital_velocity properties.
  141. - **PARAM_LINEAR_ACCEL** = **3** --- Use with :ref:`set_param<class_ParticlesMaterial_method_set_param>`, :ref:`set_param_randomness<class_ParticlesMaterial_method_set_param_randomness>`, and :ref:`set_param_texture<class_ParticlesMaterial_method_set_param_texture>` to set linear acceleration properties.
  142. - **PARAM_RADIAL_ACCEL** = **4** --- Use with :ref:`set_param<class_ParticlesMaterial_method_set_param>`, :ref:`set_param_randomness<class_ParticlesMaterial_method_set_param_randomness>`, and :ref:`set_param_texture<class_ParticlesMaterial_method_set_param_texture>` to set radial acceleration properties.
  143. - **PARAM_TANGENTIAL_ACCEL** = **5** --- Use with :ref:`set_param<class_ParticlesMaterial_method_set_param>`, :ref:`set_param_randomness<class_ParticlesMaterial_method_set_param_randomness>`, and :ref:`set_param_texture<class_ParticlesMaterial_method_set_param_texture>` to set tangential acceleration properties.
  144. - **PARAM_DAMPING** = **6** --- Use with :ref:`set_param<class_ParticlesMaterial_method_set_param>`, :ref:`set_param_randomness<class_ParticlesMaterial_method_set_param_randomness>`, and :ref:`set_param_texture<class_ParticlesMaterial_method_set_param_texture>` to set damping properties.
  145. - **PARAM_ANGLE** = **7** --- Use with :ref:`set_param<class_ParticlesMaterial_method_set_param>`, :ref:`set_param_randomness<class_ParticlesMaterial_method_set_param_randomness>`, and :ref:`set_param_texture<class_ParticlesMaterial_method_set_param_texture>` to set angle properties.
  146. - **PARAM_SCALE** = **8** --- Use with :ref:`set_param<class_ParticlesMaterial_method_set_param>`, :ref:`set_param_randomness<class_ParticlesMaterial_method_set_param_randomness>`, and :ref:`set_param_texture<class_ParticlesMaterial_method_set_param_texture>` to set scale properties.
  147. - **PARAM_HUE_VARIATION** = **9** --- Use with :ref:`set_param<class_ParticlesMaterial_method_set_param>`, :ref:`set_param_randomness<class_ParticlesMaterial_method_set_param_randomness>`, and :ref:`set_param_texture<class_ParticlesMaterial_method_set_param_texture>` to set hue_variation properties.
  148. - **PARAM_ANIM_SPEED** = **10** --- Use with :ref:`set_param<class_ParticlesMaterial_method_set_param>`, :ref:`set_param_randomness<class_ParticlesMaterial_method_set_param_randomness>`, and :ref:`set_param_texture<class_ParticlesMaterial_method_set_param_texture>` to set animation speed properties.
  149. - **PARAM_ANIM_OFFSET** = **11** --- Use with :ref:`set_param<class_ParticlesMaterial_method_set_param>`, :ref:`set_param_randomness<class_ParticlesMaterial_method_set_param_randomness>`, and :ref:`set_param_texture<class_ParticlesMaterial_method_set_param_texture>` to set animation offset properties.
  150. - **PARAM_MAX** = **12**
  151. .. _enum_ParticlesMaterial_Flags:
  152. .. _class_ParticlesMaterial_constant_FLAG_ALIGN_Y_TO_VELOCITY:
  153. .. _class_ParticlesMaterial_constant_FLAG_ROTATE_Y:
  154. .. _class_ParticlesMaterial_constant_FLAG_MAX:
  155. enum **Flags**:
  156. - **FLAG_ALIGN_Y_TO_VELOCITY** = **0** --- Use with :ref:`set_flag<class_ParticlesMaterial_method_set_flag>` to set :ref:`flag_align_y<class_ParticlesMaterial_property_flag_align_y>`.
  157. - **FLAG_ROTATE_Y** = **1** --- Use with :ref:`set_flag<class_ParticlesMaterial_method_set_flag>` to set :ref:`flag_rotate_y<class_ParticlesMaterial_property_flag_rotate_y>`
  158. - **FLAG_MAX** = **3**
  159. .. _enum_ParticlesMaterial_EmissionShape:
  160. .. _class_ParticlesMaterial_constant_EMISSION_SHAPE_POINT:
  161. .. _class_ParticlesMaterial_constant_EMISSION_SHAPE_SPHERE:
  162. .. _class_ParticlesMaterial_constant_EMISSION_SHAPE_BOX:
  163. .. _class_ParticlesMaterial_constant_EMISSION_SHAPE_POINTS:
  164. .. _class_ParticlesMaterial_constant_EMISSION_SHAPE_DIRECTED_POINTS:
  165. enum **EmissionShape**:
  166. - **EMISSION_SHAPE_POINT** = **0** --- All particles will be emitted from a single point.
  167. - **EMISSION_SHAPE_SPHERE** = **1** --- Particles will be emitted in the volume of a sphere.
  168. - **EMISSION_SHAPE_BOX** = **2** --- Particles will be emitted in the volume of a box.
  169. - **EMISSION_SHAPE_POINTS** = **3** --- Particles will be emitted at a position determined by sampling a random point on the :ref:`emission_point_texture<class_ParticlesMaterial_property_emission_point_texture>`. Particle color will be modulated by :ref:`emission_color_texture<class_ParticlesMaterial_property_emission_color_texture>`.
  170. - **EMISSION_SHAPE_DIRECTED_POINTS** = **4** --- Particles will be emitted at a position determined by sampling a random point on the :ref:`emission_point_texture<class_ParticlesMaterial_property_emission_point_texture>`. Particle velocity and rotation will be set based on :ref:`emission_normal_texture<class_ParticlesMaterial_property_emission_normal_texture>`. Particle color will be modulated by :ref:`emission_color_texture<class_ParticlesMaterial_property_emission_color_texture>`.
  171. Description
  172. -----------
  173. ParticlesMaterial defines particle properties and behavior. It is used in the ``process_material`` of :ref:`Particles<class_Particles>` and :ref:`Particles2D<class_Particles2D>` emitter nodes.
  174. Some of this material's properties are applied to each particle when emitted, while others can have a :ref:`CurveTexture<class_CurveTexture>` applied to vary values over the lifetime of the particle.
  175. When a randomness ratio is applied to a property it is used to scale that property by a random amount. The random ratio is used to interpolate between ``1.0`` and a random number less than one, the result is multiplied by the property to obtain the randomized property. For example a random ratio of ``0.4`` would scale the original property between ``0.4-1.0`` of its original value.
  176. Property Descriptions
  177. ---------------------
  178. .. _class_ParticlesMaterial_property_angle:
  179. - :ref:`float<class_float>` **angle**
  180. +----------+------------------+
  181. | *Setter* | set_param(value) |
  182. +----------+------------------+
  183. | *Getter* | get_param() |
  184. +----------+------------------+
  185. Initial rotation applied to each particle, in degrees.
  186. Only applied when :ref:`flag_disable_z<class_ParticlesMaterial_property_flag_disable_z>` or :ref:`flag_rotate_y<class_ParticlesMaterial_property_flag_rotate_y>` are ``true`` or the :ref:`SpatialMaterial<class_SpatialMaterial>` being used to draw the particle is using ``BillboardMode.BILLBOARD_PARTICLES``.
  187. .. _class_ParticlesMaterial_property_angle_curve:
  188. - :ref:`Texture<class_Texture>` **angle_curve**
  189. +----------+--------------------------+
  190. | *Setter* | set_param_texture(value) |
  191. +----------+--------------------------+
  192. | *Getter* | get_param_texture() |
  193. +----------+--------------------------+
  194. Each particle's rotation will be animated along this :ref:`CurveTexture<class_CurveTexture>`.
  195. .. _class_ParticlesMaterial_property_angle_random:
  196. - :ref:`float<class_float>` **angle_random**
  197. +----------+-----------------------------+
  198. | *Setter* | set_param_randomness(value) |
  199. +----------+-----------------------------+
  200. | *Getter* | get_param_randomness() |
  201. +----------+-----------------------------+
  202. Rotation randomness ratio. Default value: ``0``.
  203. .. _class_ParticlesMaterial_property_angular_velocity:
  204. - :ref:`float<class_float>` **angular_velocity**
  205. +----------+------------------+
  206. | *Setter* | set_param(value) |
  207. +----------+------------------+
  208. | *Getter* | get_param() |
  209. +----------+------------------+
  210. Initial angular velocity applied to each particle. Sets the speed of rotation of the particle.
  211. Only applied when :ref:`flag_disable_z<class_ParticlesMaterial_property_flag_disable_z>` or :ref:`flag_rotate_y<class_ParticlesMaterial_property_flag_rotate_y>` are ``true`` or the :ref:`SpatialMaterial<class_SpatialMaterial>` being used to draw the particle is using ``BillboardMode.BILLBOARD_PARTICLES``.
  212. .. _class_ParticlesMaterial_property_angular_velocity_curve:
  213. - :ref:`Texture<class_Texture>` **angular_velocity_curve**
  214. +----------+--------------------------+
  215. | *Setter* | set_param_texture(value) |
  216. +----------+--------------------------+
  217. | *Getter* | get_param_texture() |
  218. +----------+--------------------------+
  219. Each particle's angular velocity will vary along this :ref:`CurveTexture<class_CurveTexture>`.
  220. .. _class_ParticlesMaterial_property_angular_velocity_random:
  221. - :ref:`float<class_float>` **angular_velocity_random**
  222. +----------+-----------------------------+
  223. | *Setter* | set_param_randomness(value) |
  224. +----------+-----------------------------+
  225. | *Getter* | get_param_randomness() |
  226. +----------+-----------------------------+
  227. Angular velocity randomness ratio. Default value: ``0``.
  228. .. _class_ParticlesMaterial_property_anim_offset:
  229. - :ref:`float<class_float>` **anim_offset**
  230. +----------+------------------+
  231. | *Setter* | set_param(value) |
  232. +----------+------------------+
  233. | *Getter* | get_param() |
  234. +----------+------------------+
  235. Particle animation offset.
  236. .. _class_ParticlesMaterial_property_anim_offset_curve:
  237. - :ref:`Texture<class_Texture>` **anim_offset_curve**
  238. +----------+--------------------------+
  239. | *Setter* | set_param_texture(value) |
  240. +----------+--------------------------+
  241. | *Getter* | get_param_texture() |
  242. +----------+--------------------------+
  243. Each particle's animation offset will vary along this :ref:`CurveTexture<class_CurveTexture>`.
  244. .. _class_ParticlesMaterial_property_anim_offset_random:
  245. - :ref:`float<class_float>` **anim_offset_random**
  246. +----------+-----------------------------+
  247. | *Setter* | set_param_randomness(value) |
  248. +----------+-----------------------------+
  249. | *Getter* | get_param_randomness() |
  250. +----------+-----------------------------+
  251. Animation offset randomness ratio. Default value: ``0``.
  252. .. _class_ParticlesMaterial_property_anim_speed:
  253. - :ref:`float<class_float>` **anim_speed**
  254. +----------+------------------+
  255. | *Setter* | set_param(value) |
  256. +----------+------------------+
  257. | *Getter* | get_param() |
  258. +----------+------------------+
  259. Particle animation speed.
  260. .. _class_ParticlesMaterial_property_anim_speed_curve:
  261. - :ref:`Texture<class_Texture>` **anim_speed_curve**
  262. +----------+--------------------------+
  263. | *Setter* | set_param_texture(value) |
  264. +----------+--------------------------+
  265. | *Getter* | get_param_texture() |
  266. +----------+--------------------------+
  267. Each particle's animation speed will vary along this :ref:`CurveTexture<class_CurveTexture>`.
  268. .. _class_ParticlesMaterial_property_anim_speed_random:
  269. - :ref:`float<class_float>` **anim_speed_random**
  270. +----------+-----------------------------+
  271. | *Setter* | set_param_randomness(value) |
  272. +----------+-----------------------------+
  273. | *Getter* | get_param_randomness() |
  274. +----------+-----------------------------+
  275. Animation speed randomness ratio. Default value: ``0``.
  276. .. _class_ParticlesMaterial_property_color:
  277. - :ref:`Color<class_Color>` **color**
  278. +----------+------------------+
  279. | *Setter* | set_color(value) |
  280. +----------+------------------+
  281. | *Getter* | get_color() |
  282. +----------+------------------+
  283. Each particle's initial color. If the :ref:`Particles2D<class_Particles2D>`'s ``texture`` is defined, it will be multiplied by this color. To have particle display color in a :ref:`SpatialMaterial<class_SpatialMaterial>` make sure to set :ref:`SpatialMaterial.vertex_color_use_as_albedo<class_SpatialMaterial_property_vertex_color_use_as_albedo>` to ``true``.
  284. .. _class_ParticlesMaterial_property_color_ramp:
  285. - :ref:`Texture<class_Texture>` **color_ramp**
  286. +----------+-----------------------+
  287. | *Setter* | set_color_ramp(value) |
  288. +----------+-----------------------+
  289. | *Getter* | get_color_ramp() |
  290. +----------+-----------------------+
  291. Each particle's color will vary along this :ref:`GradientTexture<class_GradientTexture>`.
  292. .. _class_ParticlesMaterial_property_damping:
  293. - :ref:`float<class_float>` **damping**
  294. +----------+------------------+
  295. | *Setter* | set_param(value) |
  296. +----------+------------------+
  297. | *Getter* | get_param() |
  298. +----------+------------------+
  299. The rate at which particles lose velocity.
  300. .. _class_ParticlesMaterial_property_damping_curve:
  301. - :ref:`Texture<class_Texture>` **damping_curve**
  302. +----------+--------------------------+
  303. | *Setter* | set_param_texture(value) |
  304. +----------+--------------------------+
  305. | *Getter* | get_param_texture() |
  306. +----------+--------------------------+
  307. Damping will vary along this :ref:`CurveTexture<class_CurveTexture>`.
  308. .. _class_ParticlesMaterial_property_damping_random:
  309. - :ref:`float<class_float>` **damping_random**
  310. +----------+-----------------------------+
  311. | *Setter* | set_param_randomness(value) |
  312. +----------+-----------------------------+
  313. | *Getter* | get_param_randomness() |
  314. +----------+-----------------------------+
  315. Damping randomness ratio. Default value: ``0``.
  316. .. _class_ParticlesMaterial_property_emission_box_extents:
  317. - :ref:`Vector3<class_Vector3>` **emission_box_extents**
  318. +----------+---------------------------------+
  319. | *Setter* | set_emission_box_extents(value) |
  320. +----------+---------------------------------+
  321. | *Getter* | get_emission_box_extents() |
  322. +----------+---------------------------------+
  323. The box's extents if ``emission_shape`` is set to ``EMISSION_SHAPE_BOX``.
  324. .. _class_ParticlesMaterial_property_emission_color_texture:
  325. - :ref:`Texture<class_Texture>` **emission_color_texture**
  326. +----------+-----------------------------------+
  327. | *Setter* | set_emission_color_texture(value) |
  328. +----------+-----------------------------------+
  329. | *Getter* | get_emission_color_texture() |
  330. +----------+-----------------------------------+
  331. Particle color will be modulated by color determined by sampling this texture at the same point as the :ref:`emission_point_texture<class_ParticlesMaterial_property_emission_point_texture>`.
  332. .. _class_ParticlesMaterial_property_emission_normal_texture:
  333. - :ref:`Texture<class_Texture>` **emission_normal_texture**
  334. +----------+------------------------------------+
  335. | *Setter* | set_emission_normal_texture(value) |
  336. +----------+------------------------------------+
  337. | *Getter* | get_emission_normal_texture() |
  338. +----------+------------------------------------+
  339. Particle velocity and rotation will be set by sampling this texture at the same point as the :ref:`emission_point_texture<class_ParticlesMaterial_property_emission_point_texture>`. Used only in ``EMISSION_SHAPE_DIRECTED``. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar.
  340. .. _class_ParticlesMaterial_property_emission_point_count:
  341. - :ref:`int<class_int>` **emission_point_count**
  342. +----------+---------------------------------+
  343. | *Setter* | set_emission_point_count(value) |
  344. +----------+---------------------------------+
  345. | *Getter* | get_emission_point_count() |
  346. +----------+---------------------------------+
  347. The number of emission points if ``emission_shape`` is set to ``EMISSION_SHAPE_POINTS`` or ``EMISSION_SHAPE_DIRECTED_POINTS``.
  348. .. _class_ParticlesMaterial_property_emission_point_texture:
  349. - :ref:`Texture<class_Texture>` **emission_point_texture**
  350. +----------+-----------------------------------+
  351. | *Setter* | set_emission_point_texture(value) |
  352. +----------+-----------------------------------+
  353. | *Getter* | get_emission_point_texture() |
  354. +----------+-----------------------------------+
  355. Particles will be emitted at positions determined by sampling this texture at a random position. Used with ``EMISSION_SHAPE_POINTS`` and ``EMISSION_SHAPE_DIRECTED_POINTS``. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar.
  356. .. _class_ParticlesMaterial_property_emission_shape:
  357. - :ref:`EmissionShape<enum_ParticlesMaterial_EmissionShape>` **emission_shape**
  358. +----------+---------------------------+
  359. | *Setter* | set_emission_shape(value) |
  360. +----------+---------------------------+
  361. | *Getter* | get_emission_shape() |
  362. +----------+---------------------------+
  363. Particles will be emitted inside this region. Use ``EMISSION_SHAPE_*`` constants for values. Default value: ``EMISSION_SHAPE_POINT``.
  364. .. _class_ParticlesMaterial_property_emission_sphere_radius:
  365. - :ref:`float<class_float>` **emission_sphere_radius**
  366. +----------+-----------------------------------+
  367. | *Setter* | set_emission_sphere_radius(value) |
  368. +----------+-----------------------------------+
  369. | *Getter* | get_emission_sphere_radius() |
  370. +----------+-----------------------------------+
  371. The sphere's radius if ``emission_shape`` is set to ``EMISSION_SHAPE_SPHERE``.
  372. .. _class_ParticlesMaterial_property_flag_align_y:
  373. - :ref:`bool<class_bool>` **flag_align_y**
  374. +----------+-----------------+
  375. | *Setter* | set_flag(value) |
  376. +----------+-----------------+
  377. | *Getter* | get_flag() |
  378. +----------+-----------------+
  379. Align y-axis of particle with the direction of its velocity.
  380. .. _class_ParticlesMaterial_property_flag_disable_z:
  381. - :ref:`bool<class_bool>` **flag_disable_z**
  382. +----------+-----------------+
  383. | *Setter* | set_flag(value) |
  384. +----------+-----------------+
  385. | *Getter* | get_flag() |
  386. +----------+-----------------+
  387. If ``true``, particles will not move on the z axis. Default value: ``true`` for :ref:`Particles2D<class_Particles2D>`, ``false`` for :ref:`Particles<class_Particles>`.
  388. .. _class_ParticlesMaterial_property_flag_rotate_y:
  389. - :ref:`bool<class_bool>` **flag_rotate_y**
  390. +----------+-----------------+
  391. | *Setter* | set_flag(value) |
  392. +----------+-----------------+
  393. | *Getter* | get_flag() |
  394. +----------+-----------------+
  395. If ``true``, particles rotate around y-axis by :ref:`angle<class_ParticlesMaterial_property_angle>`.
  396. .. _class_ParticlesMaterial_property_flatness:
  397. - :ref:`float<class_float>` **flatness**
  398. +----------+---------------------+
  399. | *Setter* | set_flatness(value) |
  400. +----------+---------------------+
  401. | *Getter* | get_flatness() |
  402. +----------+---------------------+
  403. Amount of :ref:`spread<class_ParticlesMaterial_property_spread>` in Y/Z plane. A value of ``1`` restricts particles to X/Z plane. Default ``0``.
  404. .. _class_ParticlesMaterial_property_gravity:
  405. - :ref:`Vector3<class_Vector3>` **gravity**
  406. +----------+--------------------+
  407. | *Setter* | set_gravity(value) |
  408. +----------+--------------------+
  409. | *Getter* | get_gravity() |
  410. +----------+--------------------+
  411. Gravity applied to every particle. Default value: ``(0, 98, 0)``.
  412. .. _class_ParticlesMaterial_property_hue_variation:
  413. - :ref:`float<class_float>` **hue_variation**
  414. +----------+------------------+
  415. | *Setter* | set_param(value) |
  416. +----------+------------------+
  417. | *Getter* | get_param() |
  418. +----------+------------------+
  419. Initial hue variation applied to each particle.
  420. .. _class_ParticlesMaterial_property_hue_variation_curve:
  421. - :ref:`Texture<class_Texture>` **hue_variation_curve**
  422. +----------+--------------------------+
  423. | *Setter* | set_param_texture(value) |
  424. +----------+--------------------------+
  425. | *Getter* | get_param_texture() |
  426. +----------+--------------------------+
  427. Each particle's hue will vary along this :ref:`CurveTexture<class_CurveTexture>`.
  428. .. _class_ParticlesMaterial_property_hue_variation_random:
  429. - :ref:`float<class_float>` **hue_variation_random**
  430. +----------+-----------------------------+
  431. | *Setter* | set_param_randomness(value) |
  432. +----------+-----------------------------+
  433. | *Getter* | get_param_randomness() |
  434. +----------+-----------------------------+
  435. Hue variation randomness ratio. Default value: ``0``.
  436. .. _class_ParticlesMaterial_property_initial_velocity:
  437. - :ref:`float<class_float>` **initial_velocity**
  438. +----------+------------------+
  439. | *Setter* | set_param(value) |
  440. +----------+------------------+
  441. | *Getter* | get_param() |
  442. +----------+------------------+
  443. Initial velocity magnitude for each particle. Direction comes from :ref:`spread<class_ParticlesMaterial_property_spread>`.
  444. .. _class_ParticlesMaterial_property_initial_velocity_random:
  445. - :ref:`float<class_float>` **initial_velocity_random**
  446. +----------+-----------------------------+
  447. | *Setter* | set_param_randomness(value) |
  448. +----------+-----------------------------+
  449. | *Getter* | get_param_randomness() |
  450. +----------+-----------------------------+
  451. Initial velocity randomness ratio. Default value: ``0``.
  452. .. _class_ParticlesMaterial_property_linear_accel:
  453. - :ref:`float<class_float>` **linear_accel**
  454. +----------+------------------+
  455. | *Setter* | set_param(value) |
  456. +----------+------------------+
  457. | *Getter* | get_param() |
  458. +----------+------------------+
  459. Linear acceleration applied to each particle. Acceleration increases velocity magnitude each frame without affecting direction.
  460. .. _class_ParticlesMaterial_property_linear_accel_curve:
  461. - :ref:`Texture<class_Texture>` **linear_accel_curve**
  462. +----------+--------------------------+
  463. | *Setter* | set_param_texture(value) |
  464. +----------+--------------------------+
  465. | *Getter* | get_param_texture() |
  466. +----------+--------------------------+
  467. Each particle's linear acceleration will vary along this :ref:`CurveTexture<class_CurveTexture>`.
  468. .. _class_ParticlesMaterial_property_linear_accel_random:
  469. - :ref:`float<class_float>` **linear_accel_random**
  470. +----------+-----------------------------+
  471. | *Setter* | set_param_randomness(value) |
  472. +----------+-----------------------------+
  473. | *Getter* | get_param_randomness() |
  474. +----------+-----------------------------+
  475. Linear acceleration randomness ratio. Default value: ``0``.
  476. .. _class_ParticlesMaterial_property_orbit_velocity:
  477. - :ref:`float<class_float>` **orbit_velocity**
  478. +----------+------------------+
  479. | *Setter* | set_param(value) |
  480. +----------+------------------+
  481. | *Getter* | get_param() |
  482. +----------+------------------+
  483. Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second.
  484. Only available when :ref:`flag_disable_z<class_ParticlesMaterial_property_flag_disable_z>` is ``true``.
  485. .. _class_ParticlesMaterial_property_orbit_velocity_curve:
  486. - :ref:`Texture<class_Texture>` **orbit_velocity_curve**
  487. +----------+--------------------------+
  488. | *Setter* | set_param_texture(value) |
  489. +----------+--------------------------+
  490. | *Getter* | get_param_texture() |
  491. +----------+--------------------------+
  492. Each particle's orbital velocity will vary along this :ref:`CurveTexture<class_CurveTexture>`.
  493. .. _class_ParticlesMaterial_property_orbit_velocity_random:
  494. - :ref:`float<class_float>` **orbit_velocity_random**
  495. +----------+-----------------------------+
  496. | *Setter* | set_param_randomness(value) |
  497. +----------+-----------------------------+
  498. | *Getter* | get_param_randomness() |
  499. +----------+-----------------------------+
  500. Orbital velocity randomness ratio. Default value: ``0``.
  501. .. _class_ParticlesMaterial_property_radial_accel:
  502. - :ref:`float<class_float>` **radial_accel**
  503. +----------+------------------+
  504. | *Setter* | set_param(value) |
  505. +----------+------------------+
  506. | *Getter* | get_param() |
  507. +----------+------------------+
  508. Radial acceleration applied to each particle. Makes particle accelerate away from origin.
  509. .. _class_ParticlesMaterial_property_radial_accel_curve:
  510. - :ref:`Texture<class_Texture>` **radial_accel_curve**
  511. +----------+--------------------------+
  512. | *Setter* | set_param_texture(value) |
  513. +----------+--------------------------+
  514. | *Getter* | get_param_texture() |
  515. +----------+--------------------------+
  516. Each particle's radial acceleration will vary along this :ref:`CurveTexture<class_CurveTexture>`.
  517. .. _class_ParticlesMaterial_property_radial_accel_random:
  518. - :ref:`float<class_float>` **radial_accel_random**
  519. +----------+-----------------------------+
  520. | *Setter* | set_param_randomness(value) |
  521. +----------+-----------------------------+
  522. | *Getter* | get_param_randomness() |
  523. +----------+-----------------------------+
  524. Radial acceleration randomness ratio. Default value: ``0``.
  525. .. _class_ParticlesMaterial_property_scale:
  526. - :ref:`float<class_float>` **scale**
  527. +----------+------------------+
  528. | *Setter* | set_param(value) |
  529. +----------+------------------+
  530. | *Getter* | get_param() |
  531. +----------+------------------+
  532. Initial scale applied to each particle.
  533. .. _class_ParticlesMaterial_property_scale_curve:
  534. - :ref:`Texture<class_Texture>` **scale_curve**
  535. +----------+--------------------------+
  536. | *Setter* | set_param_texture(value) |
  537. +----------+--------------------------+
  538. | *Getter* | get_param_texture() |
  539. +----------+--------------------------+
  540. Each particle's scale will vary along this :ref:`CurveTexture<class_CurveTexture>`.
  541. .. _class_ParticlesMaterial_property_scale_random:
  542. - :ref:`float<class_float>` **scale_random**
  543. +----------+-----------------------------+
  544. | *Setter* | set_param_randomness(value) |
  545. +----------+-----------------------------+
  546. | *Getter* | get_param_randomness() |
  547. +----------+-----------------------------+
  548. Scale randomness ratio. Default value: ``0``.
  549. .. _class_ParticlesMaterial_property_spread:
  550. - :ref:`float<class_float>` **spread**
  551. +----------+-------------------+
  552. | *Setter* | set_spread(value) |
  553. +----------+-------------------+
  554. | *Getter* | get_spread() |
  555. +----------+-------------------+
  556. Each particle's initial direction range from ``+spread`` to ``-spread`` degrees. Default value: ``45``. Applied to X/Z plane and Y/Z planes.
  557. .. _class_ParticlesMaterial_property_tangential_accel:
  558. - :ref:`float<class_float>` **tangential_accel**
  559. +----------+------------------+
  560. | *Setter* | set_param(value) |
  561. +----------+------------------+
  562. | *Getter* | get_param() |
  563. +----------+------------------+
  564. Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion.
  565. .. _class_ParticlesMaterial_property_tangential_accel_curve:
  566. - :ref:`Texture<class_Texture>` **tangential_accel_curve**
  567. +----------+--------------------------+
  568. | *Setter* | set_param_texture(value) |
  569. +----------+--------------------------+
  570. | *Getter* | get_param_texture() |
  571. +----------+--------------------------+
  572. Each particle's tangential acceleration will vary along this :ref:`CurveTexture<class_CurveTexture>`.
  573. .. _class_ParticlesMaterial_property_tangential_accel_random:
  574. - :ref:`float<class_float>` **tangential_accel_random**
  575. +----------+-----------------------------+
  576. | *Setter* | set_param_randomness(value) |
  577. +----------+-----------------------------+
  578. | *Getter* | get_param_randomness() |
  579. +----------+-----------------------------+
  580. Tangential acceleration randomness ratio. Default value: ``0``.
  581. .. _class_ParticlesMaterial_property_trail_color_modifier:
  582. - :ref:`GradientTexture<class_GradientTexture>` **trail_color_modifier**
  583. +----------+---------------------------------+
  584. | *Setter* | set_trail_color_modifier(value) |
  585. +----------+---------------------------------+
  586. | *Getter* | get_trail_color_modifier() |
  587. +----------+---------------------------------+
  588. Trail particles' color will vary along this :ref:`GradientTexture<class_GradientTexture>`.
  589. .. _class_ParticlesMaterial_property_trail_divisor:
  590. - :ref:`int<class_int>` **trail_divisor**
  591. +----------+--------------------------+
  592. | *Setter* | set_trail_divisor(value) |
  593. +----------+--------------------------+
  594. | *Getter* | get_trail_divisor() |
  595. +----------+--------------------------+
  596. Emitter will emit ``amount`` divided by ``trail_divisor`` particles. The remaining particles will be used as trail(s).
  597. .. _class_ParticlesMaterial_property_trail_size_modifier:
  598. - :ref:`CurveTexture<class_CurveTexture>` **trail_size_modifier**
  599. +----------+--------------------------------+
  600. | *Setter* | set_trail_size_modifier(value) |
  601. +----------+--------------------------------+
  602. | *Getter* | get_trail_size_modifier() |
  603. +----------+--------------------------------+
  604. Trail particles' size will vary along this :ref:`CurveTexture<class_CurveTexture>`.