On this page
Particle3D QML Type
Abstract logical particle. More...
Import Statement: | import QtQuick3D.Particles3D . |
Since: | Qt 6.1 |
Inherits: | |
Inherited By: |
Properties
- AlignMode : enumeration
- FadeType : enumeration
- alignMode : AlignMode
- alignTargetPosition : vector3d
- color : color
- colorVariation : vector4d
- fadeInDuration : int
- fadeInEffect : FadeType
- fadeOutDuration : int
- fadeOutEffect : FadeType
- maxAmount : int
- system : ParticleSystem3D
- unifiedColorVariation : bool
Detailed Description
This element defines the common properties of the logical particles. Particle3D is an abstract base class of particles, use ModelParticle3D or SpriteParticle3D instead.
Property Documentation
AlignMode : enumeration
Defines the type of the alignment.
Constant | Description |
---|---|
Particle3D.AlignNone |
No alignment. Particles rotation can be defined with particleRotation. |
Particle3D.AlignTowardsTarget |
Align the particles towards alignTargetPosition direction. |
Particle3D.AlignTowardsStartVelocity |
Align the particles towards their starting velocity direction. |
FadeType : enumeration
Defines the type of the fading effect.
Constant | Description |
---|---|
Particle3D.FadeNone |
No fading. |
Particle3D.FadeOpacity |
Fade the particle opacity from/to 0.0. |
Particle3D.FadeScale |
Fade the particle scale from/to 0.0. |
alignMode : AlignMode
This property defines the align mode used for the particles. Particle alignment means the direction that particles face.
Note: When the SpriteParticle3D billboard property is set to true
, alignMode does not have an effect.
The default value is Particle3D.AlignNone
.
See also alignTargetPosition.
alignTargetPosition : vector3d
This property defines the position particles are aligned to. This property has effect only when the alignMode is set to Particle3D.AlignTowardsTarget
.
See also alignMode.
color : color
This property defines the base color that is used for colorizing the particles.
The default value is "#FFFFFF"
(white).
colorVariation : vector4d
This property defines the color variation that is used for colorizing the particles. The values are in RGBA order and each value should be between 0.0 (no variation) and 1.0 (full variation).
For example, to create particles which will have translucent red colors between #ff0000
and #e50000
, with 40% to 60% opacity:
ModelParticle3D {
...
color: "#7fff0000"
colorVariation: Qt.vector4d(0.1, 0.0, 0.0, 0.2)
}
The default value is (0, 0, 0, 0)
(no variation).
See also unifiedColorVariation.
fadeInDuration : int
This property defines the duration in milliseconds for the fading in effect.
Note: The fading durations are part of the particles lifeSpan. So e.g. if lifeSpan
is 3000, fadeInDuration
is 500 and fadeOutDuration
is 500, the fully visible time of the particle is 2000ms.
The default value is 250
.
See also fadeInEffect and fadeOutDuration.
fadeInEffect : FadeType
This property defines the fading effect used when the particles appear.
The default value is Particle3D.FadeOpacity
.
See also fadeInDuration and fadeOutEffect.
fadeOutDuration : int
This property defines the duration in milliseconds for the fading out effect.
The default value is 250
.
See also fadeOutEffect and fadeInDuration.
fadeOutEffect : FadeType
This property defines the fading effect used when the particles reach their lifeSpan and disappear.
The default value is Particle3D.FadeOpacity
.
See also fadeOutDuration and fadeInEffect.
maxAmount : int
This property defines the maximum amount of particles that can exist at the same time. You can use particlesUsed for debugging how efficiently the allocated particles are used. If the maxAmount is too small, particles are reused before they reach the end of their lifeSpan. If the maxAmount is too big, unnecessary memory is allocated for the particles.
Note: Changing the maxAmount resets all the particles in the particle system.
The default value is 100
.
system : ParticleSystem3D
This property defines the ParticleSystem3D for the particle. If the system is direct parent of the particle, this property does not need to be defined.
unifiedColorVariation : bool
This property defines if the colorVariation should be applied uniformly for all the color channels. This means that all variations are applied with the same random amount.
For example, to create particles which will have yellow colors between #ffff00
and #7f7f00
, so that the values of R
and G
color channels are always the same:
ModelParticle3D {
...
color: "#ffff00"
colorVariation: Qt.vector4d(0.5, 0.5, 0.0, 0.0)
unifiedColorVariation: true
}
The default value is false
.
See also colorVariation.
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.1/qml-qtquick3d-particles3d-particle3d.html