@ginden/blinkstick-v2
Version:
Improved Blickstick API for Node.js
22 lines • 1.21 kB
TypeScript
import { SimpleFrame } from '../frame/simple-frame';
import { ComplexFrame } from '../frame/complex-frame';
import type { RgbTuple } from '../../types';
/**
* @summary Converts multiple simple frame iterables (one per LED) into a single complex frame iterable.
* @remarks
* This function allows you to convert a set of simple frames into complex frames -
* effectively animating each LED independently.
*
* 1. A complex frame is emitted whenever *any* LED changes its colour.
*
* 2. If a LED changes its colour, **all other LEDs** that still have at least
* one more simple frame will also transition to their next frame – even if
* their current one has not finished yet. This keeps colour-changes across
* LEDs perfectly aligned (see the third test case).
*
* 3. When a LED runs out of simple frames it transitions to `fillMissingEndWith` parameter value, defaulting to black.
* @experimental
* @category Animation
*/
export declare function convertSimpleFramesToComplexFrame(simpleFrames: Exclude<Iterable<SimpleFrame>, Generator>[], fillMissingEndWith?: RgbTuple, ledCount?: number): Iterable<ComplexFrame>;
//# sourceMappingURL=convert-simple-frames-to-complex-frame.d.ts.map