@pbroom/color-kit/computePacking
PackedPlaneQueryResult
Transfer-friendly packed representation of batched plane query output.
import type { PackedPlaneQueryResult } from '@pbroom/color-kit/compute';packed-abi.ts:117interface 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
- abiVersion
2 - Format version; decoders reject any other value.
- queryDescriptors
PackedPlaneQueryDescriptor[] - One descriptor per query, in query order.
- pathRanges
Uint32Array [startPoint, pointCount]per path.- pointXY
Float32Array - Plane coordinates,
[x0, y0, x1, y1, ...]. - pointLC
Float32Array - OKLCH lightness/chroma per point,
NaNwhen the kind has none. - pointColorLcha
Float32Array - OKLCH color and alpha per point,
NaNwhen the kind has none.