本文へ移動

Hoshi Stars星

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

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

目次

リファレンス · 数値から描いた星のSVGの絵と、太陽との大きさくらべ

PortraitOptions型

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

How a portrait or a comparison is drawn.

インポート

import type { PortraitOptions } from "@johnmorrisdotca/hoshi-stars/portrait";

定義

interface PortraitOptions {
    size?: number;
    lang?: "en" | "ja";
    name?: string;
    background?: "space" | "none";
    captions?: boolean;
}

メンバー

名前型説明
size (省略可)number | undefined

The width in pixels (the picture scales, so this only sets its default size). Default 240 for a portrait and 360 for a comparison.

lang (省略可)"en" | "ja" | undefined

The language of the words in the picture: "en" (default) or "ja".

name (省略可)string | undefined

The star's name, used in the picture's title and, in the comparison, as the star's label.

background (省略可)"none" | "space" | undefined

Draw the dark sky behind ("space", the default) or leave the picture transparent ("none").

captions (省略可)boolean | undefined

Print the lines "drawn from its numbers, not a photo" and "a generic look, not this star's surface" under the portrait. Default true.

例

import type { PortraitOptions } from "@johnmorrisdotca/hoshi-stars/portrait";

const options: PortraitOptions = { size: 320, lang: "ja", name: "ベテルギウス" };
console.log(options.size);
320

出力(このページを作ったときに実行した結果)

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

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