发射逻辑粒子。 更多...
import 语句: | import QtQuick.Particles |
This element emits logical particles into the ParticleSystem , with the given starting attributes.
Note that logical particles are not automatically rendered, you will need to have one or more ParticlePainter elements visualizing them.
Note that the given starting attributes can be modified at any point in the particle's lifetime by any Affector element in the same ParticleSystem . This includes attributes like lifespan.
acceleration : StochasticDirection |
The starting acceleraton of the particles emitted.
emitRate : real |
每秒发射的粒子数。
默认值为 10 粒子/秒。
enabled : bool |
If set to false, the emitter will cease emissions until it is set to true.
默认值为 true。
endSize : real |
The size in pixels of the particles at the end of their life. Size will be linearly interpolated during the life of the particle from this value and size. If endSize is -1, then the size of the particle will remain constant at the starting size.
默认值为 -1。
group : string |
This is the logical particle group which it will emit into.
默认值为 "" (空字符串)。
lifeSpan : int |
The time in milliseconds each emitted particle should last for.
If you do not want particles to automatically die after a time, for example if you wish to dispose of them manually, set lifeSpan to Emitter.InfiniteLife.
lifeSpans greater than or equal to 600000 (10 minutes) will be treated as infinite. Particles with lifeSpans less than or equal to 0 will start out dead.
Default value is 1000 (one second).
lifeSpanVariation : int |
Particle lifespans will vary by up to this much in either direction.
默认值为 0。
maximumEmitted : int |
The maximum number of particles at a time that this emitter will have alive.
This can be set as a performance optimization (when using burst and pulse) or to stagger emissions.
If this is set to a number below zero, then there is no maximum limit on the number of particles this emitter can have alive.
默认值为 -1。
shape : Shape |
This shape is applied with the size of the Emitter. Particles will be emitted randomly from any area covered by the shape.
The default shape is a filled in rectangle, which corresponds to the full bounding box of the Emitter.
size : real |
The size in pixels of the particles at the start of their life.
默认值为 16。
sizeVariation : real |
The size of a particle can vary by this much up or down from size/ endSize . The same random addition is made to both size and endSize for a single particle.
默认值为 0。
startTime : int |
If this value is set when the emitter is loaded, then it will emit particles from the past, up to startTime milliseconds ago. These will simulate as if they were emitted then, but will not have any affectors applied to them. Affectors will take effect from the present time.
system : ParticleSystem |
This is the Particle system that the Emitter will emit into. This can be omitted if the Emitter is a direct child of the ParticleSystem
velocity : StochasticDirection |
The starting velocity of the particles emitted.
velocityFromMovement : qreal |
If this value is non-zero, then any movement of the emitter will provide additional starting velocity to the particles based on the movement. The additional vector will be the same angle as the emitter's movement, with a magnitude that is the magnitude of the emitters movement multiplied by velocityFromMovement.
默认值为 0。
emitParticles ( 数组 particles ) |
This signal is emitted when particles are emitted. particles is a JavaScript array of Particle objects. You can modify particle attributes directly within the handler.
注意: JavaScript is slower to execute, so it is not recommended to use this in high-volume particle systems.
注意:
相应处理程序是
onEmitParticles
.
burst ( int count ) |
Emits a number of particles, specified by count , from this emitter immediately.
Emits a number of particles, specified by count , from this emitter immediately. The particles are emitted as if the Emitter was positioned at ( x , y ) but all other properties are the same.
pulse ( int duration ) |
If the emitter is not enabled, enables it for a specified duration (in milliseconds) and then switches it back off.