Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
prevKeyframe.props[prop], //fromValue
props[prop], //toValue
(keyframe.time - prevKeyframe.time) * duration, //duration
prevKeyframe.time * duration, //delay
'linear', //easing
1, //iterations
'forward', //direction
animDesc.interpolate && animDesc.interpolate[prop] || 'number'
)
propTween.$$property = prop
keyframePropTweens.push(propTween)
}
}
}
}
let tween = newAnimTweens[animId] = new MultiTween(keyframePropTweens, duration, delay, easing, iterations, direction)
if (!animDesc.paused) {
runner.start(tween)
}
// The tween runner won't do anything until next tick, so immediately sync to the first frame's
// properties if the animation has no delay to avoid a flash of bad initial state
if (delay === 0) {
let firstKeyframeProps = keyframes[0].props
for (let prop in firstKeyframeProps) {
if (firstKeyframeProps.hasOwnProperty(prop)) {
this[prop + '➤anim:actuallySet'](firstKeyframeProps[prop])
}
}
}
}