If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# Start here!

Introduction to this lesson

# Ready to dive into some code?

In this lesson you will build a simple snowman model and rig it using javascript. Then you can extend the model to create your own character in the final project.
You will be filling in some important pieces of a much larger program in this lesson—similar to how people work with software at Pixar.

# Overview of lesson

First, you'll build some circles using objects.
Then you'll combine your various shapes in an array of objects.
Finally you'll write deformer functions so that you can move your model around.
By the end, you'll be ready for the final project!

# What do you need to know before starting?

• If you've never programmed anything before, we recommend going through our Intro to JS course to learn the concepts of variables, arrays, functions, and objects. And, of course, come back here when you're ready!
• If you've programmed before but not on Khan Academy, we recommend getting comfortable with our environment first by creating a new program here.
• If you've learned programming here on Khan Academy, perfect! Just review the concepts below and refresh yourself on any skills you're rusty on.
• This lesson touches on math concepts—equations for geometric transformations—appropriate for grade eight and above. You can review this concept in our sets and staging lesson.

# Quick review of programming concepts you'll use

## Variables

• This creates a variable called $\text{sulleysAge}$ which stores the value $15$.

## Arrays

• This creates an array called $\text{ages}$ which stores three values $2,4,8$.
• $\text{ages}\left[1\right]$ holds the value $4$.

## Functions

$\phantom{\rule{2em}{0ex}}\text{text}\left({\text{"Hello world!"}},100,200\right);$
$\phantom{\rule{1em}{0ex}}\right\}$
• This creates a function called $\text{sayHello}$ that will output the text ${\text{"Hello world!"}}$ at the screen coordinates $\left(100,200\right)$ when it's called.

$\phantom{\rule{1em}{0ex}}\right\}$
• This $\text{sayHello}$ function now has two input parameters, $x$ and $y$, to define the coordinates of the text.

## Objects

• This creates an empty object called $\text{snowman}$.

$\phantom{\rule{2em}{0ex}}\text{age}:2,$
$\phantom{\rule{2em}{0ex}}\text{color}:\text{"white"},$

$\phantom{\rule{1em}{0ex}}\right\}$
• The object $\text{snowman}$ now contains three properties: ${\text{snowman}}\text{.}{\text{age}}=2$ and ${\text{snowman}}\text{.}{\text{color}}=\text{"white"}$. The third property of ${\text{snowman}}$ is an array called ${\text{likes}}$.