mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-01 08:52:45 +00:00
QtQuick background test
This commit is contained in:
parent
8552e08a12
commit
4453492204
6 changed files with 74 additions and 3 deletions
36
qtquick/qml/components/Background.qml
Normal file
36
qtquick/qml/components/Background.qml
Normal file
|
@ -0,0 +1,36 @@
|
|||
import QtQuick 2.12
|
||||
import QtQuick.Particles 2.12
|
||||
|
||||
Rectangle {
|
||||
color: "black"
|
||||
|
||||
ParticleSystem {
|
||||
id: particleSystem
|
||||
}
|
||||
|
||||
Emitter {
|
||||
id: emitter
|
||||
anchors.fill: parent
|
||||
system: particleSystem
|
||||
emitRate: width * height / (lifeSpan * 100)
|
||||
lifeSpan: 10000
|
||||
lifeSpanVariation: 500
|
||||
size: 16
|
||||
endSize: 64
|
||||
}
|
||||
|
||||
Wander {
|
||||
anchors.fill: parent
|
||||
system: particleSystem
|
||||
pace: 100
|
||||
affectedParameter: Wander.Velocity
|
||||
xVariance: 300
|
||||
yVariance: 300
|
||||
}
|
||||
|
||||
|
||||
ImageParticle {
|
||||
source: "/assets/img/particle.png"
|
||||
system: particleSystem
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue