i’m using GUI with some grids. I’ve two grids one inside the other:
masterGrid: 1row x 2cols
childGrid: 3rows x 2cols
The child grid is inside the masterGrid in the 2 column.
In the first column i only want to show an image.
This is my test PG: https://playground.babylonjs.com/#E2ELYS#7
The problem is that i don’t understand how to preserve the image aspect ratio. In the PG the image is adpated to the grid cell size. How can avoid that?
I get some result using autoscale (line 103 of this new PG https://playground.babylonjs.com/#E2ELYS#8):
im.autoScale = true; im.scaleX = 0.3; im.scaleY = 0.3;
But in this way if i resize the image doesn’t scales. Is there any other way to do that?