News archive
How accurate is window.setInterval()?
For some reason this question came into my head the other day. I decided to build a Javascript clock to answer the question, mainly because it's more fun than looking at tables or graphs of statistics. It's not very scientific, but it does answer my question quite well - I really wanted to know if the interval would average out over time or not.
In the canvas above there are two clocks, the one on the left always
drawn using the current time returned by a new Date(), and
the one on the right calculated by adding the number of milliseconds in
the interval to the initial time. To give a smooth frame rate of 25 frames
per second, the interval is set to 40 milliseconds - so with each interval, 40
milliseconds is added onto the right-hand clock. (The clock in the background
is just a scaled-up version of the real time clock on the left.)
SVGGraph 2.2.1
Just a quick bugfix release this time - SVGGraph 2.2.1 now supports graphs with a single data point, which will display as a single bar or an entire pie. The line graph types will not display anything, since you can't draw a line with only one point.
I am quite surprised I had not spotted this bug before, but I have now added it to my test plan so hopefully it will not be coming back. The updated version is available from the downloads page.
Coming soon will be a new, optimised version of TagCanvas, but probably before that will be a slightly-updated JPEG Saver to sort out some installer problems on 64-bit Vista.
JPEG Saver 4.2
In this update, JPEG Saver gets a CMS! Before you start wondering why JPEG Saver needs a content management system I should point out that in this case CMS stands for Colour Management System - I have added in the Little CMS library to support loading of colour profiles from images and files.
Other changes in this version include two new transitions called Waves and Polka Dot, the return of the Depixelize transition that was in the 3.x versions, some changes to the database code and some EXIF field output tweaks.
This version should also start up and shut down more cleanly, using a window covering the screen instead of a full-screen exclusive mode. It will, however, fall back to using the old method if you change the display mode or turn on gamma adjustment, both of which require exclusive mode. Go to the downloads page for the installer.
SVGGraph 2.2
This is quite a big update to SVGGraph, changing the way axes are calculated and adding in support for negative numbers on the bar and line graphs. I've also enabled tooltips for all graph types, with new rounded corner and shadow options.
The other visible change is that I have added background image support for all graph types. The different options are a bit tricky to explain in words, so I've made a new page to demonstrate the options: SVGGraph background image support.
You can view the details of these changes on the SVGGraph page and download the latest version from there. As I said before, a lot has changed in this version so there may be bugs that I didn't find - if you find one, please let me know and I'll do my best to fix it.
TagCanvas 1.6.1
This latest version of TagCanvas is mostly a bugfix release - the
hideTags option wasn't working in the jQuery version, so I've
fixed that. I've also started looking at the performance of various aspects
of TagCanvas, running it through the profilers in Chrome and IE8 and
changing a few things here and there. I don't think it has made much
difference so far, but I intend to take a longer look at it after I've
finished with my changes to SVGGraph.
Follow the TagCanvas link to find the updated files.
