News roundup: graphics, graphics, graphics

Hello from Tokyo

write my essays

I’m currently in Tokyo on vacation now, so it’s very likely there will be no update next week. Just a heads up in case you wondered if I fell off the face of the Earth (I didn’t fall off, I just happen to be on the other side).

In the meantime, this week’s news revolves around graphics libraries and even game engines implemented in JavaScript. This is really an exciting time for this sort of stuff, which was before relegated to desktop applications or Flash-based web apps. The implementation of the canvas element has really given developers a lot of freedom to tinker around with graphics. Give geniuses the right tools and they deliver these sorts of amazing things!

WebP support with JavaScript

You may have heard about WebP, the new lossy image format introduced by Google as a better and slimmer alternative to a JPEG (albeit not without its criticism).

Great, so what happens if you really want to use a WebP picture in a webpage today? No browser currently supports the format natively (although this will probably be changing soon), so what if you really just can’t wait? As it turns out you can give a browser WebP support with a little help from JavaScript and canvas. There’s at least one caveat though: this only works on browsers that natively support the WebM video format, which means Chrome 7.0, Opera 10.62, and Firefox 4.0 beta.

Artisan JS

Artisan JS is an abstraction layer over the Canvas API. This sounds unnecessary at first, and the author David Brooks admits this in his introduction to the library. However, there are definitely some huge advantages, including more succinctness, layers, and a history function.

I haven’t tried it for myself yet, but if the layers functionality works decently, that’s probably reason enough to look into this library. The native canvas API, if you recall, is simply a drawing area in which shapes get added to a surface and left there, without the developer being able to change the properties of that particular shape later. Artisan JS is a step in the right direction in allowing that sort of functionality.

Impact: HTML5 Game Engine

Impact is a yet-to-be-released game engine developed using JavaScript. There’s a video of it in action apparently running at 60 frames per second on an iPhone 3GS. Here’s something different though: it’s not running in the browser, but it is using Safari’s JavaScript engine (JavaScriptCore). In iOS land the built-in JavaScriptCore is considered a private API, so any apps using this engine would be automatically rejected.

That would be a shame to see Impact never get off the ground on iOS. However, the developers are looking at a workaround to bundle their own JavaScript core (it is open source, after all) instead of calling the private API. Good luck! Here’s to hoping that makes it through.

Tidbits

Normal Mapped Lighting for Photos using Canvas
StackBlur: A Fast Gaussian Blur Algorithm In JavaScript
2D bin packing with javascript and canvas
John Resig confirms that the jQuery Mobile alpha is coming Saturday
Paul Irish has compiled a list of HTML5 Cross-browser polyfills (what’s a polyfill?)
NodeJS screencasts

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • description
  • Reddit
  • TwitThis
  • Simpy
  • StumbleUpon

One Comment

  1. moocr.com says:

    It seems I have much much and much to learn in javascript!




© webdevpublishing 2011