January 24, 2011

PorchCam Updates

Filed under: Main — Tags: — admin @ 12:01 am

I’ve re-worked the Wambooli PorchCam web page. Not sure if I like it yet, but I’ve fixed up a few things.

First, I had to remove the line that said, “The Porchcam is back up!” It’s been back up since 2008.

Second, I adjusted the time from 10 minutes between images to 15 minutes. Why? Because:

Third, I’ve added animation.

The software I’m using, YAWCAM, retains previous images, numbering them in sequence. I had already used the five previous images on the PorchCam site, just as a way to catch the previous “action.” With the past 96 images now saved, that’s a full 24 hours. Animation was in order!

I’m not exactly happy with the animation, but at least it works. Sorta.

For animation I used JavaScript. I’m not happy with JavaScript anyway. That’s because the JavaScript documentation out there sucks big time.

About 14 years ago, I bought the big JavaScript book from O’Reilly. It’s just awful. It doesn’t teach you anything and it’s a crappy reference. I just ordered the most recent release, so I’m hoping it’s better. In the meantime, I bought JavaScript: The Missing Manual.

The Missing Manual book is okay, but ends up talking more about JQuery, which wasn’t what I wanted.

I’ll blather on about JavaScript books later.

For the animation, I wrote a JavaScript program that swaps in all the previous 96 webcam images. It’s actually very simple code, though the operation of the timer code is kind of weird.

Because the porchcam images can be up to 140K in size, the first time you view the images it takes a while for them to load. I tried to pre-cache the images, but it would still take about a minute to load the page. That’s unacceptable.

Instead of waiting for a cache, the animation swaps in a new image every second. After cycling through those images, a new button appears that lets you view the porchcam animation a lot faster. That faster animation works because the images are cached.

The problem with the method I chose is that for some reason it doesn’t cache all the images. The faster animation sometimes screws up. I’ll have to figure that one out. Or I’ll just have to discover another way to animate all the images. Feel free to offer any suggestions. Thanks!

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.


Powered by WordPress