本文へ移動

Chikyu Earth地球

世界の国の輪郭を線で描いた地球儀です。地球と同じ速さで回ります。宇宙から見たような地球と、好きな場所の目印も使えます。

「地球」(ちきゅう) は、私たちが住む星の名前です。 名前について(英語)

目次

リファレンス · 印刷できるシート: 色をぬる地球と世界地図、わたしの国、昼と夜、季節

dayNightSvg関数

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

The day and night sheet: the Earth with the Sun's light coming from the right, the lit half left white (day) and the dark half hatched (night), the line between them thick, and three facts, for the date and time you give. The line is worked out from the package's own sun position.

インポート

import { dayNightSvg } from "@johnmorrisdotca/chikyu-earth/sheets";

定義

function dayNightSvg(ms: number, options: SheetOptions): string

引数

名前型説明
msnumber

The moment, in milliseconds since the Unix epoch.

optionsSheetOptions

The room, the language and the type.

戻り値

string

The <svg> markup, carrying the place of the Sun as data-sun.

例

import { dayNightSvg } from "@johnmorrisdotca/chikyu-earth/sheets";

const svg = dayNightSvg(Date.UTC(2026, 5, 21, 12), { widthMm: 184.6, heightMm: 180 });
console.log(svg.includes("data-sun="), svg.includes("Night"));
true true

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

ソースを見るGitHub で編集@johnmorrisdotca/chikyu-earth 0.51.1 のソースから作成しました。

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