Description VR image
Availability
Experimental; no validations yet.
Work in progress.
Required Script <script async custom-element="amp-google-vrview-image" src="https://cdn.ampproject.org/v0/amp-google-vrview-image-0.1.js"></script>
Supported Layouts fixed, fixed-height, responsive, fill, flex-item

Overview

See Google VR View for more details.

VR view supports mono and stereo 360 images. Note:

  • VR view images can be stored as png, jpeg, or gif. Recommend is jpeg for improved compression.
  • For maximum compatibility and performance, image dimensions should be powers of two (e.g., 2048 or 4096).
  • Mono images should be 2:1 aspect ratio (e.g. 4096 x 2048).
  • Stereo images should be 1:1 aspect ratio (e.g. 4096 x 4096).

Example

<amp-google-vrview-image
    src="https://storage.googleapis.com/vrview/examples/coral.jpg"
    stereo
    width="400" height="300" layout=responsive>
</amp-google-vrview-image>

Attributes

src

The source URL of a stereo image. Must resolve to https. See notes above on what kind of image can be passed here.

stereo

If specified, the image provided by the src attribute is considered to be a stereo image (see above), otherwise it's a mono image.

yaw

Initial yaw of viewer, in degrees. Defaults to 0.

yaw-only

Can be specified to restrict motion to yaw only.