Color in p5.js is the next big subject. Arslan concentrates on the RGB color system and how to pass color information to color functions. He discusses parameters, arguments and how to color shapes with functions.
Next, Arslan introduces interaction, concentrating on mouse related variables and events. He has his readers drawing shapes to the screen with the click of a mouse. He also introduces more ways to control the program with loops, nested loops and random and noise functions.
The next chapter is all about functions. Arslan starts with the function syntax and, by the end of the chapter, his readers know how to write custom functions and how to use the return keyword.
Finally, you are ready for the final project, which is an interactive, typing speed game in p5.js that requires you to demonstrate all that you have learn throughout the book. It also demonstrates how to maintain the user's score throughout the duration of the game.
Supporting source code and other materials are available on the book's product page at Apress.com.
Engin Arslan is a web developer, works at Seneca Collage and has coures on Linkedin and Pluralsight.
Editor's Picks Articles
Top Ten Articles
Content copyright © 2023 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact Diane Cipollo for details.