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
| Name | Type | Description |
|---|---|---|
width | number | 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));44739243What it prints (run when this page was built)