Get Custom particle example rotating again
authorAlan Alpert <alan.alpert@nokia.com>
Thu, 11 Aug 2011 10:01:09 +0000 (20:01 +1000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 15 Aug 2011 04:48:25 +0000 (06:48 +0200)
Change-Id: I9045f9b76f7c681cf828aa60659abb4c6b521e11
Reviewed-on: http://codereview.qt.nokia.com/2856
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>

examples/declarative/particles/custom/custom.qml

index 3938705..7a6b51d 100644 (file)
@@ -37,10 +37,10 @@ ParticleSystem{
             var theta = Math.floor(Math.random() * 6.0) / 6.0;
             theta *= 2.0*Math.PI;
             theta += sys.convert(sys.petalRotation);
-            particle.sx = petalLength * Math.cos(theta);
-            particle.sy = petalLength * Math.sin(theta);
-            particle.ax = particle.sx * -0.5;
-            particle.ay = particle.sy * -0.5;
+            particle.vx = petalLength * Math.cos(theta);
+            particle.vy = petalLength * Math.sin(theta);
+            particle.ax = particle.vx * -0.5;
+            particle.ay = particle.vy * -0.5;
         }
     }
     CustomParticle{