Hi, everyone.

According to the specification, http://w3c.github.io/web-animations/#dom-keyframeeffect-getframes spacing keyframes, i.e. attributes computedOffset are calculated in method KeyframeEffect.getFrames().
The calculation algorithm depends on KeyframeEffect.spacing value.
So if KeyframeEffect.spacing is changed, next call to KeyframeEffect.getFrames() returns different result.
For example,

var keyframes = [{top: '10px'}, {top: '30px', width: '40px'}, {top: '100px}, {width: '90px'}];
var effect = new KeyframeEffect(keyframes, 'paced(top)');
var pacedTopFrames = effect.getFrames();
effect.spacing = 'distribute';
var distributeFrames = effect.getFrames();
effect.spacing = 'paced(width)';
var pacedWidthFrames = effect.getFrames();
// pacedTopFrames, distributeFrames, pacedWidthFrames have different computedOffset values, right?

Could you clarify the side effects of such changes?
For example, what happens with currently running animation?

Thanks,
Aleksei.

Reply via email to