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
| Name | Type | Description |
|---|---|---|
options (optional) | { max?: number; gpuMax?: number; deviceMemory?: number; } |
|
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 1024What it prints (run when this page was built)