diff --git a/README.md b/README.md index e72d7e8..745d72d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ * In-browser code editor and color palette editor make creating and modifying animations easy * Large selection of built-in animations and color palettes means you don't have to write any code * Works with cheap and readily available WS281x and SK6812 LED strips and strings -* Supports pixel mapping for arbitrary 2D and 3D LED arrangements (matrix displays and LED cubes) +* Supports pixel mapping for arbitrary 2D and 3D LED arrangements * Seamlessly supports HSV-to-RGBW and RGB-to-RGBW conversion for RGBW LED strips * Supports networked E1.31 sACN DMX control for music visualization through [LedFx](https://github.com/LedFx/LedFx) @@ -101,7 +101,7 @@ optional arguments: ``` ### Built-In Animation Patterns -Image and animated GIF previews of all built-in animations can be seen at [patterns.md](patterns). +Animated GIF previews of all built-in animations can be seen at [patterns.md](patterns). ### E1.31 sACN, Music Visualization, and LedFx Use LEDControl can function as a E1.31 streaming ACN receiver, allowing the connected LEDs to be directly controlled over the network. [LedFx](https://github.com/LedFx/LedFx) is recommended for music visualization over sACN. diff --git a/img/Blackbody-Cycle-1D.gif b/img/Blackbody-Cycle-1D.gif index cc15610..63de7ae 100644 Binary files a/img/Blackbody-Cycle-1D.gif and b/img/Blackbody-Cycle-1D.gif differ diff --git a/img/Blackbody-Cycle-1D.png b/img/Blackbody-Cycle-1D.png deleted file mode 100644 index c866070..0000000 Binary files a/img/Blackbody-Cycle-1D.png and /dev/null differ diff --git a/img/Hue-Bounce-1D.gif b/img/Hue-Bounce-1D.gif index a81aa68..20dd142 100644 Binary files a/img/Hue-Bounce-1D.gif and b/img/Hue-Bounce-1D.gif differ diff --git a/img/Hue-Bounce-1D.png b/img/Hue-Bounce-1D.png deleted file mode 100644 index 4f10bc1..0000000 Binary files a/img/Hue-Bounce-1D.png and /dev/null differ diff --git a/img/Hue-Cycle-1D.gif b/img/Hue-Cycle-1D.gif index 3bd8f8b..f13259f 100644 Binary files a/img/Hue-Cycle-1D.gif and b/img/Hue-Cycle-1D.gif differ diff --git a/img/Hue-Cycle-1D.png b/img/Hue-Cycle-1D.png deleted file mode 100644 index bb2c390..0000000 Binary files a/img/Hue-Cycle-1D.png and /dev/null differ diff --git a/img/Hue-Cycle-Quantized-1D.gif b/img/Hue-Cycle-Quantized-1D.gif index be5bb5f..2b4bbc0 100644 Binary files a/img/Hue-Cycle-Quantized-1D.gif and b/img/Hue-Cycle-Quantized-1D.gif differ diff --git a/img/Hue-Cycle-Quantized-1D.png b/img/Hue-Cycle-Quantized-1D.png deleted file mode 100644 index dfaced7..0000000 Binary files a/img/Hue-Cycle-Quantized-1D.png and /dev/null differ diff --git a/img/Hue-Ripples-1D.gif b/img/Hue-Ripples-1D.gif index 3d1e4fb..bf126a7 100644 Binary files a/img/Hue-Ripples-1D.gif and b/img/Hue-Ripples-1D.gif differ diff --git a/img/Hue-Ripples-1D.png b/img/Hue-Ripples-1D.png deleted file mode 100644 index ea32bc7..0000000 Binary files a/img/Hue-Ripples-1D.png and /dev/null differ diff --git a/img/Hue-Scan-1D.gif b/img/Hue-Scan-1D.gif index c50a9c5..a68ed4e 100644 Binary files a/img/Hue-Scan-1D.gif and b/img/Hue-Scan-1D.gif differ diff --git a/img/Hue-Scan-1D.png b/img/Hue-Scan-1D.png deleted file mode 100644 index 41ca9f8..0000000 Binary files a/img/Hue-Scan-1D.png and /dev/null differ diff --git a/img/Hue-Waves-1D.gif b/img/Hue-Waves-1D.gif index 2918607..09ead29 100644 Binary files a/img/Hue-Waves-1D.gif and b/img/Hue-Waves-1D.gif differ diff --git a/img/Hue-Waves-1D.png b/img/Hue-Waves-1D.png deleted file mode 100644 index bcb4b7f..0000000 Binary files a/img/Hue-Waves-1D.png and /dev/null differ diff --git a/img/Palette-Bounce-Mirrored-1D.gif b/img/Palette-Bounce-Mirrored-1D.gif index a6c90e8..09db079 100644 Binary files a/img/Palette-Bounce-Mirrored-1D.gif and b/img/Palette-Bounce-Mirrored-1D.gif differ diff --git a/img/Palette-Bounce-Mirrored-1D.png b/img/Palette-Bounce-Mirrored-1D.png deleted file mode 100644 index 8ee7bcc..0000000 Binary files a/img/Palette-Bounce-Mirrored-1D.png and /dev/null differ diff --git a/img/Palette-Cycle-1D.gif b/img/Palette-Cycle-1D.gif index f53c6ae..8c6400d 100644 Binary files a/img/Palette-Cycle-1D.gif and b/img/Palette-Cycle-1D.gif differ diff --git a/img/Palette-Cycle-1D.png b/img/Palette-Cycle-1D.png deleted file mode 100644 index 365161c..0000000 Binary files a/img/Palette-Cycle-1D.png and /dev/null differ diff --git a/img/Palette-Cycle-Mirrored-1D.gif b/img/Palette-Cycle-Mirrored-1D.gif index 2f26a2d..0de5289 100644 Binary files a/img/Palette-Cycle-Mirrored-1D.gif and b/img/Palette-Cycle-Mirrored-1D.gif differ diff --git a/img/Palette-Cycle-Mirrored-1D.png b/img/Palette-Cycle-Mirrored-1D.png deleted file mode 100644 index 5f4d98f..0000000 Binary files a/img/Palette-Cycle-Mirrored-1D.png and /dev/null differ diff --git a/img/Palette-Cycle-Quantized-1D.gif b/img/Palette-Cycle-Quantized-1D.gif index e12c070..b1d71ca 100644 Binary files a/img/Palette-Cycle-Quantized-1D.gif and b/img/Palette-Cycle-Quantized-1D.gif differ diff --git a/img/Palette-Cycle-Quantized-1D.png b/img/Palette-Cycle-Quantized-1D.png deleted file mode 100644 index a39cad9..0000000 Binary files a/img/Palette-Cycle-Quantized-1D.png and /dev/null differ diff --git a/img/Palette-Cycle-Random-1D.gif b/img/Palette-Cycle-Random-1D.gif index 9f20973..c395637 100644 Binary files a/img/Palette-Cycle-Random-1D.gif and b/img/Palette-Cycle-Random-1D.gif differ diff --git a/img/Palette-Cycle-Random-1D.png b/img/Palette-Cycle-Random-1D.png deleted file mode 100644 index 36b3cf1..0000000 Binary files a/img/Palette-Cycle-Random-1D.png and /dev/null differ diff --git a/img/Palette-Fractal-Plasma-2D.gif b/img/Palette-Fractal-Plasma-2D.gif index 2e7b7d9..ad71612 100644 Binary files a/img/Palette-Fractal-Plasma-2D.gif and b/img/Palette-Fractal-Plasma-2D.gif differ diff --git a/img/Palette-Fractal-Plasma-2D.png b/img/Palette-Fractal-Plasma-2D.png deleted file mode 100644 index a766048..0000000 Binary files a/img/Palette-Fractal-Plasma-2D.png and /dev/null differ diff --git a/img/Palette-Perlin-Noise-2D.gif b/img/Palette-Perlin-Noise-2D.gif index fa070f7..fa4543c 100644 Binary files a/img/Palette-Perlin-Noise-2D.gif and b/img/Palette-Perlin-Noise-2D.gif differ diff --git a/img/Palette-Perlin-Noise-2D.png b/img/Palette-Perlin-Noise-2D.png deleted file mode 100644 index a968765..0000000 Binary files a/img/Palette-Perlin-Noise-2D.png and /dev/null differ diff --git a/img/Palette-Plasma-2D.gif b/img/Palette-Plasma-2D.gif index 7671e2a..631ea7d 100644 Binary files a/img/Palette-Plasma-2D.gif and b/img/Palette-Plasma-2D.gif differ diff --git a/img/Palette-Plasma-2D.png b/img/Palette-Plasma-2D.png deleted file mode 100644 index 97aa63a..0000000 Binary files a/img/Palette-Plasma-2D.png and /dev/null differ diff --git a/img/Palette-Ripples-(Fast-Cycle)-1D.gif b/img/Palette-Ripples-(Fast-Cycle)-1D.gif index c9cfbb1..f327679 100644 Binary files a/img/Palette-Ripples-(Fast-Cycle)-1D.gif and b/img/Palette-Ripples-(Fast-Cycle)-1D.gif differ diff --git a/img/Palette-Ripples-(Fast-Cycle)-1D.png b/img/Palette-Ripples-(Fast-Cycle)-1D.png deleted file mode 100644 index da17857..0000000 Binary files a/img/Palette-Ripples-(Fast-Cycle)-1D.png and /dev/null differ diff --git a/img/Palette-Ripples-1D.gif b/img/Palette-Ripples-1D.gif index 9f05dcf..9bfffa2 100644 Binary files a/img/Palette-Ripples-1D.gif and b/img/Palette-Ripples-1D.gif differ diff --git a/img/Palette-Ripples-1D.png b/img/Palette-Ripples-1D.png deleted file mode 100644 index 06ebdec..0000000 Binary files a/img/Palette-Ripples-1D.png and /dev/null differ diff --git a/img/Palette-Scan-Mirrored-1D.gif b/img/Palette-Scan-Mirrored-1D.gif index ccd3f6b..e4ddd01 100644 Binary files a/img/Palette-Scan-Mirrored-1D.gif and b/img/Palette-Scan-Mirrored-1D.gif differ diff --git a/img/Palette-Scan-Mirrored-1D.png b/img/Palette-Scan-Mirrored-1D.png deleted file mode 100644 index a7adb86..0000000 Binary files a/img/Palette-Scan-Mirrored-1D.png and /dev/null differ diff --git a/img/Palette-Twinkle-1D.gif b/img/Palette-Twinkle-1D.gif index de3eccd..f6fda2e 100644 Binary files a/img/Palette-Twinkle-1D.gif and b/img/Palette-Twinkle-1D.gif differ diff --git a/img/Palette-Twinkle-1D.png b/img/Palette-Twinkle-1D.png deleted file mode 100644 index ecbc60e..0000000 Binary files a/img/Palette-Twinkle-1D.png and /dev/null differ diff --git a/img/Palette-Waves-1D.gif b/img/Palette-Waves-1D.gif index 065f95b..d641017 100644 Binary files a/img/Palette-Waves-1D.gif and b/img/Palette-Waves-1D.gif differ diff --git a/img/Palette-Waves-1D.png b/img/Palette-Waves-1D.png deleted file mode 100644 index 367adf6..0000000 Binary files a/img/Palette-Waves-1D.png and /dev/null differ diff --git a/img/RGB-Cubics-1D.gif b/img/RGB-Cubics-1D.gif index ffd9752..3c27b19 100644 Binary files a/img/RGB-Cubics-1D.gif and b/img/RGB-Cubics-1D.gif differ diff --git a/img/RGB-Cubics-1D.png b/img/RGB-Cubics-1D.png deleted file mode 100644 index ff5c33e..0000000 Binary files a/img/RGB-Cubics-1D.png and /dev/null differ diff --git a/img/RGB-Fractal-Plasma-(Fire-Sines)-2D.gif b/img/RGB-Fractal-Plasma-(Fire-Sines)-2D.gif index c963ceb..8c9c97f 100644 Binary files a/img/RGB-Fractal-Plasma-(Fire-Sines)-2D.gif and b/img/RGB-Fractal-Plasma-(Fire-Sines)-2D.gif differ diff --git a/img/RGB-Fractal-Plasma-(Fire-Sines)-2D.png b/img/RGB-Fractal-Plasma-(Fire-Sines)-2D.png deleted file mode 100644 index 5e37cab..0000000 Binary files a/img/RGB-Fractal-Plasma-(Fire-Sines)-2D.png and /dev/null differ diff --git a/img/RGB-Plasma-(Fire-Sines)-2D.gif b/img/RGB-Plasma-(Fire-Sines)-2D.gif index fe2f43d..b1a8235 100644 Binary files a/img/RGB-Plasma-(Fire-Sines)-2D.gif and b/img/RGB-Plasma-(Fire-Sines)-2D.gif differ diff --git a/img/RGB-Plasma-(Fire-Sines)-2D.png b/img/RGB-Plasma-(Fire-Sines)-2D.png deleted file mode 100644 index c631508..0000000 Binary files a/img/RGB-Plasma-(Fire-Sines)-2D.png and /dev/null differ diff --git a/img/RGB-Plasma-(Spectrum-Sines)-2D.gif b/img/RGB-Plasma-(Spectrum-Sines)-2D.gif index 702b2f0..a48ee2c 100644 Binary files a/img/RGB-Plasma-(Spectrum-Sines)-2D.gif and b/img/RGB-Plasma-(Spectrum-Sines)-2D.gif differ diff --git a/img/RGB-Plasma-(Spectrum-Sines)-2D.png b/img/RGB-Plasma-(Spectrum-Sines)-2D.png deleted file mode 100644 index 81dbe97..0000000 Binary files a/img/RGB-Plasma-(Spectrum-Sines)-2D.png and /dev/null differ diff --git a/img/RGB-Ripples-1-1D.gif b/img/RGB-Ripples-1-1D.gif index 4dc01db..fb20b47 100644 Binary files a/img/RGB-Ripples-1-1D.gif and b/img/RGB-Ripples-1-1D.gif differ diff --git a/img/RGB-Ripples-1-1D.png b/img/RGB-Ripples-1-1D.png deleted file mode 100644 index da363ac..0000000 Binary files a/img/RGB-Ripples-1-1D.png and /dev/null differ diff --git a/img/RGB-Sines-1D.gif b/img/RGB-Sines-1D.gif index 409ac1a..b20e6db 100644 Binary files a/img/RGB-Sines-1D.gif and b/img/RGB-Sines-1D.gif differ diff --git a/img/RGB-Sines-1D.png b/img/RGB-Sines-1D.png deleted file mode 100644 index 3550802..0000000 Binary files a/img/RGB-Sines-1D.png and /dev/null differ diff --git a/img/Static-Color.png b/img/Static-Color.png deleted file mode 100644 index d45e273..0000000 Binary files a/img/Static-Color.png and /dev/null differ diff --git a/img/Static-Gradient-1D.png b/img/Static-Gradient-1D.png deleted file mode 100644 index 06f9a87..0000000 Binary files a/img/Static-Gradient-1D.png and /dev/null differ diff --git a/img/Static-Gradient-Mirrored-1D.png b/img/Static-Gradient-Mirrored-1D.png deleted file mode 100644 index fa9557e..0000000 Binary files a/img/Static-Gradient-Mirrored-1D.png and /dev/null differ diff --git a/ledcontrol/animationpatterns.py b/ledcontrol/animationpatterns.py index fc46171..a014707 100644 --- a/ledcontrol/animationpatterns.py +++ b/ledcontrol/animationpatterns.py @@ -279,7 +279,7 @@ def pattern(t, dt, x, y, z, prev_state): v0 = x + (wave_sine(t)) + wave_sine(x + 0.666 * t) v1 = x + (wave_sine(t + 0.05)) + wave_sine(x + 0.666 * t + 0.05) v2 = x + (wave_sine(t + 0.1)) + wave_sine(x + 0.666 * t + 0.1) - return (0.005 / (wave_triangle(v0) + 0.01), 0.005 / (wave_triangle(v1) + 0.01), 0.005 / (wave_triangle(v2) + 0.01)), rgb + return (0.01 / (wave_triangle(v0) + 0.01), 0.01 / (wave_triangle(v1) + 0.01), 0.01 / (wave_triangle(v2) + 0.01)), rgb ''' }, 330: { diff --git a/patterns.md b/patterns.md index 55afa1d..f764d33 100644 --- a/patterns.md +++ b/patterns.md @@ -1,120 +1,89 @@ ## Built-In Animation Patterns -In the images below, the y-axis represents the colors of a linear array of LEDs and the x-axis represents time. - ## Static Color -![img/Static-Color.png](img/Static-Color.png) -![img/Static-Color.gif](img/Static-Color.gif) + ## Static Gradient 1D -![img/Static-Gradient-1D.png](img/Static-Gradient-1D.png) -![img/Static-Gradient-1D.gif](img/Static-Gradient-1D.gif) + ## Static Gradient Mirrored 1D -![img/Static-Gradient-Mirrored-1D.png](img/Static-Gradient-Mirrored-1D.png) -![img/Static-Gradient-Mirrored-1D.gif](img/Static-Gradient-Mirrored-1D.gif) + ## Hue Cycle 1D -![img/Hue-Cycle-1D.png](img/Hue-Cycle-1D.png) -![img/Hue-Cycle-1D.gif](img/Hue-Cycle-1D.gif) + ## Hue Cycle Quantized 1D -![img/Hue-Cycle-Quantized-1D.png](img/Hue-Cycle-Quantized-1D.png) -![img/Hue-Cycle-Quantized-1D.gif](img/Hue-Cycle-Quantized-1D.gif) + ## Hue Scan 1D -![img/Hue-Scan-1D.png](img/Hue-Scan-1D.png) -![img/Hue-Scan-1D.gif](img/Hue-Scan-1D.gif) + ## Hue Bounce 1D -![img/Hue-Bounce-1D.png](img/Hue-Bounce-1D.png) -![img/Hue-Bounce-1D.gif](img/Hue-Bounce-1D.gif) + ## Hue Waves 1D -![img/Hue-Waves-1D.png](img/Hue-Waves-1D.png) -![img/Hue-Waves-1D.gif](img/Hue-Waves-1D.gif) + ## Hue Ripples 1D -![img/Hue-Ripples-1D.png](img/Hue-Ripples-1D.png) -![img/Hue-Ripples-1D.gif](img/Hue-Ripples-1D.gif) + ## Palette Cycle 1D -![img/Palette-Cycle-1D.png](img/Palette-Cycle-1D.png) -![img/Palette-Cycle-1D.gif](img/Palette-Cycle-1D.gif) + ## Palette Cycle Mirrored 1D -![img/Palette-Cycle-Mirrored-1D.png](img/Palette-Cycle-Mirrored-1D.png) -![img/Palette-Cycle-Mirrored-1D.gif](img/Palette-Cycle-Mirrored-1D.gif) + ## Palette Cycle Quantized 1D -![img/Palette-Cycle-Quantized-1D.png](img/Palette-Cycle-Quantized-1D.png) -![img/Palette-Cycle-Quantized-1D.gif](img/Palette-Cycle-Quantized-1D.gif) + ## Palette Cycle Random 1D -![img/Palette-Cycle-Random-1D.png](img/Palette-Cycle-Random-1D.png) -![img/Palette-Cycle-Random-1D.gif](img/Palette-Cycle-Random-1D.gif) + ## Palette Scan Mirrored 1D -![img/Palette-Scan-Mirrored-1D.png](img/Palette-Scan-Mirrored-1D.png) -![img/Palette-Scan-Mirrored-1D.gif](img/Palette-Scan-Mirrored-1D.gif) + ## Palette Bounce Mirrored 1D -![img/Palette-Bounce-Mirrored-1D.png](img/Palette-Bounce-Mirrored-1D.png) -![img/Palette-Bounce-Mirrored-1D.gif](img/Palette-Bounce-Mirrored-1D.gif) + ## Palette Waves 1D -![img/Palette-Waves-1D.png](img/Palette-Waves-1D.png) -![img/Palette-Waves-1D.gif](img/Palette-Waves-1D.gif) + ## Palette Ripples 1D -![img/Palette-Ripples-1D.png](img/Palette-Ripples-1D.png) -![img/Palette-Ripples-1D.gif](img/Palette-Ripples-1D.gif) + ## Palette Ripples (Fast Cycle) 1D -![img/Palette-Ripples-(Fast-Cycle)-1D.png](img/Palette-Ripples-(Fast-Cycle)-1D.png) -![img/Palette-Ripples-(Fast-Cycle)-1D.gif](img/Palette-Ripples-(Fast-Cycle)-1D.gif) + ## Palette Plasma 2D -![img/Palette-Plasma-2D.png](img/Palette-Plasma-2D.png) -![img/Palette-Plasma-2D.gif](img/Palette-Plasma-2D.gif) + ## Palette Fractal Plasma 2D -![img/Palette-Fractal-Plasma-2D.png](img/Palette-Fractal-Plasma-2D.png) -![img/Palette-Fractal-Plasma-2D.gif](img/Palette-Fractal-Plasma-2D.gif) + ## Palette Twinkle 1D -![img/Palette-Twinkle-1D.png](img/Palette-Twinkle-1D.png) -![img/Palette-Twinkle-1D.gif](img/Palette-Twinkle-1D.gif) + ## Palette Perlin Noise 2D -![img/Palette-Perlin-Noise-2D.png](img/Palette-Perlin-Noise-2D.png) -![img/Palette-Perlin-Noise-2D.gif](img/Palette-Perlin-Noise-2D.gif) + ## RGB Sines 1D -![img/RGB-Sines-1D.png](img/RGB-Sines-1D.png) -![img/RGB-Sines-1D.gif](img/RGB-Sines-1D.gif) + ## RGB Cubics 1D -![img/RGB-Cubics-1D.png](img/RGB-Cubics-1D.png) -![img/RGB-Cubics-1D.gif](img/RGB-Cubics-1D.gif) + ## RGB Ripples 1 1D -![img/RGB-Ripples-1-1D.png](img/RGB-Ripples-1-1D.png) -![img/RGB-Ripples-1-1D.gif](img/RGB-Ripples-1-1D.gif) + ## RGB Plasma (Spectrum Sines) 2D -![img/RGB-Plasma-(Spectrum-Sines)-2D.png](img/RGB-Plasma-(Spectrum-Sines)-2D.png) -![img/RGB-Plasma-(Spectrum-Sines)-2D.gif](img/RGB-Plasma-(Spectrum-Sines)-2D.gif) + ## RGB Plasma (Fire Sines) 2D -![img/RGB-Plasma-(Fire-Sines)-2D.png](img/RGB-Plasma-(Fire-Sines)-2D.png) -![img/RGB-Plasma-(Fire-Sines)-2D.gif](img/RGB-Plasma-(Fire-Sines)-2D.gif) + ## RGB Fractal Plasma (Fire Sines) 2D -![img/RGB-Fractal-Plasma-(Fire-Sines)-2D.png](img/RGB-Fractal-Plasma-(Fire-Sines)-2D.png) -![img/RGB-Fractal-Plasma-(Fire-Sines)-2D.gif](img/RGB-Fractal-Plasma-(Fire-Sines)-2D.gif) + ## Blackbody Cycle 1D -![img/Blackbody-Cycle-1D.png](img/Blackbody-Cycle-1D.png) -![img/Blackbody-Cycle-1D.gif](img/Blackbody-Cycle-1D.gif) + diff --git a/renderpreviews.py b/renderpreviews.py index 0f911dc..7ea3034 100644 --- a/renderpreviews.py +++ b/renderpreviews.py @@ -10,11 +10,11 @@ controller = AnimationController(None, 0, 256, pixelmappings.line(256), (0, 0, 0), False) s = 100 # LED strip length -t = 500 # Time units -gif_t = 200 # Animated gif duration +t = 400 # Time units +gif_t = 300 # Animated gif duration f = open('patterns.md', 'w') -f.write('## Built-In Animation Patterns\n\nIn the images below, the y-axis represents the colors of a linear array of LEDs and the x-axis represents time.\n\n') +f.write('## Built-In Animation Patterns\n\n') for pattern_dict in animpatterns.default.values(): errors, warnings, pattern = controller.compile_pattern(pattern_dict['source']) @@ -46,10 +46,11 @@ if i < gif_t: frames.append(frame) - img_name = f'img/{pattern_dict["name"]}.png'.replace(' ', '-') + #img_name = f'img/{pattern_dict["name"]}.png'.replace(' ', '-') gif_name = f'img/{pattern_dict["name"]}.gif'.replace(' ', '-') - img.save(img_name) + #img.save(img_name) frames[0].save(gif_name, save_all=True, append_images=frames[1:], duration=100, loop=0) - f.write(f'![{img_name}]({img_name})\n![{gif_name}]({gif_name})\n\n') + f.write(f'\n\n') + #f.write(f'\n\n') f.close()