Skip to content

Commit c58f84c

Browse files
authored
Merge pull request #77 from MoonModules/lots-of-effects
Lots of effects
2 parents 93a8c9b + c3a0e05 commit c58f84c

File tree

18 files changed

+14297
-13929
lines changed

18 files changed

+14297
-13929
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
**MoonLight bridges the gap between hobbyist lighting projects and professional lighting systems.** Get enterprise-grade performance and flexibility without the enterprise price tag.
4141

42-
-**High Performance** - 12K LEDs at 100 FPS with FastLED + parallel drivers
42+
- **High Performance** - 12K LEDs at 100 FPS with FastLED + parallel drivers
4343
- 🎨 **3D Effects Engine** - Stunning visuals for 1D strips, 2D panels, 3D cubes, and custom layouts
4444
- 🏗️ **Flexible Setups** - From simple strips to complex installations and DMX fixtures
4545
- 🌐 **Modern IoT** - ESP32-powered with responsive Svelte 5 interface
@@ -79,7 +79,7 @@ Start creating stunning effects immediately on both mobile and desktop.
7979

8080
| Firmware | Interface |
8181
|----------|-----------|
82-
| 🔧 **ESP-IDF 5** - Modern ESP32 framework |**Svelte 5** - Lightning-fast reactive UI |
82+
| 🔧 **ESP-IDF 5** - Modern ESP32 framework | **Svelte 5** - Lightning-fast reactive UI |
8383
| 💡 **FastLED 3.10** - Industry-standard LED library | 🎨 **DaisyUI 5** - Modern component library |
8484
| 📡 **PsychicHTTP 1.21** - High-performance web server | 🎯 **Tailwind 4** - Utility-first CSS |
8585
| 📊 **ArduinoJson 7** - Advanced JSON processing | 📱 **Mobile & Desktop** responsive |

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ hide:
4545

4646
**MoonLight bridges the gap between hobbyist lighting projects and professional lighting systems.** Get enterprise-grade performance and flexibility without the enterprise price tag.
4747

48-
-**High Performance** - 12K LEDs at 100 FPS with FastLED + parallel drivers
48+
-️️ **High Performance** - 12K LEDs at 100 FPS with FastLED + parallel drivers
4949
- 🎨 **3D Effects Engine** - Stunning visuals for 1D strips, 2D panels, 3D cubes, and custom layouts
5050
- 🏗️ **Flexible Setups** - From simple strips to complex installations and DMX fixtures
5151
- 🌐 **Modern IoT** - ESP32-powered with responsive Svelte 5 interface
@@ -85,7 +85,7 @@ Start creating stunning effects immediately on both mobile and desktop.
8585

8686
| Firmware | Interface |
8787
|----------|-----------|
88-
| 🔧 **ESP-IDF 5** - Modern ESP32 framework |**Svelte 5** - Lightning-fast reactive UI |
88+
| 🔧 **ESP-IDF 5** - Modern ESP32 framework | **Svelte 5** - Lightning-fast reactive UI |
8989
| 💡 **FastLED 3.10** - Industry-standard LED library | 🎨 **DaisyUI 5** - Modern component library |
9090
| 📡 **PsychicHTTP 1.21** - High-performance web server | 🎯 **Tailwind 4** - Utility-first CSS |
9191
| 📊 **ArduinoJson 7** - Advanced JSON processing | 📱 **Mobile & Desktop** responsive |

docs/moonlight/overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ Effects, Modifiers, Layouts and drivers use emoji's to visualize their usage. Se
128128
* 🎨 Using palette
129129
* 🐙 WLED origin
130130
* 💫 MoonLight origin
131+
* ⚡️ FastLED origin
131132
* 🚨 Moving head color effect
132133
* 🗼 Moving head move effect
133134
* 💎 Modifier

interface/src/lib/components/moonbase/FieldRenderer.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@
234234
{:else if property.type == 'coord3D'}
235235
<input
236236
type="number"
237-
style="width: {String(property.max || 255).length * 2}ch"
237+
style="width: {String(property.max || 255).length + 5}ch"
238238
class="input invalid:border-error invalid:border-2"
239239
min="0"
240240
max="65536"
@@ -243,7 +243,7 @@
243243
/>
244244
<input
245245
type="number"
246-
style="width: {String(property.max || 255).length * 2}ch"
246+
style="width: {String(property.max || 255).length + 5}ch"
247247
class="input invalid:border-error invalid:border-2"
248248
min="0"
249249
max="65536"
@@ -252,7 +252,7 @@
252252
/>
253253
<input
254254
type="number"
255-
style="width: {String(property.max || 255).length * 2}ch"
255+
style="width: {String(property.max || 255).length + 5}ch"
256256
class="input invalid:border-error invalid:border-2"
257257
min="0"
258258
max="65536"

