FullScreenLayer video; dynamically change the aspect ratio

The fullscreen layer just displays whatever it has been given in the full available space, it doesn’t know the aspect ratio of the texture it’s using. But you could change the texture itself, you can scale, offset and clamp the video to achieve the proper aspect ratio: Aspect Ratio Question | Babylon.js Playground (babylonjs-playground.com)

And it’s possible to change these values dynamically to account for the difference between the aspect ratio of the canvas with the aspect ratio of the screen.

1 Like