Skip to content

circlesToDrawables

circlesToDrawables(c, pxPerUnit?, offsetScale?): DrawableVector[]

Defined in: core/instanced-vector.ts:95

Instanced circles → one drawable per instance.

A borders entry is the ring thickness as a fraction of the radius, which the fragment shader paints as the outer annulus over the fill disc. The exact vector equivalent is ONE circle stroked on its ring centreline: r·(1 − b/2) with stroke-width = r·b covers [r·(1−b), r] in the ring colour and leaves the fill visible inside — which also renders a transparent-fill ring (the LOD aggregate halo) correctly, where two stacked discs would fill the hole.

With InstancedCirclesData.bordersPx the entries are px widths instead (#495), turned into the fraction the shader draws at the export’s zoom: pxPerUnit is the zoom k for a world layer, 1 for a screen one.

InstancedCirclesData.offsets (#509) move each centre by offset · offsetScale world units: offsetScale is 1 / k for a screen layer (px offsets at the export’s zoom) and 1 for a world one.

InstancedCirclesData

number = 1

number = 1

DrawableVector[]