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
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
options | object | ✔️ | {} | Options for the ARButton |
options.availableText | string | ✔️ | "View in AR" | A text that will be shown on mouse hover when it's available to enter the AR session. |
options.unavailableText | string | ✔️ | "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.buttonClass | string | ✔️ | "view3d-ar-button" | A class that will be applied to the button element. |
options.tooltipClass | string | ✔️ | "view3d-tooltip" | A class that will be applied to the tooltip element. |