finscn / weapp-adapter

weapp-adapter of Wechat Tiny Game in ES6
MIT License
413 stars 82 forks source link

weapp-adapter

weapp-adapter of Wechat Tiny Game in ES6

For english, see here


微信小游戏官方提供了一个weapp-adapter的示例文件. (关于什么是 weapp-adapter 详见: https://mp.weixin.qq.com/debug/wxagame/dev/tutorial/base/adapter.html )

本项目则是一个改良的weapp-adapter, 基于ES6. 针对 PixiJS、ThreeJS、Babylon等流行框架做适配, 希望可以尽可能完善的支持它们. 当然这将是一个持续的过程.

注意 : 本项目已经放弃对 Phaser 的支持, 因为最新的 Phaser 大量使用 Blob 对象, 而在微信小游戏里目前无法模拟 Blob. 欲使用 Phaser 的朋友请自行修改 Phaser 的代码, 避免使用 Blob 对象.


改良内容


微信小游戏引擎 已知问题

(只列出比较严重的、且难以通过hack手段解决的问题)


使用方法

src下的文件放入小游戏项目中(例如 放入 js/libs/weapp-adapter 目录内)

在需要使用weapp-adapter的文件内使用下列代码引入即可.

import './js/libs/weapp-adapter/index.js'

注意:


LICENSE

The MIT License

Copyright (c) 2018 finscn(大城小胖)

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.