LetterboxingViewport
constructor(targetPpiX: Float = defaultTargetPpi, targetPpiY: Float = defaultTargetPpi, aspectRatio: Float = 4f / 3f)
Parameters
targetPpiX
this is the targeted pixel per inch ratio on X axis, which allows to scale the viewport correctly on different devices. Usually about 96 for desktop and WebGL platforms, 160 for mobiles. Make sure to call updateScale after changing this variable.
targetPpiY
targeted pixel per inch ratio on Y axis. Usually about 96 for desktop and WebGL platforms, 160 for mobiles. Make sure to call updateScale after changing this variable.
aspectRatio
width divided by height. Will preserve this aspect ratio by applying letterboxing.