ParticlesMaterial

Particle properties for Particles and Particles2D nodes.

ParticlesMaterial defines particle properties and behavior. It is used in the process_material of Particles and Particles2D emitter nodes. Some of this material's properties are applied to each particle when emitted, while others can have a CurveTexture applied to vary values over the lifetime of the particle. 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.

@GodotBaseClass
struct ParticlesMaterial {}

Members

Aliases

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

Enums

Constants
enum Constants
EmissionShape
enum EmissionShape
Flags
enum Flags
Parameter
enum Parameter

Functions

getColor
Color getColor()
getColorRamp
Ref!Texture getColorRamp()
getDirection
Vector3 getDirection()
getEmissionBoxExtents
Vector3 getEmissionBoxExtents()
getEmissionColorTexture
Ref!Texture getEmissionColorTexture()
getEmissionNormalTexture
Ref!Texture getEmissionNormalTexture()
getEmissionPointCount
long getEmissionPointCount()
getEmissionPointTexture
Ref!Texture getEmissionPointTexture()
getEmissionShape
ParticlesMaterial.EmissionShape getEmissionShape()
getEmissionSphereRadius
double getEmissionSphereRadius()
getFlag
bool getFlag(long flag)

Returns true if the specified flag is enabled.

getFlatness
double getFlatness()
getGravity
Vector3 getGravity()
getLifetimeRandomness
double getLifetimeRandomness()
getParam
double getParam(long param)

Returns the value of the specified parameter.

getParamRandomness
double getParamRandomness(long param)

Returns the randomness ratio associated with the specified parameter.

getParamTexture
Ref!Texture getParamTexture(long param)

Returns the Texture used by the specified parameter.

getSpread
double getSpread()
getTrailColorModifier
Ref!GradientTexture getTrailColorModifier()
getTrailDivisor
long getTrailDivisor()
getTrailSizeModifier
Ref!CurveTexture getTrailSizeModifier()
opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(ParticlesMaterial other)
opEquals
bool opEquals(typeof(null) n)
setColor
void setColor(Color color)
setColorRamp
void setColorRamp(Texture ramp)
setDirection
void setDirection(Vector3 degrees)
setEmissionBoxExtents
void setEmissionBoxExtents(Vector3 extents)
setEmissionColorTexture
void setEmissionColorTexture(Texture texture)
setEmissionNormalTexture
void setEmissionNormalTexture(Texture texture)
setEmissionPointCount
void setEmissionPointCount(long point_count)
setEmissionPointTexture
void setEmissionPointTexture(Texture texture)
setEmissionShape
void setEmissionShape(long shape)
setEmissionSphereRadius
void setEmissionSphereRadius(double radius)
setFlag
void setFlag(long flag, bool enable)

If true, enables the specified flag. See flags for options.

setFlatness
void setFlatness(double amount)
setGravity
void setGravity(Vector3 accel_vec)
setLifetimeRandomness
void setLifetimeRandomness(double randomness)
setParam
void setParam(long param, double value)

Sets the specified parameter.

setParamRandomness
void setParamRandomness(long param, double randomness)

Sets the randomness ratio for the specified parameter.

setParamTexture
void setParamTexture(long param, Texture texture)

Sets the Texture for the specified parameter.

setSpread
void setSpread(double degrees)
setTrailColorModifier
void setTrailColorModifier(GradientTexture texture)
setTrailDivisor
void setTrailDivisor(long divisor)
setTrailSizeModifier
void setTrailSizeModifier(CurveTexture texture)
toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

angle
double angle [@property getter]
double angle [@property setter]

Initial rotation applied to each particle, in degrees. Only applied when flagDisableZ or flagRotateY are true or the SpatialMaterial being used to draw the particle is using constant SpatialMaterial.BILLBOARD_PARTICLES.

angleCurve
Texture angleCurve [@property getter]
Texture angleCurve [@property setter]

Each particle's rotation will be animated along this CurveTexture.

angleRandom
double angleRandom [@property getter]
double angleRandom [@property setter]

Rotation randomness ratio.

angularVelocity
double angularVelocity [@property getter]
double angularVelocity [@property setter]

Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. Only applied when flagDisableZ or flagRotateY are true or the SpatialMaterial being used to draw the particle is using constant SpatialMaterial.BILLBOARD_PARTICLES.

