blob: 6e5f280b13f0c569d016feffcab58b1145166c5f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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: "../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
}
}
}
}
}
|