Commit graph

19 commits

Author SHA1 Message Date
Olivier Goffart
58cdaeb8dd Update license header to mention that commertial option are available 2020-08-26 13:23:42 +02:00
Simon Hausmann
2823f32692 Apply license headers to all non-binary/non-json sources 2020-08-17 17:55:20 +02:00
Simon Hausmann
5e6bc55fe6 Reduce precision for the cubic easing curve
As suggested by Olivier. Also added another test.
2020-08-05 15:41:30 +02:00
Simon Hausmann
00b05bf891 Fix easing curves once more
Olivier is right, mixing t and x like that is not correct. Revert to the
previous formula with increased precision.
2020-08-05 15:32:58 +02:00
Simon Hausmann
99c71cca05 Avoid jumps when using cubic easing curves
solve_t_for_x uses newton's method or binary search with the provided
tolerance to find t. The default tolerance is 0.1 and our control points
are between 0.1, so the resulting t is not very fine grained.

Instead, first go from t to x and then x becomes the new t for y.

The included but commented out test can be used to verify that the
curves are correct.
2020-08-05 14:51:07 +02:00
Olivier Goffart
d43fcfe3ea Remove stray dbg! 2020-08-05 13:28:20 +02:00
Olivier Goffart
1741b90b4e Implement a SIXTYFPS_SLOW_ANIMATIONS env variable
that can be set to a factor to reduce the speed of animations
2020-08-05 13:21:29 +02:00
Simon Hausmann
97a2fb2c7b Move datastructures::EasingCurve into animations 2020-08-03 13:49:20 +02:00
Olivier Goffart
9760cf4969 Begin to implement a Flickable
The implementation is still very rough and will need to be improved
2020-07-30 14:36:21 +02:00
Olivier Goffart
46a011683f Implement easing curve in the runtime 2020-07-29 15:20:28 +02:00
Olivier Goffart
e00491811b Get rid of the context in properties/signal 2020-07-13 18:49:06 +02:00
Olivier Goffart
90ed79e39f Remove unused code in the animation driver 2020-07-02 17:36:34 +02:00
Olivier Goffart
9d852f802e Property refactoring
The tests are working and everything seems to be back normal.
But there is still some cleanup required
2020-07-02 14:14:49 +02:00
Simon Hausmann
fb74a8ddd4 Fix animations for the wasm build
Use the instant crate that has a transparent fall-back to performance.now().
2020-06-25 09:07:04 +02:00
Simon Hausmann
8675cfb183 Fix animation driver to deal with freed animations
Just skip over those entries.
2020-06-25 08:58:13 +02:00
Simon Hausmann
688f111563 Added simple linear property animation class 2020-06-23 13:27:09 +02:00
Simon Hausmann
d99972a77a Simplify animation driver handling
Instead of passing it through the event loop, make it accessible as a
thread local variable.
2020-06-23 13:03:35 +02:00
Simon Hausmann
7694337181 Simplify the animation driver API
By making the duration a "property" of the Animated trait, we can reduce
the API surface.
2020-06-22 19:27:15 +02:00
Simon Hausmann
0aa4d85c92 Start with data structures for animations, with a duration and basic controls 2020-06-15 18:02:23 +02:00