Skip to content

1681-engine / index / baseZoom

Function: baseZoom() ​

ts
function baseZoom(canvasHeight, options?): number;

Defined in: src/core/pixelZoom.ts:32

The zoom a screen this tall gets on its own: one step per pxPerStep of height, within baseMin–baseMax. With the defaults a 375–440-px phone held landscape gets 2 (about 200 world px tall: ×1 drew a 24-px character 4 mm tall, ×3 left less than a monster's reach on screen), a 720p window 2, 1080p 4.

Parameters ​

ParameterType
canvasHeightnumber
options?PixelZoomOptions

Returns ​

number

Released under the MIT License.