From 75a33aceab62d12cf9bc9567676c118af631fd32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaj=20Gr=C3=B6nholm?= Date: Fri, 18 Aug 2023 10:37:46 +0300 Subject: Small improvements into Graph example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use FrameAnimation instead of Timer and double the amount of samples to make the example smoother. Pick-to: 6.6 Change-Id: I6f5bb1414fd7532e16aeb25f886879828ce29854 Reviewed-by: Laszlo Agocs Reviewed-by: Tomi Korpipää --- examples/quick/scenegraph/graph/main.qml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'examples/quick') diff --git a/examples/quick/scenegraph/graph/main.qml b/examples/quick/scenegraph/graph/main.qml index e9b684c3ba..5f2abbbd58 100644 --- a/examples/quick/scenegraph/graph/main.qml +++ b/examples/quick/scenegraph/graph/main.qml @@ -15,27 +15,23 @@ Item { anchors.margins: 100 function newSample(i) { - return (Math.sin(i / 100.0 * Math.PI * 2) + 1) * 0.4 + Math.random() * 0.05; + return (Math.sin(i / 200.0 * Math.PI * 2) + 1) * 0.4 + Math.random() * 0.05; } Component.onCompleted: { - for (var i=0; i<100; ++i) + for (var i=0; i