FigureLinesSettingstype
What the lines are.
Import it
import type { FigureLinesSettings } from "@johnmorrisdotca/hoshi-stars/sky-labels";
Definition
interface FigureLinesSettings {
strength?: number;
reach?: number;
dotRadius?: number;
maxLength?: number;
lang?: NameLanguage;
culture?: Culture | undefined;
style?: Partial<LabelStyle>;
}
Members
| Name | Type | Description |
|---|---|---|
strength (optional) | number | undefined | How strong the lines are when not under the pointer, 0 to 1. 0 draws nothing at all, and |
reach (optional) | number | undefined | How near a line the pointer must be to pick its figure, in pixels. 14 by default; a finger may want more. |
dotRadius (optional) | number | undefined | The radius in pixels of a star's dot, which a figure's name must not cover: 3 by default. |
maxLength (optional) | number | undefined | A line longer than this many pixels is left out: a page that draws the whole sky flat uses it to drop the lines that cross the seam. Left out, no line is dropped for its length. |
lang (optional) | NameLanguage | undefined | The language of the figure's name when it is picked: |
culture (optional) | Culture | undefined | The sky culture whose figures are drawn ( |
style (optional) | Partial<LabelStyle> | undefined | The look of the picked figure's name ( |
Examples
import type { FigureLinesSettings } from "@johnmorrisdotca/hoshi-stars/sky-labels";
const settings: FigureLinesSettings = { strength: 0.2, lang: "ja", reach: 16 };
console.log(settings.strength);0.2What it prints (run when this page was built)