examples
Augmented Reality
This demonstrates several augmented reality modes, including webxr
, scene-viewer
, quick-look
, & the accompanying attributes, magic-leap
, ios-src
, quick-look-browsers
.
AR attributes
-
ar
Enable the ability to launch AR experiences on supported devices.
-
ar-modes
A prioritized list of the types of AR experiences to enable, if available; see Augmented Reality. Allowed values are "webxr", to launch the AR experience in the browser, "scene-viewer", to launch the Scene Viewer app, "quick-look", to launch the iOS Quick Look app, and "fallback", to launch a fullscreen non-AR experience in the event Scene Viewer fails to launch. You can specify any number of modes separated by whitespace. Defaults to "webxr scene-viewer quick-look fallback".
-
ar-scale
Controls the scaling behavior in AR mode in Scene Viewer. Set to "fixed" to disable scaling of the model, which sets it to always be at 100% scale. Defaults to "auto" which allows the model to be resized.
-
ios-src
Provides augmented reality on supported iOS 12+ devices via AR Quick Look, but requires an additional USDZ model.
-
quick-look-browsers
Set this attribute to control which iOS browsers will be allowed to launch AR Quick Look on iOS. Allowed values are "safari" and "chrome". You can specify any number of browsers separated by whitespace, for example: "safari chrome". Defaults to "safari".
-
magic-leap
Provides augmented reality on Magic Leap's Helio browser. Requires that the primary model be a GLB file, and the @magicleap/prismatic library.