Reference · Facts, line drawings and positions
LineupDottype
A body on the picture: its centre and radius in CSS pixels.
Import it
import type { LineupDot } from "@johnmorrisdotca/wakusei-planets";
Definition
interface LineupDot {
place: LineupPlace;
cx: number;
cy: number;
r: number;
}
Members
| Name | Type | Description |
|---|---|---|
place | LineupPlace | |
cx | number | |
cy | number | |
r | number |
Examples
import { lineupBodies, lineupProject, lineupView, placeLineup, type LineupDot } from "@johnmorrisdotca/wakusei-planets";
const places = placeLineup(lineupBodies(), "row");
const dots: LineupDot[] = lineupProject(places, lineupView(places, 0.2), 640, 360);
console.log(dots.map((dot) => `${dot.place.body.id} ${dot.r.toFixed(1)}px`).join(", "));sun 26.8px, sirius-a 45.9px, vega 72.9px, arcturus 679.6px, aldebaran 1182.6px, rigel 2111.0px, antares 18193.9px, betelgeuse 28280.8px, vy-canis-majoris 37993.1px, woh-g64 41203.8px, uy-scuti 45698.8px, stephenson-2-18 57524.8pxWhat it prints (run when this page was built)