1
// This file is part of QtUbuntu, a set of Qt components for Ubuntu.
2
// Copyright © 2013 Canonical Ltd.
4
// This program is free software: you can redistribute it and/or modify it under
5
// the terms of the GNU General Public License version 3, as published by the
6
// Free Software Foundation.
8
// This program is distributed in the hope that it will be useful, but WITHOUT
9
// ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10
// SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
// General Public License for more details.
13
// You should have received a copy of the GNU General Public License along with
14
// this program. If not, see <http://www.gnu.org/licenses/>.
21
// Hard-coded Samsung Galaxy Nexus screen size.
27
function lerp(x, a, b) {
28
return ((1.0 - x) * a) + (x * b);
39
SequentialAnimation on y {
40
loops: Animation.Infinite
42
from: 0.0; to: surface.height - logo.height
43
duration: Math.floor(lerp(Math.random(surface.seed), 2250.0, 2750.0))
44
easing.type: Easing.InOutSine;
47
to: 0.0; from: surface.height - logo.height
48
duration: Math.floor(lerp(Math.random(surface.seed), 2250.0, 2750.0))
49
easing.type: Easing.InOutSine;
53
SequentialAnimation on x {
54
loops: Animation.Infinite
56
from: 0.0; to: surface.width - logo.width
57
duration: Math.floor(lerp(Math.random(surface.seed), 1750.0, 2250.0))
58
easing.type: Easing.InOutSine;
61
to: 0.0; from: surface.width - logo.width
62
duration: Math.floor(lerp(Math.random(surface.seed), 1750.0, 2250.0))
63
easing.type: Easing.InOutSine;
69
Component.onCompleted: {
71
surface.seed = d.getSeconds();