Main content
Unit 1: Intro to JS: Drawing & Animation
About this unit
Have you ever wondered what it takes to make drawings come to life? Well, we have to speak to our computer in a special language. In this unit, we will learn how to use the programming language JavaScript and Processing JavaScript to make our own drawings and animation.If you're new here, watch our intro video and get a brief tour of our programming course. Then get coding!
We'll show you the basics of programming and how to draw shapes.
We'll show you how to color and outline your shapes!
We'll cover how to use variables to hold values, animate your drawings, and more.
Learn how to animate your drawings.
Learn how to make programs that draw shapes based on the mouse location, like painting apps.
Learn how to help your peers on their path to learning programming and how to ask for help yourself.
Learn how to use variable expressions to resize parts of your drawing relative to other parts. (This requires a bit more math, so if you don't feel you have a good grasp of fractions yet, you can skip over this.)
Learn how to display text on the canvas, resize it, color it, and animate it.
Make your code more re-usable by grouping it into functions, and then make those functions accept parameters and return values.
Learn
Teach your program to make decisions!
Learn
How can you figure out what's wrong with your code? Learn tips and tricks for debugging your programs.
Repeating something over-and-over? Loops are here to help!
Learn
Practice
Learn how to write JavaScript code that is easy to read and understand, with good use of indentation, spacing, naming, and comments.
Practice
Store multiple values in your variables with arrays!
Learn
Learn how to store complex data in objects.
How to use object-oriented concepts in JavaScript to make more re-usable code.
Now that you understand the basics of programming, learn techniques that will help you be more productive and write more beautiful code.