Nebula Effect: Difference between revisions
Jump to navigation
Jump to search
AutoSpider (talk | contribs) (Convert ExpressionEngine links) |
Henri Vikki (talk | contribs) (YouTube link fixed) |
||
Line 79: | Line 79: | ||
</code> | </code> | ||
[ | [https://www.youtube.com/watch?v=ALL5KV5u5U4 YouTube Video] |
Revision as of 12:58, 20 March 2015
This article may require cleanup to meet the Qt Wiki's quality standards. Reason: Auto-imported from ExpressionEngine. Please improve this article if you can. Remove the {{cleanup}} tag and add this page to Updated pages list after it's clean. |
Ported from this example in HTML5 example, Source code
import QtQuick 1.1
Rectangle {
width: 570
height: 570
color: "black"
Repeater {
id: repeater
model: 8
Rectangle {
id: rect
visible: false
color: "transparent"
clip: true
width: 285; height: 285
x: parent.width / 2 - width / 2
y: parent.height / 2 - height / 2
Timer {
id: timer
interval: 500 * index
running: true
repeat: false
onTriggered: {
rect.visible = true
animation.running = true
}
}
Image {
source: "nebula.jpg"
smooth: true
x: –1 * (Math.random() * 285) >> 0
y: –1 * (Math.random() * 285) >> 0
}
ParallelAnimation {
id: animation
running: false
loops: Animation.Infinite
SequentialAnimation {
NumberAnimation {
target: rect
property: "opacity"
from: .0; to: 1.0
duration: 3000
}
NumberAnimation {
target: rect
property: "opacity"
from: 1.0; to: .0
duration: 500
}
}
NumberAnimation {
target: rect
property: "scale"
from: 2.0; to: 4.0
duration: 4000
}
}
}
}
}