The most basic drawing environment we use is drawing in canvas, and the drawing environment is obtained by calling the getContext() method of the canvas object. The getContext() method requires only one parameter: the type of drawing environment. In the game we use a 2D type drawing environment.
Get the canvas drawing environment