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

前端之家收集整理的这篇文章主要介绍了cocos code ide config.json&方便查看不同屏幕分辨率适配效果前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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

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

原文链接:https://www.f2er.com/cocos2dx/338182.html

猜你在找的Cocos2d-x相关文章