02Geek HTML5 and JavaScript, TypeScript, React, Flash, ActionScript online School

Creating Canvas elements dynamically

Up until now we worked with the canvas element we added onto the stage manually. In this lecture we will learn how to dynamically add new canvas elements into our HTML. This is the last DOM specific lecture in this title as from here on words we will be deep into the world of the canvas API.

Keynotes:

  • Adding multiple canvas onto our page.
  • Creating a canvas generator.
  • Working with the DOM to create new canvas elements.

Ready to Level Up Your Skills?

Join thousands of learners on 02GEEK and start your journey to becoming a coding expert today!

Enroll Now for Free!

Preparing our JavaScript for Canvas

in this lecture we will prepare our source files to accommodate failure.

10:08

Canvas Hello World

We start our canvas journey creating a simple rectangle in the process we will learn how to define the canvas size, how to define a fill style and how to fill it up using the fillRect method.

06:36

The Palau flag and the perfect circle

By the end of this lecture will will have the complete flag of Palau and will create a perfect arc - more commonly known as a circle.

05:16

Creating Canvas elements dynamically

This is the last DOM specific lecture in this title as from here on words we will be deep into the world of the canvas API.

06:25