From 4fd12eef18204920b0974e7252eb6d97c4f1d485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaj=20Gr=C3=B6nholm?= Date: Wed, 4 Nov 2020 15:43:18 +0200 Subject: Fix CustomAffector example Don't use particle.r which doesn't exist since the CustomParticle removal. Make example a bit simpler without this. Task-number: QTBUG-88173 Change-Id: Id994a9a58796e8194fdccd63c6439d4c19681a45 Reviewed-by: Laszlo Agocs --- .../particles/affectors/content/customaffector.qml | 25 ++-------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'examples') diff --git a/examples/quick/particles/affectors/content/customaffector.qml b/examples/quick/particles/affectors/content/customaffector.qml index 6fabfb3ab2..76fc4dc302 100644 --- a/examples/quick/particles/affectors/content/customaffector.qml +++ b/examples/quick/particles/affectors/content/customaffector.qml @@ -77,35 +77,14 @@ Item { //! [0] Affector { - property real coefficient: 0.1 - property real velocity: 1.5 width: parent.width height: parent.height - 100 onAffectParticles: (particles, dt) => { - /* //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