diff options
Diffstat (limited to 'benchmarks/auto/animations/comparison/moving-images-animators.qml')
-rw-r--r-- | benchmarks/auto/animations/comparison/moving-images-animators.qml | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/benchmarks/auto/animations/comparison/moving-images-animators.qml b/benchmarks/auto/animations/comparison/moving-images-animators.qml index 95cb4a3..c7e267e 100644 --- a/benchmarks/auto/animations/comparison/moving-images-animators.qml +++ b/benchmarks/auto/animations/comparison/moving-images-animators.qml @@ -1,28 +1,25 @@ import QtQuick 2.2 +import QmlBench 1.0 -Item { +Benchmark { id: root; - property int size: Math.sqrt(width * height / count); - property int count: 500 - property int staticCount: 20000 + count: 500 + 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 } - RotationAnimator { from: -10; to: 10; duration: 500; easing.type: Easing.InOutCubic } - RotationAnimator { from: 10; to: -10; duration: 500; easing.type: Easing.InOutCubic } - loops: Animation.Infinite - } + Repeater { + model: root.count + Image { + source: "../../../../shared/butterfly-wide.png" + x: Math.random() * (root.width - width) + y: Math.random() * (root.height - height) + width: 40 + height: 40 + + SequentialAnimation on rotation { + RotationAnimator { from: -10; to: 10; duration: 500; easing.type: Easing.InOutCubic } + RotationAnimator { from: 10; to: -10; duration: 500; easing.type: Easing.InOutCubic } + loops: Animation.Infinite } } } |