panolens
pchen66.github.io/Panolens/#Home
Panolens.js
pchen66.github.io
github.com/pchen66/panolens.js
pchen66/panolens.js
Javascript panorama viewer based on Three.js. Contribute to pchen66/panolens.js development by creating an account on GitHub.
github.com
Three.js – JavaScript 3D library
threejs.org
360 이미지 or 큐브 맵을 웹에 띄어주는 모듈
기본적으로 필요한 스크립트 2가지
1. panolens.min.js
2. three.min.js (webgl)
<script src="js/three.min.js"></script>
<script src="js/panolens.min.js"></script>
viewer_main = new PANOLENS.Viewer({
enableReticle: false,
output: 'console',
viewIndicator: true,
autoRotate: false,
autoRotateSpeed: 2,
autoRotateActivationDuration: 5000,
dwellTime: 1000,
autoHideInfospot: false // 마커 토클
});
panorama_main_image1 = new PANOLENS.ImagePanorama( '360이미지 경로' );
panorama_main_image1.setLinkingImage( '마커 이미지 경로' );
panorama_main_image1.addEventListener( 'progress',function(e){
console.log(e.progress);
});
panorama_main_image2 = new PANOLENS.ImagePanorama( '360이미지 경로' );
panorama_main_image2.setLinkingImage( '마커 이미지 경로' );
panorama_main_image2.addEventListener( 'progress',function(e){
console.log(e.progress);
});
//마커 좌표 생성
panorama_main_image1.link( panorama_main_image2, new THREE.Vector3( -4894.52, -136.82, -981.37 ) );
panorama_main_image2.link( panorama_main_image1, new THREE.Vector3( 1119.54, -371.69, -4854.21 ) );
panorama_main_image1.link( panorama_main_video, new THREE.Vector3( -4568.76, -78.62, 2022.38 ) );
panorama_main_video.link( panorama_main_image1, new THREE.Vector3( -2358.58, 1205.94, -3626.21 ) );
panolens.js 에서 기본적으로 ctrl + 마우스 이동하면 console.log(vector3) 값을 표출해준다
'Programing > node js' 카테고리의 다른 글
node js mysql session 사용법 (0) | 2021.02.19 |
---|---|
node js async 모듈 (0) | 2021.02.17 |
node js 네이버 계정으로 로그인 (passport-naver) (0) | 2021.01.12 |
node js mysql 연동 암호화 로그인 (0) | 2021.01.11 |
node js request response 요청 응답 객체 (0) | 2021.01.06 |