From 84905d783004f91c0d0c2821fe1c8005c56b3026 Mon Sep 17 00:00:00 2001 From: subhransu mohanty Date: Mon, 3 Sep 2018 12:31:16 +0900 Subject: [PATCH] lottie/parser: wrap the trim offset value before normalize. Change-Id: I5bce3b840cc54d626ea2397d35c4a7ef90e7be7e --- src/lottie/lottiemodel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lottie/lottiemodel.h b/src/lottie/lottiemodel.h index 61e0d9b..7d4518e 100644 --- a/src/lottie/lottiemodel.h +++ b/src/lottie/lottiemodel.h @@ -656,7 +656,7 @@ public: {visitor->visit(this);} float start(int frameNo) const {return mStart.value(frameNo)/100.0f;} float end(int frameNo) const {return mEnd.value(frameNo)/100.0f;} - float offset(int frameNo) const {return mOffset.value(frameNo)/ 360.0f;} + float offset(int frameNo) const {return fmod(mOffset.value(frameNo), 360.0f)/ 360.0f;} LOTTrimData::TrimType type() const {return mTrimType;} public: LOTAnimatable mStart{0}; -- 2.7.4