mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-15 04:24:28 +00:00
loader/lottie: Fix the incorrect precomp layer frame time
The frame number of the referenced layer should be reduced by the precomp start frame.
This commit is contained in:
parent
c5c40885ca
commit
15c09f260f
1 changed files with 2 additions and 2 deletions
|
@ -80,8 +80,8 @@ int32_t LottieLayer::remap(int32_t frameNo)
|
||||||
frameNo = comp->frameAtTime(timeRemap(frameNo));
|
frameNo = comp->frameAtTime(timeRemap(frameNo));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timeStretch == 1.0f) return frameNo;
|
if (type == Precomp) return (int32_t)(frameNo / timeStretch) - startFrame;
|
||||||
return (int32_t)(frameNo / timeStretch);
|
else return (int32_t)(frameNo / timeStretch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue