本文へ移動

Hoshi Stars星

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

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

目次

リファレンス · 天の川 (明るさの地図と、描くための帯)

MilkyWayTextureOptions型

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

What texture to paint.

インポート

import type { MilkyWayTextureOptions } from "@johnmorrisdotca/hoshi-stars/milky-way";

定義

interface MilkyWayTextureOptions extends MilkyWayDetailOptions {
    width?: number;
    frame?: "equatorial" | "galactic";
    ramp?: readonly MilkyWayRampStop[];
}

メンバー

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

Pixels across: an even whole number from 16 to 4096 (the family's largest texture side), default 2048. The height is half of it.

frame (省略可)"galactic" | "equatorial" | undefined

equatorial (the default): across is right ascension, 0 at the left edge rising to 360 at the right, and down is declination, +90 at the top to -90 at the bottom, the way a sky sphere in equatorial coordinates is mapped. galactic: across is galactic longitude and down galactic latitude, the same way round, with the Galactic centre at the left edge.

ramp (省略可)readonly MilkyWayRampStop[] | undefined

The colours, at least two stops in rising order of level, the first at 0 and the last at 1. Default MILKY_WAY_NIGHT_RAMP.

detail (省略可)number | undefined

0 reads the grid in straight lines between its points (the default for milkyWayBrightness). Above 0 the grid is read along smooth curves and each value is pushed away from the mean of the degree or two round it, by this much: the dust lanes come out narrower and darker and the star clouds beside them brighter, the way the eye sees them. It sharpens what the grid holds and adds no detail of its own (no noise, nothing made up). From 0 to 2; 1 is the default for milkyWayTexture.

例

import { milkyWayTexture, type MilkyWayTextureOptions } from "@johnmorrisdotca/hoshi-stars/milky-way";

const options: MilkyWayTextureOptions = { width: 1024, frame: "galactic", detail: 1.5 };
console.log(milkyWayTexture(options).height); // 512
512

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

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

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