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

textureCapfunction

The cap for this device: low-memory phones stop at 2048, and the GPU's own limit and the option are never passed.

Import it

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

Definition

function textureCap(options?: { max?: number; gpuMax?: number; deviceMemory?: number; }): number

Parameters

NameTypeDescription
options (optional){ max?: number; gpuMax?: number; deviceMemory?: number; }

max (the page's own limit), gpuMax (the GPU's MAX_TEXTURE_SIZE) and deviceMemory (gigabytes, from navigator.deviceMemory); each may be left out.

Returns

number

The most pixels across any picture may have on this device.

Examples

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

console.log(textureCap(), textureCap({ deviceMemory: 2 }), textureCap({ gpuMax: 1024 }));
4096 2048 1024

What it prints (run when this page was built)

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