summaryrefslogtreecommitdiffstats
path: root/examples/declarative/particles/AllSmiles/SpriteParticles.qml
blob: dcb71c24a8d5556356916a8880ece808b8d077b7 (plain)
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
import QtQuick 2.0
import Qt.labs.particles 2.0

Rectangle{
    color: "goldenrod"
    width: 400
    height: 400
    ColoredParticle{
        id: test
        particles: ["Test"]
        image: "particle.png"
        system: sys
        z: 2
        anchors.fill: parent
        color: "lightsteelblue"
        colorVariation: 0.0
        additive: 0.6
    }
    SpriteParticle{
        id: single
        particles: ["Face"]
        system: sys
        z: 2
        anchors.fill: parent
        Sprite{
            source: "squarefacesprite.png"
            frames: 6
            duration: 120
        }
    }
    Mask{
        id: mask
        source: "smileMask.png"
    }
    TrailEmitter{
        system: sys
        particle: "Test"
        anchors.fill: parent
        id: particles2
        particlesPerSecond: 6000
        particleDuration: 720
        emitting: true
        particleSize: 10
        shape: mask
    }
    TrailEmitter{
        system: sys
        particle: "Face"
        anchors.fill: parent
        id: particles
        particlesPerSecond: 60
        particleDuration: 1440
        emitting: true
        speed: PointVector{xVariation: 10; yVariation: 10;}
        particleSize: 30
        particleSizeVariation: 10
        shape: mask
    }
    ParticleSystem{
        id: sys
        anchors.fill: parent
    }

}