WallpaperMachine
The wallpapers you love. A new home on your Mac.
指定した場所・日時に見える星と星座を表示する全天星図アプリ
Translation pending
LifestyleJavaScript · PythonGitHub @mayaimankindbuildbrightfuture-progOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
指定した場所・日時から見える星と星座を表示するWebアプリ
Translation pending
Loading the full README.
Read the full README ↗指定した場所・日時に、その場所から見える星と星座を対応づけて表示する Web アプリです。
ビルド不要の静的ファイルだけで動き、index.html をブラウザで開くだけで使えます。
index.html をブラウザで開きます(ダブルクリックで OK。サーバーは不要です)。https:// または http://localhost で開いたときだけ使えます。リポジトリの Settings → Pages で「Deploy from a branch」、ブランチ main・フォルダ / (root) を選ぶと、
そのまま公開できます(.nojekyll を置いてあります)。
| パス | 内容 |
|---|---|
index.html, style.css | 画面 |
js/astro.js | 天文計算(恒星時・歳差・地平座標変換・太陽と月・タイムゾーン)。ブラウザと Node.js の両方で動きます |
js/app.js | 画面の制御と Canvas による星図の描画・タップ判定 |
data/stars.json | 5.0 等より明るい恒星 1630 個(赤経・赤緯 J2000、等級、温度、バイエル符号、英語・日本語の固有名) |
data/constellations.json | 88 星座の星座線・日本語名・ラテン語名・ラベル位置 |
data/*.js | 上の JSON と同じ内容を JS 変数にしたもの(file:// で開いたときに読み込むため) |
tools/build_data.py | 元データから data/ を生成するスクリプト |
test/astro.test.js | 計算の検証テスト |
Node.js 18 以上で次を実行します。
npm test # または: node --test test/astro.test.js
確認している内容の例:
mkdir src && cd src
curl -LO https://raw.githubusercontent.com/brettonw/YaleBrightStarCatalog/master/bsc5-short.json
curl -LO https://raw.githubusercontent.com/ofrohn/d3-celestial/master/data/constellations.json
curl -LO https://raw.githubusercontent.com/ofrohn/d3-celestial/master/data/constellations.lines.json
cd .. && python3 tools/build_data.py src
等級の上限や日本語名は tools/build_data.py の MAG_LIMIT・JA_NAMES で変えられます。
data/LICENSE-d3-celestial.txt)。ラベル位置は星座線の頂点から計算し直しています。