Glossary · 3D on the web

model-viewer

In short

model-viewer is an open-source web component from Google that embeds interactive 3D models and AR views in a page through a single HTML element [1][2].

What model-viewer is

The project describes itself as a way to easily display interactive 3D models on the web and in AR [1]. It lives in Google's GitHub account, is published as the npm package "@google/model-viewer" and is licensed under Apache 2.0 [1][2]. Technically it builds on three.js and loads models in glTF/GLB.

Typical uses

  • 3D product view in a shop: rotate and zoom a model without custom code.
  • AR view: place the product in your own room on a phone, using USDZ on Apple devices.
  • Simple variants: colour changes through materials, for example.

In 2024 the component was among the first viewers to support the Khronos PBR Neutral tone mapper for colour-accurate product display [3].

Limits

model-viewer is built for display, not for configuration logic. Rules between options, parametric geometry, exploded views with an assembly order or an enquiry with a parts list have to be added yourself or solved differently. A custom solution with three.js is then usually the better fit.

Mind the loading time

A ready-made component still loads a library and a model. For good Core Web Vitals a real poster image helps: according to web.dev the canvas element is not among the candidates for Largest Contentful Paint, but an image is [4].

Our example configurators do not use model-viewer; they are custom three.js applications. The 3D product viewer page compares the options for a product page.

Related terms

  • three.js

    three.js is an open-source JavaScript library for 3D graphics in the browser. It handles the scene, camera, lighting, materials and model loading, and renders through WebGL or WebGPU.

  • GLB

    GLB is the binary form of glTF: the JSON description, geometry and textures are packed into one file. GLB is a common delivery format for 3D models on websites.

  • USDZ

    USDZ is a package format based on Pixar's Universal Scene Description (USD): an uncompressed ZIP archive that delivers a 3D scene and its textures as a single file. Apple devices display USDZ files in AR Quick Look.

  • Scene Viewer (Android)

    Scene Viewer is Google's viewer that lets a website or Android app show 3D models in 3D and AR. It reads glTF 2.0 and GLB and is launched from the browser through a special intent link.

  • 3D viewer or 3D configurator

    A 3D viewer shows a finished product to turn and zoom. A 3D configurator lets buyers change the product, checks rules and produces a result such as an enquiry. The deciding question is whether there are variants the buyer should choose.

  • Lazy loading for 3D

    Lazy loading means loading content only when it is needed. For 3D that means showing a fast poster image first and loading the library, model and textures only when the visitor reaches or starts the view.

Sources

  1. model-viewer on GitHub (google/model-viewer)
  2. modelviewer.dev
  3. Khronos Group: Khronos PBR Neutral Tone Mapper (press release, 16 May 2024)
  4. web.dev: Largest Contentful Paint (LCP)

← All terms in the glossary