Important: this documentation is not applicable to your currently selected format email!


Displays GL Transmission Format (gITF) 3D models.

Required Scripts

<script async custom-element="amp-3d-gltf" src=""></script>


The amp-3d-gltf component displays 3D models that are in gITF format.

Note: A WebGL capable browser is required to display these models.




Currently, only works with glTF 2.0.

Unsupported features:

  • embeded cameras
  • animation


amp-3d-gltf makes a fetch request from the origin https://<random> so access-control-allow-origin: * must be set on the response header of the endpoint specified as src. Wildcard is needed since the origin has a random sub-domain component to it.


src [required] A required attribute that specifies the URL to the gltf file.
alpha [optional] A Boolean attribute that specifies whether free space on canvas is transparent. By default, free space is filled with black. Default value is false.
antialiasing [optional] A Boolean attribute that specifies whether to turn on antialiasing. Default value is false.
clearColor [optional] A string that must contain valid CSS color, that will be used to fill free space on canvas.
maxPixelRatio [optional] A numeric value that specifies the upper limit for the pixelRatio render option. The default is window.devicePixelRatio.
autoRotate [optional] A Boolean attribute that specifies whether to automatically rotate the camera around the model's center. Default value is false.
enableZoom [optional] A Boolean attribute that specifies whether to turn on zoom. Default value is true.


setModelRotation(x, y, z, xMin, xMax, yMin, yMax, zMin, zMax) sets model rotation. rotation order is ZYX
  • x/y/z - number 0..1, defaults to previous value of model rotation.
  • min/max - angle in radians, defaults to 0 / pi * 2, defines target range
for example setModelRotation(x=0.5, xMin=0, xMax=3.14) will change x component of rotation to 1.57.


See amp-3d-gltf rules in the AMP validator specification.

Need more help?

You've read this document a dozen times but it doesn't really cover all of your questions? Maybe other people felt the same: reach out to them on Stack Overflow.

Go to Stack Overflow
Found a bug or missing a feature?

The AMP project strongly encourages your participation and contributions! We hope you'll become an ongoing participant in our open source community but we also welcome one-off contributions for the issues you're particularly passionate about.

Go to GitHub