diff options
author | Thomas Senyk <thomas.senyk@pelagicore.com> | 2012-11-22 16:19:30 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-26 21:51:51 +0100 |
commit | cf5c84959805b6ede17b5bd5311f3433b8ccf6bd (patch) | |
tree | 97586ab5dd45f885f7b34dde2df67c5ff6486fc1 /examples/quick/touchinteraction/multipointtouch | |
parent | 6c7ee9d83788f89868011cc6458c2a0073d41292 (diff) |
examples/quick/multipointtouch: move emitter instead of ParticleSystem
When you move the ParticleSystem, the existing particles will be moved
as well. If you move the emitter, only new particles will be moved.
Additional the velocityFromMovement adds a nice effect.
Change-Id: I58eeb1fecde1ca24631400676049e5f9a06518de
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Diffstat (limited to 'examples/quick/touchinteraction/multipointtouch')
-rw-r--r-- | examples/quick/touchinteraction/multipointtouch/content/ParticleFlame.qml | 7 | ||||
-rw-r--r-- | examples/quick/touchinteraction/multipointtouch/multiflame.qml | 20 |
2 files changed, 16 insertions, 11 deletions
diff --git a/examples/quick/touchinteraction/multipointtouch/content/ParticleFlame.qml b/examples/quick/touchinteraction/multipointtouch/content/ParticleFlame.qml index f3c79a4daa..1d51f73898 100644 --- a/examples/quick/touchinteraction/multipointtouch/content/ParticleFlame.qml +++ b/examples/quick/touchinteraction/multipointtouch/content/ParticleFlame.qml @@ -42,6 +42,11 @@ import QtQuick 2.0 import QtQuick.Particles 2.0 ParticleSystem { + anchors.fill: parent + + property alias emitterX: emitter.x + property alias emitterY: emitter.y + property alias color: img.color property alias emitting: emitter.enabled ImageParticle { @@ -53,7 +58,7 @@ ParticleSystem { } Emitter { id: emitter - velocityFromMovement: 20 + velocityFromMovement: 10 emitRate: 80 lifeSpan: 1500 velocity: PointDirection{ y: -90; yVariation: 50; } diff --git a/examples/quick/touchinteraction/multipointtouch/multiflame.qml b/examples/quick/touchinteraction/multipointtouch/multiflame.qml index 7922acc6c4..2697cd94b7 100644 --- a/examples/quick/touchinteraction/multipointtouch/multiflame.qml +++ b/examples/quick/touchinteraction/multipointtouch/multiflame.qml @@ -63,33 +63,33 @@ Rectangle { //! [1] ParticleFlame { color: "red" - x: touch1.x - y: touch1.y + emitterX: touch1.x + emitterY: touch1.y emitting: touch1.pressed } //! [1] ParticleFlame { color: "green" - x: touch2.x - y: touch2.y + emitterX: touch2.x + emitterY: touch2.y emitting: touch2.pressed } ParticleFlame { color: "yellow" - x: touch11.x - y: touch11.y + emitterX: touch11.x + emitterY: touch11.y emitting: touch11.pressed } ParticleFlame { color: "blue" - x: touch21.x - y: touch21.y + emitterX: touch21.x + emitterY: touch21.y emitting: touch21.pressed } ParticleFlame { color: "violet" - x: touch31.x - y: touch31.y + emitterX: touch31.x + emitterY: touch31.y emitting: touch31.pressed } } |