/Sunrise

Sunrise

Primary LanguageJavaScript

Sunrise

Sunrise

Introduction: For our final project, we coded a sunrise using ellipse and the setGradient function to gradually change the background colors to mimic a realistic sunrise with yellows and oranges. Originally, we had wanted the colors to have more of an intense transition but found it was more difficult than we originally thought it would be. We did our best by using skills we learned in class to implement the setGradient function (a function we had never previously learned about or used in class) using variables c1 and c2 as color 1 and color 2. We also used lerpColor to blend the colors of c1 and c2 together to help create the visual of a gradiant to represent the sky's colors changing.

Instructions: Press the play button and watch the sun rise and colors change!

Credits: Hayley DeLuca and Nina Silva contributed equally to the work that went into the project, collaborating over Zoom and using the web editor in p5.js to edit our code. We each took on whatever responsibility we felt would help us move closer to our completed vision for the code, whether that be looking through the p5.js library for functions we could use to change the color, or looking through old class notes to get the ellipse to rise.