PSV Resolution 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>
<script src="https://cdn.jsdelivr.net/npm/photo-sphere-viewer@4/dist/photo-sphere-viewer.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/photo-sphere-viewer@4/dist/photo-sphere-viewer.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/photo-sphere-viewer@4/dist/plugins/settings.css">
<script src="https://cdn.jsdelivr.net/npm/photo-sphere-viewer@4/dist/plugins/settings.js"></script>
<script src="https://cdn.jsdelivr.net/npm/photo-sphere-viewer@4/dist/plugins/resolution.js"></script>
<div id="photosphere"></div>
CSS
html, body, #photosphere {
margin: 0;
width: 100%;
height: 100%;
}
JavaScript
new PhotoSphereViewer.Viewer({
panorama: 'https://photo-sphere-viewer-data.netlify.app/assets/sphere-small.jpg',
container: 'photosphere',
caption: 'Parc national du Mercantour <b>© Damien Sorel</b>',
loadingImg: 'https://photo-sphere-viewer.js.org/assets/photosphere-logo.gif',
touchmoveTwoFingers: true,
mousewheelCtrlKey: true,
plugins: [
PhotoSphereViewer.SettingsPlugin,
[PhotoSphereViewer.ResolutionPlugin, {
resolutions: [
{
id : 'SD',
label : 'Small',
panorama: 'https://photo-sphere-viewer-data.netlify.app/assets/sphere-small.jpg',
},
{
id : 'HD',
label : 'Normal',
panorama: 'https://photo-sphere-viewer-data.netlify.app/assets/sphere.jpg',
},
],
}],
],
});