Hello!
I would like to customize GUI.Button3D but am having little luck!
Here is my playground: https://www.babylonjs-playground.com/#HB4C01#116
It would be great to change the size, add a background image and animate opacity.
Is there a way to achieve this with Button3D?
Thanks!
Hey!
so you have to consider that a Button3D is represented by a mesh. So for instance, changing the alpha would be done like that:
button.mesh.material.alpha = .1;
To change the size:
button.scaling = new BABYLON.Vector3(2, 2, 1);
Finally the content is based on GUI so you can easily control it like that:
var text1 = new BABYLON.GUI.TextBlock();
text1.text = "reset";
text1.color = "white";
text1.fontSize = 24;
button.content = text1;
1 Like