Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Model Viewer Formatter

6 sites No security coverage
View on drupal.org

This module allows you to display interactive 3D models from file fields using Google's Model Viewer. It supports various 3D file formats and offers features like camera controls, auto-rotation, and augmented reality support.

Model Viewer Formatter

Provides a field formatter for displaying 3D model files using Google's Model Viewer web component.

Description

The Model Viewer Formatter module integrates Google's "model-viewer" web component into Drupal, enabling you to display interactive 3D models directly on your website. This formatter can be applied to any file field to render 3D models with a rich, interactive viewer that supports rotation, zooming, and even augmented reality (AR) on compatible devices.

Features

  • Multiple 3D Format Support: Display OBJ, GLTF, and GLB file formats
  • Interactive Controls: Enable camera controls for zooming, panning, and rotating models
  • Auto-rotation: Optionally enable automatic model rotation
  • Customizable Appearance: Configure viewer dimensions, background colors, and poster images
  • AR Support: Built-in support for augmented reality on compatible mobile devices (WebXR, Scene Viewer, Quick Look)
  • Loading State: Displays a loading spinner while the model loads
  • Fully Configurable: All viewer options are configurable per field formatter instance

Configuration Options

The formatter provides the following configurable settings:

  • Width & Height: Set custom dimensions (supports px, %, vh units)
  • Auto-rotate: Toggle automatic model rotation
  • Camera Controls: Enable/disable user interaction (zoom, pan, rotate)
  • Background Color: Set background color using hex values
  • Poster Image: Optional poster image displayed before model loads

Use Cases

  • Product visualization for e-commerce sites
  • Architectural and engineering model presentations
  • Museum and gallery 3D artifact displays
  • Educational content with 3D diagrams and models
  • Any content type requiring interactive 3D model display

Requirements

  • Drupal 10 or 11
  • File field on content type or entity
  • 3D model files in OBJ, GLTF, or GLB format

Usage

  1. Install and enable the module
  2. Navigate to the Manage Display settings for any content type with a file field
  3. Select "Model Viewer (Google)" as the formatter for your file field
  4. Configure the viewer settings as desired
  5. Upload 3D model files to the field when creating/editing content

Activity

Total releases
2
First release
Oct 2025
Latest release
8 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
1.0.0 Stable Oct 28, 2025
1.x-dev Dev Oct 28, 2025