Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

animation.Transformation infinite loop #421

Open
alan-oliv opened this issue Oct 5, 2022 · 0 comments
Open

animation.Transformation infinite loop #421

alan-oliv opened this issue Oct 5, 2022 · 0 comments

Comments

@alan-oliv
Copy link

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",
        )
      ],
    ),
  )
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant