Cocos Creator (Web Mobile H5)如何检测更换Orientation?

目前把转向的功能放到button上可以正常切换横向和直立,那如果转动手机为横向或直立该如何更改cc.view.setDesignResolutionSize 的大小呢?该如何检测到手机是横向或是直立呢?

  • Creator 版本: 2.3.4
  • 目标平台: 网页和手机网页

Solution Found
cc.view.setResizeCallback(); and cc.view.getFrameSize() to detect is
(frameSize.height > frameSize.width) or
(frameSize.width > frameSize.height) that to set Landscape or Portrait