Descubre cómo el elemento model aporta contenido 3D interactivo a tus sitios web, ahora en iOS, iPadOS, macOS y visionOS. Descubre herramientas para crear y optimizar recursos 3D. Explora las funcionalidades del elemento model y descubre cómo los estándares web están dando forma al futuro del 3D en la web.
<!-- Using the src attribute --><modelsrc="mallet.usdz"></model><!-- Using a <source> child for MIME type --><model><sourcesrc="mallet.usdz"type="model/vnd.usdz+zip"></model>
The HTML model element, which brings 3D content to the web as simply as an image and now extends from visionOS to iOS, iPadOS, and macOS — how it compares to the model-viewer library and where it stands as an emerging web standard.
Approaches for creating 3D content: scanning with iPhone, converting existing files, authoring in tools like Blender, and generating models from images or text prompts. Why USDZ is the recommended format — it bundles geometry, materials, textures, and animations into a single file.
Embed a model with the tag's src attribute or a nested . Use a nested as a fallback for older browsers, await the ready promise to know when the model can be displayed, and load the W3C polyfill so the element works where it isn't supported natively.
Set background-color directly on the model element to match the surrounding page. The model renders in its own virtual space and doesn't inherit page styles, and any background is composited as fully opaque.
Add stagemode="orbit" to let visitors rotate the model with automatic spring-back and clipping protection. For custom interactivity, disable stagemode and drive the entityTransform property with a DOMMatrix to snap the model to specific viewing angles from JavaScript.
Animate between custom orientations by updating entityTransform inside requestAnimationFrame. The pattern captures a starting angle, eases each frame's rotation, and cancels any in-flight animation so successive transitions don't conflict.
Play animations baked into a USDZ file using the element's play() method and playbackRate property. Positive rates play forward, negative rates reverse, and the magnitude scales speed.
Use usdcrush to shrink USDZ files (often by 4x) with no perceived quality loss, and usdrecord to render thumbnails or fallback images from a 3D file. Both ship with macOS as part of the broader USD tool suite.
Generate a 3D model from images or a prompt, add a tag to your site, optimize assets with usdcrush, and join the W3C Immersive Web Community Group to help shape the spec.