projects
/
platform
/
core
/
uifw
/
lottie-player.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b5b39a6
)
lottie: fix position property animation along path.
59/193059/1
author
subhransu mohanty
<sub.mohanty@samsung.com>
Wed, 14 Nov 2018 06:57:02 +0000
(15:57 +0900)
committer
subhransu mohanty
<sub.mohanty@samsung.com>
Wed, 14 Nov 2018 07:37:38 +0000
(16:37 +0900)
Change-Id: I5b30f96a0e8358d2f6b75685ad9025dcdd4dee60
src/lottie/lottiemodel.h
patch
|
blob
|
history
diff --git
a/src/lottie/lottiemodel.h
b/src/lottie/lottiemodel.h
index 05c888c3f1873f3991cc9eccbfda3bcb4e975190..b3dba6063e0b801adefa80a0f54036fe0f82e250 100644
(file)
--- a/
src/lottie/lottiemodel.h
+++ b/
src/lottie/lottiemodel.h
@@
-151,8
+151,14
@@
struct LOTKeyFrameValue<VPointF>
VPointF value(float t) const {
if (mPathKeyFrame) {
- return VBezier::fromPoints(mStartValue, mStartValue + mOutTangent,
- mEndValue + mInTangent, mEndValue).pointAt(t);
+ /*
+ * position along the path calcualated
+ * using bezier at progress length (t * bezlen)
+ */
+ VBezier b = VBezier::fromPoints(mStartValue, mStartValue + mOutTangent,
+ mEndValue + mInTangent, mEndValue);
+ return b.pointAt(b.tAtLength(t * b.length()));
+
} else {
return lerp(mStartValue, mEndValue, t);
}