-
安装 nodejs,在项目目录下安装 three.js 模块:
npm install --save @types/three
-
在该目录下会有一个 node_modules/@types/three 文件夹
-
在 js 文件中输入
THREE
就会产生提示(参考 https://blog.csdn.net/Mrhan210/article/details/85263755) -
在 three 中定义的变量都有提示,不过其创建的变量没有提示,可以在变量上添加类似
/** @type {THREE.WebGLRenderer} */
的说明即可(参考 https://blog.csdn.net/supergao222/article/details/80658525)
Created
April 4, 2019 08:36
-
-
Save foolishflyfox/b35efa51ff5bf8b713babc49da1af080 to your computer and use it in GitHub Desktop.
在 vscode 下为three.js 添加自动提示功能
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment