aboutsummaryrefslogtreecommitdiffstats
path: root/examples/particles/customparticle
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2012-06-25 12:01:46 +1000
committerQt by Nokia <qt-info@nokia.com>2012-06-29 02:21:36 +0200
commit5df94d89033e7bbb3f41840a4c07a628ed66b4d5 (patch)
treee42bcd16d8f5f3a192c48794b610ffeb05b9dc02 /examples/particles/customparticle
parent2241d6fa2d39fe890ba0d17ff58b5e0615c1cd7b (diff)
Rename speed -> velocity in the particle system
Matches the convention set in the QtQuick module, for example by ListView and Flickable. Change-Id: I8df57ed1ced8128723d790c30c00cc1b2062787d Reviewed-by: Bea Lam <bea.lam@nokia.com>
Diffstat (limited to 'examples/particles/customparticle')
-rw-r--r--examples/particles/customparticle/blurparticles.qml2
-rw-r--r--examples/particles/customparticle/fragmentshader.qml4
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/particles/customparticle/blurparticles.qml b/examples/particles/customparticle/blurparticles.qml
index 3d72425655..9b432e093d 100644
--- a/examples/particles/customparticle/blurparticles.qml
+++ b/examples/particles/customparticle/blurparticles.qml
@@ -53,7 +53,7 @@ Rectangle {
height: parent.height
emitRate: 1
lifeSpan: 12000
- speed: PointDirection {x:20;}
+ velocity: PointDirection {x:20;}
size: 128
}
ShaderEffectSource {
diff --git a/examples/particles/customparticle/fragmentshader.qml b/examples/particles/customparticle/fragmentshader.qml
index 34acb1bd7c..367cc99b7b 100644
--- a/examples/particles/customparticle/fragmentshader.qml
+++ b/examples/particles/customparticle/fragmentshader.qml
@@ -63,7 +63,7 @@ ParticleSystem {
lifeSpan: 8000
size: 24
sizeVariation: 16
- speed: PointDirection {x: root.width/10; y: root.height/10;}
+ velocity: 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}
}
@@ -88,7 +88,7 @@ ParticleSystem {
highp vec2 pos = qt_ParticlePos
- currentSize / 2. + currentSize * qt_ParticleTex // adjust size
- + qt_ParticleVec.xy * t * qt_ParticleData.y // apply speed vector..
+ + qt_ParticleVec.xy * t * qt_ParticleData.y // apply velocity vector..
+ 0.5 * qt_ParticleVec.zw * pow(t * qt_ParticleData.y, 2.);
gl_Position = qt_Matrix * vec4(pos.x, pos.y, 0, 1);