Attractor QML Type
将粒子吸引到特定点。更多...
| Import Statement: | import QtQuick.Particles |
| Inherits: |
属性
- affectedParameter : enumeration
- pointX : real
- pointY : real
- proportionalToDistance : enumeration
- strength : real
详细说明
与其他影响器一样,Attractor 具有表示影响区域的标准属性 x、y、width 和 height。Attractor 对象的大小和位置决定了受其影响的粒子。
吸引点的大小始终为 0x0,其位置由pointX 和pointY 属性指定。
属性文档
affectedParameter : enumeration
受直接影响的粒子属性。
| 常数 | 描述 |
|---|---|
Attractor.Position | 位置 |
Attractor.Velocity | 速度 |
Attractor.Acceleration | 加速度 |
pointX : real
吸引点的 x 坐标,相对于“吸引器”项的 x 坐标。
pointY : real
吸引点的 y 坐标,相对于“吸引子”项的 y 坐标。
proportionalToDistance : enumeration
引力strength 与粒子到引力点的距离之间的关系。
| 常数 | 描述 |
|---|---|
Attractor.Constant | 常数 |
Attractor.Linear | 线性 |
Attractor.InverseLinear | 反线性 |
Attractor.Quadratic | 二次 |
Attractor.InverseQuadratic | 反二次 |
strength : real
作用于距离一个像素处的物体上的拉力,单位为每秒。
该数值与proportionalToDistance 属性的数值共同决定了对远处粒子施加的精确拉力大小。
© 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.