ParticleSystem3D QML Type

A system which includes particle, emitter, and affector types. More...

Import Statement: import QtQuick3D.Particles3D
Since: Qt 6.2
Inherits:

Node

Properties

Methods

Detailed Description

This element is the root of the particle system, which handles the system timing and groups all the other related elements like particles, emitters, and affectors together. To group the system elements, they either need to be direct children of the ParticleSystem3D like this:

ParticleSystem3D {
    ParticleEmitter3D {
        ...
    }
    SpriteParticle3D {
        ...
    }
}

Or if the system elements are not direct children, they need to use system property to point which ParticleSystem3D they belong to. Like this:

ParticleSystem3D {
    id: psystem
}
ParticleEmitter3D {
    system: psystem
    ...
}
SpriteParticle3D {
    system: psystem
    ...
}

Property Documentation

logging : bool

Set this to true to collect loggingData.

Note: This property has some performance impact, so it should not be enabled in releases.

The default value is false.

See also loggingData.


[read-only] loggingData : ParticleSystem3DLogging

This property contains logging data which can be useful when developing and optimizing the particle effects.

Note: This property contains correct data only when logging is set to true and particle system is running.

See also logging.


paused : bool

This property defines if system is currently paused. If paused is set to true, the particle system will not advance the simulation. When paused is set to false again, the simulation will resume from the same point where it was paused.

The default value is false.


running : bool

This property defines if system is currently running. If running is set to false, the particle system will stop the simulation. All particles will be destroyed when the system is set to running again.

Running should be set to false when manually modifying/animating the time property.

The default value is true.


seed : int

This property defines the seed value used for particles randomization. With the same seed, particles effect will be identical on every run. This is useful when deterministic behavior is desired over random behavior.

The default value is 0 when useRandomSeed is set to false, and something in between 1..INT32_MAX when useRandomSeed is set to true.

Note: This property should not be modified during the particle animations.

See also useRandomSeed.


startTime : int

This property defines time in milliseconds where the system starts. This can be useful to warm up the system so that a set of particles has already been emitted. If for example startTime is set to 2000 and system time is animating from 0 to 1000, actually animation shows particles from 2000 to 3000ms.

The default value is 0.


time : int

This property defines time in milliseconds for the system.

Note: When modifying the time property, running should usually be set to false.

Here is an example how to manually animate the system for 3 seconds, in a loop, at half speed:

ParticleSystem3D {
    running: false
    NumberAnimation on time {
        loops: Animation.Infinite
        from: 0
        to: 3000
        duration: 6000
    }
}

useRandomSeed : bool

This property defines if particle system seed should be random or user defined. When true, a new random value for seed is generated every time particle system is restarted.

The default value is true.

Note: This property should not be modified during the particle animations.

See also seed.


Method Documentation

reset()

This method resets the internal state of the particle system to it's initial state. This can be used when running property is false to reset the system. The running is true this method does not need to be called as the system is managing the internal state, but when it is false the system needs to be told when the system should be reset.


© 2024 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.