このページでは

Attractor QML Type

粒子を特定の点に向かって引き寄せます。詳細...

Import Statement: import QtQuick.Particles
Inherits:

ParticleAffector

プロパティ

詳細説明

他のエフェクターと同様に、アトラクターには、影響範囲を表す標準プロパティである x、y、width、height があります。アトラクター項目のサイズと位置によって、影響を受けるパーティクルが決まります。

吸引点のサイズは常に 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.Quadratic2次
Attractor.InverseQuadratic逆二次関数

strength : real

1ピクセル離れたオブジェクトに及ぼす引力(単位:秒あたり)。

この「引力」と、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.