diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-09-20 17:16:36 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-21 07:11:25 +0200 |
commit | c07ea77a6201ef5595ff5714fba891be4408fa9a (patch) | |
tree | a76327735961f81130bffeeb9a62f2fcb7fec8bb /examples/declarative/particles/simple/dynamicemitters.qml | |
parent | ef98f5a80369e3f014585edc3dd63a2ec331d1ea (diff) |
Add whitespace
Change-Id: Iad55228ffa86bbf63b12a33d0f00ce734807c071
Reviewed-on: http://codereview.qt-project.org/5199
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Diffstat (limited to 'examples/declarative/particles/simple/dynamicemitters.qml')
-rw-r--r-- | examples/declarative/particles/simple/dynamicemitters.qml | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/examples/declarative/particles/simple/dynamicemitters.qml b/examples/declarative/particles/simple/dynamicemitters.qml index 89e811e199..f64c1c0941 100644 --- a/examples/declarative/particles/simple/dynamicemitters.qml +++ b/examples/declarative/particles/simple/dynamicemitters.qml @@ -41,39 +41,40 @@ import QtQuick 2.0 import QtQuick.Particles 2.0 -Rectangle{ +Rectangle { id: root color: "black" width: 640 height: 480 - ParticleSystem{ + ParticleSystem { id: sys } - ImageParticle{ + ImageParticle { system: sys source: "../images/particle.png" color: "white" colorVariation: 1.0 alpha: 0.1 } - Component{ + + Component { id: emitterComp - Emitter{ + Emitter { id: container - Emitter{ + Emitter { id: emitMore system: sys emitRate: 128 lifeSpan: 600 size: 16 endSize: 8 - speed: AngleDirection{angleVariation:360; magnitude: 60} + speed: AngleDirection {angleVariation:360; magnitude: 60} } property int life: 2600 property real targetX: 0 property real targetY: 0 - function go(){ + function go() { xAnim.start(); yAnim.start(); container.enabled = true @@ -83,29 +84,30 @@ Rectangle{ lifeSpan: 600 size: 24 endSize: 8 - NumberAnimation on x{ + NumberAnimation on x { id: xAnim; to: targetX duration: life running: false } - NumberAnimation on y{ + NumberAnimation on y { id: yAnim; to: targetY duration: life running: false } - Timer{ + Timer { interval: life running: true onTriggered: container.destroy(); } } } - MouseArea{ + + MouseArea { anchors.fill: parent - onClicked:{ - for(var i=0; i<8; i++){ + onClicked: { + for (var i=0; i<8; i++) { var obj = emitterComp.createObject(root); obj.x = mouse.x obj.y = mouse.y |