I am working with Panolens.js to get a basic 3d image viewer up and running. I am working off the example provided in the documentation, but I am having console errors when loading. This is my first time working with equirectangular photography and Panolens/ThreeJS.
I have included the code:
var panorama, viewer;
panorama = new PANOLENS.ImagePanorama('http://via.placeholder.com/720x360');
viewer = new PANOLENS.Viewer({
output: 'console'
});
viewer.add(panorama);
html,
body {
margin: 0;
width: 100%;
height: 100%;
overflow: hidden;
background-color: #000;
}
a:link,
a:visited {
color: #bdc3c7;
}
.credit {
position: absolute;
text-align: center;
width: 100%;
padding: 20px 0;
color: #fff;
}
<script src="https://pchen66.github.io/js/three/three.min.js"></script>
<script src="https://pchen66.github.io/js/panolens/panolens.min.js"></script>
<div class="credit"><a href="https://github.com/pchen66/panolens.js">Panolens.js</a> image panorama example. Image from <a href="http://adaptivesamples.com/tag/equirectangular/">Adaptive Samples</a></div>
The console is giving me this error message:
Failed to load file:///Volumes/Nifty/DoVR%20Media/demo_v1/test.jpg: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
The image I am using is in the same directory. I also tried loading the image from imgur, but that is also giving me an error.