Reference · Facts, line drawings and positions
LineupLabeltype
A label placed on the picture: a plate of lines at a place, and the dot it belongs to.
Import it
import type { LineupLabel } from "@johnmorrisdotca/wakusei-planets";
Definition
interface LineupLabel {
id: string;
lines: string[];
x: number;
y: number;
width: number;
height: number;
}
Members
| Name | Type | Description |
|---|---|---|
id | string | |
lines | string[] | |
x | number | The top left of the plate, in pixels. |
y | number | |
width | number | |
height | number |
Examples
import { lineupBodies, lineupLabels, lineupProject, lineupView, placeLineup, type LineupLabel } from "@johnmorrisdotca/wakusei-planets";
const places = placeLineup(lineupBodies(), "row");
const labels: LineupLabel[] = lineupLabels(lineupProject(places, lineupView(places, 0.5), 800, 450), 800, 450, "en").labels;
console.log(labels.map((label) => label.id).join(", "));rigel, aldebaran, arcturus, vegaWhat it prints (run when this page was built)