Applies alterations to the attributes of logical particles at any point in their lifetime. 更多...
| import 語句: |
import QtQuick.Particles
|
| 繼承: |
Custom Affector manipulates the properties of the particles directly in JavaScript.
|
acceleration : StochasticDirection |
Affected particles will have their acceleration set to this direction.
|
位置 : 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.
默認為 true。
|
velocity : StochasticDirection |
Affected particles will have their velocity set to this direction.
|
affectParticles ( 數組 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.
注意: JavaScript is slower to execute, so it is not recommended to use this in high-volume particle systems.
注意:
相應處理程序是
onAffectParticles
.