nanoleaves
Version:
An API client & command-line tool for the Nanoleaf Aurora light.
22 lines (18 loc) • 310 B
JavaScript
;
module.exports = class Panel
{
constructor(id)
{
this.id = String(id);
this.frames = [];
}
serialize()
{
var result = `${this.id} ${this.frames.length}`;
this.frames.forEach(f =>
{
result += ` ${f.r} ${f.g} ${f.b} ${f.w} ${f.transition}`;
});
return result.trim();
}
};