@pbroom/color-kit/computePacking

PackedPlaneQueryResult

Transfer-friendly packed representation of batched plane query output.

interfaceimport type { PackedPlaneQueryResult } from '@pbroom/color-kit/compute';packed-abi.ts:117
interface PackedPlaneQueryResult {
  abiVersion: 2;
  queryDescriptors: PackedPlaneQueryDescriptor[];
  pathRanges: Uint32Array;
  pointXY: Float32Array;
  pointLC: Float32Array;
  pointColorLcha: Float32Array;
}

pathRanges contains [startPoint, pointCount] tuples. pointXY contains [x0, y0, x1, y1, ...]. pointLC contains [l0, c0, l1, c1, ...] (NaN when the query kind carries no lightness/chroma). pointColorLcha contains [l0, c0, h0, a0, ...] (NaN when the query kind carries no color).

Descriptors cover the path list contiguously and in order.

Properties

abiVersion2
Format version; decoders reject any other value.
queryDescriptorsPackedPlaneQueryDescriptor[]
One descriptor per query, in query order.
pathRangesUint32Array
[startPoint, pointCount] per path.
pointXYFloat32Array
Plane coordinates, [x0, y0, x1, y1, ...].
pointLCFloat32Array
OKLCH lightness/chroma per point, NaN when the kind has none.
pointColorLchaFloat32Array
OKLCH color and alpha per point, NaN when the kind has none.