1 package kaka.cakelight;
3 public class SmoothVideoMode extends VideoMode {
4 private LedFrame frame;
8 public void enter(Configuration config) {
10 frame = LedFrame.from(config);
11 ledCount = config.leds.getCount();
15 public void updateWithFrame(LedFrame frame) {
16 super.updateWithFrame(smooth(frame));
19 private LedFrame smooth(LedFrame f) {
20 for (int i = 0; i < ledCount; i++) {
21 Color c = frame.getLedColor(i).interpolate(f.getLedColor(i), 0.5);
22 frame.setLedColor(i, c);