Infinite animations, where "from" and "to" are set based on chaning values
-
Hey,
I am atempting to animated the BusyIndicator of the material design like here: https://material-design.storage.googleapis.com/publish/material_v_4/material_ext_publish/0B6Okdz75tqQsemFpeElQMFBSMG8/061101_Circular_Sheet_xhdpi_004.webm
For this I need want to animate the "start" end "end" Angles of a circle arc. The animation should be like this (in a sequential animation):
- Animate the start angle from its current value to
endAngle+2*M.PI - offset
- Animate the end angle form its current value to
startAngle
- Loop
So I am doing this (arc is the object drawing the circle arc on a canvas):
SequentialAnimation { running: control.visible == true loops: Animation.Infinite RotationAnimation { target: arc property: "startAngle_" from: arc.startAngle_ to: arc.endAngle_ + 2*Math.PI * 7.0/8.0 duration: 5000 easing.type: Easing.InOutQuad } RotationAnimation { target: arc property: "endAngle_" from: arc.endAngle_ to: arc.startAngle_ duration: 5000 easing.type: Easing.InOutQuad } } }
Now it seems that the "to" and "from" values are taking from the moment the outer SequentialAnimation starts, not the moment the individual animation starts.
How can I change this?
Or, can I define an animation that animates to a value relative the current value at the moment the animation starts?Thanks!
Nathan - Animate the start angle from its current value to