The Open Virtual World project makes significant progress. I am now using WebKit for all user interface components. WebKit is the HTML rendering engine that drives Google Chrome, Safari, and many mobile browsers, because it is easy to integrate and has a good open source license. WebKit is a C++ library and it has a brand new transparency feature. WebKit with transparency is perfect to paint avatars over browser windows.
I can use all the cool Web technologies: CSS, jQuery, canvas. I could even make make my user interface with Flash, SVG, 3D CSS Transforms, WebGL/3D. A CSS style on a text element is much faster to implement than with old graphics libraries. And it is portable to other platforms. Development almost feels like rapid prototyping. The way we are used to program Web frontends. It is a Web frontend, but for a native application. A true cross platform GUI.
This is a comparison of OVW avatars (left) and weblin avatars (right). Weblin avatars are painted to the screen by old school InvalidateRect, WM_PAINT, BitBlt techniques. OVW avatars are rendered by HTML and JavaScript.
Javascript means, that I can use jQuery, which makes effects very easy. Say, I move an avatar with the mouse and let it go. The Weblin avatar slowly slides down to the browser border. In weblin this was animated with a WM_TIMER, and painting the avatar at different positions until it reached the bottom. Then stop the timer. Now, with jQuery I just write one line of JavaScript like:
$(this).animate( { bottom: '0px' }, 800 );
Voilà, the avatar slides down.
There is more at the Open Virtual World blog:
I use Webkit also for windows and dialogs. There are no native windows. Everything is a transparent Win32 window without window border, but with a WebKit inside. All you see is programmed in HTML. Need a semi transparent shadow around your window? Just make a
and use a CSS "box-shadow".
WebKit rox.
Code is at code.google.com.
_happy_sliding()
Keine Kommentare:
Kommentar veröffentlichen