amp-google-vrview-image
Experimental
해당 예제는 다음의 실험적 기능을 활용했습니다: amp-google-vrview-image
. 아래 버튼으로 실험을 활성화할 수 있습니다. 일부 컴포넌트의 경우 AMP 개발자 채널도 함께 활성화되어야 합니다. Learn more about experimental features.
- AMP VersionPROD DEV
Introduction
The amp-google-vrview-image
extension allows embedding 360 degree VR media into AMP pages.
If experimenting with this sample on a desktop web browser, you can interact with the displayed image by clicking on it and dragging the mouse around. The best way to perceive the effects enabled by this component is to view it on a mobile device and interact with the images by moving the device around using the cardboard viewer.
The attributes supported by this component are:
- src: the source of the image being displayed
- stereo: if provided, the image is considered to be a stereoscopic image; otherwise it is a monoscopic image.
- yaw: initial yaw rotation of the viewer
- yaw-only: if specified, restrict motion to yaw rotations only
Setup
Import the amp-google-vrview-image
component in the header.
<script async custom-element="amp-google-vrview-image" src="https://cdn.ampproject.org/v0/amp-google-vrview-image-0.1.js"></script>
Basic usage
By default amp-google-vrview-image
expects a mono image and the yaw value is 0.
<amp-google-vrview-image src="https://storage.googleapis.com/vrview/examples/coral.jpg" width="400" height="300" layout="responsive"> </amp-google-vrview-image>
Stereo
Add the stereo
attribute for stereoscopic images
<amp-google-vrview-image src="https://storage.googleapis.com/vrview/examples/coral.jpg" stereo width="400" height="300" layout="responsive"> </amp-google-vrview-image>
Yaw
Add the stereo
attribute for stereoscopic images. The initial yaw value is 90 degrees
<amp-google-vrview-image src="https://storage.googleapis.com/vrview/examples/coral.jpg" stereo yaw="90" width="400" height="300" layout="responsive"> </amp-google-vrview-image>
Yaw-only
Use the yaw-only
attribute to restrict motion to the yaw axis only
<amp-google-vrview-image src="https://storage.googleapis.com/vrview/examples/coral.jpg" stereo yaw-only width="400" height="300" layout="responsive"> </amp-google-vrview-image>
이 페이지의 설명만으로 궁금한 점이 모두 해결되지 않는다면 다른 AMP 사용자에게 문의하여 구체적인 활용 사례를 논의해 보세요.
Stack Overflow로 이동 설명이 부족한 기능을 발견하셨나요?AMP 프로젝트는 여러분의 참여와 기여를 적극 환영합니다! 오픈 소스 커뮤니티를 통해 지속적으로 활동해 주셔도 좋지만 관심 있는 주제에 한 번만 기여하셔도 큰 도움이 됩니다.
GitHub에서 샘플 수정하기-
Written by @amedina