Reference · The realistic Earth's pure parts
CountryNametype
A country named at one draw: its code, the text, where the middle of the part in view falls, the box the text goes in (top left corner and size) and the text's size in pixels.
Import it
import type { CountryName } from "@johnmorrisdotca/chikyu-earth/realistic";
Definition
interface CountryName {
code: string;
text: string;
x: number;
y: number;
left: number;
top: number;
width: number;
height: number;
size: number;
}
Members
| Name | Type | Description |
|---|---|---|
code | string | |
text | string | |
x | number | |
y | number | |
left | number | |
top | number | |
width | number | |
height | number | |
size | number |
Examples
import type { CountryName } from "@johnmorrisdotca/chikyu-earth/realistic";
const say = (one: CountryName): string => `${one.text} at ${one.left}, ${one.top}`;
console.log(typeof say);functionWhat it prints (run when this page was built)