UNPKG

@visactor/vrender-animate

Version:

This module provides a graph-based animation system for VRender.

17 lines (16 loc) 888 B
import { ACustomAnimate } from "./custom-animate"; export class State extends ACustomAnimate { constructor(from, to, duration, easing, params) { super(from, to, duration, easing, params); } update(end, ratio, out) { if (this.onStart(), !this.props || !this.propKeys) return; const easedRatio = this.easing(ratio); this.animate.interpolateUpdateFunction ? this.animate.interpolateUpdateFunction(this.fromProps, this.props, easedRatio, this, this.target) : this.interpolateUpdateFunctions.forEach(((func, index) => { if (!this.animate.validAttr(this.propKeys[index])) return; const key = this.propKeys[index]; func(key, this.fromProps[key], this.props[key], easedRatio, this, this.target); })), this.onUpdate(end, easedRatio, out), this.syncAttributeUpdate(); } } //# sourceMappingURL=state.js.map