three.js学习:react + OrbitControls is not a constructor 问题处理

three.js学习:react + OrbitControls is not a constructor 问题处理_第1张图片

1.在当前页引入OrbitControls

import "three/example/js/controls/OrbitControls"

2.进入three/example/js/controls/OrbitControls中,添加以下代码

import * as THREE from "three"

3.重启项目

你可能感兴趣的:(React,Three.js,OrbitControls,javascript)