Skip to the content

Chikyu Earth地球

A line-drawn globe of the world's countries that turns at the Earth's own rate, with an optional realistic Earth from space and markers for any place.

Chikyu is the Japanese word 地球 for the Earth. About the name

Contents

Reference · The realistic Earth's pure parts

readAirThicknessfunction

What a page's air-thickness attribute means: a number from 1 (the true thickness) to 5, given as it is written; with none, or something that is not a number, AIR_THICKNESS_DEFAULT. A number outside the range is brought to its nearest end.

Import it

import { readAirThickness } from "@johnmorrisdotca/chikyu-earth/realistic";

Definition

function readAirThickness(given: string | null): number

Parameters

NameTypeDescription
givenstring | null

The attribute's value, or null when the page has none.

Returns

number

How many times its real thickness the air is drawn, between 1 and 5.

Examples

import { readAirThickness } from "@johnmorrisdotca/chikyu-earth/realistic";
console.log(readAirThickness(null), readAirThickness("1"), readAirThickness("9"));
3 1 5

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/chikyu-earth 0.51.1.