three.js 郭隆邦 笔记1

http://www.webgl3d.cn/pages/cd35b2/
p3 three.js 下载官方文件包 2023
three每个月都会发布新版本
threejs官方包所有版本: https://github.com/mrdoob/three.js/releases
three.js 中文网 www.webgl3d.cn
笔记: http://www.webgl3d.cn/pages/aac9ab/

p4
本地静态服务器 webpack vite 开发环境
three.js 就用 live-server 就行
p5
vue 引入three.js(js库)
three.js 其他扩展库 examples>jsm>controls 下的都是
新版本 three>addons>controls
.html 直接引入three.js 本地静态服务打开html

<script type="module>   // 支持Es6语法
	import * as THREE from './build/three.module.js';   // 引入ES6语法的three
</script>
<script type="importmap>   // html文件和vue开发项目中写法一样  需要配置下面的路径
{
	"imports": {
		"three": "../three.js/build/three/module.js""three/addons": "../three.js/examples/jsm/"
	}
}
</script>
// 就可以向下面一样使用了
<script type="module>  
	import * as THREE from 'three';  // 和上面的three名字对应
	import { OrbitControls} from 'three/addons/controls/OrbitControls.js'
</script>

p6

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值