Reference · The realistic Earth's pure parts
cityTiersForfunction
The tiers of cities a view of this size shows: none while the Earth is small, the capitals, then the cities of a million, then those of 100,000 as it grows.
Import it
import { cityTiersFor } from "@johnmorrisdotca/chikyu-earth/realistic";
Definition
function cityTiersFor(radius: number): CityNameTier[]
Parameters
| Name | Type | Description |
|---|---|---|
radius | number | The Earth's radius on the screen, in CSS pixels. |
Returns
CityNameTier[]
The tiers, smallest first.
Examples
import { cityTiersFor } from "@johnmorrisdotca/chikyu-earth/realistic";
console.log(cityTiersFor(30), cityTiersFor(200), cityTiersFor(900));[] [ 'capitals', '1m' ] [ 'capitals', '1m', '100k' ]What it prints (run when this page was built)