Live data from Hacker News

Show HN: SVG Clocks

s3.amazonaws.com

21–30 of 43 posts

Re: Show HN: SVG Clocks

#24
Reminds me of something an early web-server software development company Roxen did for one of their clients, a watch manufacturer, circa 1995/6.

Basically they were rendering an animated gif on the server and streaming to the browser, so that the watch told the correct time, but the hands appeared behind the glass of the photo-realistic watch.

This was when most sites (not that there were many!) only had rudimentary static graphics, with the odd flashing "under construction' sign.

I googled, but couldn't find any reference to it, although Roxen the company still seems to be going, with the Roxen Web Server having become a CMS platform.

Re: Show HN: SVG Clocks

#25
post #22

Very cool! What's the copyright/license on these?

consider it creative commons...in other words do with it as you please...The original SVGs were created for linux desktop and I believe they were GPL, I only added Javascript to make it browser friendly.

Re: Show HN: SVG Clocks

#28
post #11

Very nice indeed. Technically you should be able to do the same thing in CSS... I knocked this together in 20 minutes as a proof of concept: http://codepen.io/onion2k/details/kmouK Sadly you'd need some JS to set them to the right time though, which rather ruins the beauty of it. I think. If anyone knows a way to do it without JS I'd love to hear how.

I made a star chart, which is kind of like a clock in the form of a map of the sky, in pure HTML/CSS, that starts at the correct current time without resorting to JS: http://lee-phillips.org/skymap/ You might consider my solution cheating, however. EDIT: The trick I used is basically what jwarren describes below.

Interesting article and a great app. But yeah, that's "cheating". :)

Re: Show HN: SVG Clocks

#29
post #6

Earlier quoted context omitted.

Is it just that you are in a different timezone than the author?

No. The clocks use the local Date object, but the rotation calculations for hour hand were copied over from a 12 hour clock. One downside of 24 hour clocks: a broken one is only right once a day.

Another downside is that it's confusing all day long. I have yet to see such clock somewhere else than US television. And to be honest, I don't see a point of such clock-face.

Re: Show HN: SVG Clocks

#30
TIL one can embed javascript in SVG. Can it be used to do more than just changing the positions and rotations of objects already defined in the file? (In other words, could someone write Space Invaders entirely in SVG?)
Post reply on HN