注:用web服务器打开查看demo。(本地预览请用火狐)
demo代码
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <script src="js/jquery-1.10.2.min.js"></script> <script src="js/modernizr-2.7.1-csstransforms3d-canvas-touch.js"></script> <script src="js/megapix-image.js"></script> <script src="js/three.min.js"></script> <script src="js/Detector.js"></script> <script src="js/CSS3DRenderer.js"></script> <script src="js/theta-viewer.min.js"></script> <link rel="stylesheet" href="css/styles.css"> <title>Sample of THETA Viewer</title> </head> <body> <div id="theta-viewer"></div> <script> (function ($) { 'use strict'; $("#theta-viewer").createThetaViewer('img/theta.jpg');//在此插入图片即可 }(jQuery)); </script> </body> </html>