# three.js example
three.js example in wechat miniprogram
----
three.js 在小程序里的使用示例,其中 [three.js](https://github.com/yannliao/three.js) 使用的是小程序移植版,详情请到 [https://github.com/yannliao/three.js](https://github.com/yannliao/three.js)。
## 注意
1. 由于示例中有较多的模型是使用官网链接,加载比较慢。如果可以请查找替换资源路径,并替换。小程序只可以跟指定的域名与进行网络通信。使用前请[配置信任域名](https://developers.weixin.qq.com/miniprogram/dev/framework/ability/network.html)
2. 内存泄漏。为了防止内存泄漏,请在页面unload时,用 THREE.global.unregisterCanvas 或 THREE.global.clearCanvas 清除THREE.global中的canvas引用。同时利用canvas.cancelAnimationFrame 清除动画, 并且释放 Geometries Materials 等 Three.js 对象, 参考[How to dispose of objects](https://threejs.org/docs/index.html#manual/en/introduction/How-to-dispose-of-objects), [Three.js Cleanup](https://threejsfundamentals.org/threejs/lessons/threejs-cleanup.html)
## 示例&兼容性
<table>
<thead>
<tr>
<th>名称</th>
<th>性能</th>
<th>机型</th>
</tr>
</thead>
<tbody>
<tr>
<th>基本</th>
<th><img src="./demo/Screenshot_2019-10-22-11-03-47-236_com.tencent.mm.png" width="120"></th>
<th>
xiaomi MIX2 Android 8.0.0 Wechat Version 7.0.5 </br>
vivo X21A Android 9 Wechat Version 7.0.5</br>
iphone 8Plus ios13.1.2 Wechat Version 7.0.8</br>
</th>
</tr>
<tr>
<th>动画</th>
<th>
<img src="./demo/Screenshot_2019-10-28-20-01-20-469_com.tencent.mm.png" width="120">
</th>
<th>
xiaomi MIX2 Android 8.0.0 Wechat Version 7.0.5 </br>
vivo X21A Android 9 Wechat Version 7.0.5</br>
iphone 8Plus ios13.1.2 Wechat Version 7.0.8</br>
</th>
</tr>
<tr>
<th>OrbitControl 立方</th>
<th>
<img src="./demo/Screenshot_2019-10-22-11-04-02-587_com.tencent.mm.png" width="120">
</th>
<th>
xiaomi MIX2 Android 8.0.0 Wechat Version 7.0.5 </br>
vivo X21A Android 9 Wechat Version 7.0.5</br>
iphone 8Plus ios13.1.2 Wechat Version 7.0.8</br>
</th>
</tr>
<tr>
<th>gLTF 文件加载</th>
<th>
<img src="./demo/Screenshot_2019-10-22-11-04-32-720_com.tencent.mm.png" width="120">
</th>
<th>
xiaomi MIX2 Android 8.0.0 Wechat Version 7.0.5 </br>
vivo X21A Android 9 Wechat Version 7.0.5</br>
iphone 8Plus ios13.1.2 Wechat Version 7.0.8</br>
</th>
</tr>
<tr>
<th>glb 文件 </th>
<th>
<img src="./demo/Screenshot_2019-10-24-10-43-43-123_com.tencent.mm.png" width="120">
</th>
<th>
xiaomi MIX2 Android 8.0.0 Wechat Version 7.0.5 </br>
vivo X21A Android 9 Wechat Version 7.0.5</br>
iphone 8Plus ios13.1.2 Wechat Version 7.0.8</br>
</th>
</tr>
<tr>
<th>gLTF 文件加贴图 </th>
<th>
<img src="./demo/Screenshot_2019-10-22-11-03-37-095_com.tencent.mm.png" width="120">
<img src="./demo/Screenshot_2019-10-22-11-01-18-748_com.tencent.mm.png" width="120">
</th>
<th>
xiaomi MIX2 Android 8.0.0 Wechat Version 7.0.5 </br>
vivo X21A Android 9 Wechat Version 7.0.5</br>
</th>
</tr>
<tr>
<th>obj 文件 (WEBGL_compressed_texture_s3tc 扩展不支持)</th>
<th>
<img src="./demo/Screenshot_2019-10-28-19-13-24-007_com.tencent.mm.png" width="120">
</th>
<th>
xiaomi MIX2 Android 8.0.0 Wechat Version 7.0.5 </br>
vivo X21A Android 9 Wechat Version 7.0.5</br>
iphone 8Plus ios13.1.2 Wechat Version 7.0.8</br>
</th>
</tr>
<tr>
<th>raycaster 选中立方体</th>
<th>
<img src="./demo/Screenshot_2019-10-30-00-14-41-017_com.tencent.mm.png" width="120">
</th>
<th>
xiaomi MIX2 Android 8.0.0 Wechat Version 7.0.5 </br>
iphone 8Plus ios13.1.2 Wechat Version 7.0.8</br>
</th>
</tr>
</tbody>
</table>
没有合适的资源?快使用搜索试试~ 我知道了~
threejs微信小程序应用.zip
共83个文件
js:32个
json:15个
wxss:12个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 2 下载量 143 浏览量
2022-06-21
15:26:48
上传
评论 1
收藏 3MB ZIP 举报
温馨提示
threejs微信小程序应用
资源详情
资源评论
资源推荐
收起资源包目录
threejs微信小程序应用.zip (83个子文件)
threejs微信小程序应用
README.md 5KB
utils
util.js 472B
ResourceTracker.js 2KB
runtime.js 24KB
sitemap.json 191B
app.wxss 262B
project.config.json 997B
LICENSE 1KB
libs
three.weapp.js 1.19MB
app.js 63B
pages
cube
index.wxml 372B
index.js 3KB
index.wxss 0B
pikachu.png 84KB
index.json 52B
gltf
index.wxml 269B
loadgLTF.js 12KB
index.js 889B
index.wxss 0B
index.json 52B
obj
index.wxml 235B
index.js 845B
index.wxss 45B
index.json 52B
loadObj.js 3KB
trackcontrol
index.wxml 372B
index.js 5KB
index.wxss 0B
pikachu.png 84KB
index.json 52B
glb
index.wxml 126B
index.js 2KB
index.wxss 0B
index.json 52B
ngltf
index.wxml 269B
render.js 3KB
index.js 883B
index.wxss 0B
index.json 52B
animation
index.wxml 235B
animate.js 11KB
index.js 845B
index.wxss 45B
index.json 52B
index
index.wxml 1KB
index.js 173B
index.wxss 185B
index.json 27B
raycaster
index.wxml 235B
index.js 4KB
index.wxss 39B
index.json 52B
primitives
index.wxml 91B
primitives.js 12KB
index.js 411B
index.wxss 39B
index.json 52B
logs
logs.json 77B
logs.wxml 173B
logs.js 261B
logs.wxss 106B
jsm
pmrem
PMREMGenerator.js 10KB
PMREMCubeUVPacker.js 7KB
utils
SkeletonUtils.js 12KB
loaders
OBJLoader.js 18KB
RGBELoader.js 14KB
EquirectangularToCubeGenerator.js 5KB
MTLLoader.js 10KB
DDSLoader.js 6KB
GLTFLoader.js 78KB
controls
OrbitControls.js 23KB
TrackballControls.js 16KB
app.json 520B
package-lock.json 23KB
demo
Screenshot_2019-10-28-19-13-24-007_com.tencent.mm.png 597KB
Screenshot_2019-10-22-11-04-02-587_com.tencent.mm.png 143KB
Screenshot_2019-10-22-11-04-32-720_com.tencent.mm.png 169KB
Screenshot_2019-10-22-11-01-18-748_com.tencent.mm.png 375KB
Screenshot_2019-10-30-00-14-41-017_com.tencent.mm.png 116KB
Screenshot_2019-10-24-10-43-43-123_com.tencent.mm.png 256KB
Screenshot_2019-10-22-11-03-47-236_com.tencent.mm.png 169KB
Screenshot_2019-10-22-11-03-37-095_com.tencent.mm.png 373KB
Screenshot_2019-10-28-20-01-20-469_com.tencent.mm.png 446KB
共 83 条
- 1
紫微前端
- 粉丝: 4283
- 资源: 869
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论2