Commit 5a746970 authored by Philip Levis's avatar Philip Levis
Browse files

Change highlight behavior of Layout Tool closer to what Charlie

would like (hopefully)!
parent 604c29dd
......@@ -5,7 +5,7 @@ import heronarts.lx.effect.LXEffect;
import heronarts.lx.parameter.BooleanParameter;
import heronarts.lx.parameter.DiscreteParameter;
import heronarts.lx.parameter.LXParameter;
import heronarts.lx.modulator.QuadraticEnvelope;
import heronarts.lx.modulator.SquareLFO;
import java.util.List;
......@@ -17,7 +17,7 @@ import model.LightSamplePointModel;
public class FlyerHighlighter extends LXEffect {
public final FlyerConfig[] flyerConfigurations;
public final QuadraticEnvelope strobe = new QuadraticEnvelope(100, 0, 1000);
public final SquareLFO strobe = new SquareLFO(50, 100, 500);
public final DiscreteParameter flyerIndex;
public final BooleanParameter showBlanks = new BooleanParameter("BLANKS", false);
public final FlightModel model;
......@@ -46,8 +46,8 @@ public class FlyerHighlighter extends LXEffect {
public void onParameterChanged(LXParameter p) {
if (p == flyerIndex) {
strobe.setStartValue(100);
strobe.trigger();
}
// strobe.trigger();
}
}
public FlyerConfig getConfig() {
......@@ -67,14 +67,14 @@ public class FlyerHighlighter extends LXEffect {
}
public void trigger() {
strobe.trigger();
//strobe.trigger();
}
@Override
public void run(double deltaMs, double enabledAmount) {
// REVIEW(mcslee): looks redunant with HighlightLayer below?
if (isEnabled()) {
for (LightSamplePointModel point : getFlyerLightPoints()) {
for (LightSamplePointModel point : getFlyerLightPoints()) {
int oldColor = getColor(point);
float val = strobe.getValuef();
int highlightColor = LX.hsb(0, 0, val);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment