Globals / "structs/frame" / Frame
• brightness: number | null
Defined in src/structs/frame.ts:8
• color: Color
Defined in src/structs/frame.ts:7
• gamut: ColorGamut | null
Defined in src/structs/frame.ts:9
• light: number
Defined in src/structs/frame.ts:6
• rgbToXY: rgbToXY
Defined in src/structs/frame.ts:13
▸ asBuffer(frames
: Frame[], seqNr
: number): Buffer
Defined in src/structs/frame.ts:48
Serialize an array of frames to a Buffer ready to be sent
Name | Type | Description |
---|---|---|
frames |
Frame[] | frames to serialize |
seqNr |
number | sequence number |
Returns: Buffer
▸ write(__namedParameters
: { brightness: null | number ; color: { blue: number ; green: number ; red: number } ; gamut: null | ColorGamut ; light: number }, useXY
: boolean, buffer
: number[]): void
Defined in src/structs/frame.ts:21
Writes a frame to a buffer array
Name | Type | Description |
---|---|---|
__namedParameters |
{ brightness: null | number ; color: { blue: number ; green: number ; red: number } ; gamut: null | ColorGamut ; light: number } | - |
useXY |
boolean | whether to use the XY colorspace |
buffer |
number[] | buffer to write to |
Returns: void