W3cubDocs

/Qt 6.9

ParticleCustomShape3D QML Type

Loads custom particle shapes for emitters and affectors. More...

Import Statement: import QtQuick3D.Particles3D
Since: Qt 6.3
Inherits:

ParticleAbstractShape3D

Properties

Detailed Description

The ParticleCustomShape3D element can be used to load custom particle shapes.

For example, to emit particles from positions defined in heart.cbor:

ParticleEmitter3D {
    shape: ParticleCustomShape3D {
        source: "heart.cbor"
    }
    ...
}

The format of CBOR shape files is following:

[
  "QQ3D_SHAPE", // string
  version, // integer
  [
    posX, // float
    posY, // float
    posZ, // float
    posX, // float
    ...
  ]
]

To assist in generating these shape files you can use the shapegen tool.

Property Documentation

randomizeData : bool

This property holds whether the particles are used in random order instead of in the order they are specified in the source.

The default value is false.


source : url

This property holds the location of the shape file.

Warning: source is expected to contain trusted content. Application developers are advised to carefully consider the potential implications before passing in user-provided source files that are not part of the application.


© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.9/qml-qtquick3d-particles3d-particlecustomshape3d.html