Pure css3 analog clock (with a little cheat)

I love css3, have I told you already? Love it.

Anyway, I wanted to see what I can do with transitions and animations in webkit, and I made this :

Css only (well almost) analog clock

Click the Image to see the live demo

Support :

Firefox + Webkit browsers
In firefox I use javascript to move the properties
In Webkit, all the animation and the calculation is in CSS!!
I did cheat however : I used js to determine the current time. Now way to do that in css. I didn’t want to include jquery here, as u can see all the code is pure js, but I had to because it’s dufficult to do browser detection properly with js.

Lessons learned :

  • CSS3 is awesome!! Especially the way webkit does it (transitions, animations)
    But it still has a LONG way to go untill we see compability cross browsers
  • In Safari and Mobile safari, the arrows were jagged untill I gave the css-shadow, So it seems that giving this property turns on antialiasing somehow. Cool

Html5 video puzzle – proof of concept


I’ve decided to learn more about html5, since Google and Apple and a lot of these BIG companies say it’s the future.

I went to http://canvasdemos.com and was amazed that all this can be achieved with canvas tag.

I specifically liked the blowing up video into pieces , check it out, it’s AWESOME.

Sean from craftymind.com has done and amazing proof of concept, you should really check it out. I played with it and then realized, that clicking is the only interactivity there is and it seems that there’s more there. much more.

Here’s what I came up with :

Click on Randomize Pieces to explode the video to pieces and Begin assembling.

demo2 has video courtecy of bigcbuckbunny movie and lots more pieces (use chome)

I’ve decided to try and make something using the drawImage() method for the canvas, and inserting the video feed.

Goals :

  • Learn a bit more about <canvas> ,html5 ,  video encoding
  • Use tools I know to interact with the new stuff (jquery, css)
  • Create something awesome!
  • Make it fun

The idea:

The idea was simple, take Sean’s example, and add interactivity, first I was leaning towards making a “pyatnashki” ор fifteenpuzzle puzzle game, only using video, but then I decided it’s cool to leave it as a regular puzzle without constraints.

The actual work:

First I had to use some movie, it had to loop good enough, since as it turned out later, video puzzle isn’t really easy. I’ve used video shot by my uncle I offcourse had to format it properly, well it turns out, right now there are weird ways to input <video> in html, since webkit browsers support h.264 and webM and firefox supports theora codec.

I’ve re-encoded the video to 2 files ( .ogv and .mp4) using this tutorial : http://diveintohtml5.org/video.html

I then had to choose what will I do the actual interactivity with, the canvas itself, or DOM elements. I’ve chosen DOM elements, that maybe slower, but it’s a diferent approach then I’ve seen, plus I already know how to manipulate DOM, and can use that to my advantage.

I’ve created a factory function, that picks up on original video width and height, and takes the number of pieces that I want, and creates the necessary amount of canvas elements.

I then use drawImage each frame of the video, and copy pixels to each canvas according to their location on the matrix.

Photoshop cs5 content aware scaling Horsie

Apparently,  photoshop cs5 is awesome at genetics, this happend today (was testing content aware scale)

The horse, by cs5 content aware

Original picture, before “content aware scale” after the jump

Jquery animation effects make flash flicker

Had this problem at work.
Pissed me off, until I found a solution thanx to http://joesong.com
Just add overflow:hidden to the element animating and your’e done.

Read the full solution HERE

Simlest jquery rounded tabs with some css3

tabz

This is a solution for tabbed interface I wrote while working on a high profile project at work. It uses jQuery and about 3 lines of code to create it(plus some css+xtml). Very easy indeed.
I know there are a LOT of tab plugins avaliable out-there, I used them myself. A lot.
The problem was, I wanted a quick solution, without the bells and whiles of animation and FX. This is what came out.

SEE DEMO HERE

Step one : xHtml markup

Powered by WordPress | Shop Free T-Mobile Phones Online | Thanks to Verizon Phones without Contract, MMORPG Games and Sell Car