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 预计包含可信内容。建议应用程序开发人员在传递非应用程序一部分的用户提供的源文件之前,仔细考虑其潜在影响。
© 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.