animation.Transformation infinite loop
alan-oliv opened this issue · 0 comments
alan-oliv commented
Expected behavior
When using animation.Transformation
fill_mode forwards
, it should control which transforms will be applied to the child widget after the animation finishes: A value of forwards should retain the transforms of the last keyframe.
Current behavior
animation.Transformation
using an array of Keyframes
causes an infinite animation loop, which blocks building a functional animated widget
How to reproduce
def main():
return render.Root(
child = render.Box(
animation.Transformation(
child = render.Image(MAIN_ICON),
duration = 30,
delay = 0,
origin = animation.Origin(0.5, 0.5),
direction = "normal",
fill_mode = "forwards",
keyframes = [
animation.Keyframe(
percentage = 0.0,
transforms = [animation.Translate(21, 5), animation.Rotate(0)],
curve = "ease_in_out",
),
animation.Keyframe(
percentage = 1.0,
transforms = [animation.Translate(0, 5), animation.Rotate(360)],
curve = "ease_in_out",
)
],
),
)
)