UNPKG

aura-sdk

Version:
55 lines (54 loc) 2.17 kB
export interface ISDKInjection { setup: () => number; setcolor: (index: number, r: number, g: number, b: number) => void; updateColor: () => void; } export declare class Controller { private auraSDK; private deviceName; private ledCount; constructor(deviceName: string, auraSDK: ISDKInjection); /** * Joins multiple controllers into one array of callable functions * @param controllers array of controllers to join */ static joinControllers(controllers: Controller[]): { getDeviceName: () => string; setColor: (color: string) => void; setColorNow: (color: string) => void; }[]; /** * Get number of controllable leds in this controller */ getLedCount(): number; /** * Get the device name (motherboard, GPU, DRAM) */ getDeviceName(): string; /** * Sets the color of the LED at the given index * @param index index of the LED to change * @param color color of the LED. This uses [color](https://www.npmjs.com/package/color) package to convert the string to RGB. */ setColor(index: number, color: string): void; /** * Sets the color of all the leds in the controller * @param color color of the LEDs. This uses [color](https://www.npmjs.com/package/color) package to convert the string to RGB. */ setAllColor(color: string): void; /** * Sets the color of the LED at the given index and immediately updates them * @param index index of the LED to change * @param color color of the LED. This uses [color](https://www.npmjs.com/package/color) package to convert the string to RGB. */ setColorNow(index: number, color: string): void; /** * Sets the color of all the leds in the controller and immediately updates them * @param color color of the LEDs. This uses [color](https://www.npmjs.com/package/color) package to convert the string to RGB. */ setAllColorNow(color: string): void; /** * Updates the LEDs attached to the controller to reflect the current state */ updateColor(): void; }