For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.

Type Alias ProjectionCache

We calculate label-plane projected points for line vertices as we place glyphs along the line Since we will use the same vertices for potentially many glyphs, cache the results for this bucket over the course of the render. Each vertex location also potentially has one offset equivalent for us to hold onto. The vertex indices are per-symbol-bucket.

type ProjectionCache = {
    anyProjectionOccluded: boolean;
    cachedAnchorPoint: Point | undefined;
    offsets: IndexToPointCache;
    projections: IndexToPointCache;
}
Index

Properties

anyProjectionOccluded: boolean

Was any projected point occluded by the map itself (eg. occluded by the planet when using globe projection).

Viewport-pitched line-following texts where any of the line points is hidden behind the planet curve becomes entirely hidden. This is perhaps not the most ideal behavior, but it works, it is simple and planetary-scale texts such as this seem to be a rare edge case.

cachedAnchorPoint: Point | undefined

Cached projected anchor point.

label-plane vertices which have been shifted to follow an offset line

projections: IndexToPointCache

tile-unit vertices projected into label-plane units

Was this helpful?