diff options
Diffstat (limited to 'examples/quick/pointerhandlers/multiflame.qml')
-rw-r--r-- | examples/quick/pointerhandlers/multiflame.qml | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/examples/quick/pointerhandlers/multiflame.qml b/examples/quick/pointerhandlers/multiflame.qml new file mode 100644 index 0000000000..7793e52ad6 --- /dev/null +++ b/examples/quick/pointerhandlers/multiflame.qml @@ -0,0 +1,69 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Particles + +Rectangle { + id: root + width: 360 + height: 480 + color: "black" + + component ColoredEmitter: Emitter { + id: emitter + property string color + group: color + velocityFromMovement: 10 + emitRate: 80 + lifeSpan: 1500 + velocity: PointDirection { + y: -90 + yVariation: 50 + } + acceleration: PointDirection { + xVariation: 100 + yVariation: 90 + } + size: 51 + sizeVariation: 53 + endSize: 64 + enabled: handler.active + x: handler.point.position.x + y: handler.point.position.y + + PointHandler { + id: handler + parent: root + } + + ImageParticle { + id: img + groups: [emitter.color] + source: "images/blur-circle.png" + colorVariation: 0.1 + color: emitter.color + alpha: 0 + system: sys + } + } + + ParticleSystem { + id: sys + ColoredEmitter { + color: "indianred" + } + ColoredEmitter { + color: "greenyellow" + } + ColoredEmitter { + color: "yellow" + } + ColoredEmitter { + color: "darkorange" + } + ColoredEmitter { + color: "violet" + } + } +} |