Skip to main content

webAR

Typeboolean | WebARSessionOptions
Defaulttrue

Options for the WebXR-based AR session.
If false is given, it will disable WebXR-based AR session.

NameTypeDefaultDescription
featuresobject{}Additional features(see XRSessionInit) of the WebXR session.
overlayRootHTMLElement | string | nullnulldom-overlay's root element. You can set either HTMLElement or query selector for that element.
rotateboolean | ARSwirlControlOptionstrueOptions for the rotate control inside the AR session. You can disable rotate control by giving false.
translateboolean | ARTranslateControlOptionstrueOptions for the translate control inside the AR session. You can disable translate control by giving false.
scaleboolean | ARScaleControlOptionstrueOptions for the scale control inside the AR session. You can disable scale control by giving false.
ringFloorIndicatorOptions{}Options for the floor ring.
deadzoneDeadzoneCheckerOptions{}Control's deadzone options.
initialScale"auto" | number"auto"Initial scale of the model. If set to "auto", it will modify big overflowing 3D model's scale to fit the screen when it's initially displayed. This won't increase the 3D model's scale more than 1.

Example

webAR: true (default)

{
src: "/egjs-view3d/model/draco/alarm.glb",
iosSrc: "/egjs-view3d/model/usdz/alarm.usdz",
webAR: true
}

webAR: false

{
src: "/egjs-view3d/model/draco/alarm.glb",
iosSrc: "/egjs-view3d/model/usdz/alarm.usdz",
webAR: false
}