Skip to content

Latest commit

 

History

History
102 lines (57 loc) · 2.67 KB

_structs_frame_.frame.md

File metadata and controls

102 lines (57 loc) · 2.67 KB

@ericrabil/phea.js

Globals / "structs/frame" / Frame

Namespace: Frame

Index

Properties

Variables

Functions

Properties

brightness

brightness: number | null

Defined in src/structs/frame.ts:8


color

color: Color

Defined in src/structs/frame.ts:7


gamut

gamut: ColorGamut | null

Defined in src/structs/frame.ts:9


light

light: number

Defined in src/structs/frame.ts:6

Variables

rgbToXY

rgbToXY: rgbToXY

Defined in src/structs/frame.ts:13

Functions

asBuffer

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

Parameters:

Name Type Description
frames Frame[] frames to serialize
seqNr number sequence number

Returns: Buffer


write

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

Parameters:

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