public override void Execute(Strip strip) { foreach (var light in strip.Lights) { Color c; switch (strip.EdgeLight(light)) { case 0: c = Color.Red; break; case 1: c = Color.Green; break; case 2: c = Color.Blue; break; default: c = Color.White; break; } light.Color = c; } }
public override void Execute(Strip strip) { var w = strip.Width / 2; var h = strip.Height / 2; foreach (var light in strip.Lights) { var p = strip.EdgePoint(light); Color c; if (p.X < w) { if (p.Y > h) { c = Color.Red; } else { c = Color.Blue; } } else if (p.Y > h) { c = Color.Green; } else { c = Color.Yellow; } light.Color = Mix(c); } }
public override void Execute(Strip strip) { var rand = new Random(); var chance = Math.Abs(Speed) * 4; float fade = 10.25f - (float)Length; float percent = 0; Color c; int i = 0; foreach (var light in strip.Lights) { if (rand.Next(8000) > 7999 - chance) { twinkles[i] = DURATION; } else { twinkles[i] -= fade; if (twinkles[i] < 0) { twinkles[i] = 0; } } percent = twinkles[i] / DURATION; i++; c = ColorMix(percent, Color1, Color2); light.Color = Mix(c); } }
public override void Execute(Strip strip) { var position = (double)Step() / NumLights; foreach (var light in strip.Lights) { var h = (double)light.ID / NumLights / Length + position; var c = ColorFromHSV(h * 360, 1, 1);; light.Color = Mix(c); } }
public override void Execute(Strip strip) { var position = (long)Step(); var a = (position % 100) / 100f; foreach (var light in strip.Lights) { var f = strip.EdgeDistance(0, light) / Length; f = f + a; var c = ColorFromHSV(f * 360, 1, 1);; light.Color = Mix(c); } }
public override void Execute(Strip strip) { var position = Step() / 20d; Point p = new Point(position, position); var scale = Length * 5; var half = scale / 2; foreach (var light in strip.Lights) { var d = strip.EdgePoint(light).Distance(p); var stripe = d % scale; var color = stripe < half ? Color1 : Color2; light.Color = Mix(color); } }
public override void Execute(Strip strip) { var position = Step() / 5; var radius = Length * 5; var w = strip.Width; var h = strip.Height; var source = new Point(w / 2, h / 2); foreach (var light in strip.Lights) { var d = strip.EdgePoint(light).Distance(source) + position; d = (Math.Sin(d / radius) + 1) / 2; Color c = ColorMix((float)d, Color1, Color2); light.Color = Mix(c); } }
public override void Execute(Strip strip) { var position = Step() * 2; var a = Length * strip.Width; var b = a * 2; foreach (var light in strip.Lights) { var p = strip.EdgePoint(light); if ((position - p.X) % b < a) { light.Color = Mix(Color1); } else { light.Color = Mix(Color2); } } }
public override void Execute(Strip strip) { var position = Step() / 2; var radius = Length * strip.Width / 2; var source = strip.EdgePoint(position); foreach (var light in strip.Lights) { var d = strip.EdgePoint(light).Distance(source); if (d > radius) { light.Color = Mix(Color2); } else { Color c = ColorMix((float)(d / radius), Color1, Color2); light.Color = Mix(c); } } }
public override void Execute(Strip strip) { var position = (double)Step() / NumLights; foreach (var light in strip.Lights) { var d = (double)light.ID / NumLights * Length + position; d = Tools.Fract(d); Color c; if (d < 0.33) { c = Color1; } else if (d < 0.66) { c = Color2; } else { c = Color3; } light.Color = Mix(c); } }
public abstract void Execute(Strip strip);