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

Keyframe Animations #563

Merged
merged 16 commits into from
Sep 5, 2024
Merged

Keyframe Animations #563

merged 16 commits into from
Sep 5, 2024

Conversation

jrmoulton
Copy link
Collaborator

No description provided.

@jrmoulton
Copy link
Collaborator Author

jrmoulton commented Aug 29, 2024

This still needs to figure out how to control an animation. Start/stop/pause/resume

Resolved

@jrmoulton
Copy link
Collaborator Author

jrmoulton commented Aug 30, 2024

There are still some open questions in this API.

One of the biggest things is that you can't animate between pixel values and percent. I have some ideas on how to solve that but each has problems.

Another is a question of how should stacked animations interact. Currently they don't work well together if multiple animations have the same props. But I'm not sure if the correct behavior would be to interpolate between stacked animations?
The current implementation matches the web

This implementation does not yet resolve nested style maps but I think it should

Future performance optimizations:

  • Add a cache in the animation to look up the last keyframe that had a particular prop. I have a comment with some scaffolding in the Animation struct

  • When updating a keyframe, send a reactive update the same way we are with the state command instead of rebuilding the entire animation (this is cheap as long as there aren't many keyframes being built inside of the view animation closure. I haven't profiled it but I'm assuming)

@jrmoulton
Copy link
Collaborator Author

This is almost ready. I think resolving nested maps will happen in a different PR but I am going to fix an issue with animating towards a default and then I think this will be ready

@jrmoulton
Copy link
Collaborator Author

It would still be good to make it so that the animations can resolve nested maps and to be able to interploate between px/pct/auto but I think this is good to go for now

@dzhou121 dzhou121 merged commit b0d40a9 into lapce:main Sep 5, 2024
7 checks passed
jrmoulton added a commit to jrmoulton/floem that referenced this pull request Sep 9, 2024
* add keyframed animations

* Make animations reactive and stackable

* remove old files

* fix bezier

* add reactive animation state control

* remove animation message comment

* improve easing

* clippy

* add delay

* Fix transition on layout props

* Fix animate towards default

* fix animation view state

* fix animation view state again

* fix clippy

* remove old comment

* fix clippy 2
jrmoulton added a commit to jrmoulton/floem that referenced this pull request Sep 9, 2024
vello w/ gradients and brush override

vello chnages. before parley

attempt parley

Revert "attempt parley"

This reverts commit 851ae9d8067e1ec570bed4fa865980f6b10ba33b.

wip

updates

wip

wip

wip

new vello

fixed lapce#554 (lapce#555)

- fixed tab navigation wrapping the tab button
- fixed lapce#554

Add SignalGet SignalWith SignalUpdate traits (lapce#558)

* Add SignalGet SignalWith SignalUpdate traits

* fix doc

* fix Linux

make SignalUpdate non panic

Add initial wasm support (lapce#527)

* Add initial wasm support

* Bump web-time version

* Run cargo fmt

* Fix webgpu example

* Fix clippy warning

* Switch to latest floem-winit commit

* Fix conditional import in keyboard.rs

* Fix webgpu example

* Automatically follow canvas size by default

* Remove unused import

* Remove unused import

* Use latest floem-vger from git

add get/update from fn (lapce#559)

* add get/update from fn

* update radio buttons and example

* Add stack ext trait

* update dropdown

* change custom constructors return self to allow custom styles

* fix flight booker

* fix other examples

* better support for simple closure input

* fix clippy

rename SignalWith track method (lapce#562)

* rename SignalWith track method

* add SignalTrack trait

Keyframe Animations (lapce#563)

* add keyframed animations

* Make animations reactive and stackable

* remove old files

* fix bezier

* add reactive animation state control

* remove animation message comment

* improve easing

* clippy

* add delay

* Fix transition on layout props

* Fix animate towards default

* fix animation view state

* fix animation view state again

* fix clippy

* remove old comment

* fix clippy 2
jrmoulton added a commit to jrmoulton/floem that referenced this pull request Sep 9, 2024
vello w/ gradients and brush override

vello chnages. before parley

attempt parley

Revert "attempt parley"

This reverts commit 851ae9d8067e1ec570bed4fa865980f6b10ba33b.

wip

updates

wip

wip

wip

new vello

fixed lapce#554 (lapce#555)

- fixed tab navigation wrapping the tab button
- fixed lapce#554

Add SignalGet SignalWith SignalUpdate traits (lapce#558)

* Add SignalGet SignalWith SignalUpdate traits

* fix doc

* fix Linux

make SignalUpdate non panic

Add initial wasm support (lapce#527)

* Add initial wasm support

* Bump web-time version

* Run cargo fmt

* Fix webgpu example

* Fix clippy warning

* Switch to latest floem-winit commit

* Fix conditional import in keyboard.rs

* Fix webgpu example

* Automatically follow canvas size by default

* Remove unused import

* Remove unused import

* Use latest floem-vger from git

add get/update from fn (lapce#559)

* add get/update from fn

* update radio buttons and example

* Add stack ext trait

* update dropdown

* change custom constructors return self to allow custom styles

* fix flight booker

* fix other examples

* better support for simple closure input

* fix clippy

rename SignalWith track method (lapce#562)

* rename SignalWith track method

* add SignalTrack trait

Keyframe Animations (lapce#563)

* add keyframed animations

* Make animations reactive and stackable

* remove old files

* fix bezier

* add reactive animation state control

* remove animation message comment

* improve easing

* clippy

* add delay

* Fix transition on layout props

* Fix animate towards default

* fix animation view state

* fix animation view state again

* fix clippy

* remove old comment

* fix clippy 2
@jrmoulton jrmoulton deleted the view-transition branch September 18, 2024 02:35
jrmoulton added a commit to jrmoulton/floem that referenced this pull request Sep 26, 2024
* add keyframed animations

* Make animations reactive and stackable

* remove old files

* fix bezier

* add reactive animation state control

* remove animation message comment

* improve easing

* clippy

* add delay

* Fix transition on layout props

* Fix animate towards default

* fix animation view state

* fix animation view state again

* fix clippy

* remove old comment

* fix clippy 2
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.

2 participants