Commit | Line | Data |
---|---|---|
80785186 S |
1 | abstract class SamPattern extends SCPattern { |
2 | public SamPattern(GLucose glucose) { | |
3 | super(glucose); | |
4 | setEligible(false); | |
5 | } | |
6 | } | |
7 | ||
8 | class JazzRainbow extends SamPattern { | |
9 | public JazzRainbow(GLucose glucose) { | |
10 | super(glucose); | |
11 | } | |
12 | ||
13 | ||
34327c96 | 14 | public void run(double deltaMs) { |
80785186 S |
15 | // Access the core master hue via this method call |
16 | float hv = lx.getBaseHuef(); | |
17 | for (int i = 0; i < colors.length*5; i=i+27) { | |
18 | float a = hv%250; | |
19 | if (i%2 == 0) { | |
20 | for (int b = 0; b < 70; b++) { | |
a41f334c | 21 | colors[(i+b)%colors.length] = lx.hsb(a+i%250, 100, b*a%100); |
80785186 S |
22 | } |
23 | } | |
24 | } | |
25 | } | |
26 | } |