ModelBlendParticle3D QML Type

Blends particle effect with a 3D model. 更多...

import 语句: import QtQuick3D.Particles3D
继承: Particle3D

特性

详细描述

注意: This type is in tech preview in 6.2. The API is under development and subject to change.

The type provides a way to blend particle effect with a 3D model. The provided model needs to be triangle-based. Each triangle in the model is converted into a particle, which are then used by the emitter. Instead of particle shader, the model is shaded using the material specified in the model. The way the effect is blended is determined by the modelBlendMode .

The possible modes are:

  • Construct , where the model gets constructed from the particles.
  • Explode , where the model gets converted into particles.
  • Transfer , where Construct and Explode are combined to create an effect where the model is transferred from one place to another.

The particles are emitted in the order they are specified in the model unless activationNode is set or random 被设为 true .

Some features defined in base class and emitters are not functional with this type:

注意: 默认 fadeInEffect and fadeOutEffect are Particle3D.FadeNone .

特性文档编制

ModelBlendMode : enumeration

This property is under development and is subject to change.

Defines the blending mode for the particle effect.

常量 描述
ModelBlendParticle3D.Explode The model gets exploded i.e. the particles are emitted from the position of the model.
ModelBlendParticle3D.Construct The model gets constructed i.e the particles fly from the emitter and construct the model at the end.
ModelBlendParticle3D.Transfer Combines Explode and Transfer for the same model.
activationNode : Node

This property is under development and is subject to change.

This property holds a node that activates particles and overrides the reqular emit routine. The activation node can be used to control how the particles are emitted spatially when the model is exploded/constructed from the particles. The activation node emits a particle if the center of that particle is on the positive half of the z-axis of the activation node. Animating the activation node to move trough the model will cause the particles to be emitted sequentially along the path the activation node moves.

delegate : Component

This property is under development and is subject to change.

The delegate provides a template defining the model for the ModelBlendParticle3D .

For example, using the default sphere model with default material

Component {
    id: modelComponent
    Model {
        source: "#Sphere"
        scale: Qt.vector3d(0.5, 0.5, 0.5)
        materials: DefaultMaterial { diffuseColor: "red" }
    }
}
ModelBlendParticle3D {
    id: particleRedSphere
    delegate: modelComponent
}
					
endNode : Node

This property is under development and is subject to change.

This property holds the node that specifies the transformation for the model at the end of particle effect. It defines the size, position and rotation where the model is constructed when using the ModelBlendParticle3D.Construct and ModelBlendParticle3D.Transfer blend modes.

endTime : int

This property is under development and is subject to change.

This property holds the end time of the particle in milliseconds. The end time is used during construction and defines duration from particle lifetime at the end where the effect is blended with the model positions. Before the end time the particles positions are defined only by the particle effect, but during end time the particle position is blended linearly with the model end position.

modelBlendMode : ModelBlendMode

This property is under development and is subject to change.

This property holds blending mode for the particle effect.

random : bool

This property is under development and is subject to change.

This property holds whether the particles are emitted in random order instead of in the order they are specified in the model. The default is false .

注意: This property is ignored if activationNode 有设置。