THE DAY

POSTED ON NOVEMBER 1, 2011 BY MATTSICH |

I don’t have a tutorial for you today because I have a massive physics test tomorrow but I do have something that I decided to build today.
I was thinking… what if I could make a website look different depending on the time of day? That would be cool, right? So I went ahead and did it. This website really takes “responsive website” to the next level.

It’s a bit rough but I’ll improve it as time goes by.

PREVIEW

http://www.mattsich.net/examples/theTimer/

Basically what I did is I took the Date function in javascript (not expecting everyone to understand this) and got to time in hours and minutes. After that, I multiplied some numbers with some variables and got the day in degrees and percent (i.e. 360 = 100% = 1 day). Then I added those values to the rotation of some objects.
If you look at page between 10pm and 7am, you’ll see stars. For that I just used a basic “if” statement.

The next stuff on the list to add are (in order of importance):
- Fix problem with clouds adding width to window when they’re out of view to the right.
- Add media queries to make page respond to width changes
- make better quality pictures
- Birds
- A plane
- have objects move on the ground
- More clouds

Anyway.. that’s all I got for you today. Enjoy!

Cheers,
Matt

No Responses to this post

Leave a Reply