Zoom In , zoom Out on GUI

#1

Hello , i need to show on image with GUI and make a zoom in and zoom out to make the image bigger or smaller , is that possible with babylon ?

Thanks

#2

Hello
Yes you can control the size of the image element with width and height

If you want to keep the image element unchanged then you can use the sourceXXX properties:
https://doc.babylonjs.com/how_to/gui#image

#3

Any exemple in the playground please ?

#4

here we are:
https://www.babylonjs-playground.com/#XCPP9Y#1081

1 Like
#5

Thanks for the xemple , but it is not connected to the mousse ? i need to zoom in zoom out with the mousse scroll

#6

Yeah sure but this is pure JS :slight_smile: just handle mouse wheel event (onwheel Event)