-
-
Notifications
You must be signed in to change notification settings - Fork 647
How to deploy WeChat Mini Games with melonJS
Olivier Biot edited this page Jul 3, 2018
·
16 revisions
- melonJS 6.x
- WeChat app-adapter
- WebGL : due to compatibility issue, the melonJS WebGL renderer is currently disabled when running under WeChat, and the Canvas renderer therefore forced by default.
- Audio : melonJS built-in Audio does not currently work, however you can use the Audio component provided by the weapp-adapter :
let au = new Audio('path/to/audio.mp3');
au.play();
au.pause();
- scaling mode : the basic "fit" scaling mode does not work, as the display is stretched to the canvas size, causing errors in the touch event detection (as melonJS rightly assume the canvas is not stretched). Use the "fill" scaling mode or other matching with your needs.
- preloader : JSON and other binary files require a full URL (relative path does not work, as WeChat throws a invalid URL error)