Skip to content

Intermact API Reference / @intermact/core / GeometryProvider2D

Interface: GeometryProvider2D

Defined in: packages/core/src/object/geometry-provider.ts:56

2D geometry provider: how an object is sampled and bounded.

Properties

capabilities

readonly capabilities: readonly GeometryCapability[]

Defined in: packages/core/src/object/geometry-provider.ts:57

Methods

contourGlyphIndex()?

optional contourGlyphIndex(): readonly number[] | null

Defined in: packages/core/src/object/geometry-provider.ts:67

Flat contour index → glyph index for sequential write reveal.

Returns

readonly number[] | null


fillGroupColors()?

optional fillGroupColors(): readonly string[] | null

Defined in: packages/core/src/object/geometry-provider.ts:72

Per-fill-group CSS colors (design.md §6.2 heatmap). When present, the renderer fills each group with its own color instead of style.fill.

Returns

readonly string[] | null


getBounds()

getBounds(): Bounds2D

Defined in: packages/core/src/object/geometry-provider.ts:59

Returns

Bounds2D


sampleBuffer()?

optional sampleBuffer(opts?): Float32Array

Defined in: packages/core/src/object/geometry-provider.ts:61

Performance channel: interleaved buffer, avoiding per-point allocation.

Parameters

opts?

PathSampleOptions

Returns

Float32Array


sampleFillGroups()?

optional sampleFillGroups(opts?): SampledContour2D[][] | null

Defined in: packages/core/src/object/geometry-provider.ts:65

Per-glyph fill groups (text/LaTeX); triangulated independently.

Parameters

opts?

PathSampleOptions

Returns

SampledContour2D[][] | null


samplePath()

samplePath(opts?): SampledPath2D

Defined in: packages/core/src/object/geometry-provider.ts:58

Parameters

opts?

PathSampleOptions

Returns

SampledPath2D


sampleUnderlayPath()?

optional sampleUnderlayPath(opts?): SampledPath2D | null

Defined in: packages/core/src/object/geometry-provider.ts:63

Optional wider contour path rendered as ObjectStyle.underlayFill.

Parameters

opts?

PathSampleOptions

Returns

SampledPath2D | null

Intermact v1.0 — 文档覆盖 Phase-1 / Phase-2 / Phase-3(全阶段)