Having trouble loading an STL file into Three.js due to the three-stl-loader npm module not recognizing the THREE object.
Here is the code snippet in question:
import * as THREE from 'three'
import * as THREESTLLoader from 'three-stl-loader'
var STLLoader = new THREESTLLoader()
var loader = new STLLoader(THREE)
loader.load('path/to/file.stl', function (geometry: any) {})
Encountering this error: https://i.sstatic.net/4F6OP.png
The issue arises on line 45 in index.js within the stl-loader where the three-stl-loader module tries to use the THREE object without success: https://i.sstatic.net/haWHD.png
This project is utilizing TypeScript and Webpack for compilation, which suggests a potential problem with the compilation process.