Affector QML Type

論理パーティクルの属性に、そのライフタイムの任意の時点で変更を適用する。詳細...

Import Statement: import QtQuick.Particles
Inherits:

ParticleAffector

プロパティ

信号

詳細説明

カスタムアフェクタは、パーティクルのプロパティをJavaScriptで直接操作します。

プロパティの説明

acceleration : StochasticDirection

影響を受けたパーティクルは、加速度がこの方向に設定されます。


position : StochasticDirection

影響を受けるパーティクルの位置は、ParticleSystem を基準に、この方向に設定されます。方向を点として解釈する場合は、ParticleSystem の0,0を基点とし、指定された位置に先端がある矢印を想像してください。


relative : bool

影響を受けるパーティクルの既存の位置/速度/加速度を新しいものに追加するかどうか。

デフォルトはtrueです。


velocity : StochasticDirection

影響を受けるパーティクルの速度はこの方向に設定されます。


シグナルの説明

affectParticles(Array particles, real dt)

particles は直接操作できるパーティクルオブジェクトの配列です。

dt は最後に影響を受けてからの時間です。 を使用して、軌道操作をリアルタイムに正規化します。dt

注意: JavaScript は実行速度が遅いので、大容量のパーティクルシステムでの使用はお勧めしません。

注意: 対応するハンドラはonAffectParticles です。


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