I am new to three.js and have been struggling to get things to work. I am trying to import the mtlLoader module that comes with the latest three.js-master repository from the three.js site. I get this error when trying to import the mtlLoader module into my script-
Uncaught SyntaxError: The requested module '../dap/build/MTLLoader.js' does not provide an export named 'MTLLoader'
I was looking at the mtlLoader code and it doesn't have an exporter from what I see, but all the examples I have found from the three.js site imports that module using code similar to what I have here-
<script type="module">
import * as THREE from '../dap/build/three.module.js';
import { MTLLoader } from '../dap/build/MTLLoader.js';
</script>
I am using the mtlLoader that comes in this repository I downloaded and I am not sure if I am missing a step. I am also new to using modules in my Javascript so any clarifications would be greatly appreciated.
MTLLoaderis a module in this case and thus looks forthree.module.jsunder a certain path. BTW: Consider to add your comment as an answer. - Mugen87