Skip to content

Commit 862a61e

Browse files
authored
Update base-sprite.ts
1 parent 7ea3fc8 commit 862a61e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/av-cliper/src/sprite/base-sprite.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,10 @@ export function linearTimeFn(
211211
kf: TAnimationKeyFrame,
212212
opts: Required<IAnimationOpts>,
213213
): Partial<TAnimateProps> {
214-
const offsetTime = time - opts.delay;
215-
if (offsetTime / opts.duration >= opts.iterCount) return {};
216-
214+
let offsetTime = time - opts.delay;
215+
if (offsetTime / opts.duration > opts.iterCount) {
216+
offsetTime = opts.duration * opts.iterCount;
217+
}
217218
const t = offsetTime % opts.duration;
218219

219220
const process = offsetTime === opts.duration ? 1 : t / opts.duration;

0 commit comments

Comments
 (0)