@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 +1 -1
- package/dist/app.js +2 -1
- package/package.json +1 -1
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,
|
|
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.
|
|
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());
|