mirror of
https://github.com/szrpf/SceneAdapterDemo
synced 2025-10-25 00:15:55 +00:00
v1.3
This commit is contained in:
@@ -75,19 +75,19 @@
|
||||
"__id__": 5
|
||||
},
|
||||
{
|
||||
"__id__": 8
|
||||
"__id__": 7
|
||||
},
|
||||
{
|
||||
"__id__": 11
|
||||
"__id__": 9
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 15
|
||||
"__id__": 12
|
||||
},
|
||||
{
|
||||
"__id__": 16
|
||||
"__id__": 13
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@@ -248,9 +248,6 @@
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 6
|
||||
},
|
||||
{
|
||||
"__id__": 7
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@@ -333,33 +330,6 @@
|
||||
"_atlas": null,
|
||||
"_id": "d9tJr+3jpGA66qiPl1XnSz"
|
||||
},
|
||||
{
|
||||
"__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": 1080,
|
||||
"_originalHeight": 1920,
|
||||
"_id": "dbMGEcZJZNQI75L1FLgbd9"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Ball",
|
||||
@@ -371,10 +341,7 @@
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 9
|
||||
},
|
||||
{
|
||||
"__id__": 10
|
||||
"__id__": 8
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@@ -430,7 +397,7 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 8
|
||||
"__id__": 7
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
@@ -457,33 +424,6 @@
|
||||
"_atlas": null,
|
||||
"_id": "8fWn4KeXROfJvlWO4E6nB4"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_enabled": true,
|
||||
"alignMode": 1,
|
||||
"_target": null,
|
||||
"_alignFlags": 36,
|
||||
"_left": 0,
|
||||
"_right": 100,
|
||||
"_top": 0,
|
||||
"_bottom": 100,
|
||||
"_verticalCenter": 0,
|
||||
"_horizontalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
"_isAbsRight": true,
|
||||
"_isAbsTop": true,
|
||||
"_isAbsBottom": true,
|
||||
"_isAbsHorizontalCenter": true,
|
||||
"_isAbsVerticalCenter": true,
|
||||
"_originalWidth": 0,
|
||||
"_originalHeight": 0,
|
||||
"_id": "deTRVuGE1MxpQx3RkM1BUz"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Title",
|
||||
@@ -495,13 +435,10 @@
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 12
|
||||
"__id__": 10
|
||||
},
|
||||
{
|
||||
"__id__": 13
|
||||
},
|
||||
{
|
||||
"__id__": 14
|
||||
"__id__": 11
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
@@ -557,7 +494,7 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 11
|
||||
"__id__": 9
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
@@ -590,7 +527,7 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 11
|
||||
"__id__": 9
|
||||
},
|
||||
"_enabled": true,
|
||||
"_color": {
|
||||
@@ -603,33 +540,6 @@
|
||||
"_width": 4,
|
||||
"_id": "a8HiFt9pBAEK25pfIPlINu"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 11
|
||||
},
|
||||
"_enabled": true,
|
||||
"alignMode": 1,
|
||||
"_target": null,
|
||||
"_alignFlags": 1,
|
||||
"_left": 0,
|
||||
"_right": 0,
|
||||
"_top": 80,
|
||||
"_bottom": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_horizontalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
"_isAbsRight": true,
|
||||
"_isAbsTop": true,
|
||||
"_isAbsBottom": true,
|
||||
"_isAbsHorizontalCenter": true,
|
||||
"_isAbsVerticalCenter": true,
|
||||
"_originalWidth": 0,
|
||||
"_originalHeight": 0,
|
||||
"_id": "90OgtuTF5IHKM7kXftU4Aw"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Canvas",
|
||||
"_name": "",
|
||||
|
||||
@@ -16,13 +16,8 @@ export default class SceneAdapter extends cc.Component {
|
||||
this.destroy();
|
||||
return;
|
||||
}
|
||||
if (cvs.designResolution.width < cvs.designResolution.height) {
|
||||
cvs.fitWidth = true;
|
||||
cvs.fitHeight = false;
|
||||
} else {
|
||||
cvs.fitWidth = false;
|
||||
cvs.fitHeight = true;
|
||||
}
|
||||
cvs.fitWidth = true;
|
||||
cvs.fitHeight = true;
|
||||
this.resize();
|
||||
cc.view.setResizeCallback(this.resize.bind(this));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user