summaryrefslogtreecommitdiffstats
path: root/examples/declarative/particles/Snow/Snow.qml
blob: 2d9ce46afeb5b4ba204aa4c55be69264c03ecabd (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
import QtQuick 2.0
import Qt.labs.particles 2.0

Rectangle{
    width: 360
    height: 540
    ParticleSystem{ id: particles }
    SpriteParticle{
        system: particles
        Sprite{
            name: "snow"
            source: "flake-01.png"
            frames: 51
            duration: 40
        }
    }
    Wander{ 
        system: particles
        anchors.fill: parent
        xVariance: 40;
        pace: 40;
    }
    TrailEmitter{
        system: particles
        particlesPerSecond: 20
        particleDuration: 7000
        emitting: true
        speed: PointVector{ y:80; yVariation: 40; }
        acceleration: PointVector{ y: 4 }
        particleSize: 20
        particleSizeVariation: 10
        width: parent.width
        height: 100
    }
}