Tankōbon / lib/cover-crop / coverSourceRect
Function: coverSourceRect()
coverSourceRect(
width,height,zoom,panX,panY):SourceRect
Defined in: lib/cover-crop.ts:28
The part of a width × height picture shown in the 2:3 frame. At zoom 1 the picture covers the frame (its largest 2:3 part); a bigger zoom shows less of it. panX and panY (0 to 1, clamped) place the visible part inside the room that is left: 0 is the left/top edge, 0.5 the centre, 1 the right/bottom edge.
Parameters
width
number
height
number
zoom
number
panX
number
panY
number