three.js.
import * as THREE from "three" installed through npm install three-- save in vue; it can be introduced normally in single file components. The following figure shows a simple cube
so I want to introduce another controller to realize the camera controller to monitor all angles. This can be achieved through the introduction of script tags in a single HTML page.
<script src="../OrbitControls.js"></script>
var controls = new THREE.OrbitControls(camera);
controls.addEventListener("change", render)
.
question 1: how to introduce this file in the component?
this file is in three/examples/js/controls/OrbitControls.
always does not understand the use of import and export.
question 2: how to translate the sentence import * as THREE from "three"? Is this three a file or something?