Button

Use the button() function to add a clickable action to your scene.

let count = 0;
button("Increase!", () => count++);

update(() => {
    text(`Count: ${count}`).billboard();
});

.button() returns a regular HTML button element.

const btn = button("Click me", () => {});

btn.style.backgroundColor = "coral";