Last active
August 29, 2015 14:03
-
-
Save amclain/a3f293bd3daa5b104663 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Screensaver mode. | |
import QtQuick 2.2 | |
import QtQuick.Particles 2.0 | |
import QtQuick.Controls 1.2 | |
Rectangle { | |
id: root | |
width: 400 | |
height: 400 | |
color: "black" | |
MouseArea { | |
anchors.fill: parent | |
onClicked: mouseEmitter.burst(50) | |
} | |
ParticleSystem { | |
anchors.fill: parent | |
ImageParticle { | |
// http://i.imgur.com/WNdEXVV.png | |
source: "jag.png" | |
rotationVelocityVariation: 2 | |
// colorVariation: 0.2 | |
colorVariation: 0.4 | |
} | |
Emitter { | |
id: emitter | |
width: parent.width | |
height: 30 | |
anchors.bottom: parent.bottom | |
anchors.horizontalCenter: parent.horizontalCenter | |
emitRate: 2 | |
// lifeSpan: 12000 | |
lifeSpan: 18000 | |
// lifeSpanVariation: 2000 | |
lifeSpanVariation: 5000 | |
size: 100 | |
endSize: 0 | |
sizeVariation: 50 | |
velocity: TargetDirection { | |
targetY: root.height * -1 | |
// magnitude: 10 | |
// magnitudeVariation: 5 | |
magnitude: 20 | |
magnitudeVariation: 10 | |
} | |
} | |
Emitter { | |
id: mouseEmitter | |
anchors.fill: parent | |
emitRate: 0 | |
// lifeSpan: 12000 | |
lifeSpan: 18000 | |
// lifeSpanVariation: 2000 | |
lifeSpanVariation: 5000 | |
size: 100 | |
endSize: 0 | |
sizeVariation: 50 | |
velocity: TargetDirection { | |
targetY: root.height * -1 | |
// magnitude: 10 | |
// magnitudeVariation: 5 | |
magnitude: 40 | |
magnitudeVariation: 20 | |
} | |
} | |
Gravity { | |
angle: -90 | |
magnitude: 5 | |
} | |
Turbulence { | |
width: parent.width | |
height: parent.height | |
strength: 3 | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment