Disabled debug mode in LottieComponent and fixed a small bug.

This commit is contained in:
Leon Styhre 2022-01-09 19:26:42 +01:00
parent 93adea943b
commit 6ff91e89ca

View file

@ -6,7 +6,7 @@
// Component to play Lottie animations using the rlottie library. // Component to play Lottie animations using the rlottie library.
// //
#define DEBUG_ANIMATION true #define DEBUG_ANIMATION false
#include "components/LottieComponent.h" #include "components/LottieComponent.h"
@ -411,7 +411,9 @@ void LottieComponent::render(const glm::mat4& parentTrans)
else else
++mFrameNum; ++mFrameNum;
if (mFrameNum == mTotalFrames) if (mDirection == "reverse" && mFrameNum == 0)
renderNextFrame = false;
else if (mFrameNum == mTotalFrames)
renderNextFrame = false; renderNextFrame = false;
else else
renderNextFrame = true; renderNextFrame = true;