Displaying Our Triangle
Understand how to draw a triangle on the HTML5 canvas at a fixed position by defining a JavaScript function. This lesson prepares you to manipulate the triangle's coordinates for interactive keyboard control in upcoming lessons.
We'll cover the following...
We'll cover the following...
Let’s start easy by first drawing our triangle. The way we are going to do that is by defining a function called drawTriangle that draws a triangle at a fixed ...