-
Notifications
You must be signed in to change notification settings - Fork 364
/
HollowHeart.qml
43 lines (38 loc) · 1 KB
/
HollowHeart.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import QtQuick 2.12
import QtQuick.Particles 2.12
Item {
id: control
ParticleSystem {
id: sys
width: 300
height: 300
anchors.centerIn: parent
ImageParticle {
anchors.fill: parent
system: sys
source: "qrc:/heart_1.png"
color: Qt.rgba(0,0.5,0,0.8)
//colorVariation: 0.5 //彩色效果
}
Emitter {
id: emitter
anchors.fill: parent
system: sys
//maximumEmitted: 500
emitRate: 100 //发射速率
lifeSpan: 2500 //生存周期ms
size: 25 //尺寸
endSize: 40 //最终尺寸
sizeVariation: 5
// 移动效果
acceleration: AngleDirection{
magnitude: 10
angleVariation: 360
}
// mask只能用source
shape: MaskShape {
source: "qrc:/heart_2.png" //空心
}
}
}
}