Skip to the content

Wakusei Planets惑星

The Sun, the planets and their moons as a clean line drawing, a shaded realistic drawing or a painted surface map, with real sizes, tilt and rotation, and the moons where they are at any date and time.

Wakusei is the Japanese word 惑星 for a planet. About the name

Contents

Reference · Facts, line drawings and positions

lineupLabelsSvgfunction

The labels and rings as SVG markup (the contents of an <svg> that is width by height): a dark plate with white lines for each label, and a thin ring and tick for each body too small to see. The first line of a plate is bold.

Import it

import { lineupLabelsSvg } from "@johnmorrisdotca/wakusei-planets";

Definition

function lineupLabelsSvg(plan: ReturnType<typeof lineupLabels>, font?: number): string

Parameters

NameTypeDescription
plan{ labels: LineupLabel[]; rings: { id: string; cx: number; cy: number; r: number; }[]; }

What lineupLabels returned.

font (optional)number

The pixel size of the text; the same as was given to lineupLabels (12 by default).

Returns

string

SVG markup.

Examples

import { lineupBodies, lineupLabels, lineupLabelsSvg, lineupProject, lineupView, placeLineup } from "@johnmorrisdotca/wakusei-planets";

const places = placeLineup(lineupBodies(), "row");
const plan = lineupLabels(lineupProject(places, lineupView(places, 0.4), 800, 450), 800, 450, "en");
console.log(lineupLabelsSvg(plan).startsWith("<g"));
true

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/wakusei-planets 0.29.0.