Skip to the content

Hoshi Stars星

The stars you can see without a telescope, with names, colours and distances; the 88 constellations with their lines and boundaries; the Messier objects; and seven map projections to draw them on.

Hoshi is the Japanese word 星 for a star. About the name

Contents

Reference · /chart/element

ChartViewDetailtype

What hoshi-view says: where the chart looks now, and final once the hand has settled.

Import it

import type { ChartViewDetail } from "@johnmorrisdotca/hoshi-stars/chart/element";

Definition

interface ChartViewDetail {
    projection: Projection;
    ra: number;
    dec: number;
    zoom: number;
    final: boolean;
}

Members

NameTypeDescription
projection"stereographic" | "orthographic" | "gnomonic" | "equidistant" | "equirectangular" | "mollweide" | "hammer"
ranumber
decnumber
zoomnumber
finalboolean

Examples

import type { ChartViewDetail } from "@johnmorrisdotca/hoshi-stars/chart/element";

document.querySelector("hoshi-chart")!.addEventListener("hoshi-view", (event) => {
  const { ra, dec, zoom, final } = (event as CustomEvent<ChartViewDetail>).detail;
  if (final) history.replaceState(null, "", `?ra=${ra.toFixed(2)}&dec=${dec.toFixed(2)}&zoom=${zoom.toFixed(2)}`);
});

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hoshi-stars 0.47.0.