[Interest] how to caculate the qml animation frames

Nancy Zou Nancy.Zou at csr.com
Fri Apr 24 09:30:29 CEST 2015


Hi all

I write a simple qml animation to run on platform wayland. The duration is 100ms.

First, the animation run 8 frames and animation is smooth.
Then I do a little optimization in Weston. The animation run 11 frames and blocked. The shift is 42 when blocked.
I feel very strange. Why the frame number is different between two times? How to calculate the frame in one animation?

Qml case:

import QtQuick 2.0

Rectangle {
id: root
width: 600
height: 600
color: "blue"
Rectangle {
   X: 20+shift
}
Rectangle {
   X: 140-shift
}
property real shift: 0
         SequentialAnimation on shift {
                     NumberAnimation {to: 120; duration: 100; easing.type: Easing.InOutSine }
                      NumberAnimation {to: 0; duration: 100; easing.type: Easing.InOutSine }
                            loops: 1
                            }
         Text {
        text: "shift: " + shift
    }


}


Best Regards
Nancy



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Keep up to date with CSR on our technical blog, www.csr.com/blog, CSR people blog, www.csr.com/people, YouTube, www.youtube.com/user/CSRplc, Facebook, www.facebook.com/pages/CSR/191038434253534, or follow us on Twitter at www.twitter.com/CSR_plc.
You can now access the wide range of products powered by aptX at www.aptx.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150424/ff6389bb/attachment.html>


More information about the Interest mailing list