Skip to main content

ARButton

class ARButton implements View3DPlugin

A button that will be shown on the right-bottom side with the AR icon.
It will be disabled automatically when it's not available to enter AR sessions.
User can enter AR sessions by clicking this.

constructor

new ARButton(options, options.availableText, options.unavailableText, options.buttonClass, options.tooltipClass)

Create new instance of ARButton

PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
optionsobject✔️{}Options for the ARButton
options.availableTextstring✔️"View in AR"A text that will be shown on mouse hover when it's available to enter the AR session.
options.unavailableTextstring✔️"AR is not available in this browser"A text that will be shown on mouse hover when it's not available to enter the AR session.
options.buttonClassstring✔️"view3d-ar-button"A class that will be applied to the button element.
options.tooltipClassstring✔️"view3d-tooltip"A class that will be applied to the tooltip element.