Attractor3D QML Type
パーティクルを位置や形状に引き寄せます。詳細...
| Import Statement: | import QtQuick3D.Particles3D |
| Since: | Qt 6.2 |
| Inherits: |
プロパティ
- duration : int
- durationVariation : int
- hideAtEnd : bool
- positionVariation : vector3d
- positionsAmount : int
- shape : ParticleAbstractShape3D
- useCachedPositions : bool
詳細説明
この要素は、3Dビュー内の位置に向かってパーティクルを引き寄せます。重心が遠くにある巨大な物体の重力をモデル化するには、Gravity3D を使用します。
引き寄せ位置はposition とpositionVariation のどちらか、またはshape で定義されます。両方が定義されている場合はshape が使用されます。
プロパティ・ドキュメンテーション
duration : int
このプロパティは、パーティクルがアタクション位置に到達するまでの時間をミリ秒単位で定義します。値が-1の場合、パーティクルのライフスパンが持続時間として使用されます。
デフォルト値は-1 です。
durationVariation : int
このプロパティは持続時間の変化をミリ秒単位で定義する。アトラクターに到達する実際の継続時間は、duration -durationVariation とduration +durationVariation の間である。
デフォルト値は0 (変動なし) です。
hideAtEnd : bool
このプロパティは、パーティクルがアトラクターに到達したときに消滅するかどうかを定義します。
デフォルト値はfalse です。
positionVariation : vector3d
このプロパティは、引き寄せる位置のバリエーションを定義する。一点に引き寄せるのではなく、より広い範囲にランダムに引き寄せることができます。ここでは、(50, 50, 50)立方体の中の(100, 0, 0)の位置にあるランダムな点に、2~4秒以内にパーティクルを引き寄せる例を示します:
Attractor3D { position: Qt.vector3d(100, 0, 0) positionVariation: Qt.vector3d(50, 50, 50) duration: 3000 durationVariation: 1000 }
デフォルト値は(0, 0, 0) (変化なし)です。
Node::position とshapeも参照して ください。
positionsAmount : int
このプロパティは、アトラクター形状内に保存される可能性のある位置の量を定義します。デフォルトでは、この量はパーティクル数に等しいが、より小さいキャッシュのためにより小さい量を使用することができる。より高い量を使用すると、さらにランダム化を行うことができます。
shape : ParticleAbstractShape3D
このプロパティは、パーティクルを引き寄せるためのParticleAbstractShape3D を定義します。各パーティクルはこの形状内のランダムな位置に引き寄せられます。これはposition とpositionVariation の定義に代わるものです。ここでは、パーティクルlifeSpan の終了によって、パーティクルを球体内部のランダムな位置に引き寄せる方法の例を示します:
Attractor3D { position: Qt.vector3d(100, 0, 0) shape: ParticleShape3D { type: ParticleShape3D.Sphere fill: true } }
Node::position とpositionVariation も参照して ください。
useCachedPositions : bool
このプロパティは、アトラクターがその形状内で可能な位置をキャッシュするかどうかを定義する。キャッシュされた位置はランダムな結果が少なくなるが、パフォーマンスには有利である。
デフォルト値はtrue です。
© 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.