mirror of
				https://github.com/szrpf/SceneAdapterDemo
				synced 2025-11-04 13:26:00 +00:00 
			
		
		
		
	v1.1
This commit is contained in:
		@@ -85,6 +85,9 @@
 | 
			
		||||
    "_components": [
 | 
			
		||||
      {
 | 
			
		||||
        "__id__": 15
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "__id__": 16
 | 
			
		||||
      }
 | 
			
		||||
    ],
 | 
			
		||||
    "_prefab": null,
 | 
			
		||||
@@ -298,33 +301,6 @@
 | 
			
		||||
    "groupIndex": 0,
 | 
			
		||||
    "_id": "e2e0crkOLxGrpMxpbC4iQg1"
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "__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": 200,
 | 
			
		||||
    "_originalHeight": 150,
 | 
			
		||||
    "_id": "487+STf0lJaqZd2IOVumKy"
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "__type__": "cc.Sprite",
 | 
			
		||||
    "_name": "",
 | 
			
		||||
@@ -357,6 +333,33 @@
 | 
			
		||||
    "_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",
 | 
			
		||||
@@ -643,5 +646,15 @@
 | 
			
		||||
    "_fitWidth": true,
 | 
			
		||||
    "_fitHeight": false,
 | 
			
		||||
    "_id": "6d1ebIvmZJPqKflif+HTsU"
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "__type__": "e1b90/rohdEk4SdmmEZANaD",
 | 
			
		||||
    "_name": "",
 | 
			
		||||
    "_objFlags": 0,
 | 
			
		||||
    "node": {
 | 
			
		||||
      "__id__": 2
 | 
			
		||||
    },
 | 
			
		||||
    "_enabled": true,
 | 
			
		||||
    "_id": "e7Qc+zZkdDeabOFueN7izj"
 | 
			
		||||
  }
 | 
			
		||||
]
 | 
			
		||||
@@ -27,8 +27,5 @@ export default class SceneAdapter extends cc.Component {
 | 
			
		||||
                node.scale = cc.winSize.width / node.width;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        if (!cc.sys.isMobile && !node.getComponent(cc.Mask)) {
 | 
			
		||||
            node.addComponent(cc.Mask);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 82 B  | 
@@ -1,38 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "ver": "2.3.7",
 | 
			
		||||
  "uuid": "97364ef8-068d-4d5a-ae82-ab3241db27e5",
 | 
			
		||||
  "importer": "texture",
 | 
			
		||||
  "type": "sprite",
 | 
			
		||||
  "wrapMode": "clamp",
 | 
			
		||||
  "filterMode": "bilinear",
 | 
			
		||||
  "premultiplyAlpha": false,
 | 
			
		||||
  "genMipmaps": false,
 | 
			
		||||
  "packable": true,
 | 
			
		||||
  "width": 2,
 | 
			
		||||
  "height": 2,
 | 
			
		||||
  "platformSettings": {},
 | 
			
		||||
  "subMetas": {
 | 
			
		||||
    "白图": {
 | 
			
		||||
      "ver": "1.0.6",
 | 
			
		||||
      "uuid": "7aa032d0-85d6-4fcb-87a4-2f89173bfb8c",
 | 
			
		||||
      "importer": "sprite-frame",
 | 
			
		||||
      "rawTextureUuid": "97364ef8-068d-4d5a-ae82-ab3241db27e5",
 | 
			
		||||
      "trimType": "auto",
 | 
			
		||||
      "trimThreshold": 1,
 | 
			
		||||
      "rotated": false,
 | 
			
		||||
      "offsetX": 0,
 | 
			
		||||
      "offsetY": 0,
 | 
			
		||||
      "trimX": 0,
 | 
			
		||||
      "trimY": 0,
 | 
			
		||||
      "width": 2,
 | 
			
		||||
      "height": 2,
 | 
			
		||||
      "rawWidth": 2,
 | 
			
		||||
      "rawHeight": 2,
 | 
			
		||||
      "borderTop": 0,
 | 
			
		||||
      "borderBottom": 0,
 | 
			
		||||
      "borderLeft": 0,
 | 
			
		||||
      "borderRight": 0,
 | 
			
		||||
      "subMetas": {}
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@@ -9,7 +9,7 @@
 | 
			
		||||
  "packageName": "org.cocos2d.helloworld",
 | 
			
		||||
  "startScene": "2d2f792f-a40c-49bb-a189-ed176a246e49",
 | 
			
		||||
  "title": "SceneAdapterDemo",
 | 
			
		||||
  "webOrientation": "auto",
 | 
			
		||||
  "webOrientation": "portrait",
 | 
			
		||||
  "inlineSpriteFrames": true,
 | 
			
		||||
  "inlineSpriteFrames_native": true,
 | 
			
		||||
  "mainCompressionType": "default",
 | 
			
		||||
 
 | 
			
		||||
@@ -20,7 +20,7 @@
 | 
			
		||||
    "width": 960,
 | 
			
		||||
    "height": 640
 | 
			
		||||
  },
 | 
			
		||||
  "last-module-event-record-time": 1688608996390,
 | 
			
		||||
  "last-module-event-record-time": 1691731715153,
 | 
			
		||||
  "assets-sort-type": "name",
 | 
			
		||||
  "facebook": {
 | 
			
		||||
    "enable": false,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user