vue页面引入three.js实现3d动画场景
cnpm安装
1 | npm install -g cnpm --registry=https://registry.npm.taobao.org |
three安装
1 | cnpm install three |
安装轨道控件插件
1 | npm install three-orbit-controls |
安装加载.obj和.mtl文件的插件
1 | npm i --save three-obj-mtl-loader |
安装渲染器插件
1 | npm i --save three-css2drender |
Vue页面引入three.js并使用
import * as Three from ‘three’
页面测试demo
1 | <template> |