@safe-engine/cocos 1.4.5 → 1.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/app.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAOA,wBAAgB,SAAS,SAcxB;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,EAAE,kBAAkB,KAAA,EAAE,EAAE,KAAA,QAgCtE;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAO,EAAE,EAAE,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,QA4B5E;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC,CAIxD;AAED,eAAO,MAAM,WAAW,uBAAiB,CAAA"}
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAOA,wBAAgB,SAAS,SAcxB;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,EAAE,kBAAkB,KAAA,EAAE,EAAE,KAAA,QAiCtE;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAO,EAAE,EAAE,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,QA4B5E;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC,CAIxD;AAED,eAAO,MAAM,WAAW,uBAAiB,CAAA"}
package/dist/app.js CHANGED
@@ -68,7 +68,8 @@ function startGame(option, designedResolution, cb) {
68
68
  // Adjust viewport meta
69
69
  cc.view.adjustViewPort(true);
70
70
  // Setup the resolution policy and design resolution size
71
- cc.view.setDesignResolutionSize(width, height, cc.ResolutionPolicy.FIXED_WIDTH);
71
+ var policy = width > height ? cc.ResolutionPolicy.FIXED_HEIGHT : cc.ResolutionPolicy.FIXED_WIDTH;
72
+ cc.view.setDesignResolutionSize(width, height, policy);
72
73
  // The game will be resized when browser size change
73
74
  cc.view.resizeWithBrowserSize(true);
74
75
  cc.director.runScene(new BootScene());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@safe-engine/cocos",
3
- "version": "1.4.5",
3
+ "version": "1.4.6",
4
4
  "description": "safe-engine with cocos renderer support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",