Affector QML Type
Applies alterations to the attributes of logical particles at any point in their lifetime. More...
Import Statement: | import QtQuick.Particles |
Inherits: |
Properties
- acceleration : StochasticDirection
- position : StochasticDirection
- relative : bool
- velocity : StochasticDirection
Signals
- affectParticles(Array particles, real dt)
Detailed Description
Custom Affector manipulates the properties of the particles directly in JavaScript.
Property Documentation
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.
Signal Documentation
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
.
© 2025 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.