angularVelocityCurve
Texture angularVelocityCurve [@property getter]
Texture angularVelocityCurve [@property setter]

Each particle's angular velocity will vary along this CurveTexture.

angularVelocityRandom
double angularVelocityRandom [@property getter]
double angularVelocityRandom [@property setter]

Angular velocity randomness ratio.

animOffset
double animOffset [@property getter]
double animOffset [@property setter]

Particle animation offset.

animOffsetCurve
Texture animOffsetCurve [@property getter]
Texture animOffsetCurve [@property setter]

Each particle's animation offset will vary along this CurveTexture.

animOffsetRandom
double animOffsetRandom [@property getter]
double animOffsetRandom [@property setter]

Animation offset randomness ratio.

animSpeed
double animSpeed [@property getter]
double animSpeed [@property setter]

Particle animation speed.

animSpeedCurve
Texture animSpeedCurve [@property getter]
Texture animSpeedCurve [@property setter]

Each particle's animation speed will vary along this CurveTexture.

animSpeedRandom
double animSpeedRandom [@property setter]

Animation speed randomness ratio.

animSpeedRandom
double animSpeedRandom [@property getter]

Animation speed randomness ratio.

color
Color color [@property setter]

Each particle's initial color. If the Particles2D's texture is defined, it will be multiplied by this color. To have particle display color in a SpatialMaterial make sure to set SpatialMaterial.vertexColorUseAsAlbedo to true.

color
Color color [@property getter]

Each particle's initial color. If the Particles2D's texture is defined, it will be multiplied by this color. To have particle display color in a SpatialMaterial make sure to set SpatialMaterial.vertexColorUseAsAlbedo to true.

colorRamp
Texture colorRamp [@property setter]

Each particle's color will vary along this GradientTexture.

colorRamp
Texture colorRamp [@property getter]

Each particle's color will vary along this GradientTexture.

damping
double damping [@property getter]
double damping [@property setter]

The rate at which particles lose velocity.

dampingCurve
Texture dampingCurve [@property getter]
Texture dampingCurve [@property setter]

Damping will vary along this CurveTexture.

dampingRandom
double dampingRandom [@property getter]
double dampingRandom [@property setter]

Damping randomness ratio.

direction
Vector3 direction [@property getter]
Vector3 direction [@property setter]

Unit vector specifying the particles' emission direction.

emissionBoxExtents
Vector3 emissionBoxExtents [@property getter]
Vector3 emissionBoxExtents [@property setter]

The box's extents if emission_shape is set to constant EMISSION_SHAPE_BOX.

emissionColorTexture
Texture emissionColorTexture [@property getter]
Texture emissionColorTexture [@property setter]

Particle color will be modulated by color determined by sampling this texture at the same point as the emissionPointTexture.

emissionNormalTexture
Texture emissionNormalTexture [@property getter]
Texture emissionNormalTexture [@property setter]

Particle velocity and rotation will be set by sampling this texture at the same point as the emissionPointTexture. Used only in constant 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.

emissionPointCount
long emissionPointCount [@property getter]
long emissionPointCount [@property setter]

The number of emission points if emission_shape is set to constant EMISSION_SHAPE_POINTS or constant EMISSION_SHAPE_DIRECTED_POINTS.

emissionPointTexture
Texture emissionPointTexture [@property getter]
Texture emissionPointTexture [@property setter]

Particles will be emitted at positions determined by sampling this texture at a random position. Used with constant EMISSION_SHAPE_POINTS and constant 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.

emissionShape
ParticlesMaterial.EmissionShape emissionShape [@property getter]
long emissionShape [@property setter]

Particles will be emitted inside this region. Use emissionshape constants for values.

emissionSphereRadius
double emissionSphereRadius [@property getter]
double emissionSphereRadius [@property setter]

The sphere's radius if emission_shape is set to constant EMISSION_SHAPE_SPHERE.

flagAlignY
bool flagAlignY [@property getter]
bool flagAlignY [@property setter]

Align Y axis of particle with the direction of its velocity.

flagDisableZ
bool flagDisableZ [@property getter]
bool flagDisableZ [@property setter]

If true, particles will not move on the z axis.

flagRotateY
bool flagRotateY [@property getter]
bool flagRotateY [@property setter]

If true, particles rotate around Y axis by angle.

