Commit 2a53ba73 authored by Tt's avatar Tt

Merge branch 'master' of http://120.27.1.210:43210/huiwan/op05 into master

parents 54dac053 be81945b
{
"ver": "1.1.0",
"uuid": "d547b437-ed95-4e0a-ad03-9e8813578dad",
"subMetas": {}
}
\ No newline at end of file
...@@ -1520,8 +1520,8 @@ ...@@ -1520,8 +1520,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 1208, "width": 2056,
"height": 322 "height": 537
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -1533,14 +1533,14 @@ ...@@ -1533,14 +1533,14 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
-555.649, -531.5,
0, 0,
0, 0,
0, 0,
0, 0,
1, 1,
2, 1,
2, 1,
1 1
] ]
}, },
...@@ -2763,7 +2763,7 @@ ...@@ -2763,7 +2763,7 @@
"_N$horizontalAlign": 0, "_N$horizontalAlign": 0,
"_N$fontSize": 100, "_N$fontSize": 100,
"_N$font": { "_N$font": {
"__uuid__": "04c2b808-1c8a-499b-9152-128a1abe340a" "__uuid__": "d547b437-ed95-4e0a-ad03-9e8813578dad"
}, },
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_N$maxWidth": 0, "_N$maxWidth": 0,
...@@ -3088,8 +3088,10 @@ ...@@ -3088,8 +3088,10 @@
"_fontSize": 100, "_fontSize": 100,
"_lineHeight": 100, "_lineHeight": 100,
"_enableWrapText": true, "_enableWrapText": true,
"_N$file": null, "_N$file": {
"_isSystemFontUsed": true, "__uuid__": "d547b437-ed95-4e0a-ad03-9e8813578dad"
},
"_isSystemFontUsed": false,
"_spacingX": 0, "_spacingX": 0,
"_batchAsBitmap": false, "_batchAsBitmap": false,
"_styleFlags": 0, "_styleFlags": 0,
......
...@@ -287,8 +287,8 @@ cc.Class({ ...@@ -287,8 +287,8 @@ cc.Class({
//更换书的样子 //更换书的样子
pg.view.visible(btn_next, true);//显示的内容用true pg.view.visible(btn_next, true);//显示的内容用true
pg.view.visible(btn_return, true); pg.view.visible(btn_return, true);
let bg_book_img = this._stageData.img;//从数组中调取img数据 // let bg_book_img = this._stageData.img;//从数组中调取img数据
pg.view.setNetImg(bg_book, bg_book_img);//与界面的节点绑定 // pg.view.setNetImg(bg_book, bg_book_img);//与界面的节点绑定
//拓展加载动画的内容 //拓展加载动画的内容
this.animationName = ""; this.animationName = "";
this._tryagainCount = 0; this._tryagainCount = 0;
...@@ -336,6 +336,8 @@ cc.Class({ ...@@ -336,6 +336,8 @@ cc.Class({
this.playWordAni().then(() => { this.playWordAni().then(() => {
this.playRecordAudio(); this.playRecordAudio();
}) })
let bg_book2 = pg.view.find(this, "bg_book2");
pg.view.setNetImg(bg_book2, this._stageData.img, { w: 2056, h: 537 });
// this._timeoutIds.push(setTimeout(() => { // this._timeoutIds.push(setTimeout(() => {
// pg.view.visible(icon_hand, true); // pg.view.visible(icon_hand, true);
// let action = cc.tween(icon_hand); // let action = cc.tween(icon_hand);
......
...@@ -61,7 +61,7 @@ pg.view = { ...@@ -61,7 +61,7 @@ pg.view = {
}) })
}) })
}, },
setNetImg(item, res) { setNetImg(item, res, { w, h }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (!item) return log.w("图片更换失败,传入了错误的item"); if (!item) return log.w("图片更换失败,传入了错误的item");
let node = item.node ? item.node : item; let node = item.node ? item.node : item;
...@@ -71,8 +71,8 @@ pg.view = { ...@@ -71,8 +71,8 @@ pg.view = {
} }
if (!node) return log.w("图片更换失败,传入了错误的item"); if (!node) return log.w("图片更换失败,传入了错误的item");
if (node.net_url == res) return; if (node.net_url == res) return;
let w = node.width; // let w = node.width;
let h = node.height; // let h = node.height;
// node.active = false;// // node.active = false;//
pg.load.loadNetImg(res).then((texture) => { pg.load.loadNetImg(res).then((texture) => {
if (!cc.isValid(node)) return log.i("节点已销毁"); if (!cc.isValid(node)) return log.i("节点已销毁");
...@@ -82,6 +82,17 @@ pg.view = { ...@@ -82,6 +82,17 @@ pg.view = {
let spriteFrame = new cc.SpriteFrame(texture); let spriteFrame = new cc.SpriteFrame(texture);
component.spriteFrame = spriteFrame; component.spriteFrame = spriteFrame;
node.net_url = res; node.net_url = res;
// node.active = true;
if (!cc.isValid(node)) return pg.logger.i("节点已销毁");
if (!node) return pg.logger.w("节点已销毁");
if (w && h) {
let scaleX = w / nw;
let scaleY = h / nh;
let scale = scaleX <= scaleY ? scaleX : scaleY;
node.width = w;//nw * scale;
node.height = h;//nh * scale;
} else {
let a = w / nw;//100 2000 0.05 let a = w / nw;//100 2000 0.05
let b = h / nh;//100 1000 0.1 let b = h / nh;//100 1000 0.1
if (a < b) { if (a < b) {
...@@ -93,7 +104,8 @@ pg.view = { ...@@ -93,7 +104,8 @@ pg.view = {
} }
node.scaleX = node.parent.scaleX; node.scaleX = node.parent.scaleX;
node.scaleY = node.parent.scaleY; node.scaleY = node.parent.scaleY;
// node.active = true; }
node.active = true;
resolve({ w: nw, h: nh }); resolve({ w: nw, h: nh });
}) })
}) })
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 1208, "width": 2056,
"height": 322, "height": 537,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"bg_book": { "bg_book": {
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
"offsetY": 0, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 0,
"width": 1208, "width": 2056,
"height": 322, "height": 537,
"rawWidth": 1208, "rawWidth": 2056,
"rawHeight": 322, "rawHeight": 537,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
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