2019-07-05 16:58:46 +01:00
|
|
|
/**
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-FileCopyrightText: 2019 Aleix Pol Gonzalez <aleixpol@kde.org>
|
2019-07-05 16:58:46 +01:00
|
|
|
*
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
2019-07-05 16:58:46 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
import QtQuick 2.5
|
|
|
|
import QtQuick.Window 2.5
|
|
|
|
import QtQuick.Particles 2.0
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: root
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
property real xPos: 0.5
|
|
|
|
property real yPos: 0.5
|
|
|
|
|
2019-07-21 09:53:40 +01:00
|
|
|
property real devicePixelRatio: Window.window != null && Window.window.screen != null ? Window.window.screen.devicePixelRatio : 1.0
|
|
|
|
|
2019-07-05 16:58:46 +01:00
|
|
|
ParticleSystem {
|
|
|
|
id: particles
|
|
|
|
width: parent.width/20
|
|
|
|
height: width
|
|
|
|
|
|
|
|
x: root.width * root.xPos - width/2
|
|
|
|
y: root.height * root.yPos - height/2
|
|
|
|
|
|
|
|
ImageParticle {
|
2019-07-20 09:06:26 +01:00
|
|
|
groups: ["center"]
|
|
|
|
anchors.fill: parent
|
|
|
|
source: "qrc:///particleresources/glowdot.png"
|
|
|
|
colorVariation: 0.1
|
|
|
|
color: "#FF9999FF"
|
|
|
|
}
|
|
|
|
ImageParticle {
|
|
|
|
groups: ["edge"]
|
2019-07-05 16:58:46 +01:00
|
|
|
anchors.fill: parent
|
|
|
|
source: "qrc:///particleresources/glowdot.png"
|
|
|
|
colorVariation: 0.1
|
|
|
|
color: "#000099FF"
|
|
|
|
}
|
|
|
|
|
|
|
|
Emitter {
|
|
|
|
anchors.fill: parent
|
|
|
|
group: "center"
|
2019-07-20 09:06:26 +01:00
|
|
|
emitRate: 900
|
2019-07-05 16:58:46 +01:00
|
|
|
lifeSpan: 200
|
2019-07-21 09:53:40 +01:00
|
|
|
size: 20 * devicePixelRatio
|
2019-07-05 16:58:46 +01:00
|
|
|
sizeVariation: 2
|
|
|
|
endSize: 0
|
|
|
|
//! [0]
|
|
|
|
shape: EllipseShape {fill: false}
|
|
|
|
velocity: TargetDirection {
|
|
|
|
targetX: particles.width/2
|
|
|
|
targetY: particles.height/2
|
|
|
|
proportionalMagnitude: true
|
|
|
|
magnitude: 0.5
|
|
|
|
}
|
|
|
|
//! [0]
|
|
|
|
}
|
|
|
|
|
|
|
|
Emitter {
|
|
|
|
anchors.fill: parent
|
|
|
|
group: "edge"
|
|
|
|
startTime: 200
|
2019-07-20 09:06:26 +01:00
|
|
|
emitRate: 2000
|
2019-07-05 16:58:46 +01:00
|
|
|
lifeSpan: 20
|
2019-07-21 09:53:40 +01:00
|
|
|
size: 28 * devicePixelRatio
|
|
|
|
sizeVariation: 2 * devicePixelRatio
|
|
|
|
endSize: 16 * devicePixelRatio
|
2019-07-05 16:58:46 +01:00
|
|
|
shape: EllipseShape {fill: false}
|
|
|
|
velocity: TargetDirection {
|
|
|
|
targetX: particles.width/2
|
|
|
|
targetY: particles.height/2
|
|
|
|
proportionalMagnitude: true
|
|
|
|
magnitude: 0.1
|
|
|
|
magnitudeVariation: 0.1
|
|
|
|
}
|
|
|
|
acceleration: TargetDirection {
|
2019-07-20 09:06:26 +01:00
|
|
|
targetX: particles.width
|
|
|
|
targetY: particles.height
|
2019-07-05 16:58:46 +01:00
|
|
|
targetVariation: 200
|
|
|
|
proportionalMagnitude: true
|
|
|
|
magnitude: 0.1
|
|
|
|
magnitudeVariation: 0.1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|