Please enable JavaScript to use CodeHS

Introduction to Computer Science in JavaScript (Golden) (2022)

Description

In this lesson, students will be introduced to the concept of using timers for animation. Now instead of having graphics programs that stay the same, the content changes every time the timer runs. The first program students will see is a moving ball, so discussing this with the class as a demo on the projector is very useful.

Objective

Students will be able to:

  • Explain in their own words how animation works
  • Create animation in programs using the setTimer function
  • Explain what a callback function is
Description

In this lesson, we’ll look at more examples with timers and start making more interesting animations. Students will use timers and the Randomizer to create animations on the canvas.

Objective

Students will be able to:

  • Create programs with timers to create increasingly challenging animations
  • Analyze existing programs and explain how they create animations
  • Utilize the Randomizer to generate random events in their animations
Description

In this lesson, students use timers in combination with the other ideas they have learned, including more graphics as well as coordinate math to create different objects. The random ghosts serves as a fun example to show how you can modify things once you have the basic building blocks in place to make them more readable and easier to alter.

Objective

Students will be able to:

  • Explain the general workflow of creating an animation program
  • Analyze animation programs and identify similarities and differences
  • Create increasingly challenging animations using timers, graphics, and the Randomizer
Description

In this lesson, students build on the use of timers and utilize if statements inside timers to dynamically change what the animations are doing.

Objective

Students will be able to:

  • Create increasingly challenging animations that simulate movement using timers
Description

In this lesson, students are introduced to a way input can be taken from the user’s mouse using the mouse clicked method.

Objective

Students will be able to:

  • Describe how events are different than timers
  • Use mouse click events to create programs that respond to user clicks
Description

In this lesson, students learn how to extend mouse events to make interactive animations using the dragging motion of the mouse.

Objective

Students will be able to:

  • Explain how events are different from timers.
  • Create interactive programs that use events to respond to the mouse moving
Description

In this lesson we continue to use user input via the mouse to create interactive programs.

Objective

Students will be able to:

  • Explain how events are different from timers.
  • Create interactive programs that use events to respond to the mouse moving.
Description

In this lesson, students will learn how to use keyboard keys to control events. Keyboard events capture when the user presses keys on the keyboard. This allows students to write programs that take input from the keyboard to change what is happening in the program.

Objective

Students will be able to:

  • Explain how events are different from timers.
  • Create interactive programs that use events to respond to the keyboard input.
Description

In this lesson, students will create programs that combine multiple ideas from this unit.

Objective

Students will be able to:

  • Synthesize the skills and concepts learned in the Animation and Games unit to create advanced, interactive programs.
Description

In this lesson, students review content with a 25 question End-of-Unit Quiz.

Objective

Students will be able to:

  • Prove their knowledge of various concepts in animation through a multiple choice quiz