Particles

GPU-based 3D particle emitter.

3D particle node used to create a variety of particle systems and effects. Particles features an emitter that generates some number of particles at a given rate. Use the process_material property to add a ParticlesMaterial to configure particle appearance and behavior. Alternatively, you can add a ShaderMaterial which will be applied to all particles. Note: Particles only work when using the GLES3 renderer. If using the GLES2 renderer, use CPUParticles instead. You can convert Particles to CPUParticles by selecting the node, clicking the Particles menu at the top of the 3D editor viewport then choosing Convert to CPUParticles. Note: After working on a Particles node, remember to update its visibilityAabb by selecting it, clicking the Particles menu at the top of the 3D editor viewport then choose Generate Visibility AABB. Otherwise, particles may suddenly disappear depending on the camera position and angle.

@GodotBaseClass
struct Particles {}

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

Constants
enum Constants
DrawOrder
enum DrawOrder

Functions

captureAabb
AABB captureAabb()

Returns the axis-aligned bounding box that contains all the particles that are active in the current frame.

getAmount
long getAmount()
getDrawOrder
Particles.DrawOrder getDrawOrder()
getDrawPassMesh
Ref!Mesh getDrawPassMesh(long pass)

Returns the Mesh that is drawn at index pass.

getDrawPasses
long getDrawPasses()
getExplosivenessRatio
double getExplosivenessRatio()
getFixedFps
long getFixedFps()
getFractionalDelta
bool getFractionalDelta()
getLifetime
double getLifetime()
getOneShot
bool getOneShot()
getPreProcessTime
double getPreProcessTime()
getProcessMaterial
Ref!Material getProcessMaterial()
getRandomnessRatio
double getRandomnessRatio()
getSpeedScale
double getSpeedScale()
getUseLocalCoordinates
bool getUseLocalCoordinates()
getVisibilityAabb
AABB getVisibilityAabb()
isEmitting
bool isEmitting()
opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(Particles other)
opEquals
bool opEquals(typeof(null) n)
restart
void restart()

Restarts the particle emission, clearing existing particles.

setAmount
void setAmount(long amount)
setDrawOrder
void setDrawOrder(long order)
setDrawPassMesh
void setDrawPassMesh(long pass, Mesh mesh)

Sets the Mesh that is drawn at index pass.

setDrawPasses
void setDrawPasses(long passes)
setEmitting
void setEmitting(bool emitting)
setExplosivenessRatio
void setExplosivenessRatio(double ratio)
setFixedFps
void setFixedFps(long fps)
setFractionalDelta
void setFractionalDelta(bool enable)
setLifetime
void setLifetime(double secs)
setOneShot
void setOneShot(bool enable)
setPreProcessTime
void setPreProcessTime(double secs)
setProcessMaterial
void setProcessMaterial(Material material)
setRandomnessRatio
void setRandomnessRatio(double ratio)
setSpeedScale
void setSpeedScale(double scale)
setUseLocalCoordinates
void setUseLocalCoordinates(bool enable)
setVisibilityAabb
void setVisibilityAabb(AABB aabb)
toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

amount
long amount [@property getter]
long amount [@property setter]

The number of particles emitted in one emission cycle (corresponding to the lifetime). Note: Changing amount will reset the particle emission, therefore removing all particles that were already emitted before changing amount.

drawOrder
Particles.DrawOrder drawOrder [@property getter]
long drawOrder [@property setter]

Particle draw order. Uses draworder values.

drawPass1
Mesh drawPass1 [@property getter]
Mesh drawPass1 [@property setter]

Mesh that is drawn for the first draw pass.

drawPass2
Mesh drawPass2 [@property getter]
Mesh drawPass2 [@property setter]

Mesh that is drawn for the second draw pass.

drawPass3
Mesh drawPass3 [@property getter]
Mesh drawPass3 [@property setter]

Mesh that is drawn for the third draw pass.

drawPass4
Mesh drawPass4 [@property getter]
Mesh drawPass4 [@property setter]

Mesh that is drawn for the fourth draw pass.

drawPasses
long drawPasses [@property getter]
long drawPasses [@property setter]

The number of draw passes when rendering particles.

emitting
bool emitting [@property getter]
bool emitting [@property setter]

If true, particles are being emitted.

explosiveness
double explosiveness [@property getter]
double explosiveness [@property setter]

Time ratio between each emission. If 0, particles are emitted continuously. If 1, all particles are emitted simultaneously.

fixedFps
long fixedFps [@property getter]
long fixedFps [@property setter]

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.

fractDelta
bool fractDelta [@property getter]
bool fractDelta [@property setter]

If true, results in fractional delta calculation which has a smoother particles display effect.

lifetime
double lifetime [@property getter]
double lifetime [@property setter]

The amount of time each particle will exist (in seconds).

localCoords
bool localCoords [@property getter]
bool localCoords [@property setter]

If true, particles use the parent node's coordinate space. If false, they use global coordinates.

oneShot
bool oneShot [@property getter]
bool oneShot [@property setter]

If true, only amount particles will be emitted.

preprocess
double preprocess [@property getter]
double preprocess [@property setter]

Amount of time to preprocess the particles before animation starts. Lets you start the animation some time after particles have started emitting.

randomness
double randomness [@property getter]
double randomness [@property setter]

Emission randomness ratio.

speedScale
double speedScale [@property getter]
double speedScale [@property setter]

Speed scaling ratio. A value of 0 can be used to pause the particles.

visibilityAabb
AABB visibilityAabb [@property getter]
AABB visibilityAabb [@property setter]

The AABB that determines the node's region which needs to be visible on screen for the particle system to be active. Grow the box if particles suddenly appear/disappear when the node enters/exits the screen. The AABB can be grown via code or with the Particles → Generate AABB editor tool. Note: If the ParticlesMaterial in use is configured to cast shadows, you may want to enlarge this AABB to ensure the shadow is updated when particles are off-screen.

Static functions

_new
Particles _new()

Construct a new instance of Particles. Note: use memnew!Particles instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta