SpriteParticle3D QML Type
使用二维精灵纹理的粒子。更多
| Import Statement: | import QtQuick3D.Particles3D |
| Since: | Qt 6.2 |
| Inherits: | |
| Inherited By: |
属性
- BlendMode : enumeration
- billboard : bool
- blendMode : BlendMode
- castsReflections : bool
(since 6.4) - colorTable : Texture
- lights : list<Light>
(since 6.3) - offsetX : real
(since 6.3) - offsetY : real
(since 6.3) - particleScale : real
- sprite : Texture
- spriteSequence : SpriteSequence3D
详细说明
SpriteParticle3D 是一种逻辑粒子元素,可从二维精灵纹理创建粒子。
属性文档
BlendMode : enumeration
定义粒子的混合模式。
| 常数 | 描述 |
|---|---|
SpriteParticle3D.SourceOver | 用源翻转模式混合粒子。 |
SpriteParticle3D.Screen | 使用屏幕模式混合粒子。 |
SpriteParticle3D.Multiply | 使用乘法模式混合粒子。 |
billboard : bool
此属性定义粒子纹理是否始终朝屏幕方向对齐。
注意: 当设置为true 时,Particle3D alignMode 属性不起作用。
默认值为false 。
blendMode : BlendMode
该属性定义了用于渲染粒子的混合模式。
默认值为SpriteParticle3D.SourceOver 。
castsReflections : bool [since 6.4]
当该属性设置为true 时,精灵将通过反射探针渲染,并可在反射中看到。
此属性在 Qt 6.4 中引入。
colorTable : Texture
该属性定义了用于为粒子着色的Texture 。图像可以是一维或二维纹理。水平像素决定粒子在lifeSpan 上的颜色。例如,当粒子的寿命过半时,它将在图像的一半处指定颜色。如果图像是二维的,则会为每个粒子随机选择垂直行。例如,一幅 c {256 x 4} 图像包含4 种不同的粒子着色选项。
lights : list<Light> [since 6.3]
此属性包含用于渲染粒子的lights 列表。
注: 为获得最佳性能,请仅在需要时定义灯光,并尽量减少灯光数量。
此属性在 Qt 6.3 中引入。
offsetX : real [since 6.3]
此属性定义粒子在 X 轴上的偏移量
此属性在 Qt 6.3 中引入。
offsetY : real [since 6.3]
该属性定义了粒子在 Y 轴上的偏移量。
此属性在 Qt 6.3 中引入。
particleScale : real
该属性定义了粒子的比例乘数。要调整发射器中的粒子大小,请使用ParticleEmitter3D particleScale ,particleEndScale, 和particleScaleVariation 属性。
默认值为5.0 。
sprite : Texture
此属性定义了用于粒子的Texture 。
例如,使用 "snowFlake.png "作为粒子纹理:
SpriteParticle3D {
id: snowParticle
...
sprite: Texture {
source: "images/snowflake.png"
}
}spriteSequence : SpriteSequence3D
此属性定义粒子的精灵序列属性。如果sprite 纹理包含帧序列,则可通过设置此属性来定义帧数、动画方向等特性。
© 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.