forked from barryclark/jekyll-now
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpano5.html
62 lines (53 loc) · 2.02 KB
/
pano5.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
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width, shrink-to-fit=no">
<meta name="description" Content="가상여행, 파노라마, Panolens, Threejs, WebGL" />
<title>Hotspot Link</title>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR&family=Noto+Serif+KR&family=Oswald&display=swap" rel="stylesheet">
<link rel=stylesheet href="style.css">
<script src="./js/three.js"></script>
<script src="./js/panolens.min.js"></script>
<script src="./js/panocontroller.js"></script>
</head>
<body>
<div id="progress">
<div id="bar"></div>
</div>
<div class="title">
<header>La Silla Observatory</header>
<article>아이콘을 클릭하세요.</article>
</div>
<div id="container"></div>
<script>
var panorama, panorama2, viewer, container, infospot, camera, scene, renderer;
bar = document.querySelector( '#bar' );
function onProgressUpdate ( event ) {
var percentage = event.progress.loaded/ event.progress.total * 100;
bar.style.width = percentage + "%";
if (percentage >= 100){
bar.classList.add( 'hide' );
setTimeout(function(){
bar.style.width = 0;
}, 1000);
}
}
container = document.querySelector( '#container' );
panorama = new PANOLENS.ImagePanorama('asset/pano_vr61.jpg');
panorama2 = new PANOLENS.ImagePanorama('asset/pano_vr64.jpg');
infospot = setInfospot(-40, 0, 100, panorama2);
panorama.add(infospot) ;
viewer = new PANOLENS.Viewer( { container: container } );
viewer.add( panorama, panorama2 );
camera = viewer.getCamera();
scene = viewer.getScene();
renderer = viewer.getRenderer();
//var gridHelper = new THREE.GridHelper( 20, 20, '#adff2f', '#ff7f50' );
//scene.add( gridHelper );
//camera rotate, lookAt
let targetPos = getVectorFromAngle(40, 0, 2000)
viewer.tweenControlCenter(targetPos);
</script>
</body>
</html>