diff options
Diffstat (limited to 'benchmarks/auto/animations/comparison/moving-images-script.qml')
-rw-r--r-- | benchmarks/auto/animations/comparison/moving-images-script.qml | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/benchmarks/auto/animations/comparison/moving-images-script.qml b/benchmarks/auto/animations/comparison/moving-images-script.qml new file mode 100644 index 0000000..37b88f1 --- /dev/null +++ b/benchmarks/auto/animations/comparison/moving-images-script.qml @@ -0,0 +1,33 @@ +import QtQuick 2.2 + +Item { + id: root; + + property int size: Math.sqrt(width * height / count); + property string description: count + " " + size + "x" + size + " Image instances\nAnimation with JavaScript"; + 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); + + property real t; + rotation: 10 * Math.sin(t * Math.PI * 2 + Math.PI); + + SequentialAnimation on t { + PauseAnimation { duration: 200 + Math.random() * 200 } + NumberAnimation { from: 0; to: 1; duration: 1000; } + loops: Animation.Infinite + } + } + } + } +} |