Main content
Pixar in a Box
Course: Pixar in a Box > Unit 9
Lesson 2: Code a character- Start here!
- 1. Creating objects
- 2. Representing a shape object in code
- Rigging a snowman 1 (building the body)
- 3. Putting shapes together
- Rigging a snowman 2 (adding a head)
- Rigging a snowman 3 (adding a hat)
- 4. Functions
- 5. Defining deformer functions in code
- Rigging a snowman 4 (coding deformers)
- 6. Connecting deformers and shapes with code
- Rigging a snowman 5 (adding and updating deformers)
- Project: Create your own character
- Project 2: Animate your character
© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice
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
which stores the value .
Arrays
- This creates an array called
which stores three values . holds the value .
Functions
- This creates a function called
that will output the text at the screen coordinates when it's called.
- This
function now has two input parameters, and , to define the coordinates of the text.
Objects
- This creates an empty object called
.
- The object
now contains three properties: and . The third property of is an array called .
Have fun!
Want to join the conversation?
- all these comments are from 3 years ago im in the pandemic(17 votes)
- Well, I am 2 years after u! The pandemic is like done now.(3 votes)
- I am in 8 th grade and i have no idea still how to do this(3 votes)
- im in 5th and i understand it(1 vote)
- this will be fun yay(2 votes)
- did they use lima beam shapes on sketching?(2 votes)
- My gosh. This looks difficult. Has anyone been able to attempt and achieve this? I am not very good at understanding this set of instructions.(1 vote)
- I have, although it took me up to 1 hour and a half :((2 votes)
- how can we get in touch in other places(1 vote)
- and i still dont know how to do this(1 vote)
- We need lessons for blender(1 vote)
- how do i create boo from monsters inc(0 votes)
- does anyone know how to do rigging a snowman 4 it doesnt make any sense and i cant find sets and staging to go back and leran that part(1 vote)