Newbie Question - Use html Button to change scene elements

Hi!

This is rather straight forward. Since babylon eventually uses javascript to run the scene, anything you do in javascript, whether external or in your babylon code, will be able to influence your scene.

A very (very!!) simple example here - Babylon.js Playground
Notice the wonderful unstyled button I added at the bottom. clicking on it will make the sphere visible or invisible.

On a small note, babylon offers GUI library as well, so you can actually have the buttons in your scene. But this is a bit more complex.

2 Likes