1681-engine / index / worldZoom
Function: worldZoom() ​
ts
function worldZoom(
canvasHeight,
offset?,
options?
): number;Defined in: src/core/pixelZoom.ts:41
The camera zoom (screen px per world px) for a canvas this tall, moved offset steps by the player (rounded to half steps), within min–max. Whole, or exactly halfZoom: a half step anywhere else rounds to the whole one.
Parameters ​
| Parameter | Type | Default value |
|---|---|---|
canvasHeight | number | undefined |
offset | number | 0 |
options? | PixelZoomOptions | undefined |
Returns ​
number