html模仿360度VR

1、引入js文件

modernizr-2.7.1-csstransforms3d-canvas-touch.js
megapix-image.js
three.min.js
CSS3DRenderer.js
theta-viewer.min.js
2、引入代码
 

<div id="VRShow"></div>
#VRShow{
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
#VRShow canvas{
  width: 100%!important;
  height: 100%!important;
}
$("#VRShow").createThetaViewer('./images/001.jpg');

猜你喜欢

转载自blog.csdn.net/a_grain_of_wheat/article/details/121493889