Commit 32eaddb3 authored by 范雪寒's avatar 范雪寒

test:

parent 5c43f6ba
{"ver":"1.1.2","uuid":"d3ad24ed-9c8b-421d-934f-f93f1acf3060","isBundle":false,"bundleName":"","priority":1,"compressionType":{},"optimizeHotUpdate":{},"inlineSpriteFrames":{},"isRemoteBundle":{"ios":false,"android":false},"subMetas":{}}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "d3ad24ed-9c8b-421d-934f-f93f1acf3060",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
......@@ -73,6 +73,7 @@ cc.Class({
this.MaxSize = 1;
},
init: function () {
console.log('汪汪汪init')
var canvaSize = this.findCanvas();
cc.director._scene.width = canvaSize.width;
cc.director._scene.height = canvaSize.height;
......@@ -138,11 +139,11 @@ cc.Class({
let realWidth = this.bgScaleMax[i].width * scaleForShowAll;
let realHeight = this.bgScaleMax[i].height * scaleForShowAll;
// // 2. 基于第一步的数据,再做缩放适配
// this.bgScaleMax[i].scale = Math.max(
// cc.view.getCanvasSize().width / realWidth,
// cc.view.getCanvasSize().height / realHeight
// );
// 2. 基于第一步的数据,再做缩放适配
this.bgScaleMax[i].scale = Math.max(
cc.view.getCanvasSize().width / realWidth,
cc.view.getCanvasSize().height / realHeight
);
}
},
......@@ -158,10 +159,10 @@ cc.Class({
let realHeight = 720 * srcScaleForShowAll;
// 2. 基于第一步的数据,再做节点宽高重置
// this.nodeUIOffset[i].width =
// 1280 * (cc.view.getCanvasSize().width / realWidth);
// this.nodeUIOffset[i].height =
// 720 * (cc.view.getCanvasSize().height / realHeight);
this.nodeUIOffset[i].width =
1280 * (cc.view.getCanvasSize().width / realWidth);
this.nodeUIOffset[i].height =
720 * (cc.view.getCanvasSize().height / realHeight);
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment