-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathFirework.qml
More file actions
112 lines (97 loc) · 1.89 KB
/
Firework.qml
File metadata and controls
112 lines (97 loc) · 1.89 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import QtQuick 2.1
import qb.components 1.0
import QtQuick.Particles 2.1
Item {
id: fireworks
Rectangle {
id: root
//width: isNxt? 1024 : 800
//height: isNxt? 600 : 480
width: 1024
height: 600
color: "transparent"
ParticleSystem {
id: particlesSystem
}
ImageParticle {
source: "particle.png"
system: particlesSystem
color: "red"
groups: ["A"]
}
ImageParticle {
source: "smoke_particle.png"
system: particlesSystem
groups: ["B"]
color: "white"
}
ImageParticle {
source: "smoke_particle.png"
system: particlesSystem
groups: ["C"]
color: "red"
colorVariation: 1.2
}
Emitter {
id: fireWorkEmitter
system: particlesSystem
enabled: true
lifeSpan: 1600
maximumEmitted: 5
group: "A"
anchors{
left: parent.left
right: parent.right
bottom: parent.bottom
}
velocity: AngleDirection {
angle: 270
angleVariation: 10
magnitude: 200
}
GroupGoal {
groups: ["A"]
goalState: "exploding"
system: particlesSystem
y: - root.height / 2
width: parent.width
height: 20
jump: true
}
}
TrailEmitter {
system: particlesSystem
group: "B"
follow: "A"
size: 12
emitRatePerParticle: 80
velocity: PointDirection {yVariation: 10; xVariation: 10}
acceleration: PointDirection {y: 10}
}
ParticleGroup {
name: "exploding"
duration: 500
system: particlesSystem
TrailEmitter {
group: "C"
enabled: true
anchors.fill: parent
lifeSpan: 1700
emitRatePerParticle: 350
size: 12
velocity: AngleDirection {angleVariation: 360; magnitude: 100}
acceleration: PointDirection {y: 20}
}
}
}//rectangle
Timer {
interval: 2500
running: true
repeat: true
onTriggered: {
if (animationscreen.animationRunning==false) {
fireworks.destroy();
}
}
}
}//screen