zoom property

double zoom
getter/setter pairinherited

If set, the camera will zoom by this ratio. This can be greater than 1 (zoom in) or smaller (zoom out), but should always be greater than zero.

Note: do not confuse this with the zoom applied by the viewport. The viewport applies a (normally) fixed zoom to adapt multiple screens into one aspect ratio. The zoom might be different per dimension depending on the Viewport implementation. Also, if used with the default FlameGame implementation, it will apply to all components. The zoom from the camera is only for components that respect camera, and is applied after the viewport is set. It exists to be used if there is any kind of user configurable camera on your game.

Implementation

double zoom = 1.0;