lib/framework/WWWData.h

Lines changed: 12728 additions & 12728 deletions
Large diffs are not rendered by default.

platformio.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ build_flags =
5656
-D BUILD_TARGET=\"$PIOENV\"
5757
-D APP_NAME=\"MoonLight\" ; 🌙 Must only contain characters from [a-zA-Z0-9-_] as this is converted into a filename
5858
-D APP_VERSION=\"0.6.1\" ; semver compatible version string
59-
-D APP_DATE=\"20251216\" ; 🌙
59+
-D APP_DATE=\"20251217\" ; 🌙
6060

6161
-D PLATFORM_VERSION=\"pioarduino-55.03.34\" ; 🌙 make sure it matches with above plaftform
6262

src/MoonBase/Nodes.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ void LiveScriptNode::onLayout() {
218218
LiveScriptNode::~LiveScriptNode() {
219219
EXT_LOGV(ML_TAG, "%s", animation);
220220
scriptRuntime.kill(animation);
221-
Node::~Node();
222221
}
223222

224223
// LiveScriptNode functions

src/MoonLight/Layers/PhysicalLayer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct LightsHeader {
5656
uint8_t offsetRGB3 = UINT8_MAX;
5757
uint8_t offsetBrightness2 = UINT8_MAX; // 31
5858
uint16_t nrOfChannels; // 32, so we can deal with exceptional cases e.g. RGB2040 make sure it starts at even position!!! for alignment!!!
59-
uint8_t lightPreset = UINT8_MAX; // 34, so we can deal with exceptional cases e.g. RGB2040
59+
uint8_t lightPreset = 2; // 34, so we can deal with exceptional cases e.g. RGB2040. default 2 / GRB
6060
// =============
6161
// 35 bytes total
6262
uint8_t fill[5]; // padding to align struct to 40 bytes total. lightsControl will send 37 bytes (prime number)!!! so Monitor.svelte can recognize this

src/MoonLight/Layers/VirtualLayer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class VirtualLayer {
176176
void addRGB(const Coord3D& position, const CRGB& color) { setRGB(position, getRGB(position) + color); }
177177

178178
void blendColor(const uint16_t indexV, const CRGB& color, uint8_t blendAmount) { setRGB(indexV, blend(color, getRGB(indexV), blendAmount)); }
179-
void blendColor(Coord3D& position, const CRGB& color, const uint8_t blendAmount) { blendColor(XYZ(position), color, blendAmount); }
179+
void blendColor(Coord3D position, const CRGB& color, const uint8_t blendAmount) { blendColor(XYZ(position), color, blendAmount); }
180180

181181
uint8_t getWhite(const uint16_t indexV) { return getLight<uint8_t>(indexV, layerP->lights.header.offsetWhite); }
182182
uint8_t getWhite(Coord3D pos) { return getWhite(XYZ(pos)); }

src/MoonLight/Modules/ModuleEffects.h

Lines changed: 68 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ class ModuleEffects : public NodeManager {
6060
EXT_LOGV(ML_TAG, "");
6161
JsonObject control; // state.data has one or more properties
6262
control = addControl(controls, "layer", "select");
63-
control["default"] = 1;
64-
uint8_t i = 1; //start with 1
63+
control["default"] = 0; // the first entry has index 0 and refers to Layer 1 (layer counting starts with 1)
64+
uint8_t i = 1; // start with 1
6565
for (VirtualLayer* layer : layerP.layers) {
6666
addControlValue(control, i);
6767
i++;
@@ -78,24 +78,29 @@ class ModuleEffects : public NodeManager {
7878

7979
// MoonLight effects, Solid first then alphabetically
8080
addControlValue(control, getNameAndTags<SolidEffect>());
81+
addControlValue(control, getNameAndTags<AudioRingsEffect>());
8182
addControlValue(control, getNameAndTags<LinesEffect>());
83+
addControlValue(control, getNameAndTags<FireEffect>());
8284
addControlValue(control, getNameAndTags<FixedRectangleEffect>());
8385
addControlValue(control, getNameAndTags<ParticlesEffect>());
8486
addControlValue(control, getNameAndTags<PraxisEffect>());
8587
#if USE_M5UNIFIED
8688
addControlValue(control, getNameAndTags<MoonManEffect>());
8789
#endif
8890
addControlValue(control, getNameAndTags<FreqSawsEffect>());
89-
addControlValue(control, getNameAndTags<RainbowEffect>());
91+
addControlValue(control, getNameAndTags<MarioTestEffect>());
92+
addControlValue(control, getNameAndTags<PixelMapEffect>());
9093
addControlValue(control, getNameAndTags<RandomEffect>());
94+
addControlValue(control, getNameAndTags<RingRandomFlowEffect>());
9195
addControlValue(control, getNameAndTags<RipplesEffect>());
9296
addControlValue(control, getNameAndTags<RubiksCubeEffect>());
9397
addControlValue(control, getNameAndTags<ScrollingTextEffect>());
9498
addControlValue(control, getNameAndTags<SinusEffect>());
9599
addControlValue(control, getNameAndTags<SphereMoveEffect>());
100+
addControlValue(control, getNameAndTags<SpiralFireEffect>());
96101
addControlValue(control, getNameAndTags<StarFieldEffect>());
102+
addControlValue(control, getNameAndTags<VUMeterEffect>());
97103
addControlValue(control, getNameAndTags<WaveEffect>());
98-
addControlValue(control, getNameAndTags<SpiralFireEffect>());
99104

100105
// MoonModules effects, alphabetically
101106
addControlValue(control, getNameAndTags<GameOfLifeEffect>());
@@ -107,14 +112,29 @@ class ModuleEffects : public NodeManager {
107112
addControlValue(control, getNameAndTags<BouncingBallsEffect>());
108113
addControlValue(control, getNameAndTags<BlurzEffect>());
109114
addControlValue(control, getNameAndTags<DistortionWavesEffect>());
115+
addControlValue(control, getNameAndTags<DJLightEffect>());
116+
addControlValue(control, getNameAndTags<DNAEffect>());
117+
addControlValue(control, getNameAndTags<DripEffect>());
110118
addControlValue(control, getNameAndTags<FreqMatrixEffect>());
119+
addControlValue(control, getNameAndTags<FireworksEffect>());
120+
addControlValue(control, getNameAndTags<FlowEffect>());
121+
addControlValue(control, getNameAndTags<FrizzlesEffect>());
122+
addControlValue(control, getNameAndTags<FunkyPlankEffect>());
111123
addControlValue(control, getNameAndTags<GEQEffect>());
124+
addControlValue(control, getNameAndTags<HeartBeatEffect>());
112125
addControlValue(control, getNameAndTags<LissajousEffect>());
113126
addControlValue(control, getNameAndTags<Noise2DEffect>());
114127
addControlValue(control, getNameAndTags<NoiseMeterEffect>());
128+
addControlValue(control, getNameAndTags<OctopusEffect>());
129+
addControlValue(control, getNameAndTags<PacManEffect>());
115130
addControlValue(control, getNameAndTags<PopCornEffect>());
131+
addControlValue(control, getNameAndTags<RainEffect>());
132+
addControlValue(control, getNameAndTags<TetrixEffect>());
116133
addControlValue(control, getNameAndTags<WaverlyEffect>());
117134

135+
// FastLED effects
136+
addControlValue(control, getNameAndTags<RainbowEffect>());
137+
118138
// Moving head effects, alphabetically
119139
addControlValue(control, getNameAndTags<AmbientMoveEffect>());
120140
addControlValue(control, getNameAndTags<FreqColorsEffect>());
@@ -151,20 +171,32 @@ class ModuleEffects : public NodeManager {
151171
// MoonLight effects, Solid first then alphabetically
152172
if (equalAZaz09(name, SolidEffect::name()))
153173
node = allocMBObject<SolidEffect>();
174+
else if (equalAZaz09(name, AudioRingsEffect::name()))
175+
node = allocMBObject<AudioRingsEffect>();
176+
else if (equalAZaz09(name, FireEffect::name()))
177+
node = allocMBObject<FireEffect>();
154178
else if (equalAZaz09(name, FixedRectangleEffect::name()))
155179
node = allocMBObject<FixedRectangleEffect>();
156180
else if (equalAZaz09(name, FreqSawsEffect::name()))
157181
node = allocMBObject<FreqSawsEffect>();
158182
else if (equalAZaz09(name, LinesEffect::name()))
159183
node = allocMBObject<LinesEffect>();
184+
else if (equalAZaz09(name, MarioTestEffect::name()))
185+
node = allocMBObject<MarioTestEffect>();
160186
#if USE_M5UNIFIED
161187
else if (equalAZaz09(name, MoonManEffect::name()))
162188
node = allocMBObject<MoonManEffect>();
163189
#endif
190+
else if (equalAZaz09(name, ParticlesEffect::name()))
191+
node = allocMBObject<ParticlesEffect>();
164192
else if (equalAZaz09(name, PraxisEffect::name()))
165193
node = allocMBObject<PraxisEffect>();
194+
else if (equalAZaz09(name, PixelMapEffect::name()))
195+
node = allocMBObject<PixelMapEffect>();
166196
else if (equalAZaz09(name, RandomEffect::name()))
167197
node = allocMBObject<RandomEffect>();
198+
else if (equalAZaz09(name, RingRandomFlowEffect::name()))
199+
node = allocMBObject<RingRandomFlowEffect>();
168200
else if (equalAZaz09(name, RipplesEffect::name()))
169201
node = allocMBObject<RipplesEffect>();
170202
else if (equalAZaz09(name, RubiksCubeEffect::name()))
@@ -181,6 +213,8 @@ class ModuleEffects : public NodeManager {
181213
node = allocMBObject<WaveEffect>();
182214
else if (equalAZaz09(name, SpiralFireEffect::name()))
183215
node = allocMBObject<SpiralFireEffect>();
216+
else if (equalAZaz09(name, VUMeterEffect::name()))
217+
node = allocMBObject<VUMeterEffect>();
184218

185219
// MoonModules effects, alphabetically
186220
else if (equalAZaz09(name, GameOfLifeEffect::name()))
@@ -199,25 +233,49 @@ class ModuleEffects : public NodeManager {
199233
node = allocMBObject<BlurzEffect>();
200234
else if (equalAZaz09(name, DistortionWavesEffect::name()))
201235
node = allocMBObject<DistortionWavesEffect>();
236+
else if (equalAZaz09(name, DJLightEffect::name()))
237+
node = allocMBObject<DJLightEffect>();
238+
else if (equalAZaz09(name, DNAEffect::name()))
239+
node = allocMBObject<DNAEffect>();
240+
else if (equalAZaz09(name, DripEffect::name()))
241+
node = allocMBObject<DripEffect>();
242+
else if (equalAZaz09(name, FireworksEffect::name()))
243+
node = allocMBObject<FireworksEffect>();
244+
else if (equalAZaz09(name, FlowEffect::name()))
245+
node = allocMBObject<FlowEffect>();
202246
else if (equalAZaz09(name, FreqMatrixEffect::name()))
203247
node = allocMBObject<FreqMatrixEffect>();
248+
else if (equalAZaz09(name, FrizzlesEffect::name()))
249+
node = allocMBObject<FrizzlesEffect>();
250+
else if (equalAZaz09(name, FunkyPlankEffect::name()))
251+
node = allocMBObject<FunkyPlankEffect>();
204252
else if (equalAZaz09(name, GEQEffect::name()))
205253
node = allocMBObject<GEQEffect>();
254+
else if (equalAZaz09(name, HeartBeatEffect::name()))
255+
node = allocMBObject<HeartBeatEffect>();
206256
else if (equalAZaz09(name, LissajousEffect::name()))
207257
node = allocMBObject<LissajousEffect>();
208258
else if (equalAZaz09(name, Noise2DEffect::name()))
209259
node = allocMBObject<Noise2DEffect>();
210260
else if (equalAZaz09(name, NoiseMeterEffect::name()))
211261
node = allocMBObject<NoiseMeterEffect>();
212-
else if (equalAZaz09(name, ParticlesEffect::name()))
213-
node = allocMBObject<ParticlesEffect>();
262+
else if (equalAZaz09(name, OctopusEffect::name()))
263+
node = allocMBObject<OctopusEffect>();
264+
else if (equalAZaz09(name, PacManEffect::name()))
265+
node = allocMBObject<PacManEffect>();
214266
else if (equalAZaz09(name, PopCornEffect::name()))
215267
node = allocMBObject<PopCornEffect>();
216-
else if (equalAZaz09(name, RainbowEffect::name()))
217-
node = allocMBObject<RainbowEffect>();
268+
else if (equalAZaz09(name, RainEffect::name()))
269+
node = allocMBObject<RainEffect>();
270+
else if (equalAZaz09(name, TetrixEffect::name()))
271+
node = allocMBObject<TetrixEffect>();
218272
else if (equalAZaz09(name, WaverlyEffect::name()))
219273
node = allocMBObject<WaverlyEffect>();
220274

275+
// FastLED
276+
else if (equalAZaz09(name, RainbowEffect::name()))
277+
node = allocMBObject<RainbowEffect>();
278+
221279
// Moving head effects, alphabetically
222280

223281
else if (equalAZaz09(name, AmbientMoveEffect::name()))
@@ -268,8 +326,8 @@ class ModuleEffects : public NodeManager {
268326
node->constructor(layerP.layers[0], controls); // pass the layer to the node
269327
// node->moduleControl = _moduleLightsControl; // to access global lights control functions if needed
270328
// node->moduleIO = _moduleIO; // to get pin allocations
271-
node->moduleNodes = (Module*)this; // to request UI update
272-
node->setup(); // run the setup of the effect
329+
node->moduleNodes = (Module*)this; // to request UI update
330+
node->setup(); // run the setup of the effect
273331
node->onSizeChanged(Coord3D());
274332
// layers[0]->nodes.reserve(index+1);
275333
if (index >= layerP.layers[0]->nodes.size())

0 commit comments

Comments
 (0)