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

import { … } from "@johnmorrisdotca/hoshi-stars/chart";

201.8 kB minified and gzipped, with everything it imports (measured with esbuild)

Exports

NameKindWhat it is
bodyRadiusfunctionHow big a body's dot is drawn, in pixels: a star's rule (brighter is larger), carried to magnitude -4.6 so that Venus is larger than Sirius.
CHART_LAYERSconstantThe layers a published chart draws: the Milky Way, the figures' lines, the constellation boundaries, the names, the deep-sky objects, the black holes, the ecliptic (the Sun's yearly path, dashed) and the grid.
ChartLayertypeOne of CHART_LAYERS.
chartSvgfunctionThe sky chart as a complete SVG element, as a string: the stars, and the layers asked for, laid out for width by height, on the night background.
ChartSvgOptionstypeWhat to draw.
dimsForUncertaintyfunctionWhether the "show uncertainty" look draws a star dimmer: a grade C star (a rough or missing distance) is, grades A and B are not.
eclipticLinefunctionThe ecliptic as points of the equatorial sky, a degree of longitude apart by default, closed (the last is the first).
eclipticToEquatorialfunctionA point of the ecliptic frame in the equatorial one (both J2000): the rotation of the sphere about the equinox by the obliquity.
MarkerRangetypeThe moments to show: markers dated from from to to, both ends included.
markersFromCsvfunctionMarkers from CSV text, the way markersToCsv writes it: a header row naming the columns (ra and dec are needed; id, date, label, color, size and group are used when present, in any order).
markerSpanfunctionThe first and last moment among the markers: what a time slider spans.
markersToCsvfunctionThe markers as CSV, one row each, with a header: id,ra,dec,date,label,color,size,group.
markerTimefunctionA moment in milliseconds since 1970.
MarkerTracktypeA group joined in date order.
markerTracksfunctionThe groups to join, each in date order, from the markers a range let through.
MarkerWhentypeA moment: an ISO 8601 text (2026-11-08 or 2026-11-08T21:30:00Z), milliseconds since 1970 (what Date.now() and getTime() give), or a Date.
normaliseBodiesfunctionCleans a list that came as text (the bodies attribute is JSON): an entry with no id, no place or no brightness is dropped; a missing name falls back to the other language, else the id; a bad phase counts as full; a bad size or brightLimb is dropped; of two entries with the same id the first is kept.
normaliseMarkersfunctionMarkers from a list: what JSON.parse gave, or any array.
OBLIQUITY_J2000constantThe mean obliquity of the ecliptic at J2000, the tilt of the Earth's axis to its orbit, in degrees: 84,381.406 arc-seconds, the value the IAU 2006 precession model (Capitaine, Wallace and Chapront 2003) fixes.
pickAccuracyfunctionThe grade and the ± of a star, for a pick: the grade, the distance range and the position resolution.
PickAccuracytypeThe grade and the ± of a picked star: what hoshi-pick carries in accuracy for a star.
SkyBodytypeOne body to draw over the stars: a planet, the Moon, a dwarf planet.
SkyBodyNamestypeThe names of a body in the two languages of the chart.
SkyMarkertypeOne point of your own on the chart.
UNCERTAIN_OPACITYconstantHow much of its own strength a grade C star is drawn at when the uncertainty is shown (its fill-opacity).
VisibleMarkertypeA marker the range lets through: the marker, its place in the list, the id it answers to, its moment in milliseconds and how strongly it is drawn.
visibleMarkersfunctionThe markers a time range lets through, in the order given, each with how strongly it is drawn.

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