pixel-grid
pixel-grid copied to clipboard
add option to force type inference
Because we handle both flat arrays and nested arrays, and both single float values and rgb triplets, there is an unavoidable ambiguity when passing something like
[[a,b,c],[a,b,c],[a,b,c],[a,b,c]]
Is that a 4x3
grid of numbers, or a 4x1
grid of rgb
values?
A simple solution is to add a type
option that, if provided, forces one form of type inference or the other, then it matter's less which we do by default (currently, treat them as rgb).