Added covers, cross-fade

This commit is contained in:
Vladislav Khorev committed 2026-05-15 14:59:58 +03:00
1 parent 0f2b2e55af
commit e618c91415
29 files changed
+40462 -29

No files matched your search

+3 -1
View File
@@ -23,13 +23,14 @@ namespace ZL {
Eigen::Vector3f pivot = Eigen::Vector3f::Zero(); // local-space offset to rotation pivot
float rotationY = 0.0f; // Y-axis rotation in radians
float scale = 1.0f; // uniform scale
float alpha = 1.0f; // opacity: 1=opaque, 0=fully transparent
float interactionRadius;
bool isActive = true;
bool isAnimating = false; // true while a timed animation is running
std::string activateFunctionName;
struct AnimTask {
enum class Type { Move, Rotate, Scale } type;
enum class Type { Move, Rotate, Scale, Fade } type;
Eigen::Vector3f startPos;
float startRotY;
float startScale;
@@ -48,6 +49,7 @@ namespace ZL {
void moveTo(const Eigen::Vector3f& target, float durationSec, std::function<void()> onComplete = {});
void rotateTo(float targetRotY, float durationSec, std::function<void()> onComplete = {});
void scaleTo(float targetScale, float durationSec, std::function<void()> onComplete = {});
void fadeTo(float targetAlpha, float durationSec, std::function<void()> onComplete = {});
void update(int64_t deltaMs);
void draw(Renderer& renderer) const;
};