Class: VRButton

VRButton

new VRButton(container, scene, vrElement)

A single button widget used to switch VR modes.

Name Type Default Description
container Element | String

The DOM element or ID that contains the widget.

scene Scene

Scene.

vrElement Element | String document.body optional

The element or ID that enters VR mode.

Throws:

There is no element with ID container in the document.

Type
DeveloperError

Members

containerElement

Retrieve the parent container.

Obtain the view model.

Methods

destroy()

Destruction of components. If you want to permanently delete a widget from the layout, you should call this command.

isDestroyed(){Boolean}

If this object is destroyed, return true; otherwise, return false.

Returns:
Type Description
Boolean If the object has been destroyed, it is true; otherwise, it is false.