本页内容

Age QML Type

用于修改粒子年龄。更多内容...

Import Statement: import QtQuick.Particles
Inherits:

ParticleAffector

属性

详细说明

“Age” 效果器允许您改变粒子在其生命周期中所处的阶段。常见用途是提前终止粒子的生命周期,以便为其留出时间完成动画淡出。

“年龄”效果器有时也被称为“终止”效果器,因为在默认参数下,它会立即终止所有受其影响的粒子。

“年龄”效果器仅适用于仍处于存活状态的粒子。

属性文档

advancePosition : bool

advancePosition 用于确定位置、速度和加速度是否包含在影响器执行的模拟老化过程中。如果 advancePosition 为 false,则位置、速度和加速度将保持不变,只有其他属性(如不透明度)会在模拟中向前推进,达到粒子生命周期中该时间点应有的状态。 当 `advancePosition` 设置为 `true` 时,位置、速度和加速度也会推进到粒子生命周期中该时间点应有的状态,从而使其在屏幕上的位置向前推进。

默认值为 true。

lifeLeft : int

要为粒子设置的生命值。受影响的粒子将随时间推移,直至生命周期中剩余生命时间达到该值(以毫秒为单位)的时刻。

© 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.