forked from MyYosun/mxreality.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pano_image.html
66 lines (57 loc) · 1.77 KB
/
pano_image.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html lang="en">
<head>
<title>vr sphere example</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<script src="../build/three.js"></script>
<script src="../build/mxreality.js"></script>
<style type="text/css">
/*#example {
position: absolute;
width: 100%;
height: 100%;
left:0px;
top:0px;
overflow: hidden;
}*/
</style>
</head>
<body>
<div id="example"></div>
<script>
window.onload=function () {
init();
}
function init() {
var scene, renderer;
var container;
renderer = new THREE.WebGLRenderer();
container = document.getElementById('example');
container.appendChild(renderer.domElement);
scene = new THREE.Scene();
var vr=new VR(scene,renderer,container,{'fov':60});
vr.vrbox.radius=50;
if(!AVR.isCrossScreen()) {
vr.useGyroscope = false;
}
vr.loadProgressManager.onLoad=function () {
//vr.controls.enable=false;
}
vr.loadProgressManager.onProgress=function () {
console.log("onProgress")
}
vr.loadProgressManager.onError=function () {
console.log("onError")
}
vr.init(function () {
});
vr.playPanorama('textures/puydesancy.jpg');
}
</script>
</body>
</html>