I found out that ParallelAnimation is not truly parallel, if I try to
animate to objects
moving next to one and other, like train wagons, I get overlaps.
I'm trying to coax it into behaving by having a tiny pause, but it does not
seem to help much
ParallelAnimation {
id: pushAnimHorizontal
NumberAnimation { target: piece.ball; property: "x"; to:
piece.ball.nX; duration: 170; easing.type: Easing.InOutQuad }
SequentialAnimation { // trickery to avoid overlap
PauseAnimation { duration: 30 }
NumberAnimation { target: player; property: "x"; to: player.nX;
duration: 170; easing.type: Easing.InOutQuad }
}
}
Even with above I get the occasional overlap.
I wonder what is the minimum duration in PauseAnimation on different
platforms?
I'm testing on Meego N9 right now.
Or is there a better way?
Thanks,
Harri
_______________________________________________
Qt-qml mailing list
Qt-...@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-qml
Probably easiest would be to have a single animation over a variable and
then tie piece.ball.x and player.x to that.
- Timo
Could you elaborate a bit? It is unclear to me how would I do that in
clean fashion.
Given that I have two (or more) distinct QML items, how do I tie a
single animation to those?
/Harri
Item {
property int animvar: 0
onAnimvarChanged: {
piece.ball.x = animvar
player.x = animvar
}
NumberAnimation on animvar {
from: 0
to: player.nX
}
}
- Timo
Hi,
I found out that ParallelAnimation is not truly parallel, if I try to
animate to objects
moving next to one and other, like train wagons, I get overlaps.
It's much more than 1-pixel, like tens of pixels. In some cases it looks like they are serialized.On 02/03/2012 08:12 PM, Adriano Rezende wrote:On Tue, Jan 24, 2012 at 9:21 AM, Harri Pasanen <ha...@mpaja.com> wrote:What could be happening is some kind of pixel adjustment during the animation. The x,y,width,height values are real numbers that are rounded to an int when mapping to the display, so 1-pixel shifts could happen due that fact.
But it is not consistent, happens only maybe 1/10 times. Looks like some display list order
is arbitrary.
Piece {
id: piece
...
states: State {
name: "moved";
PropertyChanges { target: piece; x: nX; y: nY; restoreEntryValues: false }
}
}
The if in javascript if I have Piece A and B and do
A.state = 'moved'
B.state = 'moved'
sometimes B moves before A.