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
です。
© 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.