I downloaded the file package three.js-dev
from threejs.org and I am trying to use it in my project like this:
<script type="text/javascript" src="./build/three.js"></script>
<script type="text/javascript" src="./src/loaders/JSONLoader.js"></script>
<script src="./examples/js/controls/TrackballControls.js"></script>
<script src="./examples/js/Detector.js"></script>
However, I encountered an error in the console:
JSONLoader.js:1 Uncaught SyntaxError: Unexpected token import
There was another error in the source tab as well.
I started to wonder if there were any issues with 'javascript import'?
After searching, I came across this on MDN and tried replacing './Loader'
with "./Loader"
but the error persist.
Is there anyone out there with some insight on this issue? Please help!