ModelViewer
The ModelViewer component renders a 3D model (with the model-viewer custom element) for the Storefront API's Model3d object. The model-viewer custom element is lazily downloaded through a dynamically-injected <script type='module'> tag when the <ModelViewer /> component is rendered. ModelViewer is using version 1.21.1 of the @google/model-viewer library.
Anchor to propsProps
- Anchor to datadatadataPartialDeep<Model3d, {recurseIntoArrays: true}>PartialDeep<Model3d, {recurseIntoArrays: true}>requiredrequired
An object with fields that correspond to the Storefront API's Model3D object.
- Anchor to onArStatusonArStatusonArStatus(event: Event) => void(event: Event) => void
The callback to invoke when the 'ar-status' event is triggered. Refer to ar-status in the
documentation .- Anchor to onArTrackingonArTrackingonArTracking(event: Event) => void(event: Event) => void
The callback to invoke when the 'ar-tracking' event is triggered. Refer to ar-tracking in the
documentation .- Anchor to onCameraChangeonCameraChangeonCameraChange(event: Event) => void(event: Event) => void
The callback to invoke when the 'camera-change' event is triggered. Refer to camera-change in the
documentation .- Anchor to onEnvironmentChangeonEnvironmentChangeonEnvironmentChange(event: Event) => void(event: Event) => void
The callback to invoke when the 'environment-change' event is triggered. Refer to environment-change in the
documentation .- Anchor to onErroronErroronError(event: Event) => void(event: Event) => void
The callback to invoke when the 'error' event is triggered. Refer to error in the
documentation .- Anchor to onLoadonLoadonLoad(event: Event) => void(event: Event) => void
The callback to invoke when the
loadevent is triggered. Refer to load in thedocumentation .- Anchor to onModelVisibilityonModelVisibilityonModelVisibility(event: Event) => void(event: Event) => void
The callback to invoke when the 'model-visibility' event is triggered. Refer to model-visibility in the
documentation .- Anchor to onPauseonPauseonPause(event: Event) => void(event: Event) => void
The callback to invoke when the 'pause' event is triggered. Refer to pause in the
documentation .- Anchor to onPlayonPlayonPlay(event: Event) => void(event: Event) => void
The callback to invoke when the 'play' event is triggered. Refer to play in the
documentation .- Anchor to onPreloadonPreloadonPreload(event: Event) => void(event: Event) => void
The callback to invoke when the 'preload' event is triggered. Refer to preload in the
documentation .- Anchor to onProgressonProgressonProgress(event: Event) => void(event: Event) => void
The callback to invoke when the 'progress' event is triggered. Refer to progress in the
documentation .- (event: Event) => void(event: Event) => void
The callback to invoke when the 'quick-look-button-tapped' event is triggered. Refer to quick-look-button-tapped in the
documentation .- Anchor to onSceneGraphReadyonSceneGraphReadyonSceneGraphReady(event: Event) => void(event: Event) => void
The callback to invoke when the 'scene-graph-ready' event is triggered. Refer to scene-graph-ready in the
documentation .