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
@@ -18,6 +18,11 @@ namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
set => BaseValue = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The value of the property with keyframes applied
|
||||
/// </summary>
|
||||
public T CurrentValue => (T) KeyframeEngine.GetCurrentValue();
|
||||
|
||||
/// <summary>
|
||||
/// A list of keyframes defining different values of the property in time, this list contains the strongly typed
|
||||
/// <see cref="Keyframe{T}" />
|
||||
@@ -43,20 +48,12 @@ namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes all keyframes from the property.
|
||||
/// </summary>
|
||||
public void ClearKeyframes()
|
||||
{
|
||||
BaseKeyframes.Clear();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current value using the keyframes
|
||||
/// Gets the current value using the keyframes
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public T GetCurrentValue()
|
||||
{
|
||||
if (KeyframeEngine == null)
|
||||
if (KeyframeEngine == null || !Keyframes.Any())
|
||||
return Value;
|
||||
|
||||
return (T) KeyframeEngine.GetCurrentValue();
|
||||
|
||||
Reference in new issue
Block a user