When attempting to import OrbitControls.js, I encounter the following issue:
The error message
Cannot use import statement outside a module
is displayed.
To resolve this, I add:
<script type="module" src="OrbitControls.js"></script>
However, this leads to a new problem:
ReferenceError: OrbitControls is not defined
Here is the relevant part of the HTML body:
<body>
<div id="page-wrapper">
<h1>Open Spaceport Container (.drc):</h1>
<div>
<input type="file" id="fileInput">
</div>
</div>
<div>
<pre id="decoderType"><pre>
</div>
<div>
<pre id="fileDisplayArea"><pre>
</div>
<script src="https://cdn.rawgit.com/mrdoob/three.js/dev/build/three.min.js"></script>
<script src="DRACOLoader.js"></script>
<script src="geometry_helper.js"></script>
<script type="module" src="OrbitControls.js"></script>
<script>
"use strict"
// Configure decoder and create loader.
var textureLoader = new THREE.TextureLoader();
const loadManager = new THREE.LoadingManager();
...