Cocos Creator Screen Orientation

Does creator have orientation callback for native now? How can I rotate my webpage and detect that orientation?

  • Creator Version: 2.3.4

  • Target platfrom: Google Chrome: Webpage

1赞

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

1赞