SpriteParticle3D QML Type

Particle using a 2D sprite texture. More...

Import Statement: import QtQuick3D.Particles3D .
Since: Qt 6.1



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.

SpriteParticle3D.SourceOverBlend particles with SourceOver mode.
SpriteParticle3D.ScreenBlend particles with Screen mode.
SpriteParticle3D.MultiplyBlend 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"

© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.