リファレンス
/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. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。