2025-06-08 00:23:46 +02:00
|
|
|
#include "Kanimaji/Settings.hpp"
|
|
|
|
|
|
|
|
#include <cmath>
|
|
|
|
#include <utility>
|
|
|
|
|
|
|
|
namespace Kanimaji
|
|
|
|
{
|
|
|
|
std::string ToString(Progression progression)
|
|
|
|
{
|
|
|
|
switch (progression) {
|
|
|
|
case Progression::Linear: return "linear";
|
|
|
|
case Progression::EaseIn: return "ease-in";
|
|
|
|
case Progression::EaseOut: return "ease-out";
|
|
|
|
case Progression::EaseInOut: return "ease-in-out";
|
|
|
|
|
|
|
|
default: std::unreachable();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
AnimationSettings AnimationSettings::Default()
|
|
|
|
{
|
|
|
|
using namespace std::chrono_literals;
|
|
|
|
|
|
|
|
return AnimationSettings {
|
|
|
|
.StrokeProgression = Progression::EaseInOut,
|
|
|
|
.UnfilledStroke = StrokeStyle {
|
|
|
|
.Width = 2.0,
|
|
|
|
.Colour = RGB::FromHex("#EEEEEE"),
|
|
|
|
},
|
|
|
|
.FilledStroke = StrokeStyle {
|
|
|
|
.Width = 3.0,
|
|
|
|
.Colour = RGB::FromHex("#000000"),
|
|
|
|
},
|
|
|
|
.StrokeFillingColour = RGB::FromHex("#FF0000"),
|
|
|
|
.EnableBrush = Flag::Enable,
|
|
|
|
.Brush = StrokeStyle {
|
|
|
|
.Width = 5.5,
|
|
|
|
.Colour = RGB::FromHex("#FF0000"),
|
|
|
|
},
|
|
|
|
.BrushBorder = StrokeStyle {
|
|
|
|
.Width = 7.0,
|
|
|
|
.Colour = RGB::FromHex("#666666"),
|
|
|
|
},
|
|
|
|
.LengthToTimeScaling = [] (double length) -> double {
|
|
|
|
return std::pow(length, 1.0 / 3.0) / 6.0;
|
|
|
|
},
|
|
|
|
.WaitBeforeRepeating = 1s,
|
|
|
|
.DelayBetweenStrokes = 50ms,
|
|
|
|
};
|
|
|
|
}
|
2025-06-16 20:33:22 +02:00
|
|
|
|
|
|
|
RemovalSetttings RemovalSetttings::Default()
|
|
|
|
{
|
|
|
|
return RemovalSetttings {
|
|
|
|
.Style = StrokeStyle {
|
|
|
|
.Width = 3.0,
|
|
|
|
.Colour = RGB::FromHex("#000000"),
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|
2025-06-08 00:23:46 +02:00
|
|
|
}
|