All Projects → stephenml → Wxgame Threejs

stephenml / Wxgame Threejs

Licence: mit
Threejs 开发微信小游戏

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Wxgame Threejs

Wxdatabasedecryptkey
读取微信数据库聊天记录备份
Stars: ✭ 237 (+113.51%)
Mutual labels:  wx, wxapp
taroCloud
记日常、GitHub trending资讯小程序 taro-hooks + rematch+云开发
Stars: ✭ 25 (-77.48%)
Mutual labels:  wxapp, wx
face-login-wx
人脸识别登录微信小程序
Stars: ✭ 77 (-30.63%)
Mutual labels:  wxapp, wx
Weapp
🐧 微信小程序组件和功能封装,基于微信Component自定义组件开发
Stars: ✭ 235 (+111.71%)
Mutual labels:  wx, wxapp
cloudFns
微信小程序云函数合集
Stars: ✭ 34 (-69.37%)
Mutual labels:  wxapp, wx
wxfortune
运势小程序,使用canvas绘画图片,并保存图片
Stars: ✭ 79 (-28.83%)
Mutual labels:  wxapp, wx
wxapp-storage
简单的微信小程序Storage相关的封装, 特点是安全的数据源, 有效的存储时间
Stars: ✭ 13 (-88.29%)
Mutual labels:  wxapp, wx
Metro-Weapp
微信小程序-上海地铁Lite
Stars: ✭ 15 (-86.49%)
Mutual labels:  wxapp, wx
sea-ai
微信小程序 智能识别小程序 接入百度AI平台 基于wepy开发
Stars: ✭ 42 (-62.16%)
Mutual labels:  wxapp, wx
wx-ant-ble
微信、支付宝小程序BLE蓝牙SDK
Stars: ✭ 75 (-32.43%)
Mutual labels:  wxapp, wx
Cityselector
微信小程序 城市/区县定位选择模块 汉字/拼音搜索 可直接使用 另附 mpvue 版本 city picker / auto positioning / auto complete
Stars: ✭ 276 (+148.65%)
Mutual labels:  wx, wxapp
citySelector
🛳基于mpvue的微信小程序 城市/区县定位选择模块 汉字/拼音搜索 可直接使用 已更新
Stars: ✭ 52 (-53.15%)
Mutual labels:  wxapp, wx
Weixin Java Miniapp Demo
基于Spring Boot 和 WxJava 实现的微信小程序Java后端Demo
Stars: ✭ 779 (+601.8%)
Mutual labels:  wx, wxapp
Qake
Qake voxel-engine demo
Stars: ✭ 100 (-9.91%)
Mutual labels:  threejs
Giojs
🌏 A Declarative 3D Globe Data Visualization Library built with Three.js
Stars: ✭ 1,528 (+1276.58%)
Mutual labels:  threejs
Weapp Qrcode Base64
微信小程序生成二维码的插件,基于base64编码输出二维码,不依赖canvas
Stars: ✭ 100 (-9.91%)
Mutual labels:  wxapp
Wechat Weapp Movie
🎬电影推荐 - 微信小程序
Stars: ✭ 1,355 (+1120.72%)
Mutual labels:  wxapp
Awesome Wechat Weapp
微信小程序开发资源汇总 💯
Stars: ✭ 36,769 (+33025.23%)
Mutual labels:  wxapp
Three Spritetext
A sprite based text component for ThreeJS
Stars: ✭ 106 (-4.5%)
Mutual labels:  threejs
Threejs Example For Miniprogram
这是一个 three.js 在微信小程序里的使用示例
Stars: ✭ 96 (-13.51%)
Mutual labels:  threejs

Threejs 开发微信小游戏

本项目是一个使用 Threejs 开发微信小游戏的 '完整' 示例,不定期更新


使用的库

weapp-adapter : https://github.com/finscn/weapp-adapter


Threejs : https://github.com/mrdoob/three.js

由于微信小游戏的包大小限制,直接引入 three.js 微信开发工具压缩后还是会很大,所以引入 minified 版本后体积会减少很多,使用 weapp-adapterThreejs 无需修改代码


Physijs : https://github.com/chandlerprall/Physijs

由于 Physijs 是基于 worker 进行模拟, 而微信小游戏中的 worker 并非原生,所以需要对 physi.jsphysijs_worker.js 中的部分代码进行修改才能适配微信小游戏


Ammojs : https://github.com/kripken/ammo.js

目前直接引入的是 Physijs 示例中的 ammo.js,有条件的可自行下载进行编译


Oimojs : https://github.com/lo-th/Oimo.js

引入方式同 Threejs


遇到的问题

  1. 使用 Physijs 示例中的 ammo.js 开发工具可以正常模拟,手机预览会报错,暂时还没有进行适配

  2. ammo.js 的体积太大,而微信小游戏的包大小限制为 4M ,占用了 1/3 的大小 (Threejs 的占用大小约为 600k

  3. 使用 Oimojs 手机预览时,如果有 console.log( OimoObject ) 类似操作,可能会造成无法渲染,解决办法就是删除这行调试代码

  4. 微信小游戏离屏 Canvas 使用 webgl 存在 bug 无法渲染

  5. 由于 子域 的限制,无法得知 子域 的状态,需要不停的更新渲染 子域 的内容,在绘制 子域 内容时会存在很大的性能消耗,掉帧严重


更新日志

2018年05月05日

> 移除 `Physijs` 和 `Ammojs` 改用 `Oimojs` 实现物理效果

2018年5月9日

> 修改绘图方式 
  # 上屏 `Canvas` 使用 `2d`
  # 离屏 `Canvas` 使用 `webgl`
  # 将离屏 `Canvas` 绘制到上屏 `Canvas` 中

> 增加子域排行榜示例

2018年05月13日

> 弃用离屏 `Canvas` 渲染 `webgl` ,改用新的解决方案,详见 `ui` 类

LICENSE

The MIT License (MIT)

Copyright © 2018 stephenml(Stephen.Yang)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].