b65686e59efea76f3a255b83a8278176170156f3
[profile/ivi/qtdeclarative.git] / examples / declarative / plasmapatrol / content / PlasmaPatrolParticles.qml
1 /****************************************************************************
2 **
3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: Nokia Corporation (qt-info@nokia.com)
6 **
7 ** This file is part of the QtDeclarative module of the Qt Toolkit.
8 **
9 ** $QT_BEGIN_LICENSE:LGPL$
10 ** No Commercial Usage
11 ** This file contains pre-release code and may not be distributed.
12 ** You may use this file in accordance with the terms and conditions
13 ** contained in the Technology Preview License Agreement accompanying
14 ** this package.
15 **
16 ** GNU Lesser General Public License Usage
17 ** Alternatively, this file may be used under the terms of the GNU Lesser
18 ** General Public License version 2.1 as published by the Free Software
19 ** Foundation and appearing in the file LICENSE.LGPL included in the
20 ** packaging of this file.  Please review the following information to
21 ** ensure the GNU Lesser General Public License version 2.1 requirements
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
23 **
24 ** In addition, as a special exception, Nokia gives you certain additional
25 ** rights.  These rights are described in the Nokia Qt LGPL Exception
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
27 **
28 ** If you have questions regarding the use of this file, please contact
29 ** Nokia at qt-info@nokia.com.
30 **
31 **
32 **
33 **
34 **
35 **
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 import QtQuick 2.0
42 import QtQuick.Particles 2.0
43
44 Item{
45     property ParticleSystem sys
46     ImageParticle{
47         system: sys
48         particles: ["default"]
49         source: "pics/blur-circle3.png"
50         color: "#003A3A3A"
51         colorVariation: 0.1
52         z: 0
53     }
54     ImageParticle{
55         system: sys
56         particles: ["redTeam"]
57         source: "pics/blur-circle3.png"
58         color: "#0028060A"
59         colorVariation: 0.1
60         z: 0
61     }
62     ImageParticle{
63         system: sys
64         particles: ["greenTeam"]
65         source: "pics/blur-circle3.png"
66         color: "#0006280A"
67         colorVariation: 0.1
68        z: 0
69     }
70     ImageParticle{
71         system: sys
72         particles: ["blaster"]
73         source: "pics/star2.png"
74         //color: "#0F282406"
75         color: "#0F484416"
76         colorVariation: 0.2
77         z: 2
78     }
79     ImageParticle{
80         system: sys
81         particles: ["laser"]
82         source: "pics/star3.png"
83         //color: "#00123F68"
84         color: "#00428FF8"
85         colorVariation: 0.2
86         z: 2
87     }
88     ImageParticle{
89         system: sys
90         particles: ["cannon"]
91         source: "pics/particle.png"
92         color: "#80FFAAFF"
93         colorVariation: 0.1
94         z: 2
95     }
96     ImageParticle{
97         system: sys
98         particles: ["cannonCore"]
99         source: "pics/particle.png"
100         color: "#00666666"
101         colorVariation: 0.8
102         z: 1
103     }
104     ImageParticle{
105         system: sys
106         particles: ["cannonWake"]
107         source: "pics/star.png"
108         color: "#00CCCCCC"
109         colorVariation: 0.2
110         z: 1
111     }
112     ImageParticle{
113         system: sys
114         particles: ["frigateShield"]
115         source: "pics/blur-circle2.png"
116         color: "#00000000"
117         colorVariation: 0.05
118         blueVariation: 0.5
119         greenVariation: 0.1
120         z: 3
121     }
122     ImageParticle{
123         system: sys
124         particles: ["cruiserArmor"]
125         z: 1
126         sprites:[Sprite{
127                 id: spinState
128                 name: "spinning"
129                 source: "pics/meteor.png"
130                 frames: 35
131                 duration: 40
132                 to: {"death":0, "spinning":1}
133             },Sprite{
134                 name: "death"
135                 source: "pics/meteor_explo.png"
136                 frames: 22
137                 duration: 40
138                 to: {"null":1}
139             }, Sprite{
140                 name: "null"
141                 source: "pics/nullRock.png"
142                 frames: 1
143                 duration: 1000
144             }
145         ]
146     }
147     FollowEmitter{
148         system: sys
149         particle: "cannonWake"
150         follow: "cannon"
151         emitRatePerParticle: 64
152         lifeSpan: 600
153         speed: AngledDirection{ angleVariation: 360; magnitude: 48}
154         size: 16
155         endSize: 8
156         sizeVariation: 2
157         emitting: true
158         width: 1000//XXX: Terrible hack
159         height: 1000
160     }
161     FollowEmitter{
162         system: sys
163         particle: "cannonCore"
164         follow: "cannon"
165         emitRatePerParticle: 256
166         lifeSpan: 128
167         size: 24
168         endSize: 8
169         emitting: true
170         width: 1000//XXX: Terrible hack
171         height: 1000
172     }
173 }