Week2. sunrise/sunset

 


-One element controlled by the mouse :  sun

I put a ellipse shape (sun) instead of mouse cursor which I can move the sun.

I used the map() function to change the background color. If the sun( mouse ) goes down, it gets darker ( night ). And if the sun rises, it gets brighter ( Day ).


-One element that changes over time, independently of the mouse : clouds

I add “x++” to move the clouds to x-direction which seems like floating in the sky.


-One element that is different every time you run the sketch : mountains

I gave a random value to the top point of the mountains, so that the mountain’s height can change every time when I refresh the sketch.

 

 

Week2. sunrise/sunset

Leave a Reply

Your email address will not be published. Required fields are marked *