博客
CLI命令
# install dependencies
yarn
# serve with hot reload at localhost:8080
yarn dev
# build for production with minification
yarn build
# run tests with jest and preact-render-spy
yarn test
有关工作原理的详细说明,请参阅。
注意:预渲染时,模块作为组件在大多数Web API不可用的Node.js
一。安装three.js
1.npm `npm install three0.106.2` vscode
2.下载three.js文件拖入项目
3.在需要定义three对象的js文件头写入import * as THREE from '../js/three.module.js';路径为自己的three.module.js文件的路径,这样就可以自动提示three.js中的函数和方法
二。基本组件
1.场景var scene = new THREE.Scene()
2.相机
(1)正交相机