mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2025-12-08 16:28:44 +00:00
[adapters] 增加小游戏适配部分源码
This commit is contained in:
20
adapters/platforms/wechat/res/game.js
Normal file
20
adapters/platforms/wechat/res/game.js
Normal file
@@ -0,0 +1,20 @@
|
||||
require('adapter-js-path');
|
||||
__globalAdapter.init();
|
||||
require('cocos2d-js-path');
|
||||
require('physics-js-path');
|
||||
__globalAdapter.adaptEngine();
|
||||
require('./ccRequire');
|
||||
|
||||
require('./src/settings');
|
||||
// Introduce Cocos Service here
|
||||
require('./main'); // TODO: move to common
|
||||
|
||||
// Adjust devicePixelRatio
|
||||
cc.view._maxPixelRatio = 4;
|
||||
|
||||
if (cc.sys.platform !== cc.sys.WECHAT_GAME_SUB) {
|
||||
// Release Image objects after uploaded gl texture
|
||||
cc.macro.CLEANUP_IMAGE_CACHE = true;
|
||||
}
|
||||
|
||||
window.boot();
|
||||
Reference in New Issue
Block a user