TimeLine has nice API for controlling its direction that can be re-used
later by AnimationEffect.
Details
- Reviewers
davidedmundson graesslin - Group Reviewers
KWin - Commits
- R108:ee72569647c0: [libkwineffects] Port AnimationEffect to TimeLine
The existing tests for scripting effects still pass.
Diff Detail
- Repository
- R108 KWin
- Lint
Lint OK - Unit
No Unit Test Coverage - Build Status
Buildable 5029 Build 5047: arc lint + arc unit
Generally +1
libkwineffects/kwinanimationeffect.cpp | ||
---|---|---|
308 | This is different. Though IMHO arguably more correct - please can you check. Lets say I'm animating opacity 0 to 1 for 10 seconds. After 5 seconds through I decide I want to make it 15 seconds, so I call retarget(id, 1, 10) With the old code I'm 1/3 of the way through a 15s animation that goes from 0.5 -> 1 which means my current value is 0.666 With the new code I'm at the start of a 10s animation from 0.5 to 1. Which means my current value is 0.5 |
libkwineffects/kwinanimationeffect.cpp | ||
---|---|---|
308 | That's why I posted video of the Morphing Popups. :-) IMHO, the behavior of the old code is incorrect. If I retarget animation from the current position to a new position, then there should not be any jumps. Animation should go from the current position to the new target position.
This is the correct behavior, imho. The opacity should go from 0.5 to 1.0, otherwise animation won't be smooth. |
libkwineffects/kwinanimationeffect.cpp | ||
---|---|---|
308 | ... also please notice that the current value of the timeline will go from 0.0 to 1.0. |