I am faced with the challenge of preloading multiple obj+mtl files using Three.js, each with distinct file paths, and I need to trigger another function once all the objects have finished loading.
Initially, I attempted to use a boolean variable that would change upon the successful loading of each obj file. However, my implementation didn't work as intended, ultimately causing the page to crash for unknown reasons.
All the file paths for the obj and mtl files are stored in an array for easy access.
You can view a snippet of my current approach here:
Despite my efforts, placing the load function within a for loop led to unexpected behavior.
Any assistance or insights you can provide would be greatly appreciated!