Emitter QML Type
Emits logical particles More...
Import Statement: | import QtQuick.Particles 2.0 |
Properties
- acceleration : StochasticDirection
- emitRate : real
- enabled : bool
- endSize : real
- group : string
- lifeSpan : int
- lifeSpanVariation : int
- maximumEmitted : int
- shape : Shape
- size : real
- sizeVariation : real
- startTime : int
- system : ParticleSystem
- velocity : StochasticDirection
- velocityFromMovement : qreal
Signals
- void emitParticles(Array particles)
Methods
Detailed Description
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.
Property Documentation
If set to false, the emitter will cease emissions until it is set to true.
Default value is true.
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.
Default value is -1.
This is the logical particle group which it will emit into.
Default value is "" (empty string).
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).
Particle lifespans will vary by up to this much in either direction.
Default value is 0.
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.
The default value is -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.
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
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.
Default value is 0.
Signal Documentation
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.
Note that JavaScript is slower to execute, so it is not recommended to use this in high-volume particle systems.
The corresponding handler is onEmitParticles
.
Method Documentation
Emits count particles from this emitter immediately. The particles are emitted as if the Emitter was positioned at x,y but all other properties are the same.
If the emitter is not enabled, enables it for duration milliseconds and then switches it back off.
© 2015 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.