0

When changing the path to the files.

    <script src="js/loaders/ctm/lzma.js"></script>
    <script src="js/loaders/ctm/ctm.js"></script>
    <script src="js/loaders/ctm/CTMLoader.js"></script>

Gives an error message

GET file:///C:/Users/igorn/Downloads/%D0%9F%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B%20%D0%9A%D0%BE%D0%BD%D1%82%D0%B5%D0%BD%D1%82%D0%B0/!Models%202/!ADAPTI/CTM/js/loaders/ctm/CTMWorker.js 0 ()

When you try to connect the CTMWorker file, a new error appears

CTMWorker.js:1 Uncaught ReferenceError: importScripts is not defined at CTMWorker.js:1

Is it possible to fix it somehow?

notgrilbi
  • 29
  • 3
  • Possible duplicate of ["Cross origin requests are only supported for HTTP." error when loading a local file](https://stackoverflow.com/questions/10752055/cross-origin-requests-are-only-supported-for-http-error-when-loading-a-local) – M - Jan 22 '19 at 18:32
  • This question is a duplicate of https://stackoverflow.com/questions/10752055/cross-origin-requests-are-only-supported-for-http-error-when-loading-a-local It's a browser safety feature that is not allowing you to run certain files from your C-drive. You'll need to start a web-server locally or upload your .js file to a server online to access it. – M - Jan 22 '19 at 18:34
  • @Marquizzo No, I checked on the local server. The result is the same. The biggest reason is: If you specify the path to the `js/loaders/ctm/lzma.js` file, everything works fine. But if I change it `ff/js/loaders/ctm/lzma.js` then I get an error.If the problem was in the browser, in both cases it would give an error – notgrilbi Jan 22 '19 at 20:16
  • It looks like both your .js paths are the same. Is one of them a web worker? It looks like the second file you're trying to use is attempting to use `importScripts`, which is not defined. Have you tried opening that `.js` file and try to figure out what it's trying to do? – M - Jan 22 '19 at 20:19

0 Answers0