I am struggling with getting the mtlLoader module to work in three.js. I am a beginner and I am trying to import the mtlLoader module from the latest three.js-master repository on the official website. However, I keep encountering this error message when I try to import the mtlLoader module into my script:
Uncaught SyntaxError: The requested module '../dap/build/MTLLoader.js' does not provide an export named 'MTLLoader'
After examining the mtlLoader code, it seems like there is no export named 'MTLLoader', but all the examples I found on the three.js site use a similar code structure for importing the module:
<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 from the downloaded repository, and I am not sure if I am missing a crucial step. Additionally, I am new to working with modules in JavaScript, so any guidance or clarifications would be greatly appreciated.