S
S
Stalder2016-07-19 20:20:44
HTML
Stalder, 2016-07-19 20:20:44

Creating a VK application. How to properly size a Canvas?

The task is to write the client part of the game for the social. VKontakte networks. The whole thing should be in HTML5 + JS. I started to understand the examples and I was confused by the following: the dimensions of the Canvas are set there by two constants, but then what about different screens? How to correctly set the size of the canvas?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
gleendo, 2016-07-19
@evgeniy8705

Specify dimensions in relative units, not:? Why constants?

A
Alexander Aksentiev, 2016-07-19
@Sanasol

In VK, in the settings, the dimensions of the application are set.
The maximum can be somehow perverted with the height, the width cannot be changed from the application.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question