mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Profiles - Abstracted property elements and effect elements
Folders - Added properties to folders Layer effects - Expanded to folders Layer effects - Added shape clipping
This commit is contained in:
1 parent
34bcd22f8c
commit
75b0ee8151
42 files changed
+638
-347
No files matched your search
@@ -18,9 +18,9 @@ namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The layer this property applies to
|
||||
/// Gets the profile element (such as layer or folder) this effect is applied to
|
||||
/// </summary>
|
||||
public Layer Layer { get; internal set; }
|
||||
public PropertiesProfileElement ProfileElement { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// The parent group of this layer property, set after construction
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Artemis.Core.Extensions;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.LayerProperties.Types
|
||||
@@ -17,17 +18,7 @@ namespace Artemis.Core.Models.Profile.LayerProperties.Types
|
||||
|
||||
protected override void UpdateCurrentValue(float keyframeProgress, float keyframeProgressEased)
|
||||
{
|
||||
var redDiff = NextKeyframe.Value.Red - CurrentKeyframe.Value.Red;
|
||||
var greenDiff = NextKeyframe.Value.Green - CurrentKeyframe.Value.Green;
|
||||
var blueDiff = NextKeyframe.Value.Blue - CurrentKeyframe.Value.Blue;
|
||||
var alphaDiff = NextKeyframe.Value.Alpha - CurrentKeyframe.Value.Alpha;
|
||||
|
||||
CurrentValue = new SKColor(
|
||||
ClampToByte(CurrentKeyframe.Value.Red + redDiff * keyframeProgressEased),
|
||||
ClampToByte(CurrentKeyframe.Value.Green + greenDiff * keyframeProgressEased),
|
||||
ClampToByte(CurrentKeyframe.Value.Blue + blueDiff * keyframeProgressEased),
|
||||
ClampToByte(CurrentKeyframe.Value.Alpha + alphaDiff * keyframeProgressEased)
|
||||
);
|
||||
CurrentValue = CurrentKeyframe.Value.Interpolate(NextKeyframe.Value, keyframeProgressEased);
|
||||
}
|
||||
|
||||
private static byte ClampToByte(float value)
|
||||
|
||||
Reference in new issue
Block a user