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/customparticle | |
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/customparticle')
3 files changed, 29 insertions, 26 deletions
diff --git a/examples/declarative/particles/customparticle/blurparticles.qml b/examples/declarative/particles/customparticle/blurparticles.qml index 4c33d14969..9767818bd3 100644 --- a/examples/declarative/particles/customparticle/blurparticles.qml +++ b/examples/declarative/particles/customparticle/blurparticles.qml @@ -41,32 +41,32 @@ import QtQuick 2.0 import QtQuick.Particles 2.0 -Rectangle{ +Rectangle { color: "white" width: 240 height: 360 - ParticleSystem{ + ParticleSystem { id: sys } - Emitter{ + Emitter { system:sys height: parent.height emitRate: 1 lifeSpan: 12000 - speed: PointDirection{x:20;} + speed: PointDirection {x:20;} size: 64 } - ShaderEffectSource{ + ShaderEffectSource { id: theSource sourceItem: theItem hideSource: true } - Image{ + Image { id: theItem source: "../images/smile.png" } - CustomParticle{ + CustomParticle { system: sys vertexShader:" uniform lowp float qt_Opacity; diff --git a/examples/declarative/particles/customparticle/fragmentshader.qml b/examples/declarative/particles/customparticle/fragmentshader.qml index ecc06a6be6..6dc9e41db2 100644 --- a/examples/declarative/particles/customparticle/fragmentshader.qml +++ b/examples/declarative/particles/customparticle/fragmentshader.qml @@ -41,15 +41,15 @@ import QtQuick 2.0 import QtQuick.Particles 2.0 -ParticleSystem{ +ParticleSystem { id: root width: 1024 height: 768 - Rectangle{ + Rectangle { z: -1 anchors.fill: parent color: "black" - Text{ + Text { anchors.bottom: parent.bottom anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 36 @@ -57,16 +57,18 @@ ParticleSystem{ text: "It's all in the fragment shader." } } - Emitter{ + + Emitter { emitRate: 400 lifeSpan: 8000 size: 24 sizeVariation: 16 - speed: PointDirection{x: root.width/10; y: root.height/10;} - //acceleration: AngledDirection{angle:225; magnitude: root.width/36; angleVariation: 45; magnitudeVariation: 80} - acceleration: PointDirection{x: -root.width/40; y: -root.height/40; xVariation: -root.width/20; yVariation: -root.width/20} + speed: PointDirection {x: root.width/10; y: root.height/10;} + //acceleration: AngledDirection {angle:225; magnitude: root.width/36; angleVariation: 45; magnitudeVariation: 80} + acceleration: PointDirection {x: -root.width/40; y: -root.height/40; xVariation: -root.width/20; yVariation: -root.width/20} } - CustomParticle{ + + CustomParticle { vertexShader:" uniform lowp float qt_Opacity; varying lowp float fFade; diff --git a/examples/declarative/particles/customparticle/imagecolors.qml b/examples/declarative/particles/customparticle/imagecolors.qml index 20d6220ee3..591fd2421f 100644 --- a/examples/declarative/particles/customparticle/imagecolors.qml +++ b/examples/declarative/particles/customparticle/imagecolors.qml @@ -41,35 +41,35 @@ import QtQuick 2.0 import QtQuick.Particles 2.0 -Rectangle{ +Rectangle { width: 400 height: 400 - Rectangle{ + Rectangle { id: root color: "white" width: 310 height: 300 anchors.centerIn: parent - ParticleSystem{ id: sys } - CustomParticle{ + ParticleSystem { id: sys } + CustomParticle { system: sys property real maxWidth: root.width property real maxHeight: root.height - ShaderEffectSource{ + ShaderEffectSource { id: pictureSource sourceItem: picture hideSource: true } - Image{ + Image { id: picture source: "../images/smile.png" } - ShaderEffectSource{ + ShaderEffectSource { id: particleSource sourceItem: particle hideSource: true } - Image{ + Image { id: particle source: "../images/particle.png" } @@ -99,7 +99,8 @@ Rectangle{ gl_FragColor = texture2D(pictureTexture, fTex2) * texture2D(particleTexture, qt_TexCoord0).w * fFade; }" } - Emitter{ + + Emitter { id: emitter system: sys enabled: false @@ -107,9 +108,9 @@ Rectangle{ maximumEmitted: 1200 anchors.fill: parent size: 32 - speed: PointDirection{ xVariation: 12; yVariation: 12 } + speed: PointDirection { xVariation: 12; yVariation: 12 } } - MouseArea{ + MouseArea { anchors.fill: parent onClicked: emitter.burst(1200); } |