mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Implemented basic keyframes
This commit is contained in:
1 parent
b734fa2f8f
commit
8a1759a575
41 files changed
+951
-123
No files matched your search
@@ -9,10 +9,13 @@ namespace Artemis.Core.Models.Profile.KeyframeEngines
|
||||
{
|
||||
public sealed override List<Type> CompatibleTypes { get; } = new List<Type> {typeof(float)};
|
||||
|
||||
public override object GetCurrentValue()
|
||||
protected override object GetInterpolatedValue()
|
||||
{
|
||||
// Nothing fancy for now, just return the base value
|
||||
return ((LayerProperty<float>) LayerProperty).Value;
|
||||
var currentKeyframe = (Keyframe<float>) CurrentKeyframe;
|
||||
var nextKeyframe = (Keyframe<float>) NextKeyframe;
|
||||
|
||||
var diff = nextKeyframe.Value - currentKeyframe.Value;
|
||||
return currentKeyframe.Value + diff * KeyframeProgress;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user