three.js学习记录(基础)

前言:

        页面渲染3D特效,可以从各种图表库(例如ECharts)中寻找各种适用的模版,也可以寻找第三方插件。。。

                一直以来都对three.js充满向往,终于偷闲找了个借口学了起来

参考资料

Three.js – JavaScript 3D Libraryhttps://threejs.org/Three.js中文网提供Three.js、WebGL视频课程http://www.webgl3d.cn/项目环境介绍:vue3+ts+vite

一、安装

yarn add three

 yarn add @types/three -D

二、引用

1、安装成功后,首先在env.d.ts同级目录下创建three.d.ts,并且申明下载文件

declare module 'three'

declare module 'three/addons/controls/OrbitControls.js'

三、简单使用




你可能感兴趣的:(javascript,学习,前端,three.js)