Closed mdelclaro closed 6 years ago
Ok, I setted up a local web server with XAMPP, and now it's working... Just to be sure, there is no way to work fully local with this, right? With no webserver, even if it's a local webserver... Because of the CORS.
Please reopen. Here is proof this does not work!
Never mind. For future readers the fix:
I added this to my .htaccess
running Apache:
Header add Access-Control-Allow-Origin "*"
Header add Access-Control-Allow-Headers "origin,x-requested-with,content-type"
Header add Access-Control-Allow-Methods: "GET,POST,OPTIONS,DELETE,PUT"
I have this in my HTML above the actual JS to load the pano:
<script src="https://googlevr.github.io/vrview/build/three.min.js"></script>
<script src="https://googlevr.github.io/vrview/build/vrview.min.js"></script>
<script src="https://googlevr.github.io/vrview/build/embed.min.js"></script>
<script src="https://googlevr.github.io/vrview/build/device-motion-sender.min.js"></script>
<script>
window.addEventListener('load', onVrViewLoad);
function onVrViewLoad() {
// Do the actual VRView.Player stuff here
}
</script>
I've downloaded the project with the built js. When I try to run the example, it gives me this error: "Render: Unable to load texture from" + the file name.
I've tried to change the file, even putting an URL, and it gives me the same error.
"Not allowed to load local resource:" from the console. How can I fix it?