We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5ad24ed + f6b6851 commit 3da5c7dCopy full SHA for 3da5c7d
packages/av-cliper/src/sprite/base-sprite.ts
@@ -212,11 +212,12 @@ export function linearTimeFn(
212
opts: Required<IAnimationOpts>,
213
): Partial<TAnimateProps> {
214
const offsetTime = time - opts.delay;
215
- if (offsetTime / opts.duration >= opts.iterCount) return {};
216
-
217
const t = offsetTime % opts.duration;
+ const process =
+ offsetTime / opts.duration >= opts.iterCount || offsetTime === opts.duration
218
+ ? 1
219
+ : t / opts.duration;
220
- const process = offsetTime === opts.duration ? 1 : t / opts.duration;
221
const idx = kf.findIndex((it) => it[0] >= process);
222
if (idx === -1) return {};
223
0 commit comments