Class: Buttons

Buttons(scene, title, options, callback, property)

Menu consisting of vertical buttons in 3D space and associated labels.

Constructor

new Buttons(scene, title, options, callback, property)

Parameters:
Name Type Description
scene babylonjs scene
title string displayed above the menu
options array of options, string labels or objects
callback executed when button is activated
property optional, if options are object, this specifies string property to display as label
Source:

Classes

Buttons

Members

showOptionNumber

Prefix the button with a number? Default false.
Source:

turnOff

Can we turn off the current selection? Default false.
Source:

Methods

display()

Display the menu, adds a pointer observable
Source:

dispose()

Dispose of everything
Source:

noMatch()

Called by default on speech recognition mismatch
Source:

select()

Select an option, executed when a button is pressed. Executes the callback passing selected option as parameter.
Source:

setHeight()

Set the height, rescales the menu
Source: