-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ Rename effects so that
Color
is only used for effects where a co…
…lor is actually configurable. e.g. While color cycle is generally understandable, it starts being a problem when we have `ColorWave`, that could actually be a wave one one color, with only brightness changes. I don't particularly like the use of the word spectrum, but it is more generic than rainbow, and easily understandable, so here it is 🤷♂️
- Loading branch information
Showing
21 changed files
with
191 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
namespace Exo.Lighting.Effects; | ||
using System.ComponentModel; | ||
using System.Runtime.Serialization; | ||
using Exo.Lighting.Effects; | ||
|
||
/// <summary>Represents an effect where colors of the rainbow will move in a wave.</summary> | ||
/// <remarks> | ||
/// <para> | ||
/// This is a slightly more advanced version of <see cref="ColorCycleEffect"/> that is designed for adressable lighting zones only. | ||
/// The adressable lighting zones supporting this effect may not necessarily be adressable through software, but the effect will work as long as the lighting controller supports it. | ||
/// </para> | ||
/// <para> | ||
/// Some lighting controllers may support applying this effect across multiple zones, as if they were a single addressable lighting zone. | ||
/// </para> | ||
/// </remarks> | ||
[TypeId(0xB93254E0, 0xD39C, 0x40DF, 0xBF, 0x1F, 0x89, 0xD6, 0xCE, 0xB6, 0x16, 0x15)] | ||
public readonly struct ColorWaveEffect : ISingletonLightingEffect | ||
namespace Exo.Devices.Asus.Aura.Effects; | ||
|
||
/// <summary>Represents an effect where a color will move across an area following a wave pattern.</summary> | ||
/// <remarks>This is the monochrome, less common, version of <see cref="SpectrumWaveEffect"/>.</remarks> | ||
[DataContract] | ||
[TypeId(0xF64133DF, 0x043A, 0x4E9F, 0x82, 0xCA, 0x64, 0x89, 0xB8, 0xF7, 0x86, 0xA7)] | ||
public readonly struct ColorWaveEffect : ISingleColorLightEffect | ||
{ | ||
/// <summary>Gets a boxed instance of the effect.</summary> | ||
public static ISingletonLightingEffect SharedInstance { get; } = new ColorWaveEffect(); | ||
[DataMember(Order = 1)] | ||
[DisplayName("Color")] | ||
public RgbColor Color { get; } | ||
|
||
public ColorWaveEffect(RgbColor color) => Color = color; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace Exo.Lighting.Effects; | ||
|
||
/// <summary>Represents an effect where colors of the rainbow will move in a wave.</summary> | ||
/// <remarks> | ||
/// <para> | ||
/// This is a slightly more advanced version of <see cref="SpectrumCycleEffect"/> that is designed for adressable lighting zones only. | ||
/// The adressable lighting zones supporting this effect may not necessarily be adressable through software, but the effect will work as long as the lighting controller supports it. | ||
/// </para> | ||
/// <para> | ||
/// Some lighting controllers may support applying this effect across multiple zones, as if they were a single addressable lighting zone. | ||
/// </para> | ||
/// </remarks> | ||
[TypeId(0xB93254E0, 0xD39C, 0x40DF, 0xBF, 0x1F, 0x89, 0xD6, 0xCE, 0xB6, 0x16, 0x15)] | ||
public readonly struct SpectrumWaveEffect : ISingletonLightingEffect | ||
{ | ||
/// <summary>Gets a boxed instance of the effect.</summary> | ||
public static ISingletonLightingEffect SharedInstance { get; } = new SpectrumWaveEffect(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
using System.ComponentModel; | ||
using System.ComponentModel.DataAnnotations; | ||
using System.ComponentModel; | ||
using System.Runtime.Serialization; | ||
|
||
namespace Exo.Lighting.Effects; | ||
|
||
/// <summary>Represents an effect where colors of the rainbow will move in a wave.</summary> | ||
[TypeId(0xD11B8022, 0x2C92, 0x467A, 0xB8, 0x63, 0x9B, 0x70, 0x3D, 0x26, 0x5A, 0x70)] | ||
public readonly struct VariableColorWaveEffect : ILightingEffect | ||
/// <summary>Represents an effect where a color will move across an area following a wave pattern.</summary> | ||
[TypeId(0x3798FD63, 0x6B69, 0x4167, 0xAD, 0x09, 0xB0, 0x06, 0x20, 0x82, 0x17, 0x8C)] | ||
public readonly struct VariableColorWaveEffect : ISingleColorLightEffect | ||
{ | ||
[DataMember(Order = 1)] | ||
[Display(Name = "Color")] | ||
public RgbColor Color { get; } | ||
|
||
[DataMember(Order = 2)] | ||
[Display(Name = "Speed")] | ||
[Range(0, 5)] | ||
[DefaultValue(3)] | ||
public PredeterminedEffectSpeed Speed { get; } | ||
|
||
public VariableColorWaveEffect(PredeterminedEffectSpeed speed) | ||
public VariableColorWaveEffect(RgbColor color, PredeterminedEffectSpeed speed) | ||
{ | ||
Color = color; | ||
Speed = speed; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
using System.ComponentModel; | ||
using System.Runtime.Serialization; | ||
|
||
namespace Exo.Lighting.Effects; | ||
|
||
/// <summary>Represents an effect where colors of the rainbow will move in a wave.</summary> | ||
[TypeId(0xD11B8022, 0x2C92, 0x467A, 0xB8, 0x63, 0x9B, 0x70, 0x3D, 0x26, 0x5A, 0x70)] | ||
public readonly struct VariableSpectrumWaveEffect : ILightingEffect | ||
{ | ||
[DataMember(Order = 1)] | ||
[Display(Name = "Speed")] | ||
[Range(0, 5)] | ||
[DefaultValue(3)] | ||
public PredeterminedEffectSpeed Speed { get; } | ||
|
||
public VariableSpectrumWaveEffect(PredeterminedEffectSpeed speed) | ||
{ | ||
Speed = speed; | ||
} | ||
} |
Oops, something went wrong.