Attractor QML Type
将粒子吸引到一个特定的点上。更多
Import Statement: | import QtQuick.Particles |
Inherits: |
属性
- affectedParameter : enumeration
- pointX : real
- pointY : real
- proportionalToDistance : enumeration
- strength : real
详细说明
与其他影响器一样,Attractor 也具有代表受影响区域的标准属性 x、y、宽度和高度。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 属性的值一起决定了对远处粒子施加的拉力的确切大小。
© 2025 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.