class_gpuparticles3d.rst 29 KB

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