SpriteParticle3D QML Type
Particle using a 2D sprite texture. More...
Import Statement: | import QtQuick3D.Particles3D . |
Since: | Qt 6.1 |
Inherits: |
Properties
- BlendMode : enumeration
- billboard : bool
- blendMode : BlendMode
- colorTable : Texture
- frameCount : int
- interpolate : bool
- particleScale : real
- sprite : Texture
Detailed Description
The SpriteParticle3D is a logical particle element that creates particles from a 2D sprite texture.
Property Documentation
BlendMode : enumeration
Defines the blending mode for the particles.
Constant | Description |
---|---|
SpriteParticle3D.SourceOver |
Blend particles with SourceOver mode. |
SpriteParticle3D.Screen |
Blend particles with Screen mode. |
SpriteParticle3D.Multiply |
Blend particles with Multiply mode. |
billboard : bool
This property defines if the particle texture should always be aligned face towards the screen.
Note: When set to true
, Particle3D alignMode property does not have an effect.
The default value is false
.
blendMode : BlendMode
This property defines the blending mode used for rendering the particles.
The default value is SpriteParticle3D.SourceOver
.
colorTable : Texture
This property defines the Texture used for coloring the particles. The image can be a 1D or a 2D texture. Horizontal pixels determine the particle color over its lifeSpan. For example, when the particle is halfway through its life, it will have the color specified halfway across the image. If the image is 2D, vertical row is randomly selected for each particle. For example, a c {256 x 4} image contains 4
different coloring options for particles.
frameCount : int
This property defines the amount of image frames in sprite. Particle animates through these frames during its lifeSpan. The frames should be laid out horizontally in the same image file. For example, sprite could be a 512x64
image, with frameCount
of 8
. If the particle lifeSpan is 2000
, each of those images will be visible for 250
milliseconds.
The default value is 1
.
See also interpolate.
interpolate : bool
This property defines if the sprites are interpolated (blended) between frames to make the animation appear smoother.
Note: This property doesn't have an effect when the sprite has only a single frame (so frameCount is 1
).
The default value is true
.
See also frameCount.
particleScale : real
This property defines the scale multiplier of the particles. To adjust the particles sizes in the emitter, use ParticleEmitter3D particleScale, particleEndScale, and particleScaleVariation properties.
The default value is 5.0
.
sprite : Texture
This property defines the Texture used for the particles.
For example, to use "snowFlake.png" as the particles texture:
SpriteParticle3D { id: snowParticle ... sprite: Texture { source: "images/snowflake.png" } }
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.1/qml-qtquick3d-particles3d-spriteparticle3d.html