Particle QML Type
代表由发射器和影响器操控的粒子。更多
| Import Statement: | import QtQuick.Particles |
属性
- alpha : real
- autoRotate : bool
- ax : real
- ay : real
- blue : real
- currentSize : real
- endSize : real
- green : real
- initialAX : real
- initialAY : real
- initialVX : real
- initialVY : real
- initialX : real
- initialY : real
- lifeLeft : real
- lifeSpan : real
- red : real
- rotation : real
- rotationVelocity : real
- startSize : real
- t : real
- update : bool
- vx : real
- vy : real
- x : real
- xDeformationVectorX : real
- xDeformationVectorY : real
- y : real
- yDeformationVectorX : real
- yDeformationVectorY : real
详细说明
粒子元素总是由ParticleSystem 内部管理,不能在 QML 中创建。不过,有时它们会通过信号暴露出来,以便允许对粒子状态进行任意更改。
属性文档
alpha : real
ImageParticle 可以绘制彩色粒子。在绘制时,alpha 会被用作源图像颜色的 alpha 通道。
数值范围为 0.0 至 1.0。
autoRotate : bool
如果自动旋转(autoRotate)为真,那么粒子的旋转将设置为面向行进方向,加上旋转或rotationVelocity 属性中的任何旋转。
ax : real
粒子当前的 x 加速度。
ay : real
粒子当前的 y 加速度。
blue : real
ImageParticle 可以绘制彩色粒子。在绘制时,会使用蓝色作为源图像的蓝色通道。
数值范围为 0.0 至 1.0。
currentSize : real
粒子的当前大小,根据当前时间在startSize 和endSize 之间插值。
endSize : real
粒子图像在生命周期结束时的像素大小。如果该值小于 0,则忽略不计,粒子在整个生命周期内都将保持startSize 。
green : real
ImageParticle 可以绘制彩色粒子。绘制时,绿色将作为源图像的绿色通道。
数值范围为 0.0 至 1.0。
initialAX : real
粒子寿命开始时的 x 加速度。
模拟方法更倾向于改变初始值,而不是在给定时间确定并改变值。在 CustomEmitters 中更改初始值,而不是当前值。
initialAY : real
粒子寿命开始时的 y 加速度。
模拟方法更倾向于改变初始值,而不是在给定时间确定并改变值。在 CustomEmitters 中更改初始值,而不是当前值。
initialVX : real
粒子寿命开始时的 x 速度。
模拟方法更倾向于改变初始值,而不是在给定时间确定并改变值。在 CustomEmitters 中更改初始值,而不是当前值。
initialVY : real
粒子在其生命周期开始时的 y 速度。
模拟方法更倾向于改变初始值,而不是在给定时间确定并改变值。在 CustomEmitters 中更改初始值,而不是当前值。
initialX : real
粒子生命周期开始时的 x 坐标。
模拟方法更倾向于改变初始值,而不是在给定时间确定并改变值。在 CustomEmitters 中更改初始值,而不是当前值。
initialY : real
粒子在其生命周期开始时的 y 坐标。
模拟方法更倾向于改变初始值,而不是在给定时间确定并改变值。在 CustomEmitters 中更改初始值,而不是当前值。
lifeLeft : real
粒子在当前时间点的剩余生存时间(秒)。
lifeSpan : real
粒子的存活时间(秒)。
red : real
ImageParticle 可以绘制彩色粒子。绘制时,会使用红色作为源图像的红色通道。
数值范围为 0.0 至 1.0。
rotation : real
粒子图像开始时的顺时针旋转度数。
rotationVelocity : real
粒子图像存活时每秒顺时针旋转的度数。
startSize : real
粒子图像开始时的像素大小。
t : real
粒子诞生的时间(模拟开始后的秒数)。
update : bool
在影响器中,只有当 update 设置为 true 时,对粒子所做的更改才会被应用。
vx : real
粒子当前的 x 速度。
vy : real
粒子当前的 y 速度。
x : real
粒子当前的 x 坐标。
xDeformationVectorX : real
变形矢量沿 X 轴的 x 分量。ImageParticle 可以在非正方形图形上绘制粒子。它会在用 x 和 y 变形矢量绘制的平行四边形上绘制矩形纹理。
xDeformationVectorY : real
变形矢量沿 X 轴的 x 分量。ImageParticle 可以在非正方形图形上绘制粒子。它会在用 x 和 y 变形矢量绘制的平行四边形上绘制矩形纹理。
y : real
粒子当前的 Y 坐标。
yDeformationVectorX : real
变形矢量沿 X 轴的 Y 分量。ImageParticle 可以在非正方形图形上绘制粒子。它将在使用 X 和 Y 变形矢量绘制的平行四边形上绘制矩形纹理。
yDeformationVectorY : real
变形矢量沿 Y 轴的 Y 分量。ImageParticle 可以在非正方形图形上绘制粒子。它会在用 x 和 y 变形矢量绘制的平行四边形上绘制矩形纹理。
© 2026 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.