本文へ移動

Hoshi Stars星

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

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

目次

リファレンス · /chart/element

ChartPick型

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

What hoshi-pick says: a body of the page's bodies (kind body, id its own, with names), a star (id its HR number, with accuracy: its grade, the distance range and the position resolution), a deep-sky object (M42), a black hole (cygnus-x-1), a figure (id the figure's, with abbreviation for a constellation), or nothing (kind none).

インポート

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

定義

interface ChartPick {
    kind: "star" | "deep" | "hole" | "figure" | "body" | "none";
    id: string | null;
    names?: SkyBodyNames | undefined;
    abbreviation?: string | undefined;
    accuracy?: PickAccuracy | undefined;
}

メンバー

名前型説明
kind"deep" | "star" | "hole" | "figure" | "body" | "none"
idstring | null
names (省略可)SkyBodyNames | undefined

For a body only: its names in English and Japanese, as the page gave them.

abbreviation (省略可)string | undefined
accuracy (省略可)PickAccuracy | undefined

For a star only: how well it is known (PickAccuracy): the grade A, B or C, the distance range in light-years (null where there is none) and the position resolution in arc-seconds.

例

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

document.querySelector("hoshi-chart")!.addEventListener("hoshi-pick", (event) => {
  const { kind, id, abbreviation, accuracy } = (event as CustomEvent<ChartPick>).detail;
  console.log(kind, id, abbreviation ?? "", accuracy?.grade ?? "");
});

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

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