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
| Name | Type | Description |
|---|---|---|
given | string | null | The attribute's value, or |
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 5What it prints (run when this page was built)