class_gpuparticles3d.rst 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/GPUParticles3D.xml.
  6. .. _class_GPUParticles3D:
  7. GPUParticles3D
  8. ==============
  9. **Inherits:** :ref:`GeometryInstance3D<class_GeometryInstance3D>` **<** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. 3D particle emitter.
  11. Description
  12. -----------
  13. 3D particle node used to create a variety of particle systems and effects. ``GPUParticles3D`` features an emitter that generates some number of particles at a given rate.
  14. Use the ``process_material`` property to add a :ref:`ParticleProcessMaterial<class_ParticleProcessMaterial>` to configure particle appearance and behavior. Alternatively, you can add a :ref:`ShaderMaterial<class_ShaderMaterial>` which will be applied to all particles.
  15. Tutorials
  16. ---------
  17. - :doc:`Controlling thousands of fish with Particles <../tutorials/performance/vertex_animation/controlling_thousands_of_fish>`
  18. - `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__
  19. Properties
  20. ----------
  21. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  22. | :ref:`int<class_int>` | :ref:`amount<class_GPUParticles3D_property_amount>` | ``8`` |
  23. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  24. | :ref:`float<class_float>` | :ref:`collision_base_size<class_GPUParticles3D_property_collision_base_size>` | ``0.01`` |
  25. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  26. | :ref:`DrawOrder<enum_GPUParticles3D_DrawOrder>` | :ref:`draw_order<class_GPUParticles3D_property_draw_order>` | ``0`` |
  27. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  28. | :ref:`Mesh<class_Mesh>` | :ref:`draw_pass_1<class_GPUParticles3D_property_draw_pass_1>` | |
  29. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  30. | :ref:`Mesh<class_Mesh>` | :ref:`draw_pass_2<class_GPUParticles3D_property_draw_pass_2>` | |
  31. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  32. | :ref:`Mesh<class_Mesh>` | :ref:`draw_pass_3<class_GPUParticles3D_property_draw_pass_3>` | |
  33. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  34. | :ref:`Mesh<class_Mesh>` | :ref:`draw_pass_4<class_GPUParticles3D_property_draw_pass_4>` | |
  35. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  36. | :ref:`int<class_int>` | :ref:`draw_passes<class_GPUParticles3D_property_draw_passes>` | ``1`` |
  37. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  38. | :ref:`Skin<class_Skin>` | :ref:`draw_skin<class_GPUParticles3D_property_draw_skin>` | |
  39. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  40. | :ref:`bool<class_bool>` | :ref:`emitting<class_GPUParticles3D_property_emitting>` | ``true`` |
  41. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  42. | :ref:`float<class_float>` | :ref:`explosiveness<class_GPUParticles3D_property_explosiveness>` | ``0.0`` |
  43. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  44. | :ref:`int<class_int>` | :ref:`fixed_fps<class_GPUParticles3D_property_fixed_fps>` | ``30`` |
  45. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  46. | :ref:`bool<class_bool>` | :ref:`fract_delta<class_GPUParticles3D_property_fract_delta>` | ``true`` |
  47. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  48. | :ref:`bool<class_bool>` | :ref:`interpolate<class_GPUParticles3D_property_interpolate>` | ``true`` |
  49. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  50. | :ref:`float<class_float>` | :ref:`lifetime<class_GPUParticles3D_property_lifetime>` | ``1.0`` |
  51. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  52. | :ref:`bool<class_bool>` | :ref:`local_coords<class_GPUParticles3D_property_local_coords>` | ``false`` |
  53. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  54. | :ref:`bool<class_bool>` | :ref:`one_shot<class_GPUParticles3D_property_one_shot>` | ``false`` |
  55. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  56. | :ref:`float<class_float>` | :ref:`preprocess<class_GPUParticles3D_property_preprocess>` | ``0.0`` |
  57. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  58. | :ref:`Material<class_Material>` | :ref:`process_material<class_GPUParticles3D_property_process_material>` | |
  59. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  60. | :ref:`float<class_float>` | :ref:`randomness<class_GPUParticles3D_property_randomness>` | ``0.0`` |
  61. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  62. | :ref:`float<class_float>` | :ref:`speed_scale<class_GPUParticles3D_property_speed_scale>` | ``1.0`` |
  63. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  64. | :ref:`NodePath<class_NodePath>` | :ref:`sub_emitter<class_GPUParticles3D_property_sub_emitter>` | ``NodePath("")`` |
  65. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  66. | :ref:`bool<class_bool>` | :ref:`trail_enabled<class_GPUParticles3D_property_trail_enabled>` | ``false`` |
  67. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  68. | :ref:`float<class_float>` | :ref:`trail_lifetime<class_GPUParticles3D_property_trail_lifetime>` | ``0.3`` |
  69. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  70. | :ref:`TransformAlign<enum_GPUParticles3D_TransformAlign>` | :ref:`transform_align<class_GPUParticles3D_property_transform_align>` | ``0`` |
  71. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  72. | :ref:`AABB<class_AABB>` | :ref:`visibility_aabb<class_GPUParticles3D_property_visibility_aabb>` | ``AABB(-4, -4, -4, 8, 8, 8)`` |
  73. +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+
  74. Methods
  75. -------
  76. +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | :ref:`AABB<class_AABB>` | :ref:`capture_aabb<class_GPUParticles3D_method_capture_aabb>` **(** **)** |const| |
  78. +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | void | :ref:`emit_particle<class_GPUParticles3D_method_emit_particle>` **(** :ref:`Transform3D<class_Transform3D>` xform, :ref:`Vector3<class_Vector3>` velocity, :ref:`Color<class_Color>` color, :ref:`Color<class_Color>` custom, :ref:`int<class_int>` flags **)** |
  80. +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | :ref:`Mesh<class_Mesh>` | :ref:`get_draw_pass_mesh<class_GPUParticles3D_method_get_draw_pass_mesh>` **(** :ref:`int<class_int>` pass **)** |const| |
  82. +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | void | :ref:`restart<class_GPUParticles3D_method_restart>` **(** **)** |
  84. +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | void | :ref:`set_draw_pass_mesh<class_GPUParticles3D_method_set_draw_pass_mesh>` **(** :ref:`int<class_int>` pass, :ref:`Mesh<class_Mesh>` mesh **)** |
  86. +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. Enumerations
  88. ------------
  89. .. _enum_GPUParticles3D_DrawOrder:
  90. .. _class_GPUParticles3D_constant_DRAW_ORDER_INDEX:
  91. .. _class_GPUParticles3D_constant_DRAW_ORDER_LIFETIME:
  92. .. _class_GPUParticles3D_constant_DRAW_ORDER_REVERSE_LIFETIME:
  93. .. _class_GPUParticles3D_constant_DRAW_ORDER_VIEW_DEPTH:
  94. enum **DrawOrder**:
  95. - **DRAW_ORDER_INDEX** = **0** --- Particles are drawn in the order emitted.
  96. - **DRAW_ORDER_LIFETIME** = **1** --- Particles are drawn in order of remaining lifetime.
  97. - **DRAW_ORDER_REVERSE_LIFETIME** = **2**
  98. - **DRAW_ORDER_VIEW_DEPTH** = **3** --- Particles are drawn in order of depth.
  99. ----
  100. .. _enum_GPUParticles3D_EmitFlags:
  101. .. _class_GPUParticles3D_constant_EMIT_FLAG_POSITION:
  102. .. _class_GPUParticles3D_constant_EMIT_FLAG_ROTATION_SCALE:
  103. .. _class_GPUParticles3D_constant_EMIT_FLAG_VELOCITY:
  104. .. _class_GPUParticles3D_constant_EMIT_FLAG_COLOR:
  105. .. _class_GPUParticles3D_constant_EMIT_FLAG_CUSTOM:
  106. enum **EmitFlags**:
  107. - **EMIT_FLAG_POSITION** = **1** --- Particle starts at the specified position.
  108. - **EMIT_FLAG_ROTATION_SCALE** = **2** --- Particle starts with specified rotation and scale.
  109. - **EMIT_FLAG_VELOCITY** = **4** --- Particle starts with the specified velocity vector, which defines the emission direction and speed.
  110. - **EMIT_FLAG_COLOR** = **8** --- Particle starts with specified color.
  111. - **EMIT_FLAG_CUSTOM** = **16** --- Particle starts with specified ``CUSTOM`` data.
  112. ----
  113. .. _enum_GPUParticles3D_TransformAlign:
  114. .. _class_GPUParticles3D_constant_TRANSFORM_ALIGN_DISABLED:
  115. .. _class_GPUParticles3D_constant_TRANSFORM_ALIGN_Z_BILLBOARD:
  116. .. _class_GPUParticles3D_constant_TRANSFORM_ALIGN_Y_TO_VELOCITY:
  117. .. _class_GPUParticles3D_constant_TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY:
  118. enum **TransformAlign**:
  119. - **TRANSFORM_ALIGN_DISABLED** = **0**
  120. - **TRANSFORM_ALIGN_Z_BILLBOARD** = **1**
  121. - **TRANSFORM_ALIGN_Y_TO_VELOCITY** = **2**
  122. - **TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY** = **3**
  123. Constants
  124. ---------
  125. .. _class_GPUParticles3D_constant_MAX_DRAW_PASSES:
  126. - **MAX_DRAW_PASSES** = **4** --- Maximum number of draw passes supported.
  127. Property Descriptions
  128. ---------------------
  129. .. _class_GPUParticles3D_property_amount:
  130. - :ref:`int<class_int>` **amount**
  131. +-----------+-------------------+
  132. | *Default* | ``8`` |
  133. +-----------+-------------------+
  134. | *Setter* | set_amount(value) |
  135. +-----------+-------------------+
  136. | *Getter* | get_amount() |
  137. +-----------+-------------------+
  138. Number of particles to emit.
  139. ----
  140. .. _class_GPUParticles3D_property_collision_base_size:
  141. - :ref:`float<class_float>` **collision_base_size**
  142. +-----------+--------------------------------+
  143. | *Default* | ``0.01`` |
  144. +-----------+--------------------------------+
  145. | *Setter* | set_collision_base_size(value) |
  146. +-----------+--------------------------------+
  147. | *Getter* | get_collision_base_size() |
  148. +-----------+--------------------------------+
  149. .. container:: contribute
  150. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  151. ----
  152. .. _class_GPUParticles3D_property_draw_order:
  153. - :ref:`DrawOrder<enum_GPUParticles3D_DrawOrder>` **draw_order**
  154. +-----------+-----------------------+
  155. | *Default* | ``0`` |
  156. +-----------+-----------------------+
  157. | *Setter* | set_draw_order(value) |
  158. +-----------+-----------------------+
  159. | *Getter* | get_draw_order() |
  160. +-----------+-----------------------+
  161. Particle draw order. Uses :ref:`DrawOrder<enum_GPUParticles3D_DrawOrder>` values.
  162. ----
  163. .. _class_GPUParticles3D_property_draw_pass_1:
  164. - :ref:`Mesh<class_Mesh>` **draw_pass_1**
  165. +----------+---------------------------+
  166. | *Setter* | set_draw_pass_mesh(value) |
  167. +----------+---------------------------+
  168. | *Getter* | get_draw_pass_mesh() |
  169. +----------+---------------------------+
  170. :ref:`Mesh<class_Mesh>` that is drawn for the first draw pass.
  171. ----
  172. .. _class_GPUParticles3D_property_draw_pass_2:
  173. - :ref:`Mesh<class_Mesh>` **draw_pass_2**
  174. +----------+---------------------------+
  175. | *Setter* | set_draw_pass_mesh(value) |
  176. +----------+---------------------------+
  177. | *Getter* | get_draw_pass_mesh() |
  178. +----------+---------------------------+
  179. :ref:`Mesh<class_Mesh>` that is drawn for the second draw pass.
  180. ----
  181. .. _class_GPUParticles3D_property_draw_pass_3:
  182. - :ref:`Mesh<class_Mesh>` **draw_pass_3**
  183. +----------+---------------------------+
  184. | *Setter* | set_draw_pass_mesh(value) |
  185. +----------+---------------------------+
  186. | *Getter* | get_draw_pass_mesh() |
  187. +----------+---------------------------+
  188. :ref:`Mesh<class_Mesh>` that is drawn for the third draw pass.
  189. ----
  190. .. _class_GPUParticles3D_property_draw_pass_4:
  191. - :ref:`Mesh<class_Mesh>` **draw_pass_4**
  192. +----------+---------------------------+
  193. | *Setter* | set_draw_pass_mesh(value) |
  194. +----------+---------------------------+
  195. | *Getter* | get_draw_pass_mesh() |
  196. +----------+---------------------------+
  197. :ref:`Mesh<class_Mesh>` that is drawn for the fourth draw pass.
  198. ----
  199. .. _class_GPUParticles3D_property_draw_passes:
  200. - :ref:`int<class_int>` **draw_passes**
  201. +-----------+------------------------+
  202. | *Default* | ``1`` |
  203. +-----------+------------------------+
  204. | *Setter* | set_draw_passes(value) |
  205. +-----------+------------------------+
  206. | *Getter* | get_draw_passes() |
  207. +-----------+------------------------+
  208. The number of draw passes when rendering particles.
  209. ----
  210. .. _class_GPUParticles3D_property_draw_skin:
  211. - :ref:`Skin<class_Skin>` **draw_skin**
  212. +----------+-----------------+
  213. | *Setter* | set_skin(value) |
  214. +----------+-----------------+
  215. | *Getter* | get_skin() |
  216. +----------+-----------------+
  217. .. container:: contribute
  218. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  219. ----
  220. .. _class_GPUParticles3D_property_emitting:
  221. - :ref:`bool<class_bool>` **emitting**
  222. +-----------+---------------------+
  223. | *Default* | ``true`` |
  224. +-----------+---------------------+
  225. | *Setter* | set_emitting(value) |
  226. +-----------+---------------------+
  227. | *Getter* | is_emitting() |
  228. +-----------+---------------------+
  229. If ``true``, particles are being emitted.
  230. ----
  231. .. _class_GPUParticles3D_property_explosiveness:
  232. - :ref:`float<class_float>` **explosiveness**
  233. +-----------+--------------------------------+
  234. | *Default* | ``0.0`` |
  235. +-----------+--------------------------------+
  236. | *Setter* | set_explosiveness_ratio(value) |
  237. +-----------+--------------------------------+
  238. | *Getter* | get_explosiveness_ratio() |
  239. +-----------+--------------------------------+
  240. Time ratio between each emission. If ``0``, particles are emitted continuously. If ``1``, all particles are emitted simultaneously.
  241. ----
  242. .. _class_GPUParticles3D_property_fixed_fps:
  243. - :ref:`int<class_int>` **fixed_fps**
  244. +-----------+----------------------+
  245. | *Default* | ``30`` |
  246. +-----------+----------------------+
  247. | *Setter* | set_fixed_fps(value) |
  248. +-----------+----------------------+
  249. | *Getter* | get_fixed_fps() |
  250. +-----------+----------------------+
  251. The particle system's frame rate is fixed to a value. For example, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself.
  252. ----
  253. .. _class_GPUParticles3D_property_fract_delta:
  254. - :ref:`bool<class_bool>` **fract_delta**
  255. +-----------+-----------------------------+
  256. | *Default* | ``true`` |
  257. +-----------+-----------------------------+
  258. | *Setter* | set_fractional_delta(value) |
  259. +-----------+-----------------------------+
  260. | *Getter* | get_fractional_delta() |
  261. +-----------+-----------------------------+
  262. If ``true``, results in fractional delta calculation which has a smoother particles display effect.
  263. ----
  264. .. _class_GPUParticles3D_property_interpolate:
  265. - :ref:`bool<class_bool>` **interpolate**
  266. +-----------+------------------------+
  267. | *Default* | ``true`` |
  268. +-----------+------------------------+
  269. | *Setter* | set_interpolate(value) |
  270. +-----------+------------------------+
  271. | *Getter* | get_interpolate() |
  272. +-----------+------------------------+
  273. Enables particle interpolation, which makes the particle movement smoother when their :ref:`fixed_fps<class_GPUParticles3D_property_fixed_fps>` is lower than the screen refresh rate.
  274. ----
  275. .. _class_GPUParticles3D_property_lifetime:
  276. - :ref:`float<class_float>` **lifetime**
  277. +-----------+---------------------+
  278. | *Default* | ``1.0`` |
  279. +-----------+---------------------+
  280. | *Setter* | set_lifetime(value) |
  281. +-----------+---------------------+
  282. | *Getter* | get_lifetime() |
  283. +-----------+---------------------+
  284. Amount of time each particle will exist.
  285. ----
  286. .. _class_GPUParticles3D_property_local_coords:
  287. - :ref:`bool<class_bool>` **local_coords**
  288. +-----------+----------------------------------+
  289. | *Default* | ``false`` |
  290. +-----------+----------------------------------+
  291. | *Setter* | set_use_local_coordinates(value) |
  292. +-----------+----------------------------------+
  293. | *Getter* | get_use_local_coordinates() |
  294. +-----------+----------------------------------+
  295. If ``true``, particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the ``GPUParticles3D`` node (and its parents) when it is moved or rotated. If ``false``, particles use global coordinates; they will not move or rotate along the ``GPUParticles3D`` node (and its parents) when it is moved or rotated.
  296. ----
  297. .. _class_GPUParticles3D_property_one_shot:
  298. - :ref:`bool<class_bool>` **one_shot**
  299. +-----------+---------------------+
  300. | *Default* | ``false`` |
  301. +-----------+---------------------+
  302. | *Setter* | set_one_shot(value) |
  303. +-----------+---------------------+
  304. | *Getter* | get_one_shot() |
  305. +-----------+---------------------+
  306. If ``true``, only ``amount`` particles will be emitted.
  307. ----
  308. .. _class_GPUParticles3D_property_preprocess:
  309. - :ref:`float<class_float>` **preprocess**
  310. +-----------+-----------------------------+
  311. | *Default* | ``0.0`` |
  312. +-----------+-----------------------------+
  313. | *Setter* | set_pre_process_time(value) |
  314. +-----------+-----------------------------+
  315. | *Getter* | get_pre_process_time() |
  316. +-----------+-----------------------------+
  317. Amount of time to preprocess the particles before animation starts. Lets you start the animation some time after particles have started emitting.
  318. ----
  319. .. _class_GPUParticles3D_property_process_material:
  320. - :ref:`Material<class_Material>` **process_material**
  321. +----------+-----------------------------+
  322. | *Setter* | set_process_material(value) |
  323. +----------+-----------------------------+
  324. | *Getter* | get_process_material() |
  325. +----------+-----------------------------+
  326. :ref:`Material<class_Material>` for processing particles. Can be a :ref:`ParticleProcessMaterial<class_ParticleProcessMaterial>` or a :ref:`ShaderMaterial<class_ShaderMaterial>`.
  327. ----
  328. .. _class_GPUParticles3D_property_randomness:
  329. - :ref:`float<class_float>` **randomness**
  330. +-----------+-----------------------------+
  331. | *Default* | ``0.0`` |
  332. +-----------+-----------------------------+
  333. | *Setter* | set_randomness_ratio(value) |
  334. +-----------+-----------------------------+
  335. | *Getter* | get_randomness_ratio() |
  336. +-----------+-----------------------------+
  337. Emission randomness ratio.
  338. ----
  339. .. _class_GPUParticles3D_property_speed_scale:
  340. - :ref:`float<class_float>` **speed_scale**
  341. +-----------+------------------------+
  342. | *Default* | ``1.0`` |
  343. +-----------+------------------------+
  344. | *Setter* | set_speed_scale(value) |
  345. +-----------+------------------------+
  346. | *Getter* | get_speed_scale() |
  347. +-----------+------------------------+
  348. Speed scaling ratio. A value of ``0`` can be used to pause the particles.
  349. ----
  350. .. _class_GPUParticles3D_property_sub_emitter:
  351. - :ref:`NodePath<class_NodePath>` **sub_emitter**
  352. +-----------+------------------------+
  353. | *Default* | ``NodePath("")`` |
  354. +-----------+------------------------+
  355. | *Setter* | set_sub_emitter(value) |
  356. +-----------+------------------------+
  357. | *Getter* | get_sub_emitter() |
  358. +-----------+------------------------+
  359. .. container:: contribute
  360. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  361. ----
  362. .. _class_GPUParticles3D_property_trail_enabled:
  363. - :ref:`bool<class_bool>` **trail_enabled**
  364. +-----------+--------------------------+
  365. | *Default* | ``false`` |
  366. +-----------+--------------------------+
  367. | *Setter* | set_trail_enabled(value) |
  368. +-----------+--------------------------+
  369. | *Getter* | is_trail_enabled() |
  370. +-----------+--------------------------+
  371. If ``true``, enables particle trails using a mesh skinning system. Designed to work with :ref:`RibbonTrailMesh<class_RibbonTrailMesh>` and :ref:`TubeTrailMesh<class_TubeTrailMesh>`.
  372. \ **Note:** :ref:`BaseMaterial3D.use_particle_trails<class_BaseMaterial3D_property_use_particle_trails>` must also be enabled on the particle mesh's material. Otherwise, setting :ref:`trail_enabled<class_GPUParticles3D_property_trail_enabled>` to ``true`` will have no effect.
  373. \ **Note:** Unlike :ref:`GPUParticles2D<class_GPUParticles2D>`, the number of trail sections and subdivisions is set in the :ref:`RibbonTrailMesh<class_RibbonTrailMesh>` or the :ref:`TubeTrailMesh<class_TubeTrailMesh>`'s properties.
  374. ----
  375. .. _class_GPUParticles3D_property_trail_lifetime:
  376. - :ref:`float<class_float>` **trail_lifetime**
  377. +-----------+---------------------------+
  378. | *Default* | ``0.3`` |
  379. +-----------+---------------------------+
  380. | *Setter* | set_trail_lifetime(value) |
  381. +-----------+---------------------------+
  382. | *Getter* | get_trail_lifetime() |
  383. +-----------+---------------------------+
  384. The amount of time the particle's trail should represent (in seconds). Only effective if :ref:`trail_enabled<class_GPUParticles3D_property_trail_enabled>` is ``true``.
  385. ----
  386. .. _class_GPUParticles3D_property_transform_align:
  387. - :ref:`TransformAlign<enum_GPUParticles3D_TransformAlign>` **transform_align**
  388. +-----------+----------------------------+
  389. | *Default* | ``0`` |
  390. +-----------+----------------------------+
  391. | *Setter* | set_transform_align(value) |
  392. +-----------+----------------------------+
  393. | *Getter* | get_transform_align() |
  394. +-----------+----------------------------+
  395. .. container:: contribute
  396. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  397. ----
  398. .. _class_GPUParticles3D_property_visibility_aabb:
  399. - :ref:`AABB<class_AABB>` **visibility_aabb**
  400. +-----------+-------------------------------+
  401. | *Default* | ``AABB(-4, -4, -4, 8, 8, 8)`` |
  402. +-----------+-------------------------------+
  403. | *Setter* | set_visibility_aabb(value) |
  404. +-----------+-------------------------------+
  405. | *Getter* | get_visibility_aabb() |
  406. +-----------+-------------------------------+
  407. The :ref:`AABB<class_AABB>` that determines the node's region which needs to be visible on screen for the particle system to be active.
  408. Grow the box if particles suddenly appear/disappear when the node enters/exits the screen. The :ref:`AABB<class_AABB>` can be grown via code or with the **Particles → Generate AABB** editor tool.
  409. Method Descriptions
  410. -------------------
  411. .. _class_GPUParticles3D_method_capture_aabb:
  412. - :ref:`AABB<class_AABB>` **capture_aabb** **(** **)** |const|
  413. Returns the axis-aligned bounding box that contains all the particles that are active in the current frame.
  414. ----
  415. .. _class_GPUParticles3D_method_emit_particle:
  416. - void **emit_particle** **(** :ref:`Transform3D<class_Transform3D>` xform, :ref:`Vector3<class_Vector3>` velocity, :ref:`Color<class_Color>` color, :ref:`Color<class_Color>` custom, :ref:`int<class_int>` flags **)**
  417. Emits a single particle. Whether ``xform``, ``velocity``, ``color`` and ``custom`` are applied depends on the value of ``flags``. See :ref:`EmitFlags<enum_GPUParticles3D_EmitFlags>`.
  418. ----
  419. .. _class_GPUParticles3D_method_get_draw_pass_mesh:
  420. - :ref:`Mesh<class_Mesh>` **get_draw_pass_mesh** **(** :ref:`int<class_int>` pass **)** |const|
  421. Returns the :ref:`Mesh<class_Mesh>` that is drawn at index ``pass``.
  422. ----
  423. .. _class_GPUParticles3D_method_restart:
  424. - void **restart** **(** **)**
  425. Restarts the particle emission, clearing existing particles.
  426. ----
  427. .. _class_GPUParticles3D_method_set_draw_pass_mesh:
  428. - void **set_draw_pass_mesh** **(** :ref:`int<class_int>` pass, :ref:`Mesh<class_Mesh>` mesh **)**
  429. Sets the :ref:`Mesh<class_Mesh>` that is drawn at index ``pass``.
  430. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  431. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  432. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  433. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  434. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  435. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`