CubeTest in SVG progress


The first episode of 'programming in SVG' led to some nice bling improvements in KDE. Aaron showed how to put an SVG program in a plasmoid and Ariya taught us the incantation to make the desktop shine through such a plasmoid. And last but not least Remco Bloemen mailed me with a working demo that hows how to include arbitrary data in an SVG application with data URIs.

Work in CubeTest 2.0 has progressed. The current version has nice animations that revert the cubes to a more ordered state by clicking the corners. The next steps will be to add the question generator and a style switcher and more styles.

Programming in javascript in SVG is rather different from programming C++. There is no need to implement a function for painting. This is similar to using QGraphicsView. There is also no type checking and no compiling. There is no way to print debug output to the console. I have not looked for a javascript debugger yet. I'm sure there is one that lets you set breakpoints and inspect data values.

A issue that I need to look into is internationalization. How does the SVG application know the current locale and how can user messages be switched accordingly.

A note on conformance and speed. I have found very little difference between the Firefox, the WebKit (Qt, Arora, Chromium) and the Opera SVG implementations. If the application works in one of the browsers, it will very likely work in all of them. CubeTest does not use fancy SVG features though.

An finally a request to look at performance. The latest version has a small counter that displays the number of frames that can be shown in one animation. The maximum is 10. Chromium scores 10. QtWebKit scores 2 (very slow). FireFox 3.5b4 and Opera score 4. The slow performance of QtWebKit 4.5 is not related to my graphics card; I tested on Intel and ATI.

What do your browsers score? Does your mobile browser display the svg properly?

Check out the new version.

cubetest screenshot


Post a comment