Blends particle effect with a 3D model. 更多...
import 语句: | import QtQuick3D.Particles3D |
继承: |
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:
By default the particles are emitted in the order they are specified in the model unless
emitMode
被设为
Random
or
emitMode
被设为
Activation
and
activationNode
有设置。
Some features defined in base class and emitters are not functional with this type:
注意:
默认
fadeInEffect
and
fadeOutEffect
are
Particle3D.FadeNone
.
ModelBlendEmitMode : enumeration |
Defines the emit mode of the particles
常量 | 描述 |
---|---|
ModelBlendParticle3D.Sequential
|
The particles are emitted in the order they are defined in the model. |
ModelBlendParticle3D.Random
|
The particles are emitted in random order. |
ModelBlendParticle3D.Activation
|
The particles are emitted when they are activated by the activationNode . |
ModelBlendMode : enumeration |
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 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 |
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 }
emitMode : bool |
This property holds the emit mode of the particles.
endNode : Node |
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 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 holds blending mode for the particle effect.