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

textureBytesfunction

Bytes of GPU memory a texture of this width costs, with its mipmaps, at 4 bytes a pixel (the most it can be).

Import it

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

Definition

function textureBytes(width: number): number

Parameters

NameTypeDescription
widthnumber

Pixels across; the picture is 2:1.

Returns

number

The bytes the GPU holds for it.

Examples

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

console.log(textureBytes(4096));
44739243

What it prints (run when this page was built)

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