Reference · The realistic Earth's pure parts
seaNamesForfunction
The names a view of this size may show: oceans and continents while the Earth is small, and seas, gulfs and bays once it is at least SEA_RADIUS pixels in radius.
Import it
import { seaNamesFor } from "@johnmorrisdotca/chikyu-earth/realistic";
Definition
function seaNamesFor(radius: number): readonly SeaFeature[]
Parameters
| Name | Type | Description |
|---|---|---|
radius | number | The Earth's radius on the screen, in CSS pixels. |
Returns
readonly SeaFeature[]
The features, oceans and continents first.
Examples
import { seaNamesFor } from "@johnmorrisdotca/chikyu-earth/realistic";
console.log(seaNamesFor(120).some((one) => one.id === "pacific-ocean"));
console.log(seaNamesFor(120).some((one) => one.id === "sea-of-japan"));
console.log(seaNamesFor(400).some((one) => one.id === "mediterranean-sea"));true
false
trueWhat it prints (run when this page was built)