three-joystick
three-joystick copied to clipboard
你好,按照你说的依序引入,页面没有报错但没有出现摇杆,请问要怎么解决?
用的是vue+three.js, 我把npm i three-joystick 下好的modules移到了static文价夹下 import { RotationJoystickControls } from "@/static/three-joystick";
initCanvas(){ this.rotationJoystick = new RotationJoystickControls(camera, scene, mesh); this.animate() } animate() { requestAnimationFrame(()=>{this.animate()}); this.rotationJoystick.update(); renderer.render(scene, camera); }