0.0.2 • Published 2 years ago

adapter-miniprogram v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

adapter-miniprogram

Playcanvas.js 小程序 WebGL 的适配器。

使用

可参考 example 目录下的示例项目或参照以下流程:

  1. 通过 npm 安装

    npm install --save adapter-miniprogram

    安装完成之后在微信开发者工具中点击构建 npm。

  2. 导入小程序适配版本的 Playcanvas

import adapter from 'adapter-miniprogram'

Page({
  onReady() {
    wx.createSelectorQuery()
      .select('#webgl')
      .node()
      .exec((res) => {
        const canvas = res[0].node
  

      })
  }
})

说明

  • 如在使用过程中发现有适配问题,可通过 issue 反馈或发 PR 修复。
0.0.2

2 years ago

0.0.1

2 years ago