Cocos Creator 3.0 preview | Canvas and screen Resolution

  • What is the best canvas size for mobile screen resolution?
  • Can we create Canvas Size that would be suitable for all devices (Such as Mobile and computer)?

waiting for advice, if there is a script please share a full script example, to understand the solution of canvas size and screen resolution.

@Rainbowin Maybe you can refer to this document

According to the document link you sent and according to google search, for mobile phones best resolution for canvas is w:640 * h:960 …
this resolution is an example in the document you sent.

All is good but not perfect.
all game engines have the same rules of canvas + widgets components.
and there is no exception.

I am testing cocos creator 3.0 preview 1, learning typescript to use cocos creator.

canvas and widgets is always a trouble.
look her

clearly a smaller resolution according to W:640 * H:960

and if it is larger

there will be a weird gap.

however, the widget is doing its job.
but UI positions will be different from mobile to other

still, I am not fully satisfied with this canvas

i understood now, finally
i needed to do some calculation hight and width of canvas + fit hight

all good