FigureOnScreentype
One figure on the screen: where its lines are in FigureLines.segments, and its name's spot. The objects are reused by the next update.
Import it
import type { FigureOnScreen } from "@johnmorrisdotca/hoshi-stars/sky-labels";
Definition
interface FigureOnScreen {
abbreviation: string;
start: number;
end: number;
left: number;
top: number;
right: number;
bottom: number;
x: number;
}
Members
| Name | Type | Description |
|---|---|---|
abbreviation | string | The constellation's IAU abbreviation ( |
start | number | The figure's lines are the segments from |
end | number | |
left | number | The box the figure's lines in view take: its left, top, right and bottom edges. |
top | number | |
right | number | |
bottom | number | |
x | number | The middle of that box across: where its name is centred. |
Examples
import type { FigureOnScreen } from "@johnmorrisdotca/hoshi-stars/sky-labels";
const lines = (figure: FigureOnScreen): number => figure.end - figure.start;
console.log(typeof lines);functionWhat it prints (run when this page was built)