Using the Canvas
Discover the canvas element, sprites, layering, and sorting
- Basic HTML
- Canvas Element
- Interval Loops
- Canvas Images
- Canvas Drawing
14 Programming Activities
1. What Is the HTML Canvas Element?
Discover the HTML canvas element and find out what you'll make with it in this lesson.
2. How Do You Set Up the Canvas?
Set up a webpage with a canvas element. You'll use the canvas element for drawing and making games!
3. How Do You Add Delays?
Find out how to activate code after a time-delay with the setTimeout function.
4. How Do You Add Images?
Create a slideshow by adding multiple background images to your canvas and drawing each image after a delay.
6. What Are Canvas Coordinates?
Discover the mystery of the canvas coordinate system.
7. Design a Scene
Use your canvas knowledge to create a project with a background and an Actor of your choosing.
8. What Is Canvas Drawing?
Draw, color, and position basic shapes on the canvas. Find out how to erase the canvas.
Draw a snowman using the canvas.
Use loops and some math to draw concentric shapes on the canvas.
11. How Do You Create Timed Loops?
Create a forever loop that has a built-in time delay.
Create a project with Actors that patrol back and forth across the screen.
Review the concepts you've learned in this chapter before taking the chapter quiz.
Test your knowledge.