mistic100 / Photo-Sphere-Viewer

A JavaScript library to display 360° sphere panoramas.
https://photo-sphere-viewer.js.org
MIT License
1.94k stars 690 forks source link

No Stereo button: photo-sphere-viewer.js file #206

Closed liam-nolan closed 6 years ago

liam-nolan commented 6 years ago

Hi

Sorry I am new to JS and Three.js and from what I can tell the button for Stereo is not built in the latest version of your app.

I think I got my stuff working however when loading photo-sphere-viewer.js there appears to be an error:

photo-sphere-viewer.js:3903 Uncaught PSVErrormessage: "Unknown button stereo"stack: "PSVError: Unknown button stereo↵ at PSVNavBar. (http://krldsl0089:9050/vr/dist/photo-sphere-viewer.js:3903:19)↵ at Array.forEach ()↵ at PSVNavBar.create (http://krldsl0089:9050/vr/dist/photo-sphere-viewer.js:3858:15)↵ at new PSVNavBar (http://krldsl0089:9050/vr/dist/photo-sphere-viewer.js:3842:8)↵ at new PhotoSphereViewer (http://krldsl0089:9050/vr/dist/photo-sphere-viewer.js:451:17)↵ at http://krldsl0089:9050/vr/equirectangular.html:90:13"__proto__: Error (anonymous) @ photo-sphere-viewer.js:3903 PSVNavBar.create @ photo-sphere-viewer.js:3858 PSVNavBar @ photo-sphere-viewer.js:3842 PhotoSphereViewer @ photo-sphere-viewer.js:451 (anonymous) @ equirectangular.html:90

If I remove Stereo out of the Nav menu here (scene works and loads fine:):

var PSV = new PhotoSphereViewer({ container: 'photosphere', panorama: panos[0].url, caption: panos[0].desc, loading_img: 'assets/photosphere-logo.gif', longitude_range: [-7 Math.PI / 8, 7 Math.PI / 8], latitude_range: [-3 Math.PI / 4, 3 Math.PI / 4], anim_speed: '-2rpm', default_fov: 50, fisheye: true, move_speed: 1.1, time_anim: false, // mousemove_hover: true, // webgl: false, navbar: [ 'autorotate', 'zoom', 'download', 'markers', 'spacer-1', { title: 'Change image', className: 'custom-button', content: '↻', onClick: (function() { var i = 0; var loading = false;

      return function() {
        if (loading) {
          return;
        }

        i = 1 - i;
        loading = true;
        PSV.clearMarkers();

        PSV.setPanorama(panos[i].url, panos[i].target, true)
          .then(function() {
            PSV.setCaption(panos[i].desc);
            loading = false;
          });
      }
    }())
  },
  {

krldsl0089-1528732364230.log

    id: 'disabled',
    title: 'This button is disabled',
    content: '❌',
    enabled: false
  },
  'caption', 'gyroscope', 'stereo', 'fullscreen'

Can you please fix/update and let me know.. Even if its me being stupid :)

Thanks

mistic100 commented 6 years ago

As you said this is not released it. You can either build it yourself https://github.com/mistic100/Photo-Sphere-Viewer#build or wait.