Skip to content

Animation API for application code#2757

Merged
hecrj merged 10 commits intomasterfrom
feature/animation-api
Jan 28, 2025
Merged

Animation API for application code#2757
hecrj merged 10 commits intomasterfrom
feature/animation-api

Conversation

@hecrj
Copy link
Member

@hecrj hecrj commented Jan 27, 2025

This PR introduces a new animation module built on top of lilt.

The animation module exposes an Animation type that wraps some state and can be used to trigger an animation when this state changes; as well as cancel it.

When combined together with a window::frames subscription, it can be effectively used to animate smoothly at maximum framerate!

As usual, I have created a new example to showcase this feature. The new gallery example lazily loads the most popular images of Civitai and displays them in a grid:

gallery_small.mp4

@hecrj hecrj added this to the 0.14 milestone Jan 27, 2025
@hecrj hecrj force-pushed the feature/animation-api branch from b8f9b8b to 3cc3594 Compare January 27, 2025 04:25
@hecrj hecrj force-pushed the feature/animation-api branch from 3cc3594 to 8fd87f9 Compare January 27, 2025 04:32
@JL710
Copy link
Contributor

JL710 commented Jan 27, 2025

The gallery example looks very nice!

@wiiznokes
Copy link
Contributor

This is so cool. Will animation for default widgets be in another PR ? Any ETA ?

@git-f0x
Copy link

git-f0x commented Jan 27, 2025

Maybe #2483 could be rebased after this and pushed up to 0.14?

@iamkartiknayak
Copy link

The last animation, opening the image was crazy 🔥

@hecrj hecrj merged commit 00a0486 into master Jan 28, 2025
30 checks passed
@hecrj hecrj deleted the feature/animation-api branch January 28, 2025 02:47
@hecrj hecrj mentioned this pull request Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Comments