I just started to learn a little bit about canvas!
I want to draw rectangle that flickers (shows/hides/shows/hides/shows...) after set time interval.
If I remove setInterval()
and clear_canvas()
- rectangle is drown. Problem seems to be in clear_canvas()
. I got that code from here.
At the moment it just shows blank page. In my opinion, it should draw, clear, draw, clear...
I addedconsole.log()
for debugging; it's called! No errors or whatever are thrown in Chrome 14 (on Fedora 15, if that matters). Everything seems to be okay; unfortunately, it isn't!
I putted code on JsFiddle so you, guys, can help me out. Thanks!