aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks/auto/animations/comparison/moving-images-animations.qml
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/auto/animations/comparison/moving-images-animations.qml')
-rw-r--r--benchmarks/auto/animations/comparison/moving-images-animations.qml29
1 files changed, 29 insertions, 0 deletions
diff --git a/benchmarks/auto/animations/comparison/moving-images-animations.qml b/benchmarks/auto/animations/comparison/moving-images-animations.qml
new file mode 100644
index 0000000..88e1901
--- /dev/null
+++ b/benchmarks/auto/animations/comparison/moving-images-animations.qml
@@ -0,0 +1,29 @@
+import QtQuick 2.2
+
+Item {
+ id: root;
+
+ property int size: Math.sqrt(width * height / count);
+ property int count: 500
+ property int staticCount: 20000
+
+ Grid {
+ width: root.width
+ height: root.height
+ columns: Math.ceil(root.width / root.size);
+ rows: Math.ceil(root.height / root.size);
+ Repeater {
+ model: root.count
+ Image {
+ source: "../../../../shared/butterfly-wide.png"
+ sourceSize: Qt.size(root.size, root.size);
+ SequentialAnimation on rotation {
+ PauseAnimation { duration: 200 + Math.random() * 200 }
+ NumberAnimation { from: -10; to: 10; duration: 500; easing.type: Easing.InOutCubic }
+ NumberAnimation { from: 10; to: -10; duration: 500; easing.type: Easing.InOutCubic }
+ loops: Animation.Infinite
+ }
+ }
+ }
+ }
+}