快速开始 greensock.com/get-started…
1.新建文件夹:01-three-basic
2.打开终端:
npm init
npm install parcel-bundler --save-dev
3.把这个复制到package.json的对应位置
"scripts": {
"dev": "parcel <your entry file>",
"build": "parcel build <your entry file>"
},
4.package.json
{
"name": "01-three-basic",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "parcel src/index.html",
"build": "parcel build src/index.html"
},
"author": "",
"license": "ISC",
"devDependencies": {
"parcel-bundler": "^1.12.5"
}
}
5.启动项目
6.安装three.js,gsap(动画库),dat.gui
npm install gsap dat.gui three