Please enable JavaScript to use CodeHS

Video Game Design in JavaScript

Lesson 3.2 More Graphics Objects

Description

In this lesson, students will get more practice with graphics objects. They will also learn how to find images on the internet and use them in their projects. Web images can be loaded into a graphics project using the WebImage class and passing a web image address to it and they can be resized using the setSize method. Apart from loading images and resizing them, students will also learn how to add text objects to their canvas.


Objective

Students will be able to:

  • Add images to their graphics projects using WebImage
  • Resize image objects using setSize
  • Display text on the canvas
  • Break their code into functions based on objects to be rendered