Hello,
I am loading a png file as a texture on a plane to simply display it as a 2D image.
https://playground.babylonjs.com/#R8M11R
Now I would like to be able to display the image at maximum 100% resolution or, if that would exceed the visible area, zoomed to fill this area.
I guess I’d have to tweak the Camera zoom vector and the the size parameters of the mesh according to the texture size i am getting in the onLoadObservable
tex.onLoadObservable.add(loadedTExture => {
let size = loadedTExture.getSize();
//do some adjustments
})
what I do not understand really is how to deal with the different units with getSize giving me pixels but the Vector3 being something else.
Maybe someone can push me gently towards the chasm of knowledge that holds this information?