웹 개발 Google VR API를 이용해서 웹 페이지에 360˚ 이미지 보여주기
2019.07.20 15:53
<iframe src="//storage.googleapis.com/vrview/2.0/embed?video=link/to/video.mp4&is_stereo=true"></iframe>
<iframe width="100%" height="300px" allowfullscreen frameborder="0" src="//storage.googleapis.com/vrview/index.html?image=//storage.googleapis.com/vrview/examples/coral.jpg&is_stereo=true"></iframe>
구글에서 제공하는 VR API를 이용하면 웹 페이지에서도 360˚ 이미지를 손쉽게 보여줄 수 있습니다.
image 파라메터에는 웹 상에서 접근할 수 있는 이미지 경로를 넘겨주면 됩니다.
(반드시 http나 https를 포함한 이미지 절대 경로를 넘겨주셔야 합니다)
필요에 따라 width나 height 값을 조정해서 이미지 크기를 조절할 수 있습니다.