Applies alterations to the attributes of logical particles at any point in their lifetime. More...
| Import Statement: | import QtQuick.Particles
|
| Inherits: |
Custom Affector manipulates the properties of the particles directly in JavaScript.
acceleration : StochasticDirection
Affected particles will have their acceleration set to this direction.
position : StochasticDirection
Affected particles will have their position set to this direction, relative to the ParticleSystem. When interpreting directions as points, imagine it as an arrow with the base at the 0,0 of the ParticleSystem and the tip at where the specified position will be.
relative : bool
Whether the affected particles have their existing position/velocity/acceleration added to the new one.
Default is true.
velocity : StochasticDirection
Affected particles will have their velocity set to this direction.
affectParticles(Array particles, real dt)
This signal is emitted when particles are selected to be affected. particles is an array of particle objects which can be directly manipulated.
dt is the time since the last time it was affected. Use dt to normalize trajectory manipulations to real time.
Note: JavaScript is slower to execute, so it is not recommended to use this in high-volume particle systems.
Note: The corresponding handler is onAffectParticles.
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.9/qml-qtquick-particles-affector.html