/* SPDX-FileCopyrightText: 2013 Digia Plc and /or its subsidiary(-ies) This file is part of the examples of the Qt Toolkit. SPDX-License-Identifier: BSD-3-Clause */ import QtQuick 2.0 import QtQuick.Particles 2.0 Item { width: 360 height: 600 Image { source: "../images/backgroundLeaves.jpg" anchors.fill: parent } ParticleSystem { anchors.fill: parent Emitter { width: parent.width emitRate: 4 lifeSpan: 14000 size: 80 velocity: PointDirection { y: wallpaper.configuration.Speed } } Wander { anchors.fill: parent anchors.bottomMargin: 100 xVariance: 60 pace: 60 } //! [0] Affector { property real coefficient: 2.0 property real velocity: 1.5 width: parent.width height: parent.height - 100 onAffectParticles: { /* //Linear movement if (particle.r == 0) { particle.r = Math.random() > 0.5 ? -1 : 1; } else if (particle.r == 1) { particle.rotation += velocity * dt; if (particle.rotation >= maxAngle) particle.r = -1; } else if (particle.r == -1) { particle.rotation -= velocity * dt; if (particle.rotation <= -1 * maxAngle) particle.r = 1; } */ //Wobbly movement for (var i=0; i