Cross origin requests are only supported for protocol schemes


#1

hello everyone, I have a question for you and tried to mix three js and electron (I know it was not a good idea) and I already encountered the first problem of this idea is how you see in the title, the obj loader does not recive the path, some idea of how to solve this problem?

thanks in advance


#2

Why was it not a good idea?

I already encountered the first problem of this idea is how you see in the title, the obj loader does not recive the path

This doesn’t seem to have been a difficulty for this project. If you share your code with us, as well as the exact text of any errors you are seeing, maybe we can help you figure out how to make it work.


#3

hello friend here is the project code the file where the error is executed is 3dview.vue

project


#4

And what code is causing the error?


#5

when you try to open a file


#6

Your source code is locked. You should open it or give me access.


#7

sorry now the access is open


#8

I haven’t done this myself, but I think what you need to do is register a protocol. You might just be able to name it file, but if you can’t I don’t know if it will work with THREE.OBJLoader. If not, you will need to find a project that uses OBJLoader inside of Electron to see how they made it work.