-
Notifications
You must be signed in to change notification settings - Fork 7
/
LEDomePattern.pde
73 lines (59 loc) · 1.49 KB
/
LEDomePattern.pde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
public abstract class LEDomePattern extends LXPattern {
public LEDome model;
public LEDomePattern(LX lx) {
super(lx);
this.model = (LEDome) lx.model;
}
/**
* Reset this pattern to its default state.
*/
public LEDomePattern reset() {
for (LXParameter parameter : getParameters()) {
if (!(parameter instanceof LXListenableNormalizedParameter)) { continue; }
parameter.reset();
}
onReset();
return this;
}
/**
* Subclasses may override to add additional reset functionality.
*/
protected void onReset() {}
}
public abstract class LEDomeEffect extends LXEffect {
protected LEDome model;
protected LEDomeEffect(LX lx) {
super(lx);
}
// TODO: figure out how effects have changed in general.
// protected LEDomeEffect(LX lx) {
// this(lx, false);
//}
//protected LEDomeEffect(LX lx, boolean on) {
// super(lx, on);
// this.model = (LEDome) lx.model;
//}
/**
* Reset this pattern to its default state.
*/
public LEDomeEffect reset() {
for (LXParameter parameter : getParameters()) {
parameter.reset();
}
onReset();
return this;
}
/**
* Subclasses may override to add additional reset functionality.
*/
protected void onReset() {}
}
public abstract class LEDomeLayer extends LXLayer {
protected LEDome model;
protected LEDomeLayer(LX lx) {
super(lx);
}
protected LEDomeLayer(LX lx, LXDeviceComponent pattern) {
super(lx, pattern);
}
}