Giter Site home page Giter Site logo

weapp-phaser3-adapter's Introduction

微信小游戏 phaser3 适配解决方案

注意:当前在真机环境未测试通过

使用方法

将文件weapp-phaser3-adapter.js拷贝至微信小程序目录,并在入口引用即可。

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

游戏配置

在初始化phaser3实例时,配置建议加上:

let config = {};  // your config

if (window.canvas) {
    config.canvas = window.canvas;
}

资源的加载

在微信端使用时,注意文件的加载。如果资源在远端,则按如下方式指定远端地址:

this.load.setBaseURL("http://your.domain.name");

@taliove 2018

weapp-phaser3-adapter's People

Contributors

taliove avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

weapp-phaser3-adapter's Issues

有没有具体的使用Demo

先引入 Phaser, 再引入了 weapp-phaser3-adapter, 报了以下错误
Cannot read property 'hasOwnProperty' of undefined TypeError: Cannot read property 'hasOwnProperty' of undefined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.