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

Timeline Animations #416

Merged
merged 43 commits into from
Sep 25, 2022
Merged

Timeline Animations #416

merged 43 commits into from
Sep 25, 2022

Conversation

davesmith00000
Copy link
Member

No description provided.

@davesmith00000 davesmith00000 self-assigned this Sep 18, 2022
@davesmith00000
Copy link
Member Author

I threw together a mock DSL yesterday to see how this could be presented to the user:

image

...but it has lots of problems. Not least that you can't describe parallel vs sequential operations. Some suggestions/feedback I got back included:

  1. Use of and and then to describe parallel and sequential respectively.
  2. Possibility of merging timelines.

To help work through this, I thought I might try looking at the following made up use cases:

  1. delay start, fade logo in, pause, fade logo out, pause, emit event. (One property, sequential change.)
  2. Same as above, but move from left to right continuously through out (Parallel animation of same entity, different property. Overlapping times)
  3. Same as above, but during pause, ease-in-out the scale (Parallel animation during one segment.)

@davesmith00000
Copy link
Member Author

animated-crate

Gif quality is a bit poor but here is the latest animation. Appear after 2 seconds (gif may be clipped), move from Point(0, 0) to Point(100, 100), then to Point(100, 0) using ease-in-out for both journeys.

@davesmith00000
Copy link
Member Author

animated-crate.webm

WebM version.

@davesmith00000
Copy link
Member Author

davesmith00000 commented Sep 21, 2022

At this point, an animation is a SignalFunction, and this will be expensive for big animations:

  val modifier: Graphic[Material.Bitmap] => SignalFunction[Seconds, Graphic[Material.Bitmap]] =
    SF.easeInOut(5.seconds) >>> SF.lerp(Point(0), Point(100)) >>> move(_)

@davesmith00000
Copy link
Member Author

davesmith00000 commented Sep 23, 2022

Things left to do:

  • More helper methods
  • Tests
  • Clips
  • Sprites
  • Review naming?
  • Emit events This already works, added a test to show how it's done.

...then we're done enough for a first edition I think.

@davesmith00000 davesmith00000 marked this pull request as ready for review September 24, 2022 20:39
@davesmith00000 davesmith00000 requested a review from a team September 24, 2022 20:39
@davesmith00000 davesmith00000 merged commit 539ba9e into main Sep 25, 2022
@davesmith00000 davesmith00000 deleted the timeline-animation branch September 25, 2022 07:33
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

Successfully merging this pull request may close these issues.

1 participant