We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ea3fc8 commit 862a61eCopy full SHA for 862a61e
packages/av-cliper/src/sprite/base-sprite.ts
@@ -211,9 +211,10 @@ export function linearTimeFn(
211
kf: TAnimationKeyFrame,
212
opts: Required<IAnimationOpts>,
213
): Partial<TAnimateProps> {
214
- const offsetTime = time - opts.delay;
215
- if (offsetTime / opts.duration >= opts.iterCount) return {};
216
-
+ let offsetTime = time - opts.delay;
+ if (offsetTime / opts.duration > opts.iterCount) {
+ offsetTime = opts.duration * opts.iterCount;
217
+ }
218
const t = offsetTime % opts.duration;
219
220
const process = offsetTime === opts.duration ? 1 : t / opts.duration;
0 commit comments