1681-engine / pixel / ditherVignette
Function: ditherVignette() ​
ts
function ditherVignette(
w,
h,
strength?,
from?
): Texture;Defined in: src/pixel/DitherVignette.ts:14
A white dithered edge for a screen of w×h world pixels, one texel a world pixel and scaled up 'nearest'; the sprite that draws it tints it. Made once per size and strength. Returns Texture.EMPTY when the browser has no canvas memory to spare (iOS), so the caller asks again later.
Parameters ​
| Parameter | Type | Default value |
|---|---|---|
w | number | undefined |
h | number | undefined |
strength | number | 1 |
from | number | 0.55 |
Returns ​
Texture