#pragma once #include #include #include #include #include namespace NXKit { class CAAction {}; class CABasicAnimation: public CAAction { public: /// animation duration in seconds double duration = 0; /// animation delay in seconds double delay = 0; std::optional keyPath; std::optional fillMode; bool isRemovedOnCompletion = true; std::shared_ptr timingFunction; std::optional fromValue; std::optional toValue; std::shared_ptr animationGroup; Timer creationTime; CABasicAnimation(std::string keyPath); CABasicAnimation(std::shared_ptr prototype, std::string keyPath, AnimatableProperty fromValue, std::shared_ptr timingFunction); CABasicAnimation(CABasicAnimation* animation); bool wasCreatedInUIAnimateBlock(); float progressFor(Timer currentTime); private: float ease(float x); }; }