tests/auto/declarative/qmlvisual/qdeclarativeparticles/particles.qml
branchGCC_SURGE
changeset 31 5daf16870df6
parent 30 5dc02b23752f
equal deleted inserted replaced
27:93b982ccede2 31:5daf16870df6
       
     1 import Qt 4.7
       
     2 import Qt.labs.particles 1.0
       
     3 
       
     4 Rectangle {
       
     5     width: 640; height: 480; color: "black"
       
     6 
       
     7     Particles { id:particlesAnotEmitting
       
     8         y:60; width: 260; height:30; source: "star.png";
       
     9         lifeSpan:1000; count: 50; angle:70; angleDeviation:36;
       
    10         velocity:30; velocityDeviation:10; emissionRate: 0
       
    11         ParticleMotionWander { yvariance:5; xvariance:30; pace:100 }
       
    12     }
       
    13     Particles { id:particlesA
       
    14         y:0; width: 260; height:30; source: "star.png";
       
    15         lifeSpan:1000; count: 50; angle:70; angleDeviation:36;
       
    16         velocity:30; velocityDeviation:10; emissionRate: 10
       
    17         ParticleMotionWander { yvariance:5; xvariance:30; pace:100 }
       
    18     }
       
    19 
       
    20     Particles { id:particlesB
       
    21         y:280; x:180; width:1; height:1; lifeSpan:1000; source: "star.png"
       
    22         count: 100; angle:270; angleDeviation:45; velocity:50; velocityDeviation:30;
       
    23         emissionRate: 0
       
    24         ParticleMotionGravity { yattractor: 1000; xattractor:0; acceleration:25 }
       
    25     }
       
    26 
       
    27         Timer { running: true; interval: 1000; repeat: true; onTriggered: particlesB.burst(200, 2000); }
       
    28 
       
    29     Column{
       
    30         x: 340;
       
    31         Repeater{
       
    32             model: 5
       
    33             delegate: Component{
       
    34                 Item{
       
    35                     width: 100; height: 100
       
    36                     Rectangle{
       
    37                         color: "blue"
       
    38                         width: 2; height: 2;
       
    39                         x: 49; y:49;
       
    40                     }
       
    41                     Particles{
       
    42                         x: 50; y:50; width: 0; height: 0;
       
    43                         fadeInDuration: 0; fadeOutDuration: 0
       
    44                         lifeSpan: 1000; lifeSpanDeviation:0;
       
    45                         source: "star.png"
       
    46                         count: -1; emissionRate: 120;
       
    47                         emissionVariance: index/2;
       
    48                         velocity: 250; velocityDeviation: 0;
       
    49                         angle: 0; angleDeviation: 0;
       
    50                     }
       
    51                 }
       
    52             }
       
    53         }
       
    54     }
       
    55 }