I'm having a problem loading MTL files on Chrome with Three.js. It works fine on Safari but I'm getting a cross origin request error in Chrome. I don't know how to fix this issue for local files. It does work fine if I publish this to an http website on Chrome.
var mtlLoader = new THREE.MTLLoader();
mtlLoader.setPath('assets/');
mtlLoader.setBaseUrl('assets/');
mtlLoader.load('file.mtl', function(materials) {
...
});
three.js:18280 XMLHttpRequest cannot load file:///.../assets/file.mtl. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.