Skip to content

Function: expandColor() ​

ts
function expandColor(input, count, out?): Float32Array;

Experimental

Expand a ColorInput into 4 * count floats. A tuple is broadcast; a Float32Array shorter than 4 * count is padded by repeating its last complete color (or transparent black when empty), so a partially-streamed color array never reads garbage.

Parameters ​

ParameterType
inputColorInput
countnumber
outFloat32Array

Returns ​

Float32Array

Released under the MIT License.