vczh-libraries / GacUI

GPU Accelerated C++ User Interface, with WYSIWYG developing tools, XML supports, built-in data binding and MVVM features.
Other
2.34k stars 298 forks source link

cubic bezier animation for workflow #92

Open roodkcab opened 1 year ago

roodkcab commented 1 year ago

use cubic bezier in workflow to calculate deltaX for animation like css

var bezier1 = self.CubicBezier(0, 0, 1, 1);
var bezier2 = self.CubicBezier(0.25, 0, 0.25, 1);
self.AddAnimation(IGuiAnimation::CreateAnimation(func (time: UInt64): void {
    var changeTime = (cast double (time % (cast UInt64 2000))) / 2000;
    var b1 = bezier1(changeTime);
    var b2 = bezier2(changeTime);