[email protected]
|[email protected]
专门适配
更加全面的适配可参考官方的适配库 oasis-engine/miniprogram-adapter 也欢迎 PR 集成到本仓库
# 0.8.3
pnpm i -S [email protected] [email protected]
# 0.6.3
pnpm i -S [email protected] [email protected]
rollup.config.js
注入特定配置
import { mergeRollupOptions } from 'platformize-oasis/dist-plugin';
export default mergeRollupOptions(
{
input: ['./miniprogram/pages/index/index.ts'],
output: {
format: 'cjs',
dir: 'miniprogram/',
entryFileNames: 'pages/[name]/[name].js',
},
},
{ minify: process.env.BUILD === 'production' },
);
自行组装版本见这里
import { PlatformManager, WechatPlatform } from 'platformize-oasis';
const width = canvasClientWidth;
const height = canvasClientHeight;
const wechatPlatform = new WechatPlatform(canvas, width, height);
PlatformManager.set(wechatPlatform);
window.innerWidth
window.innerHeight
window.devicePixelRatio
requestAnimationFrame();
cancelAnimationFrame();
const xhr = new XMLHttpRequest();
...等等
// 使用完毕后销毁资源
wechatPlatform.dispose();
2022/8/6 发现微信小程序gl.texSubImage2D api有问题...目前只修复了GLTexture2D.setImageSource, setPixelBuffer依然有问题...
可通过飞书
群里 DeepKolos 联系我, QQ群广告太多了
如果项目对您有帮助或者有适配需求,欢迎打赏
感谢各位支持~~