difenduandada
2024-12-31 34abe6963b344c882358274957f4b992456fee40
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
require('libs/weapp-adapter/index');
var Parser = require('libs/xmldom/dom-parser');
window.DOMParser = Parser.DOMParser;
require('libs/wx-downloader.js');
require('src/settings.18728');
var settings = window._CCSettings;
require('main.10312');
require(settings.debug ? 'cocos2d-js.js' : 'cocos2d-js-min.14a9c.js');
require('./libs/engine/index.js');
 
// Adjust devicePixelRatio
cc.view._maxPixelRatio = 3;
wx.setStatusBarStyle({style: "white"});
 
wxDownloader.REMOTE_SERVER_ROOT = "https://sszgh5-cdn.shiyuegame.com/h5/v190705/";
wxDownloader.SUBCONTEXT_ROOT = "";
var pipeBeforeDownloader = cc.loader.subPackPipe || cc.loader.md5Pipe || cc.loader.assetLoader;
cc.loader.insertPipeAfter(pipeBeforeDownloader, wxDownloader);
 
cc.loader.downloader.loadSubpackage('src', function (err) {
  if (err) {
 
    return console.error(err);
  }
  console.log('load subpackage successfully.');
 
  if (cc.sys.browserType === cc.sys.BROWSER_TYPE_WECHAT_GAME_SUB) {
    var _WECHAT_SUBDOMAIN_DATA = require('src/subdomain.json.js');
    cc.game.once(cc.game.EVENT_ENGINE_INITED, function () {
      cc.Pipeline.Downloader.PackDownloader._doPreload("WECHAT_SUBDOMAIN", _WECHAT_SUBDOMAIN_DATA);
    });
 
    require('./libs/sub-context-adapter');
  }
  else {
    // Release Image objects after uploaded gl texture
    cc.macro.CLEANUP_IMAGE_CACHE = true;
  }
  wxDownloader.init();
  window.boot();
 
});