本文へ移動

Hoshi Stars星

肉眼で見える星の名前・色・距離、88星座の線と境界、メシエ天体、そしてそれらを描くための7種類の図法を使えます。

「星」(ほし) は、夜空に光って見えるものです。 名前について(英語)

目次

リファレンス

/chart

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

最小化と gzip 圧縮をしたサイズは 201.8 kB(読み込むものをすべて含み、esbuild で計測)

リファレンスの説明と例は英語です。見出しと目次は日本語です。

エクスポート

名前種類概要
bodyRadius関数How 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_LAYERS定数The 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.
ChartLayer型One of CHART_LAYERS.
chartSvg関数The 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.
ChartSvgOptions型What to draw.
dimsForUncertainty関数Whether the "show uncertainty" look draws a star dimmer: a grade C star (a rough or missing distance) is, grades A and B are not.
eclipticLine関数The ecliptic as points of the equatorial sky, a degree of longitude apart by default, closed (the last is the first).
eclipticToEquatorial関数A point of the ecliptic frame in the equatorial one (both J2000): the rotation of the sphere about the equinox by the obliquity.
MarkerRange型The moments to show: markers dated from from to to, both ends included.
markersFromCsv関数Markers 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).
markerSpan関数The first and last moment among the markers: what a time slider spans.
markersToCsv関数The markers as CSV, one row each, with a header: id,ra,dec,date,label,color,size,group.
markerTime関数A moment in milliseconds since 1970.
MarkerTrack型A group joined in date order.
markerTracks関数The groups to join, each in date order, from the markers a range let through.
MarkerWhen型A 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.
normaliseBodies関数Cleans 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.
normaliseMarkers関数Markers from a list: what JSON.parse gave, or any array.
OBLIQUITY_J2000定数The 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.
pickAccuracy関数The grade and the ± of a star, for a pick: the grade, the distance range and the position resolution.
PickAccuracy型The grade and the ± of a picked star: what hoshi-pick carries in accuracy for a star.
SkyBody型One body to draw over the stars: a planet, the Moon, a dwarf planet.
SkyBodyNames型The names of a body in the two languages of the chart.
SkyMarker型One point of your own on the chart.
UNCERTAIN_OPACITY定数How much of its own strength a grade C star is drawn at when the uncertainty is shown (its fill-opacity).
VisibleMarker型A 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.
visibleMarkers関数The markers a time range lets through, in the order given, each with how strongly it is drawn.

ソースを見るGitHub で編集@johnmorrisdotca/hoshi-stars 0.47.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。