@pbroom/color-kit/planeTracing

PlaneQueryTrace

Diagnostic record of how a plane query was solved, returned by inspectPlaneQuery / inspectPlaneQueries and by compute requests that set trace.

interfaceimport type { PlaneQueryTrace } from '@pbroom/color-kit/plane';types.ts:343
interface PlaneQueryTrace {
  summary: PlaneQueryTraceSummary;
  stages: PlaneQueryTraceStage[];
}

Properties

summaryPlaneQueryTraceSummary
Aggregate counters and metadata; always present.
stagesPlaneQueryTraceStage[]
Ordered stage records; empty at 'summary' level, ends with metrics otherwise.

Example

TypeScript
import { inspectPlaneQuery } from '@pbroom/color-kit/plane';

const { trace } = inspectPlaneQuery({ model: 'oklch', fixed: { h: 250 } }, { kind: 'gamutRegion', gamut: 'srgb' });

trace.summary.solver; // → 'analytic-lc'
trace.summary.resultPointCount; // → 110
trace.stages.map((stage) => stage.kind);
// → ['solver', 'marchingSquares', 'viewportClassification', 'paths', 'paths', 'marchingSquares', 'paths', 'metrics']

Also exported from