Conversation
| let movie = makeMovie({ | ||
| nLeds, | ||
| nFrames: nLeds + 20, | ||
| tailLength: 20, | ||
| type: details.led_profile?.toLowerCase() || 'rgb', | ||
| }); |
There was a problem hiding this comment.
Made this function configurable so it'll match the device's specs
There was a problem hiding this comment.
Oh also nFrames = nLeds + tailLength lets the tail fade out rather than cutting it off
| if (white && preserveWhite) { | ||
| this.brighten(white / 255); | ||
| } |
There was a problem hiding this comment.
tbf this is probably unnecessary
| return new Uint8Array( | ||
| this._type === 'rgbw' | ||
| ? [this.white!, this.red, this.green, this.blue] | ||
| : [this.red, this.green, this.blue] | ||
| ); |
There was a problem hiding this comment.
Apparently RGBW products use white as the first byte 🤷
| import { Led } from "./led"; | ||
| import { Frame } from "./frame"; | ||
| import { Movie } from "./movie"; |
There was a problem hiding this comment.
Removing the .js extension throughout fixed some module resolution quirks in VSCode for me
|
Hey, just wanted to mention here that I made an RGBW implementation as well here: matthi4s@a886a16 I tried to avoid having to declare every LED as RGBW, so any LED, Frame or Movie can be used on RGB and RGBW devices without any further changes, you just have to declare RGBW on the device level (or even autodetect it). Not sure really which one is the better solution. I can also create a PR for it, but #1 should be merged first. |
Hey! Hope you don't mind but your fork seems to be the most updated of the bunch, but it lacked support for RGB+W Twinkly products.
tl;dr changelog:
I'll annotate the diff in a bit!