diff options
Diffstat (limited to 'examples/declarative/particles/modelparticles/stream.qml')
-rw-r--r-- | examples/declarative/particles/modelparticles/stream.qml | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/examples/declarative/particles/modelparticles/stream.qml b/examples/declarative/particles/modelparticles/stream.qml index 0ad807bc7b..73107ad4f7 100644 --- a/examples/declarative/particles/modelparticles/stream.qml +++ b/examples/declarative/particles/modelparticles/stream.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.0 -import Qt.labs.particles 2.0 +import QtQuick.Particles 2.0 import "content/script.js" as Script import "content" @@ -68,13 +68,13 @@ Item{ overwrite: false startTime: 12000//Doesn't actually work with the loading time though... } - TrailEmitter{ + Emitter{ id: emitter system: sys height: parent.height - 132/2 x: -132/2 y: 132/2 - speed: PointVector{ x: 32; xVariation: 8 } + speed: PointDirection{ x: 32; xVariation: 8 } particlesPerSecond: 0.5 particleDuration: 120000 //TODO: A -1 or something which does 'infinite'? (but need disable fade first) particle: "photos" @@ -85,7 +85,7 @@ Item{ height: parent.height width: 1000 } - ColoredParticle{ + ImageParticle{ system: sys particles: ["fireworks"] image: "../trails/content/star.png" @@ -125,7 +125,7 @@ Item{ } property Item alertItem; function alert(){ - resetter.active = false + //resetter.active = false force.active = true; alertItem = alertDelegate.createObject(root); alertItem.x = root.width/2 - alertItem.width/2 @@ -142,31 +142,27 @@ Item{ interval: 800 onTriggered: { force.active = false - resetter.active = true; + //resetter.active = true; mp.take(alertItem, true); centerEmitter.burst(1); } } - Attractor{ + PointAttractor{ id: force system: sys x: root.width/2 y: root.height/2 - strength: -30000 + strength: -10000 active: false anchors.centerIn: parent width: parent.width/2 height: parent.height/2 particles:["photos"] + physics: PointAttractor.Position } - Reset{ - id: resetter - system: sys - particles:["photos"] - } - TrailEmitter{ + Emitter{ id: centerEmitter - speed: PointVector{ x: 32; xVariation: 8;} + speed: PointDirection{ x: 32; xVariation: 8;} particlesPerSecond: 0.5 particleDuration: 12000 //TODO: A -1 or something which does 'infinite'? (but need disable fade first) maxParticles: 20 @@ -177,7 +173,7 @@ Item{ //TODO: Zoom in effect } - TrailEmitter{ + Emitter{ id: spawnFireworks particle: "fireworks" system: sys @@ -191,8 +187,8 @@ Item{ emitting: false particleSize: 32 particleEndSize: 8 - speed: AngleVector{ magnitude: 160; magnitudeVariation: 120; angleVariation: 90; angle: 270 } - acceleration: PointVector{ y: 160 } + speed: AngledDirection{ magnitude: 160; magnitudeVariation: 120; angleVariation: 90; angle: 270 } + acceleration: PointDirection{ y: 160 } } Item{ x: -1000; y: -1000 //offscreen Repeater{//Load them here, add to system on completed |