File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
packages/av-cliper/src/sprite Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -211,14 +211,13 @@ export function linearTimeFn(
211211 kf : TAnimationKeyFrame ,
212212 opts : Required < IAnimationOpts > ,
213213) : Partial < TAnimateProps > {
214- let offsetTime = time - opts . delay ;
215- if ( offsetTime / opts . duration > opts . iterCount ) {
216- offsetTime = opts . duration * opts . iterCount ;
217- }
218-
214+ const offsetTime = time - opts . delay ;
219215 const t = offsetTime % opts . duration ;
216+ const process =
217+ offsetTime / opts . duration >= opts . iterCount || offsetTime === opts . duration
218+ ? 1
219+ : t / opts . duration ;
220220
221- const process = offsetTime === opts . duration ? 1 : t / opts . duration ;
222221 const idx = kf . findIndex ( ( it ) => it [ 0 ] >= process ) ;
223222 if ( idx === - 1 ) return { } ;
224223
You can’t perform that action at this time.
0 commit comments