PSV Cubemap Demo
by mistic100
HTML
<script src="https://cdn.jsdelivr.net/npm/uevent@2/browser.js"></script>
<script src="https://cdn.jsdelivr.net/npm/three/build/three.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/photo-sphere-viewer@4/dist/photo-sphere-viewer.css">
<script src="https://cdn.jsdelivr.net/npm/photo-sphere-viewer@4/dist/photo-sphere-viewer.js"></script>
<script src="https://cdn.jsdelivr.net/npm/photo-sphere-viewer@4/dist/adapters/cubemap.js"></script>
<div id="photosphere"></div>
CSS
html, body, #photosphere {
margin: 0;
width: 100%;
height: 100%;
}
JavaScript
new PhotoSphereViewer.Viewer({
adapter: PhotoSphereViewer.CubemapAdapter,
panorama: {
left : 'https://photo-sphere-viewer-data.netlify.app/assets/cubemap/px.jpg',
front : 'https://photo-sphere-viewer-data.netlify.app/assets/cubemap/nz.jpg',
right : 'https://photo-sphere-viewer-data.netlify.app/assets/cubemap/nx.jpg',
back : 'https://photo-sphere-viewer-data.netlify.app/assets/cubemap/pz.jpg',
top : 'https://photo-sphere-viewer-data.netlify.app/assets/cubemap/py.jpg',
bottom: 'https://photo-sphere-viewer-data.netlify.app/assets/cubemap/ny.jpg'
},
container: 'photosphere',
caption: 'Parc national du Mercantour <b>© Damien Sorel</b>',
loadingImg: 'https://photo-sphere-viewer.js.org/assets/photosphere-logo.gif',
navbar: 'autorotate zoom move caption fullscreen',
defaultZoomLvl: 20,
touchmoveTwoFingers: true,
mousewheelCtrlKey: true,
});