Commit a7296fd5 authored by 范雪寒's avatar 范雪寒

feat: 背景图缩放_try 2

parent e1d296cb
...@@ -80,6 +80,9 @@ ...@@ -80,6 +80,9 @@
{ {
"__id__": 5 "__id__": 5
}, },
{
"__id__": 8
},
{ {
"__id__": 11 "__id__": 11
} }
...@@ -249,18 +252,14 @@ ...@@ -249,18 +252,14 @@
"_parent": { "_parent": {
"__id__": 2 "__id__": 2
}, },
"_children": [ "_children": [],
{
"__id__": 6
}
],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 9 "__id__": 6
}, },
{ {
"__id__": 10 "__id__": 7
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -311,21 +310,80 @@ ...@@ -311,21 +310,80 @@
"groupIndex": 0, "groupIndex": 0,
"_id": "c3GYfSaEpP94AyYyWhJpcv" "_id": "c3GYfSaEpP94AyYyWhJpcv"
}, },
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "51haGpsblC9L6V90SEmhCy"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 100,
"_originalHeight": 100,
"_id": "ceuFd5fJtHL7nlxNnSnNC5"
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "ImgBg", "_name": "ImgBg",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 5 "__id__": 2
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 7 "__id__": 9
}, },
{ {
"__id__": 8 "__id__": 10
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -381,7 +439,7 @@ ...@@ -381,7 +439,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 6 "__id__": 8
}, },
"_enabled": true, "_enabled": true,
"_materials": [ "_materials": [
...@@ -413,7 +471,7 @@ ...@@ -413,7 +471,7 @@
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"node": { "node": {
"__id__": 6 "__id__": 8
}, },
"_enabled": true, "_enabled": true,
"alignMode": 2, "alignMode": 2,
...@@ -435,65 +493,6 @@ ...@@ -435,65 +493,6 @@
"_originalHeight": 0, "_originalHeight": 0,
"_id": "4egRIGqGlJ+q9io/Aad+bD" "_id": "4egRIGqGlJ+q9io/Aad+bD"
}, },
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "51haGpsblC9L6V90SEmhCy"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 100,
"_originalHeight": 100,
"_id": "ceuFd5fJtHL7nlxNnSnNC5"
},
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "catFrame", "_name": "catFrame",
......
...@@ -155,7 +155,7 @@ cc.Class({ ...@@ -155,7 +155,7 @@ cc.Class({
this.coolCatSpeakStart(); this.coolCatSpeakStart();
const bg = cc.find('Canvas/bg/ImgBg'); const bg = cc.find('Canvas/ImgBg');
await this.asyncLoadSpriteByUrl(bg, this.data.bgItem.url); await this.asyncLoadSpriteByUrl(bg, this.data.bgItem.url);
const canvas = cc.find('Canvas'); const canvas = cc.find('Canvas');
......
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