Is there a way for me to import the custom geometry file called "OutlinesGeometry.js" from this link?
I've attempted to import it like this:
<script type="module" src="./three/build/three.module.js"></script>
<script type="module" src="./three/examples/jsm/controls/OrbitControls.js"></script>
<script type="module" src="./three/examples/jsm/libs/dat.gui.min.js"></script>
<script type="module" src="./OutlinesGeometry.js"></script>
However, this approach is resulting in errors as shown below: https://i.sstatic.net/Rq9Sw.png
In my initial attempts, I did not import three
, OrbitControls
, and dat.gui
as modules, which worked fine. But when I tried importing OutlinesGeometry
, I encountered the error:
Uncaught TypeError: class constructors must be invoked with 'new'
. This prompted me to switch to importing the modules.
<script src="./three/build/three.js"></script>
<script src="./three/examples/js/controls/OrbitControls.js"></script>
<script src="./three/examples/js/libs/dat.gui.min.js"></script>
<script src="./OutlinesGeometry.js"></script>
Can anyone advise on the correct way to handle these imports?