mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 20:06:33 +00:00
Plugins - Removed plugin info from constructor
This commit is contained in:
1 parent
33bb3ffa6c
commit
1d35a02d5b
49 files changed
+305
-390
No files matched your search
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using Artemis.Core.Models.Profile;
|
||||
using Artemis.Core.Plugins.LayerBrush;
|
||||
using Artemis.Core.Plugins.LayerBrush.Abstract;
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
using Artemis.Plugins.LayerBrushes.Noise.Utilities;
|
||||
using SkiaSharp;
|
||||
@@ -11,31 +10,30 @@ namespace Artemis.Plugins.LayerBrushes.Noise
|
||||
public class NoiseBrush : LayerBrush<NoiseBrushProperties>
|
||||
{
|
||||
private static readonly Random Rand = new Random();
|
||||
private readonly OpenSimplexNoise _noise;
|
||||
private readonly IRgbService _rgbService;
|
||||
private SKBitmap _bitmap;
|
||||
private SKColor[] _colorMap;
|
||||
|
||||
private OpenSimplexNoise _noise;
|
||||
private float _renderScale;
|
||||
private float _x;
|
||||
private float _y;
|
||||
private float _z;
|
||||
|
||||
public NoiseBrush(Layer layer, LayerBrushDescriptor descriptor, IRgbService rgbService) : base(layer, descriptor)
|
||||
public NoiseBrush(IRgbService rgbService)
|
||||
{
|
||||
_rgbService = rgbService;
|
||||
}
|
||||
|
||||
public override void EnableLayerBrush()
|
||||
{
|
||||
_x = Rand.Next(0, 4096);
|
||||
_y = Rand.Next(0, 4096);
|
||||
_z = Rand.Next(0, 4096);
|
||||
_noise = new OpenSimplexNoise(Rand.Next(0, 4096));
|
||||
|
||||
DetermineRenderScale();
|
||||
}
|
||||
|
||||
public override void EnableLayerBrush()
|
||||
{
|
||||
Properties.GradientColor.BaseValue.PropertyChanged += GradientColorChanged;
|
||||
CreateColorMap();
|
||||
DetermineRenderScale();
|
||||
}
|
||||
|
||||
public override void DisableLayerBrush()
|
||||
@@ -115,7 +113,7 @@ namespace Artemis.Plugins.LayerBrushes.Noise
|
||||
paint.Shader = foregroundShader;
|
||||
canvas.DrawRect(path.Bounds, paint);
|
||||
}
|
||||
|
||||
|
||||
private void GradientColorChanged(object sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
CreateColorMap();
|
||||
|
||||
Reference in new issue
Block a user