1、安装
– npm install --save three
– npm install --save @types/three
2、Bugs
– 此时就已经安装好ThreeJS了,但是在引入的时候依然存在问题,插件类型部分引入出现找不到该模块的声明文件,找了好多都太老了,所以记录一下这个问题;
> 将类型声明指向真实的路径
tsconfig.json ------------------------------ compilerOptions/paths
"three/examples/jsm/loaders/GLTFLoader": ["./node_modules/@types/three/examples/jsm/loaders/GLTFLoader"],