flatness
double flatness [@property getter]
double flatness [@property setter]

Amount of spread in Y/Z plane. A value of 1 restricts particles to X/Z plane.

gravity
Vector3 gravity [@property getter]
Vector3 gravity [@property setter]

Gravity applied to every particle.

hueVariation
double hueVariation [@property getter]
double hueVariation [@property setter]

Initial hue variation applied to each particle.

hueVariationCurve
Texture hueVariationCurve [@property getter]
Texture hueVariationCurve [@property setter]

Each particle's hue will vary along this CurveTexture.

hueVariationRandom
double hueVariationRandom [@property getter]
double hueVariationRandom [@property setter]

Hue variation randomness ratio.

initialVelocity
double initialVelocity [@property getter]
double initialVelocity [@property setter]

Initial velocity magnitude for each particle. Direction comes from spread and the node's orientation.

initialVelocityRandom
double initialVelocityRandom [@property getter]
double initialVelocityRandom [@property setter]

Initial velocity randomness ratio.

lifetimeRandomness
double lifetimeRandomness [@property getter]
double lifetimeRandomness [@property setter]

Particle lifetime randomness ratio.

linearAccel
double linearAccel [@property getter]
double linearAccel [@property setter]

Linear acceleration applied to each particle in the direction of motion.

linearAccelCurve
Texture linearAccelCurve [@property getter]
Texture linearAccelCurve [@property setter]

Each particle's linear acceleration will vary along this CurveTexture.

linearAccelRandom
double linearAccelRandom [@property getter]
double linearAccelRandom [@property setter]

Linear acceleration randomness ratio.

orbitVelocity
double orbitVelocity [@property getter]
double orbitVelocity [@property setter]

Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second. Only available when flagDisableZ is true.

orbitVelocityCurve
Texture orbitVelocityCurve [@property getter]
Texture orbitVelocityCurve [@property setter]

Each particle's orbital velocity will vary along this CurveTexture.

orbitVelocityRandom
double orbitVelocityRandom [@property getter]
double orbitVelocityRandom [@property setter]

Orbital velocity randomness ratio.

radialAccel
double radialAccel [@property getter]
double radialAccel [@property setter]

Radial acceleration applied to each particle. Makes particle accelerate away from origin.

radialAccelCurve
Texture radialAccelCurve [@property getter]
Texture radialAccelCurve [@property setter]

Each particle's radial acceleration will vary along this CurveTexture.

radialAccelRandom
double radialAccelRandom [@property getter]
double radialAccelRandom [@property setter]

Radial acceleration randomness ratio.

scale
double scale [@property getter]
double scale [@property setter]

Initial scale applied to each particle.

scaleCurve
Texture scaleCurve [@property getter]
Texture scaleCurve [@property setter]

Each particle's scale will vary along this CurveTexture.

scaleRandom
double scaleRandom [@property getter]
double scaleRandom [@property setter]

Scale randomness ratio.

spread
double spread [@property getter]
double spread [@property setter]

Each particle's initial direction range from +spread to -spread degrees. Applied to X/Z plane and Y/Z planes.

tangentialAccel
double tangentialAccel [@property getter]
double tangentialAccel [@property setter]

Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion.

tangentialAccelCurve
Texture tangentialAccelCurve [@property getter]
Texture tangentialAccelCurve [@property setter]

Each particle's tangential acceleration will vary along this CurveTexture.

tangentialAccelRandom
double tangentialAccelRandom [@property setter]

Tangential acceleration randomness ratio.

tangentialAccelRandom
double tangentialAccelRandom [@property getter]

Tangential acceleration randomness ratio.

trailColorModifier
GradientTexture trailColorModifier [@property getter]
GradientTexture trailColorModifier [@property setter]

Trail particles' color will vary along this GradientTexture.

trailDivisor
long trailDivisor [@property getter]
long trailDivisor [@property setter]

Emitter will emit amount divided by trail_divisor particles. The remaining particles will be used as trail(s).

trailSizeModifier
CurveTexture trailSizeModifier [@property getter]
CurveTexture trailSizeModifier [@property setter]

Trail particles' size will vary along this CurveTexture.

Static functions

_new
ParticlesMaterial _new()

Construct a new instance of ParticlesMaterial. Note: use memnew!ParticlesMaterial 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