ParticleCustomShape3D QML Type
为发射器和影响器加载自定义粒子形状。更多内容...
| Import Statement: | import QtQuick3D.Particles3D |
| Since: | Qt 6.3 |
| Inherits: |
属性
- randomizeData : bool
- source : url
详细说明
ParticleCustomShape3D 元素可用于加载自定义粒子形状。
例如,要从 heart.cbor 中定义的位置发射粒子:
ParticleEmitter3D {
shape: ParticleCustomShape3D {
source: "heart.cbor"
}
...
}CBOR 形状文件的格式如下:
[
"QQ3D_SHAPE", // string
version, // integer
[
posX, // float
posY, // float
posZ, // float
posX, // float
...
]
]您可以使用 shapegen 工具来辅助生成这些形状文件。
属性文档
randomizeData : bool
此属性控制粒子是否以随机顺序使用,而非按照源中指定的顺序使用。
默认值为false 。
source : url
该属性存储了形状文件的位置。
警告: source 应包含可信内容。建议应用程序开发人员在传递不属于应用程序本身的用户提供的源文件之前,仔细考虑其潜在影响。
© 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.