92ec801a2b
AE discriminates [1] between basic 2-dimensional properties (PropertyValueType.TwoD - e.g. scale), and spatial 2D properties (PropertyValueType.TwoD_SPATIAL - e.g. position). For the latter it provides additional keyframe controls (tangent in & tangent out) to describe a non-linear interpolation path ("spatial interpolation"). This composes on top of the usual temporal interpolation (with its own optional cubic mapping). To support spatial interpolation: - introduce a new Skottie value type (Vec2Value), to represent TwoD and TwoD_SPATIAL properties - introduce a KeyframeAnimator specialization for Vec2Value, which tracks per-keyframe tangent information - for spatial keyframes, instantiate/store an SkContourMeasure, and use instead of straight Vec2 LERP - switch interesting 2D properties to the new value type (transform position, anchor point, scale) (we could look into separating TwoD/TwoD_SPATIAL if needed, but the new specialization is already more efficient than the old opaque-vector-with-late-binding approach) [1] http://docs.aenhancers.com/properties/property/#property-propertyvaluetype Change-Id: I0863fd970cec4c5ff15cf01b2fb5c6602a468179 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274283 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org> |
||
---|---|---|
.. | ||
fuzz | ||
gm | ||
include | ||
src | ||
tests | ||
utils | ||
BUILD.gn | ||
skottie.gni |