For visualizing logical particles using an image 更多...
import 语句: | import QtQuick.Particles 2.0 |
继承: | ParticlePainter |
This element renders a logical particle as an image. The image can be
ImageParticles implictly share data on particles if multiple ImageParticles are painting the same logical particle group. This is broken down along the four capabilities listed above. So if one ImageParticle defines data for rendering the particles in one of those capabilities, and the other does not, then both will draw the particles the same in that aspect automatically. This is primarily useful when there is some random variation on the particle which is supposed to stay with it when switching painters. If both ImageParticles define how they should appear for that aspect, they diverge and each appears as it is defined.
This sharing of data happens behind the scenes based off of whether properties were implicitly or explicitly set. One drawback of the current implementation is that it is only possible to reset the capabilities as a whole. So if you explicitly set an attribute affecting color, such as redVariation , and then reset it (by setting redVariation to undefined), all color data will be reset and it will begin to have an implicit value of any shared color from other ImageParticles.
注意: The maximum number of image particles is limited to 16383.
An alpha to be applied to the image. This value is multiplied by the value in the image, and the value in the color property.
Particles have additive blending, so lower alpha on single particles leads to stronger effects when multiple particles overlap.
Alpha is measured from 0.0 to 1.0.
Default is 1.0
The variation in the alpha channel between particles.
Alpha is measured from 0.0 to 1.0.
Default is 0.0
If set to true then a rotation will be applied on top of the particles rotation, so that it faces the direction of travel. So to face away from the direction of travel, set autoRotation to true and rotation to 180.
Default is false
The variation in the blue color channel between particles.
Color is measured, per channel, from 0.0 to 1.0.
Default is 0.0
If a color is specified, the provided image will be colorized with it.
Default is white (no change).
colorTable : url |
An image whose color will be used as a 1D texture to determine color over life. E.g. when the particle is halfway through its lifetime, it will have the color specified halfway across the image.
This color is blended with the color property and the color of the source image.
This number represents the color variation applied to individual particles. Setting colorVariation is the same as setting redVariation , greenVariation ,和 blueVariation to the same number.
Each channel can vary between particle by up to colorVariation from its usual color.
Color is measured, per channel, from 0.0 to 1.0.
Default is 0.0
This property provides basic and cheap entrance and exit effects for the particles. For fine-grained control, see sizeTable and opacityTable .
Acceptable values are
Default value is Fade.
The variation in the green color channel between particles.
Color is measured, per channel, from 0.0 to 1.0.
Default is 0.0
opacityTable : url |
An image whose opacity will be used as a 1D texture to determine size over life.
This property is expected to be removed shortly, in favor of custom easing curves to determine opacity over life.
The variation in the red color channel between particles.
Color is measured, per channel, from 0.0 to 1.0.
Default is 0.0
If set the image will be rotated by this many degrees before it is drawn.
The particle coordinates are not transformed.
If set the rotation of individual particles will vary by up to this much between particles.
If set particles will rotate at this velocity in degrees/second.
If set the rotationVelocity of individual particles will vary by up to this much between particles.
sizeTable : url |
An image whose opacity will be used as a 1D texture to determine size over life.
This property is expected to be removed shortly, in favor of custom easing curves to determine size over life.
source : url |
The source image to be used.
If the image is a sprite animation, use the sprite property instead.
Since Qt 5.2, some default images are provided as resources to aid prototyping:
qrc:///particleresources/star.png | |
qrc:///particleresources/glowdot.png | |
qrc:///particleresources/fuzzydot.png |
Note that the images are white and semi-transparent, to allow colorization and alpha levels to have maximum effect.
sprites : list < Sprite > |
The sprite or sprites used to draw this particle.
Note that the sprite image will be scaled to a square based on the size of the particle being rendered.
For full details, see the 子画面动画 概述。
If set to true, sprite particles will interpolate between sprite frames each rendered frame, making the sprites look smoother.
默认为 true。
The status of loading the image.
Allows you to deform the particle image when drawn. The rectangular image will be deformed so that the horizontal sides are in the shape of this vector instead of (1,0).
Allows you to deform the particle image when drawn. The rectangular image will be deformed so that the vertical sides are in the shape of this vector instead of (0,1).