OrbitControls Controller in three introduced into vue

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

clipboard.png
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?

Oct.11,2021

just npm I three-OrbitControls directly. Please test today


No one answers?


suggest learning
https://github.com/hujiulong/.
to think about


import {OrbitControls} from 'three/examples/jsm/controls/OrbitControls'

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4610d-44ba2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4610d-44ba2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?