加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

cocos code ide config.json&方便查看不同屏幕分辨率适配效

发布时间:2020-12-14 17:29:04 所属栏目:百科 来源:网络整理
导读:config.json { "init_cfg":{ "isLandscape": true,"isWindowTop": false,"name": "mahjonghn","width": 1080,"height": 540,"entry": "src/main.lua","consolePort": 6050,"uploadPort": 6060 },"simulator_screen_size": [ { "title": "iPhone 3Gs (480x320

config.json

{
    "init_cfg":{
       "isLandscape": true,"isWindowTop": false,"name": "mahjonghn","width": 1080,"height": 540,"entry": "src/main.lua","consolePort": 6050,"uploadPort": 6060
    },"simulator_screen_size": [
        {
            "title": "iPhone 3Gs (480x320)","width": 480,"height": 320
        },{
            "title": "iPhone 4 (960x640)","width": 960,"height": 640
        },{
            "title": "iPhone 5 (1136x640)","width": 1136,{
            "title": "iPad (1024x768)","width": 1024,"height": 768
        },{
            "title": "iPad Retina (2048x1536)","width": 2048,"height": 1536
        },{
            "title": "Android (800x480)","width": 800,"height": 480
        },{
            "title": "Android (854x480)","width": 854,{
            "title": "Android (1280x720)","width": 1280,"height": 720
        },{
            "title": "Android (1920x1080)","width": 1920,"height": 1080
        }
    ]
}

其中,


这个width和height调整为:

1080 * 540 小米mix2 2160*1080

960 * 640 普通手机 宽高比1.5

1024 * 768 ipad2 2048 * 1536

即可方便看到在不同手机上适配效果,再也不用担心公司没测试机啦

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读