mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-12 21:38:38 +00:00
Sorted Gradient - Fix code style
This commit is contained in:
parent
b530ae1023
commit
b607690286
@ -23,7 +23,7 @@ namespace Artemis.VisualScripting.Nodes.Color
|
||||
|
||||
public override void Evaluate()
|
||||
{
|
||||
var colors = Inputs.Values.ToArray();
|
||||
SKColor[] colors = Inputs.Values.ToArray();
|
||||
|
||||
if (colors.Length == 0)
|
||||
{
|
||||
@ -33,10 +33,10 @@ namespace Artemis.VisualScripting.Nodes.Color
|
||||
|
||||
ColorSorter.Sort(colors, SKColors.Black);
|
||||
|
||||
var gradient = new ColorGradient();
|
||||
ColorGradient gradient = new();
|
||||
for (int i = 0; i < colors.Length; i++)
|
||||
{
|
||||
gradient.Add(new(colors[i], (float)i / (colors.Length - 1)));
|
||||
gradient.Add(new ColorGradientStop(colors[i], (float)i / (colors.Length - 1)));
|
||||
}
|
||||
|
||||
Output.Value = gradient;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user