diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2012-01-18 11:48:30 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-27 06:17:54 +0100 |
commit | 7c9f6b7b8f2a1959ded34215d09e5a2e3dbaf0b7 (patch) | |
tree | 9efeb0d32df9742e77aeee71798d41388dfda498 /examples | |
parent | 335aa328622523c17b36e676cb1aa37283ce8fda (diff) |
Implement randomStart for sprites
Most useful in the particle system, so that sprites aren't temporally
aligned at the start (ruining the random look).
Change-Id: I1cbf6c2187e412fcb8b31cab0d87bcde275c9281
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/declarative/particles/affectors/spritegoal.qml | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/declarative/particles/affectors/spritegoal.qml b/examples/declarative/particles/affectors/spritegoal.qml index 1e14e0bb27..ac4f3c757a 100644 --- a/examples/declarative/particles/affectors/spritegoal.qml +++ b/examples/declarative/particles/affectors/spritegoal.qml @@ -38,9 +38,8 @@ ** ****************************************************************************/ -import QtQuick.Particles 2.0 -import QtQuick.Particles 2.0 as Qlp import QtQuick 2.0 +import QtQuick.Particles 2.0 Item { id: root @@ -108,14 +107,13 @@ Item { source: "../images/meteor.png" frames: 35 duration: 40 - speedModifiesDuration: -0.1 + randomStart: true to: {"explode":0, "spinning":1} },Sprite { name: "explode" source: "../images/_explo.png" frames: 22 duration: 40 - speedModifiesDuration: -0.1 to: {"nullFrame":1} },Sprite {//Not sure if this is needed, but seemed easiest name: "nullFrame" |