Giter Club home page Giter Club logo

we_flappybird's Introduction

we_flappybird

微信小程序-像素鸟游戏

##注意: 微信小程序绘图API中drawImage不支持图片裁剪,其实微信是支持裁剪的只是接口没有实现,可以通过修改WAService.js使其支持裁剪。 修改如下:

//修改前
"drawImage" == e ? u.prototype[e] = function(t, n, o, i, a) {
            "devtools" == (0, p.getPlatform)() || /wxfile:\/\//.test(t) || (t = (0, p.getRealRoute)(g, t).replace(/.html$/, "")),
            r(i) && r(a) ? data = [t, n, o, i, a] : data = [t, n, o],
            this.actions.push({
                method: e,
                data: data
            })
        }
//修改后
"drawImage" == e ? s.prototype[e] = function(t, n, o, i, a,xx,yy,ww,hh) {
            "devtools" == (0, l.getPlatform)() || /wxfile:\/\//.test(t) || (t = (0, l.getRealRoute)(v, t).replace(/.html$/, "")),
            r(xx) && r(yy) ? data = [t, n, o, i, a,xx,yy,ww,hh] :r(i) && r(a) ? data = [t, n, o, i, a] : data = [t, n, o],
            this.actions.push({
                method: e,
                data: data
            })
        }

修改后替换两处文件:

  1. 安装目录\package.nw\app\dist\weapp\onlinevendor下的WAService.js
  2. C:\Users\用户名\AppData\Local\微信web开发者工具\User Data\WeappVendor下的WAService.js

修改好的WAService.js文件在refile文件夹中

不支持手机预览

we_flappybird's People

Contributors

qutz avatar

Watchers

James Cloos avatar zzw avatar

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.