<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" gd:etag="W/&quot;AkIFR3k7eip7ImA9WxJUEU0.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039</id><updated>2009-07-08T20:01:56.702-07:00</updated><title>Nihilogic</title><subtitle type="html">Bending and breaking the web. Experiments in the world of JavaScript, DHTML, CSS, Ajax, Web 2.0 and maybe even other fine buzzwords.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>85</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><link rel="self" href="http://feeds.feedburner.com/nihilogic" type="application/atom+xml" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">nihilogic</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry gd:etag="W/&quot;DUEFR305eyp7ImA9WxJVEU8.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-4797494954188577606</id><published>2009-06-27T09:53:00.000-07:00</published><updated>2009-06-27T11:33:36.323-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-27T11:33:36.323-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="pixastic" /><category scheme="http://www.blogger.com/atom/ns#" term="ubiquity" /><title>Photo editing with Ubiquity</title><content type="html">&lt;span class='post-summary'&gt;
This is the first release of the new image editor that has actual Ubiquity functionality. Yay. In my &lt;a href="http://blog.nihilogic.dk/2009/05/photo-editing-in-browser-with-pixastic.html"&gt;previous post&lt;/a&gt; I introduced a new JavaScript image editor based on my &lt;a href="http://www.pixastic.com/"&gt;Pixastic image processing library&lt;/a&gt; and let you play around with a "static" demo version. Now I've made a few Ubiquity commands that lets you take the editor with you around the web and edit any image you want.
&lt;/span&gt;
&lt;span class="full-article"&gt;

&lt;h4&gt;Before we start&lt;/h4&gt;

You should only use this with &lt;em&gt;&lt;a href="http://www.mozilla.com/firefox/all-beta.html"&gt;Firefox 3.5&lt;/a&gt;&lt;/em&gt;, anything older will probably not work at all (at least it didn't last time I checked). I haven't looked too deeply into it but I'm not sure it's possible to make it work for earlier versions due to some changes in security concerning the canvas image data acccess. That said, even with 3.5 this is still in the alpha stage and things occasionally fail.
&lt;br/&gt;&lt;br/&gt;

When the commands are executed a whole bunch of JavaScript is injected into the page which then takes care of setting up the editor, loading CSS, images, etc (about 100KB gzip'ed, everything included). All these assets are currently fetched from www.pixastic.com, maybe they'll eventually be bundled with Ubiquity.
&lt;br/&gt;&lt;br/&gt;

Once you've got &lt;a href="http://www.mozilla.com/firefox/all-beta.html"&gt;Firefox 3.5&lt;/a&gt; and the &lt;a href="http://labs.mozilla.com/projects/ubiquity/"&gt;Ubiquity extension&lt;/a&gt; up and running you can subscribe to the commands at &lt;a href="http://www.pixastic.com/ubiquity/"&gt;http://www.pixastic.com/ubiquity/&lt;/a&gt;. This will add the commands &lt;code&gt;edit-image&lt;/code&gt; and &lt;code&gt;edit-screenshot&lt;/code&gt; to your Ubiquity arsenal. The latest beta of Ubiquity supports hyphen-less commands but doing "edit image" seems to get mixed up with a Flickr search.


&lt;h4&gt;Image editing&lt;/h4&gt;

The &lt;code&gt;edit-image&lt;/code&gt; command lets you edit any image on any web page using the Pixastic editor. Just execute the command and click on the relevant image to load the editor.  Currently only &lt;img&gt; elements are supported, I don't know if support for background images will be added at some point. I'd also like some more UI feedback when in this "image selection" mode, and possibly allow for selecting an image with the mouse prior to command execution.


&lt;h4&gt;Screenshots and zooming&lt;/h4&gt;

The other command, &lt;code&gt;edit-screenshot&lt;/code&gt;, does pretty much what it says. It takes a picture of the current page (only the visible portion and no browser UI) and then loads the editor using that image. 
&lt;br/&gt;&lt;br/&gt;

&lt;img border="0" src="http://1.bp.blogspot.com/_OjchJpvqFiw/SkZMOVf3q1I/AAAAAAAAAm0/f1bHf2k9KOw/s200/zoomlevel.png" style="float:right;margin-left:10px;"/&gt;

Since the screenshots are always bigger than the image viewport in the editor, I've implemented some zoom functionality. There are just a few different pre-defined zoom levels and it doesn't allow for much zooming in, it's not very pretty anyway due to the interpolation when rescaling images in the browser. You'll see the current zoom level in the top left corner, some buttons or something for zooming in/out will be added later but for now you can use the mousewheel.


&lt;h4&gt;Image upload and Flickr&lt;/h4&gt;

Ubiquity allows the editor to do stuff it wouldn't normally have access to (eg. taking a picture of the current page, editing images regardless of where they're hosted, etc) which means it is also possible to post the image to any destination such as photo hosting services and what not. An obvious one to implement was Flickr since it's widely used and has a nice and detailed API.
&lt;br/&gt;&lt;br/&gt;

&lt;img border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SkZLobCBtHI/AAAAAAAAAmk/ExfV4--Uubg/s200/flickr.png" style="float:right;margin-left:10px;"/&gt;

So you'll notice in the "Done" tab that there's now also an "Upload to Flickr" option where, with just a few clicks, you can authorize the editor with Flickr and then upload your edited image. It shouldn't be too hard to figure out. An authentication window is opened where you'll have to grant Pixastic the necessary privileges, you then confirm the authentication back in the editor and if all is ok, you can then fill in a few image details and begin the upload. It's all a bit rough around the edges and it needs a bit more work, better feedback to the user, more image info fields, etc.
&lt;br/&gt;&lt;br/&gt;

A feature I might try to implement is to register if the original image was loaded from a Flickr photo page and then ask if the user wants to update the existing image or just upload to a new one. That shouldn't be too hard, I think. And of course more destinations, maybe Facebook and also something like ImageShack for quick and simple image hosting.


&lt;h4&gt;Other changes since last time&lt;/h4&gt;

&lt;img border="0" src="http://4.bp.blogspot.com/_OjchJpvqFiw/SkZMMxEgzkI/AAAAAAAAAms/tlmsYRt5IVc/s320/selection.png" style="width:150px;float:right;margin-left:10px;"/&gt;

Most actions now let you apply them to a selected region of the image. Just drag a rectangular area on the image to make a selection. The selection stays active across actions until you click "Apply" on one of them, at which point the selection is reset.
&lt;br/&gt;&lt;br/&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;img border="0" src="http://1.bp.blogspot.com/_OjchJpvqFiw/SkZLnTZ3WtI/AAAAAAAAAmc/YhR5rBW6d70/s320/apply.png" style="float:right;margin-left:10px;"/&gt;

To reduce the risk of forgetting to click "Apply" after setting the parameters for an editing action, the "Apply" button is now highlighted when any of the parameters are changed. If there are no parameters, eg. the invert action, the button will always be highlighted just as it will be for those actions where there are no "non-image-changing" default parameters (for instance the "mosaic" action, no value for the block size will leave the image untouched).
&lt;br/&gt;&lt;br/&gt;

If you still manage to move on to something else without committing your changes, you can simply go back to the action you came from and the settings should be intact and ready for you to apply. I hope that's a reasonable compromise but I'm open to suggestions on how to improve the process.


&lt;h4&gt;Have fun&lt;/h4&gt;

In case you missed it, you can find the Ubiquity commands &lt;a href="http://www.pixastic.com/ubiquity/"&gt;here&lt;/a&gt; where you'll also have a few images to play around with if you're too lazy to find some yourself. 
&lt;br/&gt;&lt;br/&gt;

Be sure to let me know what you think. And since the web is such a hostile environment there might some pages where things get messed up, just give me links so I can check it out. 
&lt;br/&gt;&lt;br/&gt;

So, have fun, I know I will. That special &lt;a href="http://www.roskilde-festival.dk/"&gt;Roskilde Festival&lt;/a&gt; type of fun! Back in a weeks time.

&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-4797494954188577606?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=1xFuINY2KpI:nVAOLqmn3vs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=1xFuINY2KpI:nVAOLqmn3vs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=1xFuINY2KpI:nVAOLqmn3vs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=1xFuINY2KpI:nVAOLqmn3vs:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=1xFuINY2KpI:nVAOLqmn3vs:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=1xFuINY2KpI:nVAOLqmn3vs:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=1xFuINY2KpI:nVAOLqmn3vs:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=1xFuINY2KpI:nVAOLqmn3vs:aWsTvxROl_s"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=aWsTvxROl_s" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/1xFuINY2KpI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/4797494954188577606/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/06/photo-editing-with-ubiquity.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/4797494954188577606?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/4797494954188577606?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/06/photo-editing-with-ubiquity.html" title="Photo editing with Ubiquity" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_OjchJpvqFiw/SkZMOVf3q1I/AAAAAAAAAm0/f1bHf2k9KOw/s72-c/zoomlevel.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;DEUFQHs8fSp7ImA9WxJXEk0.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-7559061036788080993</id><published>2009-06-05T05:42:00.000-07:00</published><updated>2009-06-05T05:50:11.575-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-05T05:50:11.575-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ubiquity" /><title>Grab colors from web pages with Ubiquity and Firefox</title><content type="html">&lt;span class='post-summary'&gt;
It has always bothered me when I wanted to grab the color code of some HTML element of image on a web page and I had to either dig through a whole bunch of CSS or take a screenshot and load up Photoshop or whatever. I'm sure somewhere someone has made a tool that lets you do something similar, but with &lt;a href="http://labs.mozilla.com/projects/ubiquity/"&gt;Ubiquity&lt;/a&gt; and my new color grabber command I can now quickly put a page into color picking mode and grab any color I want, all from within Firefox.
&lt;/span&gt;
&lt;span class="full-article"&gt;
&lt;br/&gt;&lt;br/&gt;
The idea came to me while working on the &lt;a href="http://blog.nihilogic.dk/2009/05/photo-editing-in-browser-with-pixastic.html"&gt;new Pixastic image editor&lt;/a&gt;. One of the Ubiquity-specific features will be an "edit-screenshot" command that takes a picture of the current page and loads it up in the image editor. This is possible via the HTML5 &lt;code&gt;canvas&lt;/code&gt; element. While in normal web pages you can only paint regular images via the &lt;code&gt;drawImage()&lt;/code&gt; method, running with Ubiquity's privileges also gives you access to a &lt;code&gt;drawWindow()&lt;/code&gt; method that simply takes a window object instead. Pretty cool stuff. So that makes it rather easy to just grab a screenshot and use that in place of a regular image and, for this color picking command, to put the page in a "click somewhere" mode and then use the mouse coordinates to grab the pixel value from the screenshot image. 
&lt;br/&gt;&lt;br/&gt;

&lt;div style="float:right;margin-left:10px;"&gt;
&lt;img border="0" src="http://4.bp.blogspot.com/_OjchJpvqFiw/SikJfkISJpI/AAAAAAAAAmM/TSz0E2pKt24/s200/grab_color_ubiquity.png" /&gt;&lt;br/&gt;&lt;br/&gt;
&lt;img border="0" src="http://2.bp.blogspot.com/_OjchJpvqFiw/SikJcv3M4DI/AAAAAAAAAl8/zbfhwNX4yrI/s200/color_grab_hover.png" /&gt;&lt;br/&gt;&lt;br/&gt;
&lt;img border="0" src="http://2.bp.blogspot.com/_OjchJpvqFiw/SikJeA3qM1I/AAAAAAAAAmE/KDW72LcgPXg/s200/color_prompt.png" /&gt;
&lt;/div&gt;

So what you do is this. If you don't have Ubiquity installed, &lt;a href="http://labs.mozilla.com/projects/ubiquity/"&gt;do that first&lt;/a&gt;. Then get the &lt;code&gt;grab-color&lt;/code&gt; command &lt;a href="http://www.pixastic.com/ubiquity/grab-color.htm"&gt;here&lt;/a&gt; (notice the bar at the top and the "Subscribe" button in the top-right corner).
&lt;br/&gt;&lt;br/&gt;
You can now toggle Ubiquity (ctrl+space or whatever your command is) and type &lt;code&gt;grab-color&lt;/code&gt;. And that's it. When you move the mouse over the page, the color under the pointer is displayed in a box and when you click the page, the color is prompted to you for easy copying.&lt;br/&gt;&lt;br/&gt;
The command has one optional argument that determines the format of the color returned to you, either "hex" or "rgb". So to get the color in &lt;code&gt;rgb([r],[g],[b])&lt;/code&gt; format, do &lt;code&gt;grab-color rgb&lt;/code&gt;. 
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-7559061036788080993?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=afqbceDApwg:8ssh6LiYcGs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=afqbceDApwg:8ssh6LiYcGs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=afqbceDApwg:8ssh6LiYcGs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=afqbceDApwg:8ssh6LiYcGs:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=afqbceDApwg:8ssh6LiYcGs:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=afqbceDApwg:8ssh6LiYcGs:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=afqbceDApwg:8ssh6LiYcGs:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=afqbceDApwg:8ssh6LiYcGs:aWsTvxROl_s"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=aWsTvxROl_s" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/afqbceDApwg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/7559061036788080993/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/06/grab-colors-from-web-pages-with.html#comment-form" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/7559061036788080993?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/7559061036788080993?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/06/grab-colors-from-web-pages-with.html" title="Grab colors from web pages with Ubiquity and Firefox" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_OjchJpvqFiw/SikJfkISJpI/AAAAAAAAAmM/TSz0E2pKt24/s72-c/grab_color_ubiquity.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">7</thr:total></entry><entry gd:etag="W/&quot;D04BQHY9eyp7ImA9WxJRF0g.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-1607351085022785556</id><published>2009-05-19T10:54:00.000-07:00</published><updated>2009-05-19T10:59:11.863-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-19T10:59:11.863-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="pixastic" /><category scheme="http://www.blogger.com/atom/ns#" term="ubiquity" /><title>Photo editing in the browser with Pixastic - revisited</title><content type="html">&lt;img border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/ShLwUhyUIAI/AAAAAAAAAlk/1YIaf3GfRNc/s320/pixastic_editor.png" style="float:left;margin-right:10px;"/&gt;

&lt;span class='post-summary'&gt;
A bit delayed, some progress has been made on the new &lt;a href="http://www.pixastic.com/"&gt;Pixastic&lt;/a&gt; powered photo editor which will eventually find its way into the Mozilla Labs &lt;a href="http://labs.mozilla.com/projects/ubiquity/"&gt;Ubiquity project&lt;/a&gt;. Here's a first preview of how the editor is going to look. It's still very alpha-ish and in a stage where I'm just trying to get something up and running, so wear your hard hats.
&lt;/span&gt;
&lt;span class="full-article"&gt;
&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;
In very few words, the current situation is that I have an editor application running on the Pixastic library (the one featured on the &lt;a href="http://editor.pixastic.com/"&gt;Pixastic site&lt;/a&gt; doesn't actually use the library). There's no Ubiquity version yet (or rather, there is but it blows up every other time I run it), but I've made a test page with a few images that you can play around with.
&lt;br/&gt;&lt;br/&gt;
In a lot more words, the main goals for this editor are:

&lt;h4&gt;Embeddable&lt;/h4&gt;

I want it to be as easy as possible to embed into an existing page. This ties in with the goal to make accessible it via a Ubiquity command since this also means that it has to be all ninja like and there shouldn't be any trace of it post-edit. On the other hand, I'd also like it to replace the editor on &lt;a href="http://www.pixastic.com/"&gt;http://www.pixastic.com/&lt;/a&gt; so it should also run as a stand-alone app, but that shouldn't be a problem if the aforementioned criteria is met.&lt;br/&gt;&lt;br/&gt;
Some JavaScript files obviously need to be included (in Ubiquity's case, they're injected when the command is triggered) and in its current form the application is then loaded in an &lt;code&gt;iframe&lt;/code&gt; where the DOM is filled and all the necessary CSS is loaded, keeping the editor separated from the page from which it was loaded.

&lt;h4&gt;Extendable&lt;/h4&gt;

Well, it's based on Pixastic which is itself pretty easy to extend with new actions. Even though the internal API has a few flaws, it's easy and flexible enough that adding new actions and effects requires very little effort besides the actual image processing code. I'd like it to be just as easy to add new functionality to the editor so I'm working on a format that allows adding the most basic controls (text inputs, sliders, etc) with very little code but at the same is also flexible enough that you can create something like the cropping tool.

&lt;h4&gt;Load and save from/to anywhere?&lt;/h4&gt;

Loading images is done programmatically at the moment but is as simple as calling loadImage(image) where image is an HTML &lt;code&gt;img&lt;/code&gt; element. It would be great if it was possible to load up images from anywhere (other websites, Flickr albums, local images, etc), but same-origin security restrictions limit us to accessing images from the same host. There should be more freedom when running from Ubiquity and that feature would be more useful to have in the general case.
&lt;br/&gt;&lt;br/&gt;
When it comes to saving, there are a few different options. The first - and most obvious when editing an in-page image - is to simply save the image back to the page. This is done by generating a &lt;code&gt;data:&lt;/code&gt; URI and setting the &lt;code&gt;src&lt;/code&gt; on the original image element. Second option is to save the image to the user's computer. This can be done by either making a link with the &lt;code&gt;data:&lt;/code&gt; URI for the user to right click or by triggering a download dialog. The last option would seem like the best but in order to do that, the mime type of the &lt;code&gt;data:&lt;/code&gt; URI has to be altered and it seems that Firefox is then unable to figure out the actual format of the image and defaults to giving it a .png extension, so that's only good for saving PNG images. I'd like to also take advantage of some browsers' ability to generate both PNG and JPG &lt;code&gt;data:&lt;/code&gt; URI's so at the moment I'm not sure what to do. Any suggestions?
&lt;br/&gt;&lt;br/&gt;
But with the cross-domain XHR abilities available from Ubiquity it should also be possible to post the image to something like Flickr or maybe Facebook. I've only just started looking at Flickr integration and I don't actually know if the Flickr API will even accept the image data - the &lt;code&gt;data:&lt;/code&gt; URI is base64 encoded and it would be nice to not have to mess around too much with it since it can be quite big. I'll also have to look into what other online photo services are accessible.

&lt;h4&gt;Skinnable&lt;/h4&gt;

To some extent the editor should be skinnable but I'm not going out of my way to make every detail customizable. In terms of layout I'm sort of going with &lt;a href="http://www.azarask.in/blog/post/ubiquity-photo-editor/"&gt;Aza Raskin's Lightroom inspired proposal&lt;/a&gt;, at least for now. I'm using jQuery UI as a base for the UI elements, so all the theming that comes with that should apply here as well. It will likely end with a compromise with a somewhat fixed layout but color schemes and so on can be changed via CSS and jQuery UI themes if need be.

&lt;h4&gt;Feedback&lt;/h4&gt;

At this point I'm very much looking for feedback on just about every aspect (features, UI, usability issues, etc.), but a couple of specific things I'm thinking about/that were brought to my attention are:
&lt;br/&gt;&lt;br/&gt;
&lt;ul&gt;
&lt;li&gt;
The undo feature: How does it work for you with the vertical bar? Is it in the right place? Should it stay hidden until there's actually something to undo?
&lt;/li&gt;
&lt;li&gt;
Preview: On or off by default? I've hesitated turning preview on by default since JavaScript image processing can still be a CPU intensive task (especially with large images), even with today's fast JS engines. If processing was instant, I would have no problem making "on" the default state. Maybe turning it on/off once should toggle it for all actions (ie. globally)?
&lt;/li&gt;
&lt;li&gt;
Apply: You have to actively click "Apply" before anything actually happens to the image. If you select another action/tab without clicking "Apply", your changes are lost, followed by much frustration. It's been suggested that all changes are applied right away (since you can just undo them). I'm not sure if that's the right thing to do due to the way the UI works right now, but that might just be me being used to the extra layer of confirmation. Perhaps it would be better if the button was highlighted in some way as soon as there are any changes that would be lost?
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;So many words&lt;/h4&gt;

Ok, &lt;a href="http://www.pixastic.com/editor-test/"&gt;go on and play with the preview&lt;/a&gt;. When you're done, please let me know what you think.
&lt;br/&gt;&lt;br/&gt;
At the moment it only works in Firefox but the aim is to have it working in all appropriate browsers. That means Opera 9.5+, Safari 4 (and Chrome once it gets &lt;code&gt;[get|put]ImageData&lt;/code&gt; support in stable.
&lt;br/&gt;&lt;br/&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-1607351085022785556?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=kjUq7ErJrNQ:K7HKG2z-7Uk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=kjUq7ErJrNQ:K7HKG2z-7Uk:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=kjUq7ErJrNQ:K7HKG2z-7Uk:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=kjUq7ErJrNQ:K7HKG2z-7Uk:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=kjUq7ErJrNQ:K7HKG2z-7Uk:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=kjUq7ErJrNQ:K7HKG2z-7Uk:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=kjUq7ErJrNQ:K7HKG2z-7Uk:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=kjUq7ErJrNQ:K7HKG2z-7Uk:aWsTvxROl_s"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=aWsTvxROl_s" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/kjUq7ErJrNQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/1607351085022785556/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/05/photo-editing-in-browser-with-pixastic.html#comment-form" title="9 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/1607351085022785556?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/1607351085022785556?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/05/photo-editing-in-browser-with-pixastic.html" title="Photo editing in the browser with Pixastic - revisited" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_OjchJpvqFiw/ShLwUhyUIAI/AAAAAAAAAlk/1YIaf3GfRNc/s72-c/pixastic_editor.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">9</thr:total></entry><entry gd:etag="W/&quot;C0UARXw_cSp7ImA9WxJRE0o.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-7720671921764256105</id><published>2009-05-15T00:07:00.000-07:00</published><updated>2009-05-15T00:07:24.249-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-15T00:07:24.249-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="games" /><title>Nihilogic Games is now JavaScript Gaming</title><content type="html">&lt;span class='post-summary'&gt;
At some point I'd like the games portal to be able to live on its own and it didn't sit right with me that it was a subdomain of nihilogic.dk. So it now has a new home at &lt;a href="http://www.javascriptgaming.com/"&gt;http://www.javascriptgaming.com/&lt;/a&gt;, check it out. Nothing but the name has changed (yet), though. The &lt;a href="http://feeds2.feedburner.com/nihilogic_games"&gt;games feed&lt;/a&gt; is also still the same. Happy friday!
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-7720671921764256105?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=KCpMA37Bj3M:-CyEOJk7wD4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=KCpMA37Bj3M:-CyEOJk7wD4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=KCpMA37Bj3M:-CyEOJk7wD4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=KCpMA37Bj3M:-CyEOJk7wD4:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=KCpMA37Bj3M:-CyEOJk7wD4:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=KCpMA37Bj3M:-CyEOJk7wD4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=KCpMA37Bj3M:-CyEOJk7wD4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=KCpMA37Bj3M:-CyEOJk7wD4:aWsTvxROl_s"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=aWsTvxROl_s" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/KCpMA37Bj3M" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/7720671921764256105/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/05/nihilogic-games-is-now-javascript.html#comment-form" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/7720671921764256105?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/7720671921764256105?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/05/nihilogic-games-is-now-javascript.html" title="Nihilogic Games is now JavaScript Gaming" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">6</thr:total></entry><entry gd:etag="W/&quot;DkQFSXk8eyp7ImA9WxJSFUQ.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-3106816705673046414</id><published>2009-05-05T13:03:00.000-07:00</published><updated>2009-05-06T00:18:38.773-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-06T00:18:38.773-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="games" /><title>Games round-up for April 2009</title><content type="html">&lt;span class='post-summary'&gt;
I had hoped to get a good chunk of Brent Silby's games added to the &lt;a href="http://games.nihilogic.dk/"&gt;games portal&lt;/a&gt; during April but I had to postpone that mission. Only one Silby game made it but fortunately a few other people were also kind enough to email me about their games. As always, just &lt;a href="mailto:jseidelin@nihilogic.dk"&gt;let me know&lt;/a&gt; if you know of a cool game that fits the profile.
&lt;/span&gt;
&lt;span class="full-article"&gt;
&lt;br/&gt;&lt;br/&gt;

&lt;img src="http://1.bp.blogspot.com/_OjchJpvqFiw/SdjC66kbefI/AAAAAAAAAkc/I7Y8bt9p_8M/s200/3bored.png" width="100" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;3bored&lt;/b&gt;&lt;br/&gt;
A very creative and somewhat abstract &lt;code&gt;canvas&lt;/code&gt;-based shooter. If you ever wanted to be a white rectangle with the power of flight and bad odds of survival, this is the game for you.
&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/04/3bored.html"&gt;Read more about 3bored&lt;/a&gt;&lt;br/&gt;

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://3.bp.blogspot.com/_OjchJpvqFiw/SfgZU9I9UaI/AAAAAAAAAlE/phNPywUkGIk/s200/balloons_and_droids.png" width="100" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;Balloons and Droids&lt;/b&gt;&lt;br/&gt;
The only one of Brent Silby's games I got around to adding, Balloons and Droids delivers exactly what it promises - balloons and droids, all in good arcade style fun.&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/05/balloons-and-droids.html"&gt;Read more about Balloons and Droids&lt;/a&gt;&lt;br/&gt;

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://2.bp.blogspot.com/_OjchJpvqFiw/SfBI5zqwuoI/AAAAAAAAAk8/L2sYKkVZSbw/s200/canvas_invaders.png" width="100" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;Canvas Invaders&lt;/b&gt;&lt;br/&gt;
Yet another Space Invaders clone, made by Jason Brown to gain more &lt;code&gt;canvas&lt;/code&gt; experience.&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/04/canvas-invaders.html"&gt;Read more about Canvas Invaders&lt;/a&gt;

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://2.bp.blogspot.com/_OjchJpvqFiw/Sdiunb9-_eI/AAAAAAAAAkM/ESbxFpCPbbU/s200/coverfire.png" width="100" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;Coverfire&lt;/b&gt;&lt;br/&gt;
A remake of the old Crossfire game - and it's Wii enabled.&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/04/coverfire.html"&gt;Read more about Coverfire&lt;/a&gt;

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://1.bp.blogspot.com/_OjchJpvqFiw/SeDnp-FTmaI/AAAAAAAAAkk/56VCop04UpI/s200/mblocks.png" width="100" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;mBlocks&lt;/b&gt;&lt;br/&gt;
Now, there are a lot (and I mean a lot) of Tetris clones out there but this one is so well done that it just puts most other attempts to shame.&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/04/mblocks.html"&gt;Read more about mBlocks&lt;/a&gt;&lt;br/&gt;

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://4.bp.blogspot.com/_OjchJpvqFiw/SexAnm8jJeI/AAAAAAAAAk0/gxDlGdKdNlI/s200/multiplayer.png" width="100" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;Sarien.net&lt;/b&gt;&lt;br/&gt;
Sarien.net lets you play old Sierra On-Line adventure games in your browser and spices it up with some interesting multiplayer "action". Absolutely one of the coolest things I've seen in a while.&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/04/sariennet.html"&gt;Read more about Sarien.net&lt;/a&gt;

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://3.bp.blogspot.com/_OjchJpvqFiw/SfgiBdkTOgI/AAAAAAAAAlM/z4sFW9-3eBo/s200/tetris_bricks_car_racing.png" width="100" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;Tetris Bricks Car Racing&lt;/b&gt;&lt;br/&gt;
Valentin Galea linked me to his nostalgia inducing racing game a'la Tetris, inspired by the handheld devices of yore.&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/05/tetris-bricks-car-racing.html"&gt;Read more about Tetris Bricks Car Racing&lt;/a&gt;&lt;br/&gt;

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://1.bp.blogspot.com/_OjchJpvqFiw/Sdi9cDi6JVI/AAAAAAAAAkU/Ud8LCY5H0BA/s200/word_wombat.png" width="100" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;Word Wombat&lt;/b&gt;&lt;br/&gt;
A fun way to hone your typing skills. Type the falling words before they hit the bottom of the page.&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/04/word-wombat.html"&gt;Read more about Word Wombat&lt;/a&gt;&lt;br/&gt;

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;br/&gt;&lt;br/&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-3106816705673046414?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=it8ncYPaoL0:YPqhXHg0RLM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=it8ncYPaoL0:YPqhXHg0RLM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=it8ncYPaoL0:YPqhXHg0RLM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=it8ncYPaoL0:YPqhXHg0RLM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=it8ncYPaoL0:YPqhXHg0RLM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=it8ncYPaoL0:YPqhXHg0RLM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=it8ncYPaoL0:YPqhXHg0RLM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=it8ncYPaoL0:YPqhXHg0RLM:aWsTvxROl_s"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=aWsTvxROl_s" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/it8ncYPaoL0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/3106816705673046414/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/05/games-round-up-for-april-2009.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/3106816705673046414?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/3106816705673046414?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/05/games-round-up-for-april-2009.html" title="Games round-up for April 2009" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_OjchJpvqFiw/SdjC66kbefI/AAAAAAAAAkc/I7Y8bt9p_8M/s72-c/3bored.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;AkAHRHY4fCp7ImA9WxJSFUk.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-6131100952323010786</id><published>2009-05-05T11:38:00.000-07:00</published><updated>2009-05-05T11:38:55.834-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-05T11:38:55.834-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="canvas" /><title>Canvas Cheat Sheet update</title><content type="html">&lt;span class='post-summary'&gt;As &lt;a href="http://blog.nihilogic.dk/2009/02/html5-canvas-cheat-sheet.html?showComment=1241176080000#c2726478613119172718"&gt;zcorpan&lt;/a&gt; was so kind to point out, my &lt;a href="http://blog.nihilogic.dk/2009/02/html5-canvas-cheat-sheet.html"&gt;Canvas Cheat Sheet&lt;/a&gt; wasn't quite up to date and I finally got around to fixing it up. Here are the links to the revised version:
&lt;br/&gt;
&lt;br/&gt;
&lt;a href="http://www.nihilogic.dk/labs/canvas_sheet/HTML5_Canvas_Cheat_Sheet.pdf"&gt;PDF document&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://www.nihilogic.dk/labs/canvas_sheet/HTML5_Canvas_Cheat_Sheet.png"&gt;PNG image&lt;/a&gt;
&lt;br/&gt;&lt;br/&gt;
Besides a few minor corrections the only significant change is that &lt;code&gt;createPattern&lt;/code&gt; and &lt;code&gt;drawImage&lt;/code&gt; can both take &lt;code&gt;HTMLVideoElement&lt;/code&gt;s now.
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-6131100952323010786?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=X_h6-HkJeEo:X2hbj0Jn7MQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=X_h6-HkJeEo:X2hbj0Jn7MQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=X_h6-HkJeEo:X2hbj0Jn7MQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=X_h6-HkJeEo:X2hbj0Jn7MQ:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=X_h6-HkJeEo:X2hbj0Jn7MQ:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=X_h6-HkJeEo:X2hbj0Jn7MQ:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=X_h6-HkJeEo:X2hbj0Jn7MQ:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=X_h6-HkJeEo:X2hbj0Jn7MQ:aWsTvxROl_s"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=aWsTvxROl_s" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/X_h6-HkJeEo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/6131100952323010786/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/05/canvas-cheat-sheet-update.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/6131100952323010786?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/6131100952323010786?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/05/canvas-cheat-sheet-update.html" title="Canvas Cheat Sheet update" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;CEENQX85fSp7ImA9WxVaF0Q.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-8346798538043285678</id><published>2009-04-15T03:49:00.000-07:00</published><updated>2009-04-15T03:51:30.125-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-15T03:51:30.125-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="canvas" /><title>Canvas Visualizations of Sorting Algorithms</title><content type="html">&lt;img border="0" src="http://1.bp.blogspot.com/_OjchJpvqFiw/SeW6V7piWpI/AAAAAAAAAks/bMryhXEMUl0/s320/sorting_vis.png" style="margin-right:10px;float:left;"/&gt;

Via &lt;a href="http://simonwillison.net/2009/Apr/14/sort/"&gt;Simon Willison&lt;/a&gt;, I was made aware of an old but interesting post dealing with &lt;a href="http://www.hatfulofhollow.com/posts/code/visualisingsorting/index.html"&gt;visualizing of sorting algorithms&lt;/a&gt;. Aldo Cortesi explains his dislike for animated visualizations and argues that their explanatory power equals that of a "glob of porridge flung against a wall". 
&lt;span class="full-article"&gt;
&lt;br/&gt;&lt;br/&gt;
He decided to make something better and ended up with some pretty cool static visualizations rendered with Python using the &lt;a href="http://cairographics.org/"&gt;Cairo&lt;/a&gt; graphics library. Now, I don't know if these are really that much more informing than other attempts (especially if you're comparing algorithms), but I do think they're quite pretty.
&lt;br/&gt;&lt;br/&gt;
Anyway, I thought they could use a little &lt;code&gt;canvas&lt;/code&gt; love so I've spent my morning making a quick and dirty JavaScript / &lt;code&gt;canvas&lt;/code&gt; port of Aldo's original Python program. It's a bit rushed and I don't have much experience with Python, so I might have missed a few details in the code, but it looks to be producing similar results.
&lt;br/&gt;&lt;br/&gt;
&lt;a href="http://www.nihilogic.dk/labs/sorting_visualization/"&gt;See the canvas visualizations here&lt;/a&gt;
&lt;br/&gt;&lt;br/&gt;
You can adjust the number of elements in the array and the dimensions of the canvas. When you click the "Render" button, an array of length &lt;em&gt;NumElements&lt;/em&gt; is filled with random numbers and sorted using the algorithm of choice.
&lt;br/&gt;&lt;br/&gt;
And make sure to read Aldo's &lt;a href="http://www.hatfulofhollow.com/posts/code/visualisingsorting/index.html"&gt;original post&lt;/a&gt; for the full story.
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-8346798538043285678?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=ONhvb9VR8So:q8jDAISN7yc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=ONhvb9VR8So:q8jDAISN7yc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=ONhvb9VR8So:q8jDAISN7yc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=ONhvb9VR8So:q8jDAISN7yc:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=ONhvb9VR8So:q8jDAISN7yc:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=ONhvb9VR8So:q8jDAISN7yc:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=ONhvb9VR8So:q8jDAISN7yc:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=ONhvb9VR8So:q8jDAISN7yc:aWsTvxROl_s"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=aWsTvxROl_s" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/ONhvb9VR8So" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/8346798538043285678/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/04/canvas-visualizations-of-sorting.html#comment-form" title="8 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/8346798538043285678?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/8346798538043285678?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/04/canvas-visualizations-of-sorting.html" title="Canvas Visualizations of Sorting Algorithms" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_OjchJpvqFiw/SeW6V7piWpI/AAAAAAAAAks/bMryhXEMUl0/s72-c/sorting_vis.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">8</thr:total></entry><entry gd:etag="W/&quot;D0MBQn44cCp7ImA9WxJRGUw.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-6954781747065610538</id><published>2009-04-05T05:47:00.000-07:00</published><updated>2009-05-21T07:17:33.038-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-21T07:17:33.038-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="hosting" /><title>FsckVPS review update</title><content type="html">&lt;span class='post-summary'&gt;
&lt;a href="https://secure.fsckvps.com/aff.php?aff=107"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_OjchJpvqFiw/SdipQcVi1OI/AAAAAAAAAkE/9044P4btbjA/s400/fsckvps.png" style="float:left;margin-right:10px;"/&gt;&lt;/a&gt;
As promised, here's a 1-month update on my experience with &lt;a href="https://secure.fsckvps.com/aff.php?aff=107"&gt;FsckVPS&lt;/a&gt;.
&lt;/span&gt;
&lt;span class="full-article"&gt;
&lt;br/&gt;&lt;br/&gt;
Well, once during one of my initial setting-things-up sessions, I did have some problems with either a very slow network or some other form of heavy load on the server. However, the problem disappeared before I could locate the cause and it hasn't come back (but I haven't been "active" on the server as much as in the beginning, so I might just not have noticed it). Other than that, ping times look ok according to &lt;a href="http://www.host-tracker.com" rel="nofollow"&gt;host-tracker.com&lt;/a&gt;, with most US locations in the 50-200 ms range and the rest of the world just above that. As for download speed, I'm able to get about 8 Mbit/s here from Denmark, I haven't really tested upload speeds.
&lt;br/&gt;&lt;br/&gt;
I didn't want to go through all the hassle with setting up FTP access, so I'm currently using SCP/SFTP to transfer files. I've never used SFTP much and found a program that would let me map a drive letter to the connection. Pretty nice but also horribly, amazingly slow. I realize there must be some encryption overhead and all that, but wow. So, back to WinSCP for me. Anyway, that has nothing to do with the VPS as such.
&lt;br/&gt;&lt;br/&gt;
I've still seen no sign of my open source developer discount. I got no response to my email to FsckVPS (I replied to the mail I got from Rus with the coupon code) and I've just given up hope of saving those few dollars. $20/month is still cheap.
&lt;br/&gt;&lt;br/&gt;
The HyperVM control panel is a bit glitchy at times and responds very slowly some times, but fortunately I don't need to use it much. 
&lt;br/&gt;&lt;br/&gt;
A few days ago, they had to shut down the HyperVM instance due to a "potential security issue" (which turned out to be relatively harmless). It didn't affect the &lt;a href="http://www.webhostingsearch.com/virtual-private-server.php"&gt;VPS&lt;/a&gt; itself, though, and everything was up and running again later that day.
&lt;br/&gt;&lt;br/&gt;
Overall, I'm still pretty satisfied. I've moved more and more over to the VPS, everything on pixastic.com and www.nihilogic.dk is now hosted there. The blog is still hosted at Blogger, as is the Games site, but now I'm considering switching to Wordpress and moving both of those to the VPS as well. It will probably be a while before I can find the time for that, though.
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-6954781747065610538?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=gv1HIuENUN8:EDqi8zmGhbk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=gv1HIuENUN8:EDqi8zmGhbk:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=gv1HIuENUN8:EDqi8zmGhbk:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=gv1HIuENUN8:EDqi8zmGhbk:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=gv1HIuENUN8:EDqi8zmGhbk:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=gv1HIuENUN8:EDqi8zmGhbk:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=gv1HIuENUN8:EDqi8zmGhbk:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=gv1HIuENUN8:EDqi8zmGhbk:aWsTvxROl_s"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=aWsTvxROl_s" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/gv1HIuENUN8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/6954781747065610538/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/04/fsckvps-review-update.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/6954781747065610538?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/6954781747065610538?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/04/fsckvps-review-update.html" title="FsckVPS review update" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_OjchJpvqFiw/SdipQcVi1OI/AAAAAAAAAkE/9044P4btbjA/s72-c/fsckvps.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total></entry><entry gd:etag="W/&quot;CUUGRnY9cSp7ImA9WxVaF0w.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-7916946144295219327</id><published>2009-04-05T04:43:00.000-07:00</published><updated>2009-04-14T05:47:07.869-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-14T05:47:07.869-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="games" /><title>Games round-up for March 2009</title><content type="html">&lt;span class='post-summary'&gt;
I've been so busy this month, especially the past week or two, that I haven't had time to add a lot of games, but the collection did expand a bit afterall.
A few new games were added in addition to a bunch of oldies as well as some of my own game-related experiments.
&lt;/span&gt;
&lt;span class="full-article"&gt;
&lt;br/&gt;&lt;br/&gt;

&lt;img src="http://2.bp.blogspot.com/_OjchJpvqFiw/SbOx5r1u17I/AAAAAAAAAiM/-_Wq45acrC8/s200/3d_tomb_ii.png" width="100" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;3D Tomb II&lt;/b&gt;&lt;br/&gt;
The master of all things tiny, &lt;a href="http://www.p01.org/"&gt;Mathieu 'p01' Henri&lt;/a&gt;, created this impressive FPS game in just 4KB.&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/03/3d-tomb-ii.html"&gt;Read more about 3D Tomb II&lt;/a&gt;&lt;br/&gt;

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://4.bp.blogspot.com/_OjchJpvqFiw/SbFy_SAXrzI/AAAAAAAAAhc/JAX8VpsDRnk/s200/amoeba.png" width="100" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;Amoeba&lt;/b&gt;&lt;br/&gt;
A fun, little Roguelike where you have to survive in a dog-eat-dog world (or amoeba-eat-amoeba, I guess).&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/03/amoeba.html"&gt;Read more about Amoeba&lt;/a&gt;&lt;br/&gt;

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://2.bp.blogspot.com/_OjchJpvqFiw/SbO64Z1rhKI/AAAAAAAAAic/4iYv0wVMrkk/s200/beslimed.png" width="100" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;BeSlimed&lt;/b&gt;&lt;br/&gt;
Everyone's favorite puzzle game Bejeweled - MooTools style.&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/03/beslimed.html"&gt;Read more about BeSlimed&lt;/a&gt;

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://3.bp.blogspot.com/_OjchJpvqFiw/SbFTvanOQTI/AAAAAAAAAhM/yGuI5Ge8J4I/s200/dhtml_lemmings.png" width="100" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;DHTML Lemmings&lt;/b&gt;&lt;br/&gt;
This game says JavaScript gaming like no other. A classic game with a near perfect DHTML implementation.&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/03/dhtml-lemmings.html"&gt;Read more about DHTML Lemmings&lt;/a&gt;&lt;br/&gt;

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://4.bp.blogspot.com/_OjchJpvqFiw/SbFUdgfWcYI/AAAAAAAAAhU/hDAaTSCAQbc/s200/hatenarunner.png" width="100" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;HatenaRunner&lt;/b&gt;&lt;br/&gt;
From the talented Satoshi Ueyama comes a fun Lode Runner clone.&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/03/hatenarunner.html"&gt;Read more about HatenaRunner&lt;/a&gt;

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://3.bp.blogspot.com/_OjchJpvqFiw/SbO0eDDxp8I/AAAAAAAAAiU/kYCWa5L-zcU/s200/helicopter_2k1.png" width="100" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;Helicopter 2K1&lt;/b&gt;&lt;br/&gt;
Classic chopper action in this nice arcade game.&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/03/helicopter-2k1.html"&gt;Read more about Helicopter 2K1&lt;/a&gt;&lt;br/&gt;

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://1.bp.blogspot.com/_OjchJpvqFiw/SbOjuyyQ6nI/AAAAAAAAAiE/gZaEEHRhA1c/s200/leisure_suit_larry_%28agi_interpreter%29.png" width="100" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;Leisure Suit Larry AGI interpreter&lt;/b&gt;&lt;br/&gt;
One of my favourites, António Afonso has made an interpreter for the old AGI adventure game format used by Sierra OnLine way back when and is showing it off with some old school Larry Laffer fun.&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/03/leisure-suit-larry-agi-interpreter.html"&gt;Read more about Leisure Suit Larry&lt;/a&gt;&lt;br/&gt;

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://3.bp.blogspot.com/_OjchJpvqFiw/Sb6zACPu8JI/AAAAAAAAAjk/q4SLKwUT1Es/s200/scriptris.png" width="100" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;Scriptris&lt;/b&gt;&lt;br/&gt;
Tetris clones are plentyful and JavaScript versions are too, but this one has some nice multiplayer options.&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/03/scriptris.html"&gt;Read more about Scriptris&lt;/a&gt;&lt;br/&gt;

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://4.bp.blogspot.com/_OjchJpvqFiw/SbFCULVkiPI/AAAAAAAAAhE/2bxhvxcd-SE/s200/shapes.png" width="100" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;Shapes&lt;/b&gt;&lt;br/&gt;
A DHTML arcade game inspired by the fast paced Geometry Wars.&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/03/shapes.html"&gt;Read more about Shapes&lt;/a&gt;

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://1.bp.blogspot.com/_OjchJpvqFiw/Sb6-374VbTI/AAAAAAAAAjs/cPjpxpTG87Y/s200/space_invaders_emulator.png" width="100" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;Space Invaders Emulator&lt;/b&gt;&lt;br/&gt;
Not just a JavaScript version of Space Invaders, this is an actual emulation of the hardware used in the old arcade games. It also runs a few other classic Taito games.&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/03/space-invaders-emulator.html"&gt;Read more about Space Invaders Emulator&lt;/a&gt;&lt;br/&gt;

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://3.bp.blogspot.com/_OjchJpvqFiw/SbOgeSRkzdI/AAAAAAAAAh0/nRq8pJmoLxQ/s200/javascript_wolfenstein_3d.png" width="100" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;Super Mario and Wolfenstein&lt;/b&gt;&lt;br/&gt;
Also added was three Nihilogic experiments/demos from last year. First the Super Mario game that basically gave life to Nihilogic about a year ago and was later followed up by a Mario Kart experiment. Finally, a partial remake of the first map of Wolfenstein using my own crappy 3D engine.&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/03/14kb-super-mario.html"&gt;Read more about Super Mario Bros.&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/03/javascript-super-mario-kart.html"&gt;Read more about Super Mario Kart&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/03/javascript-wolfenstein-3d.html"&gt;Read more about Wolfenstein 3D&lt;/a&gt;&lt;br/&gt;

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://2.bp.blogspot.com/_OjchJpvqFiw/SbPIGswiRQI/AAAAAAAAAik/Mpp-OY_X_hc/s200/videopoker.png" width="100" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;VideoPoker&lt;/b&gt;&lt;br/&gt;
Get a piece of casino action with this video poker game by Juan Mellado. No risk of loosing the kids' college funds.&lt;br/&gt;
&lt;a href="http://games.nihilogic.dk/2009/03/videopoker.html"&gt;Read more about VideoPoker&lt;/a&gt;&lt;br/&gt;

&lt;br/&gt;&lt;br/&gt;

I think for April, I might try to dig into &lt;a href="http://www.def-logic.com/games.html"&gt;Brent Silby's&lt;/a&gt; archive of DHTML games. I've been putting it off since there are just so many but there's really no way around it.
&lt;br/&gt;&lt;br/&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-7916946144295219327?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=3-xMYGqjulY:5KaF0jGxudI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=3-xMYGqjulY:5KaF0jGxudI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=3-xMYGqjulY:5KaF0jGxudI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=3-xMYGqjulY:5KaF0jGxudI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=3-xMYGqjulY:5KaF0jGxudI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=3-xMYGqjulY:5KaF0jGxudI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=3-xMYGqjulY:5KaF0jGxudI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=3-xMYGqjulY:5KaF0jGxudI:aWsTvxROl_s"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=aWsTvxROl_s" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/3-xMYGqjulY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/7916946144295219327/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/04/games-round-up-for-march-2009.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/7916946144295219327?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/7916946144295219327?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/04/games-round-up-for-march-2009.html" title="Games round-up for March 2009" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_OjchJpvqFiw/SbOx5r1u17I/AAAAAAAAAiM/-_Wq45acrC8/s72-c/3d_tomb_ii.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;CEAERnw7eSp7ImA9WxVaF0w.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-5914225388206134436</id><published>2009-03-26T14:14:00.000-07:00</published><updated>2009-04-14T05:38:27.201-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-14T05:38:27.201-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="music visualization" /><title>The Dancing Scrollbars!</title><content type="html">&lt;span class='post-summary'&gt;
&lt;a href="http://www.nihilogic.dk/labs/dancing_scrollbars/"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_OjchJpvqFiw/ScvvE5r1CVI/AAAAAAAAAj8/bda1NBSa1wg/s200/dancing_scrollbars.png" style="float:left;margin-right:10px;"/&gt;&lt;/a&gt;
I had an hour to kill and got inspired by &lt;a href="http://www.chromeexperiments.com/detail/wavy-scrollbars/"&gt;this entry&lt;/a&gt; on the Chrome Experiments site. Andrey has made a nice wave simulator using scrollbars and some JavaScript magic. Taking that idea and mixing it up with what I've been doing lately (see &lt;a href="http://blog.nihilogic.dk/2009/03/javascript-canvas-sm2-milkdrop.html"&gt;here&lt;/a&gt; and &lt;a href="http://blog.nihilogic.dk/2009/03/music-visualization-with-canvas-and.html"&gt;here&lt;/a&gt;), here is the magnificent troupe of &lt;a href="http://www.nihilogic.dk/labs/dancing_scrollbars/"&gt;Dancing Scrollbars&lt;/a&gt; (ok, they're more like the Jumping Scrollbar handles, really).
&lt;/span&gt;
&lt;span class="full-article"&gt;
&lt;br/&gt;&lt;br/&gt;
The music is &lt;em&gt;Tom Cruise Crazy&lt;/em&gt; by &lt;a href="http://www.jonathancoulton.com/songdetails/Tom%20Cruise%20Crazy"&gt;Jonathan Coulton&lt;/a&gt;.
&lt;br/&gt;&lt;br/&gt;
&lt;a href="http://www.nihilogic.dk/labs/dancing_scrollbars/"&gt;Have fun!&lt;/a&gt;
&lt;br/&gt;&lt;br/&gt;
And now I'm totally done with this. For now.
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-5914225388206134436?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=B6r0hIefSwA:De73t0X6T2c:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=B6r0hIefSwA:De73t0X6T2c:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=B6r0hIefSwA:De73t0X6T2c:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=B6r0hIefSwA:De73t0X6T2c:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=B6r0hIefSwA:De73t0X6T2c:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=B6r0hIefSwA:De73t0X6T2c:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=B6r0hIefSwA:De73t0X6T2c:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=B6r0hIefSwA:De73t0X6T2c:aWsTvxROl_s"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=aWsTvxROl_s" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/B6r0hIefSwA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/5914225388206134436/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/03/dancing-scrollbars.html#comment-form" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/5914225388206134436?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/5914225388206134436?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/03/dancing-scrollbars.html" title="The Dancing Scrollbars!" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_OjchJpvqFiw/ScvvE5r1CVI/AAAAAAAAAj8/bda1NBSa1wg/s72-c/dancing_scrollbars.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">7</thr:total></entry><entry gd:etag="W/&quot;CEEDRXo_eyp7ImA9WxVaF0w.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-1514428550487579666</id><published>2009-03-26T03:01:00.000-07:00</published><updated>2009-04-14T05:37:54.443-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-14T05:37:54.443-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="pixastic" /><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="image processing" /><category scheme="http://www.blogger.com/atom/ns#" term="fixes and updates" /><category scheme="http://www.blogger.com/atom/ns#" term="canvas" /><title>A few Pixastic updates</title><content type="html">&lt;span class='post-summary'&gt;
A few minor updates to &lt;a href="http://www.pixastic.com/"&gt;Pixastic&lt;/a&gt; before I begin working on the next edition of the photo editor (the one that will eventually also work as a Ubiquity command). Undo/revert functionality, a color histogram action, and more..
&lt;/span&gt;
&lt;span class="full-article"&gt;
&lt;br/&gt;&lt;br/&gt;
A few people have requested a way to revert the image back to the original, so Pixastic now remembers the original image and lets you call &lt;code&gt;Pixastic.revert(img)&lt;/code&gt; to undo all the processing done on an image. It's important to know that the resulting image from a &lt;code&gt;process()&lt;/code&gt; call is not the same element as the one passed to the &lt;code&gt;process()&lt;/code&gt; call. Pixastic creates a new canvas element which means that most properties, attributes and events are not carried over to the new canvas element. For instance, if you are making a mouseover/out effect on an image, you'll have to listen for the &lt;code&gt;mouseout&lt;/code&gt; event on the new element after calling &lt;code&gt;process()&lt;/code&gt; in the &lt;code&gt;mouseover&lt;/code&gt; event. The example on the &lt;a href="http://www.pixastic.com/lib/"&gt;introduction page&lt;/a&gt; has been reworked to use this.
&lt;br/&gt;&lt;br/&gt;

After processing an image, the options object now holds the resulting canvas in a property called &lt;code&gt;resultCanvas&lt;/code&gt;.
Example:
&lt;pre name="code" class="javascript"&gt;
  var options = {};
  Pixastic.process(image, "action", options);
  options.resultCanvas; // &lt;- holds new canvas
&lt;/pre&gt;
The canvas is also returned by the &lt;code&gt;Pixastic.process()&lt;/code&gt; method itself, but only if the image is completely loaded by the time of the call (if it is not, the actual processing is deferred until the onload event on the image)
&lt;br/&gt;&lt;br/&gt;
The options object can now also take a boolean &lt;code&gt;leaveDOM&lt;/code&gt; option that will leave the DOM untouched after processing. If not set (or set to false), Pixastic behaves as it did before and replaces the original image with the new canvas element. The new &lt;code&gt;revert()&lt;/code&gt; method will also put the original image element back in the DOM, if possible.
&lt;br/&gt;&lt;br/&gt;
&lt;a href="http://billmill.org/"&gt;Bill Mill&lt;/a&gt; did some color histogram code for his &lt;a href="http://billmill.org/the_histogram.html"&gt;article series&lt;/a&gt; on canvas image processing. This code has now been &lt;a href="http://www.pixastic.com/lib/docs/actions/colorhistogram/"&gt;integrated&lt;/a&gt; (and slightly modified for consistency with the brightness histogram). Thanks Bill!
&lt;br/&gt;&lt;br/&gt;
Lastly, I made few performance improvements in some of the actions (brightness/contrast, color adjust, desaturate). More will come as I get around to it.
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-1514428550487579666?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=FRxSv5q5WGg:ezU7-ZWsyj4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=FRxSv5q5WGg:ezU7-ZWsyj4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=FRxSv5q5WGg:ezU7-ZWsyj4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=FRxSv5q5WGg:ezU7-ZWsyj4:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=FRxSv5q5WGg:ezU7-ZWsyj4:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=FRxSv5q5WGg:ezU7-ZWsyj4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=FRxSv5q5WGg:ezU7-ZWsyj4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=FRxSv5q5WGg:ezU7-ZWsyj4:aWsTvxROl_s"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=aWsTvxROl_s" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/FRxSv5q5WGg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/1514428550487579666/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/03/few-pixastic-updates.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/1514428550487579666?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/1514428550487579666?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/03/few-pixastic-updates.html" title="A few Pixastic updates" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></entry><entry gd:etag="W/&quot;CEEBR3g7fip7ImA9WxVaF0w.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-3567966092722714072</id><published>2009-03-24T10:02:00.000-07:00</published><updated>2009-04-14T05:37:36.606-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-14T05:37:36.606-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="music visualization" /><category scheme="http://www.blogger.com/atom/ns#" term="audio" /><category scheme="http://www.blogger.com/atom/ns#" term="canvas" /><title>JavaScript + Canvas + SM2 + MilkDrop = JuicyDrop</title><content type="html">&lt;span class="post-summary"&gt;
&lt;img border="0" src="http://4.bp.blogspot.com/_OjchJpvqFiw/Scj0ENMhPTI/AAAAAAAAAj0/qH7lvn-xlKw/s320/juicydrop_screenshot.png" style="float:left;margin-right:10px;height:150px;" /&gt;
More canvas music visualization - now with 100% more Winamp-iness.
&lt;/span&gt;
&lt;span class="full-article"&gt;
&lt;br/&gt;&lt;br/&gt;
A couple of weeks ago &lt;a href="http://blog.nihilogic.dk/2009/03/music-visualization-with-canvas-and.html"&gt;I played around&lt;/a&gt; with music visualization using JavaScript/canvas and &lt;a href="http://schillmania.com/projects/soundmanager2/"&gt;SoundManager2&lt;/a&gt;. Well, I couldn't leave it at that and as I mentioned in the comments, I had an eye on the &lt;a href="http://www.nullsoft.com/free/milkdrop/" target="_blank"&gt;MilkDrop&lt;/a&gt; plugin for Winamp. The result so far is a little Winamp lookalike called JuicyAmp with its own music visualizer JuicyDrop that feeds on Milkdrop preset files.
&lt;br/&gt;&lt;br/&gt;
If you just want to see the pretty colors -&gt; &lt;a href="http://www.nihilogic.dk/labs/juicydrop/" target="_blank"&gt;CLICKY&lt;/a&gt;. (But please use Chrome or Firefox 3+)
&lt;br/&gt;&lt;br/&gt;
MilkDrop is nice because, although there's a built-in editor in the plugin, the presets are in plain text. They are basically just lists of variables and equations that, with a bit of mangling, can be evaluated as JavaScript. There are also extensive guides that explain how to author presets and how variables are passed around between the different equations. And, even better, the source code for the plugin was released a couple of years ago.
&lt;br/&gt;&lt;br/&gt;
MilkDrop presets consist of a number of different elements (waveforms, shapes, per-pixel effects, etc). Some of them I haven't touched at all, but JuicyDrop supports enough at the moment that a good handful of presets run just fine. That said, there are a whole bunch of problems to work out and the presets included were selected because they looked alright and didn't make it blow up.
&lt;br/&gt;&lt;br/&gt;
I strongly recommend using Chrome for this. Firefox 3 can play too but is probably somewhat slower. There's something screwy going on with Safari, it's like it's refusing to update the display (try holding down a key on your keyboard) &lt;i&gt;(Edit: at least a few people have reported that Safari is working fine for them, YMMV)&lt;/i&gt;, I'm not sure what exactly is causing it. Opera is a mixed experience for me and it seems to have a problem with playing the music that I haven't found the reason for yet. 
&lt;br/&gt;&lt;br/&gt;
The issue with open Flash/sound-using tabs, etc. is of course still here as well (&lt;a href="http://blog.nihilogic.dk/2009/03/music-visualization-with-canvas-and.html"&gt;read the comments here for more&lt;/a&gt;). 

&lt;br/&gt;&lt;br/&gt;
A couple of keyboard controls:
&lt;ul&gt;
&lt;li&gt;Z : switch to smaller (128x128) visualization view (in case of low framerate)
&lt;li&gt;X : switch back to normal (256x256) view
&lt;li&gt;D : Toggle rendering of deformation mesh points
&lt;li&gt;1 : Toggle basic waveform
&lt;li&gt;2 : Toggle custom waves
&lt;li&gt;3 : Toggle custom shapes
&lt;li&gt;4 : Toggle borders
&lt;li&gt;5 : Toggle per-pixel effects
&lt;li&gt;6 : Toggle video echo
&lt;/ul&gt;
Note that not all presets use all of the features that you can toggle with the keys 1-6.
&lt;br/&gt;&lt;br/&gt;
So without further ado, &lt;a href="http://www.nihilogic.dk/labs/juicydrop/"&gt;go have yourself a canvas trip&lt;/a&gt;.
&lt;br/&gt;&lt;br/&gt;
I'm not sure where to go from here (besides a lot of optimizing). I'm not done with this, but I'm not sure I want to try to get full MilkDrop support. I believe the presets of today use a lot of pixel shaders anyway, which obviously is no good here. What I might do, though, is add another preset format (probably JSON?) that's a bit easier to work with and then shape that into something more suited for canvas and JavaScript. But for now I have a date with &lt;a href="http://www.pixastic.com/"&gt;Pixastic&lt;/a&gt;..
&lt;br/&gt;&lt;br/&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-3567966092722714072?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=GPs39FUUCwc:oKQ4wKE-JTg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=GPs39FUUCwc:oKQ4wKE-JTg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=GPs39FUUCwc:oKQ4wKE-JTg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=GPs39FUUCwc:oKQ4wKE-JTg:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=GPs39FUUCwc:oKQ4wKE-JTg:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=GPs39FUUCwc:oKQ4wKE-JTg:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=GPs39FUUCwc:oKQ4wKE-JTg:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=GPs39FUUCwc:oKQ4wKE-JTg:aWsTvxROl_s"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=aWsTvxROl_s" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/GPs39FUUCwc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/3567966092722714072/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/03/javascript-canvas-sm2-milkdrop.html#comment-form" title="23 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/3567966092722714072?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/3567966092722714072?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/03/javascript-canvas-sm2-milkdrop.html" title="JavaScript + Canvas + SM2 + MilkDrop = JuicyDrop" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_OjchJpvqFiw/Scj0ENMhPTI/AAAAAAAAAj0/qH7lvn-xlKw/s72-c/juicydrop_screenshot.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">23</thr:total></entry><entry gd:etag="W/&quot;C0YGSH49fip7ImA9WxVUFEg.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-6520886898378544212</id><published>2009-03-19T01:25:00.000-07:00</published><updated>2009-03-19T01:25:29.066-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-19T01:25:29.066-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="elsewhere" /><title>Chrome Experiments and DOMTris</title><content type="html">&lt;span class='post-summary'&gt;
"Not your mother's JavaScript". Google has just launched their new Chrome Experiments site, a showcase for experimental JavaScript projects. Anyone can submit an experiment and if it's deemed good enough, it will be included. There are already a bunch of cool experiments to play around with.
&lt;/span&gt;
&lt;span class="full-article"&gt;
&lt;br /&gt;&lt;br/&gt;
They contacted me a while ago, asking for a project of mine to include in the "initial batch". First it was supposed to have been the &lt;a href="http://games.nihilogic.dk/2009/02/digg-attack.html"&gt;Digg Attack&lt;/a&gt; game, but for some reason they later decided to use my &lt;a href="http://games.nihilogic.dk/2008/12/domtris.html"&gt;DOMTris&lt;/a&gt; Tetris game. That's cool, at least a lot of people are playing Tetris right now, my logs tell me. :D
&lt;br/&gt;&lt;br/&gt;
Anyway, check out the &lt;a href="http://www.chromeexperiments.com/" target="_blank"&gt;Chrome Experiments site&lt;/a&gt; (and the &lt;a href="http://www.chromeexperiments.com/detail/domtris/" target="_blank"&gt;DOMTris entry&lt;/a&gt;), lots of fun!
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-6520886898378544212?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=QR5tmkduxNg:JJ78H14UBt4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=QR5tmkduxNg:JJ78H14UBt4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=QR5tmkduxNg:JJ78H14UBt4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=QR5tmkduxNg:JJ78H14UBt4:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=QR5tmkduxNg:JJ78H14UBt4:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=QR5tmkduxNg:JJ78H14UBt4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=QR5tmkduxNg:JJ78H14UBt4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=QR5tmkduxNg:JJ78H14UBt4:aWsTvxROl_s"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=aWsTvxROl_s" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/QR5tmkduxNg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/6520886898378544212/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/03/chrome-experiments-and-domtris.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/6520886898378544212?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/6520886898378544212?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/03/chrome-experiments-and-domtris.html" title="Chrome Experiments and DOMTris" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;D0EBQn04cCp7ImA9WxVVGUs.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-7825037354961281642</id><published>2009-03-13T10:34:00.000-07:00</published><updated>2009-03-13T10:34:13.338-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-13T10:34:13.338-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="games" /><category scheme="http://www.blogger.com/atom/ns#" term="elsewhere" /><category scheme="http://www.blogger.com/atom/ns#" term="3d" /><title>Creating pseudo-3D games... part 2</title><content type="html">&lt;span class="post-summary"&gt;
&lt;img border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SbqYgcCtrjI/AAAAAAAAAjc/H6EeLhiDUm8/s200/figure_chased_by_enemies.png" style="float:left;margin-right:10px;"/&gt;
Part 2 of my series of articles about how to use JavaScript, DHTML and Canvas to create raycasting games like Wolfenstein 3D is up at Dev.Opera - &lt;a href="http://dev.opera.com/articles/view/3d-games-with-canvas-and-raycasting-part-2/" target="_blank"&gt;read the article here&lt;/a&gt;.&lt;br /&gt;
&lt;/span&gt;
&lt;span class="full-article"&gt;
&lt;br /&gt;
In this article I've taken the result of &lt;a href="http://dev.opera.com/articles/view/creating-pseudo-3d-games-with-html-5-can-1/" target="_blank"&gt;the first article&lt;/a&gt; and improved upon it by, among other things, optimizing performance and adding sprites and scary (not really) enemies that run after you.&lt;br /&gt;
&lt;br /&gt;
Note that the titles of the articles are a bit misleading since Canvas is only really used for drawing the minimap, everything else is plain DHTML.
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-7825037354961281642?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=ae5U4BKZ_oU:D9K0TVX7-fE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=ae5U4BKZ_oU:D9K0TVX7-fE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=ae5U4BKZ_oU:D9K0TVX7-fE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=ae5U4BKZ_oU:D9K0TVX7-fE:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=ae5U4BKZ_oU:D9K0TVX7-fE:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=ae5U4BKZ_oU:D9K0TVX7-fE:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=ae5U4BKZ_oU:D9K0TVX7-fE:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=ae5U4BKZ_oU:D9K0TVX7-fE:aWsTvxROl_s"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=aWsTvxROl_s" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/ae5U4BKZ_oU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/7825037354961281642/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/03/creating-pseudo-3d-games-part-2.html#comment-form" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/7825037354961281642?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/7825037354961281642?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/03/creating-pseudo-3d-games-part-2.html" title="Creating pseudo-3D games... part 2" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_OjchJpvqFiw/SbqYgcCtrjI/AAAAAAAAAjc/H6EeLhiDUm8/s72-c/figure_chased_by_enemies.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">7</thr:total></entry><entry gd:etag="W/&quot;CkMHRXY9fSp7ImA9WxJRGE4.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-6072272860372228138</id><published>2009-03-09T13:12:00.000-07:00</published><updated>2009-05-20T07:40:34.865-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-20T07:40:34.865-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="music visualization" /><category scheme="http://www.blogger.com/atom/ns#" term="audio" /><category scheme="http://www.blogger.com/atom/ns#" term="canvas" /><title>Music visualization with Canvas and SoundManager2</title><content type="html">&lt;span class="post-summary"&gt;
&lt;a href="http://www.nihilogic.dk/labs/canvas_music_visualization/" target="_blank"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_OjchJpvqFiw/SbVpgSst3rI/AAAAAAAAAjM/XBgqFK84-O8/s200/thom_yorke.png" style="width:150px;float:left;margin-right:10px;" /&gt;&lt;/a&gt;

I'm not much of a Flash person and I guess I just hadn't been paying attention since I only found about the new audio features when &lt;a href="http://schillmania.com/" target="_blank"&gt;Scott Schiller&lt;/a&gt; added support for them in his &lt;a href="http://schillmania.com/projects/soundmanager2/" target="_blank"&gt;SoundManager2&lt;/a&gt; JavaScript/Flash library and later posted a (very cool) favicon VU-meter that would just dance all night to the sound of your music. Since then I've been wanting to do something with those abilities since I figured &lt;code&gt;canvas&lt;/code&gt; and live audio data would be a perfect match for some groovy audio visualization.
&lt;/span&gt;
&lt;span class="full-article"&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the first of hopefully many such experiments. It's a fun little music video of sorts, where I've just thrown in all sorts of things to the tune of some Radiohead. If you don't care about all the details, scroll down to the end for the link.&lt;br/&gt;
&lt;br/&gt;
So, apparently Flash has a function called &lt;code&gt;computeSpectrum&lt;/code&gt; which returns the current audio state, either as frequency data or as a waveform. In SM2 this has been split into two separate properties of the &lt;code&gt;SMSound&lt;/code&gt; object (you have to specifically enable both with a setting and it's only available in Flash 9 mode). The data is available as 256-element arrays of values between 0 and 1. &lt;br /&gt;
&lt;br /&gt;
&lt;img border="0" src="http://4.bp.blogspot.com/_OjchJpvqFiw/SbVpFMKkMHI/AAAAAAAAAis/omWZcy2FQh0/s200/bars_radiohead.png" style="float:left;margin-right:10px;" /&gt;
For the frequency bars at the bottom, I've simply summed the values in 9 broader groups rather than paint the full spectrum. The same goes for the binary values on the left sides, they're simply averaged in 16 groups and then converted to binary. At the top of the screen you'll see the waveform, drawn at intervals of 8 for performance reasons.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="float:right;margin-right:10px;"&gt;
&lt;img border="0" src="http://1.bp.blogspot.com/_OjchJpvqFiw/SbVpYNZlFEI/AAAAAAAAAi8/Z9qoOmJkEpQ/s320/boids.png" title="Boids"/&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;img border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SbVpKcrSrsI/AAAAAAAAAi0/2P_peTWjIW4/s320/connected_boids.png" title="Connected boids"/&gt;
&lt;/div&gt;

The fun part is the flock of &lt;a href="http://en.wikipedia.org/wiki/Boids" rel="nofollow" target="_blank"&gt;boids&lt;/a&gt; that is spawned at the beginning of the song. They are controlled by simple rules similar to those described by Craig Reynolds' original &lt;a href="http://www.red3d.com/cwr/boids/" target="_blank"&gt;1987 model&lt;/a&gt; for emergent flock behaviour (cohesion, separation, alignment) but will also start to react to the beat of the music. Every frame, the audio is analysed and if certain areas of the spectrum reaches a threshold limit a "pulse" is fired, making the boids attract each other and then repel each other again. When this happens, they also form grids and shapes that are drawn on the canvas. As the song progresses, the drawing takes the shape of Thom Yorke's lovely face (see the image at the beginning), but each playback is random and thus will produce a new drawing.&lt;br /&gt;
&lt;br /&gt;
You can pause the whole thing by clicking on the main area. Clicking on the waveform at the top controls the playback position.&lt;br /&gt;
&lt;br /&gt;
Naturally, this is only for &lt;code&gt;canvas&lt;/code&gt; enabled browsers (no Internet Explorer). It runs a lot better for me in Chrome than any other browser. I have not tested it in Firefox 2 but Firefox 3 runs ok but slow (might be better on more powerful machines than mine) as does Opera 10. Safari 4 is fine as well although it stutters a bit at times. I'm sure there's plenty room for more performance improvements but that will have to wait for another time.&lt;br /&gt;
&lt;br /&gt;
Another puzzling issue I came across: I get a security error from Flash's &lt;code&gt;computeSpectrum&lt;/code&gt; when trying to run this if I also have a tab open with a YouTube video (probably some other Flash sites as well). Exact error from SM2: "&lt;code&gt;(Flash): computeSpectrum() (waveform data) SecurityError: Error #2122&lt;/code&gt;". Happens in at least Firefox and Chrome and a bit of googling tells me it's a Flash issue.&lt;br /&gt;
&lt;br /&gt;
I chose Radiohead because I'm a big fan and it just seemed like a nice place to start, given the Flash based visualization of their &lt;a href="http://blog.nihilogic.dk/2008/07/house-of-canvas-radiohead-meets.html"&gt;House of Cards&lt;/a&gt; "video" last year. And in case you're wondering, the track is Idioteque off of Kid A, taken from a 2001 performance in Paris that can be seen on &lt;a href="http://www.youtube.com/watch?v=JBsLFNcnwGM" target="_blank"&gt;YouTube here&lt;/a&gt; (just remember the tab issue I just mentioned).&lt;br /&gt;
&lt;br /&gt;
I'm not aware of any other music visualization projects using JavaScript and &lt;code&gt;canvas&lt;/code&gt; as its output medium and Flash as the "backend" (besides simple dancing bars and such), so I'd be very interested if you know of any.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.nihilogic.dk/labs/canvas_music_visualization/" target="_blank"&gt;Now have fun with the demo!&lt;/a&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;span class="note"&gt;
If you like this, you should definitely check out &lt;a href="http://blog.nihilogic.dk/2009/03/javascript-canvas-sm2-milkdrop.html"&gt;JuicyDrop&lt;/a&gt;, another music visualization project of mine (think Canvas meets Winamp).
&lt;/span&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-6072272860372228138?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=Bf7ewyo0LqU:CWPK3vvO1Gs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=Bf7ewyo0LqU:CWPK3vvO1Gs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=Bf7ewyo0LqU:CWPK3vvO1Gs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=Bf7ewyo0LqU:CWPK3vvO1Gs:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=Bf7ewyo0LqU:CWPK3vvO1Gs:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=Bf7ewyo0LqU:CWPK3vvO1Gs:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=Bf7ewyo0LqU:CWPK3vvO1Gs:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=Bf7ewyo0LqU:CWPK3vvO1Gs:aWsTvxROl_s"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=aWsTvxROl_s" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/Bf7ewyo0LqU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/6072272860372228138/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/03/music-visualization-with-canvas-and.html#comment-form" title="15 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/6072272860372228138?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/6072272860372228138?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/03/music-visualization-with-canvas-and.html" title="Music visualization with Canvas and SoundManager2" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_OjchJpvqFiw/SbVpgSst3rI/AAAAAAAAAjM/XBgqFK84-O8/s72-c/thom_yorke.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">15</thr:total></entry><entry gd:etag="W/&quot;C0IBQ308eCp7ImA9WxJXEUQ.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-3936910449654027970</id><published>2009-03-05T13:18:00.000-08:00</published><updated>2009-06-05T01:45:52.370-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-05T01:45:52.370-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="nihilogic" /><category scheme="http://www.blogger.com/atom/ns#" term="hosting" /><title>FsckVPS review - Finding a good, cheap VPS hosting solution</title><content type="html">&lt;span class='post-summary'&gt;
Warning: Following is a long (and potentially boring) account of me trying to find a new host and how I eventually end up at &lt;a href="https://secure.fsckvps.com/aff.php?aff=107"&gt;FsckVPS&lt;/a&gt;. This was written as I went along, excuse the journal format.
&lt;/span&gt;
&lt;span class='full-article'&gt;
&lt;h4&gt;March 4, 15:00&lt;/h4&gt;

For a long time, I've been wanting to switch hosts and possibly move to something a bit heavier than the simple $3/mo host I've been using so far (your typical shared web hosting service). For most purposes it's been fine but there have been a few annoying limitations (e.g. outbound connections are blocked) and coming from, at one time, having my own small server stowed away in a closet, I've felt rather amputated - even though I've also enjoyed not having the burden of system administration (something I'd rather avoid but can do if necessary).&lt;br/&gt;
&lt;br/&gt;
So, a number of times I've been looking around, trying to find a suitable alternative, but until now nothing ever came of it. Price is pretty important (when isn't it?) since I don't really feel that my needs should warrant something more expensive than $20-$30/mo while still having enough resources to let me play around a bit without worrying too much. I don't plan on doing anything that would really stress the server and my bandwidth requirements are not that high, although it should be able to handle the occasional spike. A good compromise seems to be a cheap VPS (&lt;a href="http://www.webhostingsearch.com/virtual-private-server.php"&gt;Virtual Private Server&lt;/a&gt;) solution.&lt;br/&gt;

&lt;h4&gt;March 4, 16:00&lt;/h4&gt;

After a bit of googling and digging through a number of really horrible hosting review sites, it seems that &lt;a href="http://www.webhostingtalk.com/" target="_blank"&gt;Web Hosting Talk&lt;/a&gt; is the place to go when you're shopping around. Investigating further..&lt;br/&gt;

&lt;h4&gt;March 4, 20:15&lt;/h4&gt;

At WHT I've now learned of the UK based &lt;a href="http://cheapvps.co.uk/" target="_blank"&gt;CheapVPS&lt;/a&gt; - would you look at that, it even says cheap in the name! Now, of course this puts me off immediately, since putting "cheap" in your brand name usually means you're peddling crap, but the reviews are overwhelmingly positive, they're regularly recommended and they actually do offer some pretty cheap VPS hosting. The owner (Rus) and some other employees frequent the forums at WHT, so you can even get an impression of the kind of people running the business before buying and they all seem nice and helpful (at least to the extent that you've paid for since these are unmanaged VPS hosting plans).&lt;br/&gt;

&lt;h4&gt;March 4, 21:30&lt;/h4&gt;

Ok, I've decided to try this supposedly great service. Off to &lt;a href="http://cheapvps.co.uk/" target="_blank"&gt;CheapVPS&lt;/a&gt; to find a plan that sounds ok. After debating myself a bit, I've settled on a $19/mo 256MB (512MB with a RAMX2 coupon code) plan and fired off the order. The price is low and paid on a monthly basis, so I can afford to close it again if it turns out to be crap.&lt;br/&gt;

&lt;h4&gt;March 4, 21:45&lt;/h4&gt;

Got a confirmation email. Shutting down for today.&lt;br/&gt;

&lt;h4&gt;March 5, 08:30&lt;/h4&gt;

It appears another email was sent out a few hours after the confirmation email. I wasn't really expecting any more until today. Anyway, now they want me to scan and email some form of photographic ID (passport, drivers license, etc). Well that's just great, because I think I'm the only person on the planet who's never had a scanner. Way to be a 21st century digital boy, Jacob. &lt;br/&gt;

&lt;h4&gt;March 5, 09:00&lt;/h4&gt;

Bummed out that I can't really do anything more right now, I went back to WHT to read some more experiences with this service. It turns out that CheapVPS is actually just one of several companies operated by a parent company called &lt;a href="http://www.vaserv.com/" target="_blank"&gt;VAServ&lt;/a&gt;. They also run &lt;a href="http://a2b2.com/"&gt;a2b2&lt;/a&gt; which offers managed VPS plans, and then another, younger and very interesting sibling, &lt;a href="https://secure.fsckvps.com/aff.php?aff=107" target="_blank"&gt;FsckVPS&lt;/a&gt;. FsckVPS is an almost fully automated, unmanaged VPS solution and their goal is to make things as automated as possible, ie. everything from ordering to setup, billing, etc. in order to lower prices as much as possible. This means the VPS is instantly setup within minutes (at least according to the website) and for the same 20 bucks I can now get 1024MB RAM (burstable to 2048), 50GB disk and 850GB transfer - or half those numbers for $10. Of course, in turn you also give up pretty much all support. Hmm..&lt;br/&gt;

&lt;h4&gt;March 5, 09:05&lt;/h4&gt;

Oh, look. They even have a 10-20% discount for open source developers. Nice! A better deal for me and karma points for them. Sending email to sales department requesting coupon code.&lt;br/&gt;

&lt;h4&gt;March 5, 09:10&lt;/h4&gt;

Well, that was quick. A 15% discount code received from Rus the boss. Now pondering which direction to take.&lt;br/&gt;

&lt;h4&gt;March 5, 10:40&lt;/h4&gt;

Oh my, it seems all their websites just went down with 502 Bad Gateway errors. Nice timing!&lt;br/&gt;

&lt;h4&gt;March 5, 11:10&lt;/h4&gt;

Some of the websites are back up, fsckvps.com not included unfortunately. I'm pretending this didn't happen or that it at least only affects their own websites..&lt;br/&gt;

&lt;h4&gt;March 5, 11:20&lt;/h4&gt;

Ok, I've more or less decided to go with a 1GB plan from FsckVPS instead. The things CheapVPS offers over FsckVPS (as far as I can see) are optional control panels (DirectAdmin, cPanel), choice of Xen or OpenVZ (FsckVPS is OpenVZ only), choice of UK or US location, a few more Linux distros to choose from and 3, 6 and 12-month payment plans. All things that don't really matter much to me. Now I'm just waiting for the website come back online. Their test download file (http://server1.fsckvps.com/test.100M) is still working, so hopefully that means the problem is just with their own sites.&lt;br/&gt;

&lt;h4&gt;March 5, 12:50&lt;/h4&gt;

After much waiting, the fsckvps.com website is still down, but I think they only serve a few static pages there anyway. Their order module is hosted elsewhere and I've now completed my order. However, the coupon I received does not appear to have much effect. Even though the discount appears on the order, the price remains the same. I've left a note about it in the "additional comments" field and am now waiting, hoping for a response before I finalize the payment (via Paypal, yay.)&lt;br/&gt;

&lt;h4&gt;March 5, 13:50&lt;/h4&gt;

Screw that. Payment done. Ding! Paypal confirmation email is followed by email from FsckVPS telling me my VPS is ready. Instant actually means instant, not bad.
Logging in. The HyperVM VPS control panel (about which I know absolutely nothing) seems to be running ok. Time to play!&lt;br/&gt;

&lt;h4&gt;March 5, 14:00&lt;/h4&gt;

Seems my new VPS is running CentOS and not Ubuntu as I'm pretty sure I had requested. Nevermind, there's a rebuild option where I can choose between a whole boat load of distros, guess I was wrong earlier when I said there were more options with CheapVPS. Anyway, I don't feel like familiarizing myself with yet another Linux distro, so a rebuild it is. And now it's done, nice. In the mean time their website is also back up. Preparing myself for a day of apt-getting.&lt;br/&gt;

&lt;h4&gt;March 5, 21:00&lt;/h4&gt;

Been messing around with my new toy for hours, spent way too much time on simple things like getting SSH up and running (helps when you bind to the right IP), but now it seems I've finally got a basic LAMP box set up. For testing purposes, I've cloned the Pixastic site to &lt;a href="http://www2.pixastic.com/" target="_blank"&gt;http://www2.pixastic.com/&lt;/a&gt; which is now located on the new host. I'll probably let it sit for a few days and then move it for real and if things are still looking fine, I'll begin looking at moving the Nihilogic stuff. Anyway, so far it's been a mostly pleasant experience. My discount is still nowhere to be seen, though, so I'm sending an email now.&lt;br/&gt;
&lt;br/&gt;
I'll probably post a follow up in some time when I've got more experience with their service and maybe my posts will help someone else decide whether or not to give FsckVPS a shot. And if you have any experience with this company and their services or have reviews of similar services, feel free to comment.&lt;br/&gt;
&lt;br/&gt;

TL;DR: Looking for new hosting, signed up for a VPS at CheapVPS, changed my mind and went with &lt;a href="https://secure.fsckvps.com/aff.php?aff=107"&gt;FsckVPS&lt;/a&gt;, will post more later.&lt;br/&gt;
&lt;br/&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-3936910449654027970?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=hn0NId4XFOE:gT2EGCJ2mJY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=hn0NId4XFOE:gT2EGCJ2mJY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=hn0NId4XFOE:gT2EGCJ2mJY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=hn0NId4XFOE:gT2EGCJ2mJY:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=hn0NId4XFOE:gT2EGCJ2mJY:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=hn0NId4XFOE:gT2EGCJ2mJY:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=hn0NId4XFOE:gT2EGCJ2mJY:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=hn0NId4XFOE:gT2EGCJ2mJY:aWsTvxROl_s"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=aWsTvxROl_s" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/hn0NId4XFOE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/3936910449654027970/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/03/shopping-for-hosts-looking-at-fsckvps.html#comment-form" title="15 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/3936910449654027970?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/3936910449654027970?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/03/shopping-for-hosts-looking-at-fsckvps.html" title="FsckVPS review - Finding a good, cheap VPS hosting solution" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">15</thr:total></entry><entry gd:etag="W/&quot;CEINRnk4fip7ImA9WxVaF0w.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-7504015549060116045</id><published>2009-03-03T13:25:00.000-08:00</published><updated>2009-04-14T05:36:37.736-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-14T05:36:37.736-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="games" /><title>Games round-up for February 2009</title><content type="html">&lt;span class='post-summary'&gt;
Last month, I opened up &lt;a href="http://games.nihilogic.dk/"&gt;another section&lt;/a&gt; of Nihilogic devoted to JavaScript games and I got a lot of nice feedback, so I'm hoping it will grow to be a successful site with time. To keep a connection between that section and the blog and for those who want to stay up to date without getting spammed every time a new game is added, I think I'll do monthly round-ups here, briefly summing up all games added during the month.
&lt;/span&gt;
&lt;span class="full-article"&gt;
&lt;br/&gt;&lt;br/&gt;
Ok, on with the games for February. I'll only mention those that were added after the initial announcement and since I'm still largely playing catch-up with several years worth of existing games, most games aren't that fresh anymore but there might a few that catch your eye anyway. As I work my way through the pile of games to add, the old-to-new ratio should hopefully improve.
&lt;br/&gt;&lt;br/&gt;


&lt;img src="http://2.bp.blogspot.com/_OjchJpvqFiw/SaQC7a4OGdI/AAAAAAAAAg4/QcfA0BBTx9c/s200/protorpg.png" width="80" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;&lt;a href="http://games.nihilogic.dk/2009/02/protorpg.html"&gt;ProtoRPG&lt;/a&gt;&lt;/b&gt;&lt;br/&gt;
Not really a game as such, ProtoRPG is actually a game engine ready to use if you feel like making your own roleplaying game. Built on Prototype and Scriptaculous.

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://1.bp.blogspot.com/_OjchJpvqFiw/SaPbMTd-OJI/AAAAAAAAAgw/brdJS0vwAxs/s200/final_fantasy_mini_battle.png" width="80" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;&lt;a href="http://games.nihilogic.dk/2009/02/final-fantasy-mini-battle.html"&gt;Final Fantasy Mini Battle&lt;/a&gt;&lt;/b&gt;&lt;br/&gt;
A fun little diversion in this Final Fantasy inspired battle game.

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;


&lt;img src="http://2.bp.blogspot.com/_OjchJpvqFiw/SaPZyEkgyqI/AAAAAAAAAgo/g8TfdbABr38/s200/js_bomberman.png" width="80" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;&lt;a href="http://games.nihilogic.dk/2009/02/js-bomberman.html"&gt;JS Bomberman&lt;/a&gt;&lt;/b&gt;&lt;br/&gt;
A nice Bomberman-like game by Gabriel Munteanu.

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://2.bp.blogspot.com/_OjchJpvqFiw/SZnPGmVsYwI/AAAAAAAAAf4/z-inw9I7T34/s200/canvex.png" width="80" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;&lt;a href="http://games.nihilogic.dk/2009/02/canvex.html"&gt;Canvex&lt;/a&gt;&lt;/b&gt;&lt;br/&gt;
I really wish Philip Taylor would do something more with this since it's just awesome cool. Raycasting for fun and profit.

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://4.bp.blogspot.com/_OjchJpvqFiw/SZqKbKy7dvI/AAAAAAAAAgQ/MC0qe23C59k/s200/digg_attack.png" width="80" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;&lt;a href="http://games.nihilogic.dk/2009/02/digg-attack.html"&gt;Digg Attack&lt;/a&gt;&lt;/b&gt;&lt;br/&gt;
One of my own experiments, a mashup of shoot'em-up action and data from the Digg API.

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://1.bp.blogspot.com/_OjchJpvqFiw/SZqA8nE6Q1I/AAAAAAAAAgI/ktW4zvdGbKU/s200/stack_the_log.png" width="80" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;&lt;a href="http://games.nihilogic.dk/2009/02/stack-log.html"&gt;Stack the Log!&lt;/a&gt;&lt;/b&gt;&lt;br/&gt;
The first of two games from XWUZ, this is a test of quick reactions.

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://2.bp.blogspot.com/_OjchJpvqFiw/SZqARmynuLI/AAAAAAAAAgA/ns5nsCT3Pgs/s200/bubble_trouble.png" width="80" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;&lt;a href="http://games.nihilogic.dk/2009/02/bubble-trouble.html"&gt;Bubble Trouble&lt;/a&gt;&lt;/b&gt;&lt;br/&gt;
The second XWUZ game is a SameGame-like puzzle game.

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://1.bp.blogspot.com/_OjchJpvqFiw/SZmcF1zOEtI/AAAAAAAAAfw/X7q0cnH_SN0/s200/clix.png" width="80" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;&lt;a href="http://games.nihilogic.dk/2009/02/clix.html"&gt;Clix&lt;/a&gt;&lt;/b&gt;&lt;br/&gt;
Another puzzle game like Bubble Trouble.

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://1.bp.blogspot.com/_OjchJpvqFiw/SZa_28Z9xuI/AAAAAAAAAfg/8yKq7F9lmlE/s200/invaders_from_mars_1.png" width="80" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;&lt;a href="http://games.nihilogic.dk/2009/02/invaders-from-mars.html"&gt;Invaders from Mars&lt;/a&gt;&lt;/b&gt;&lt;br/&gt;
Space Invaders meets Galaxians in this great looking game from &lt;a href="http://rebelfive.wordpress.com/" target="_blank"&gt;Mark Wilcox&lt;/a&gt;.

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://3.bp.blogspot.com/_OjchJpvqFiw/SZazoWBdngI/AAAAAAAAAfQ/n1psaFcLNNs/s200/redline.png" width="80" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;&lt;a href="http://games.nihilogic.dk/2009/02/redline.html"&gt;Redline&lt;/a&gt;&lt;/b&gt;&lt;br/&gt;
Fun little side-scrolling racing game.

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://1.bp.blogspot.com/_OjchJpvqFiw/SZX48u_zAwI/AAAAAAAAAfI/UgVzkvSSLAQ/s200/z-war.png" width="80" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;&lt;a href="http://games.nihilogic.dk/2009/02/z-war.html"&gt;Z-War&lt;/a&gt;&lt;/b&gt;&lt;br/&gt;
Odds are against you as zombies try to eat your brains in this shooter. 

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://2.bp.blogspot.com/_OjchJpvqFiw/SZXtEi2Q1hI/AAAAAAAAAfA/DcUGhLuGBzY/s200/world_of_solitaire.png" width="80" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;&lt;a href="http://games.nihilogic.dk/2009/02/world-of-solitaire.html"&gt;World of Solitaire&lt;/a&gt;&lt;/b&gt;&lt;br/&gt;
This is a really impressive collection of online solitaire games.

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;img src="http://1.bp.blogspot.com/_OjchJpvqFiw/SZa5pvYaPGI/AAAAAAAAAfY/3ox9oRnNdRo/s200/canvas_breakout_tutorial.png" width="80" style="float:left;margin-right:10px;" /&gt;
&lt;b&gt;&lt;a href="http://games.nihilogic.dk/2009/02/canvas-breakout-tutorial.html"&gt;Canvas Breakout Tutorial&lt;/a&gt;&lt;/b&gt;&lt;br/&gt;
A step-by-step manual to creating your own Breakout clone with &lt;code&gt;canvas&lt;/code&gt; by &lt;a href="http://billmill.org/" target="_blank"&gt;Bill Mill&lt;/a&gt;.

&lt;div style="clear:both;"&gt;&lt;br/&gt;&lt;/div&gt;

&lt;br/&gt;
Feel free to use the comments feature to comment on the games or to suggest games you'd like to see added.
&lt;br/&gt;&lt;br/&gt;
I'm also looking for any tutorials and other good resources that would fit in, so don't keep them to yourself!
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-7504015549060116045?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=rbPSj2mcPUs:0qlHZE1KsXg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=rbPSj2mcPUs:0qlHZE1KsXg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=rbPSj2mcPUs:0qlHZE1KsXg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=rbPSj2mcPUs:0qlHZE1KsXg:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=rbPSj2mcPUs:0qlHZE1KsXg:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=rbPSj2mcPUs:0qlHZE1KsXg:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?i=rbPSj2mcPUs:0qlHZE1KsXg:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/nihilogic?a=rbPSj2mcPUs:0qlHZE1KsXg:aWsTvxROl_s"&gt;&lt;img src="http://feeds.feedburner.com/~ff/nihilogic?d=aWsTvxROl_s" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/rbPSj2mcPUs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/7504015549060116045/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/03/games-round-up-for-february-2009.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/7504015549060116045?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/7504015549060116045?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/03/games-round-up-for-february-2009.html" title="Games round-up for February 2009" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_OjchJpvqFiw/SaQC7a4OGdI/AAAAAAAAAg4/QcfA0BBTx9c/s72-c/protorpg.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></entry><entry gd:etag="W/&quot;AkABRn0_fip7ImA9WxJSFUk.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-5211853670352169752</id><published>2009-02-22T12:14:00.000-08:00</published><updated>2009-05-05T11:39:17.346-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-05T11:39:17.346-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="canvas" /><title>HTML5 Canvas Cheat Sheet</title><content type="html">&lt;span class='post-summary'&gt;
&lt;img border="0" src="http://2.bp.blogspot.com/_OjchJpvqFiw/SaGveJKyTTI/AAAAAAAAAgY/swOCfkuoXSs/s200/HTML5-Canvas-Cheat-Sheet.png" alt="Canvas cheat sheet" style="float:left;margin-right:10px;" /&gt;

My memory isn't very good and I often find myself looking up simple things in various specs but sometimes they're just too damn long-winded when you're simply looking for argument x of function y. That's where cheat sheets and reference cards come in handy with their compact, bare-bones information crammed into, at most, a few pages.&lt;/span&gt; 
&lt;span class="full-article"&gt;
There are cheat sheets for just about anything out there but I couldn't find one for the HTML5 canvas element, so I decided to do something about that, mostly for my own sake but if other people find it useful that's just all the better.
&lt;br/&gt;&lt;br/&gt;
The information is pretty much just a copy of what is found in the &lt;a href="http://www.whatwg.org/specs/web-apps/current-work/" target="_blank"&gt;WHATWG specs&lt;/a&gt;, just condensed and hopefully a bit easier to read. There are virtually no explanations, however, and no examples other than some graphics for compositing values and a few other things (the appearance of which is very much inspired by those found in Mozilla's examples). So, it's basically just a listing of the attributes and methods of the canvas element and the 2d drawing context. 
&lt;br/&gt;&lt;br/&gt;
Choose between a 2 page &lt;a href="http://www.nihilogic.dk/labs/canvas_sheet/HTML5_Canvas_Cheat_Sheet.pdf" target="_blank"&gt;PDF document&lt;/a&gt; or a &lt;a href="http://www.nihilogic.dk/labs/canvas_sheet/HTML5_Canvas_Cheat_Sheet.png" target="_blank"&gt;PNG file&lt;/a&gt;. Thanks!
&lt;br/&gt;&lt;br/&gt;
Corrections and comments are welcome!
&lt;br/&gt;&lt;br/&gt;
&lt;!--&lt;span class="note"&gt;zcorpan has also shared a &lt;a href="http://simon.html5.org/dump/html5-canvas-cheat-sheet.html"&gt;modified version&lt;/a&gt; that addresses a few issues. Thanks!&lt;/span&gt;--&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-5211853670352169752?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=X5RoSxby"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=Ukz59Jtx"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=Ukz59Jtx" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=SqxMxF0I"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=SqxMxF0I" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=Qml9zmdF"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=Qml9zmdF" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=szYEynyD"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?d=779" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/LdYb9LVbxFA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/5211853670352169752/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/02/html5-canvas-cheat-sheet.html#comment-form" title="18 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/5211853670352169752?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/5211853670352169752?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/02/html5-canvas-cheat-sheet.html" title="HTML5 Canvas Cheat Sheet" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_OjchJpvqFiw/SaGveJKyTTI/AAAAAAAAAgY/swOCfkuoXSs/s72-c/HTML5-Canvas-Cheat-Sheet.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">18</thr:total></entry><entry gd:etag="W/&quot;CEIFQHk_cSp7ImA9WxVXFEg.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-8789370173385034590</id><published>2009-02-11T10:37:00.001-08:00</published><updated>2009-02-12T07:28:31.749-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-12T07:28:31.749-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="games" /><category scheme="http://www.blogger.com/atom/ns#" term="nihilogic" /><title>Introducing Nihilogic Games - A JavaScript games portal</title><content type="html">&lt;span class='post-summary'&gt;
&lt;a href="http://games.nihilogic.dk/"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SZMkZDZF1pI/AAAAAAAAAe4/g4V02k4vO-8/s200/nihilogic_games.png" style="float:left;margin-right:10px;"/&gt;&lt;/a&gt;
A small expansion to the Nihilogic site! A new games subsite is now located at &lt;a href="http://games.nihilogic.dk/"&gt;http://games.nihilogic.dk/&lt;/a&gt;, dedicated to JavaScript games.&lt;br/&gt;&lt;br/&gt;
&lt;/span&gt;
&lt;span class='full-article'&gt;
As you probably know, there are about a billion sites that collect Flash games (yes, I've counted them), some small and dedicated to niche genres, some &lt;a href="http://www.jayisgames.com/" target="_blank" rel="nofollow"&gt;big and elaborate&lt;/a&gt;. But I've yet to come across a good resource dedicated to just DHTML/JavaScript games, which is why I decided to expand my little site here with a games portal of sorts. It's a subsite of nihilogic.dk and is located at &lt;a href="http://games.nihilogic.dk/"&gt;http://games.nihilogic.dk/&lt;/a&gt;. It's still very much a work in progress, so I'm still moving things around and stuff.&lt;br/&gt;
&lt;br/&gt;
So far I've only got about 35 games catalogued but there's a whole bunch more in the queue just waiting to be added. The games get tagged with genres, authors, year of production and the technologies used and a small review blurb will tell you what the game is about. The idea is that you shouldn't be able to just browse for, let's say, nice JavaScript &lt;a href="http://games.nihilogic.dk/search/label/Platform?Genre"&gt;platform games&lt;/a&gt;, but - since this is a code focused site - also find games that use a certain type of technology, like the &lt;a href="http://games.nihilogic.dk/search/label/YUI?Tech"&gt;YUI&lt;/a&gt; library, &lt;a href="http://games.nihilogic.dk/search/label/SoundManager2?Tech"&gt;SoundManager2&lt;/a&gt; or just plain &lt;a href="http://games.nihilogic.dk/search/label/DHTML?Tech"&gt;DHTML&lt;/a&gt;.&lt;br/&gt;
&lt;br/&gt;
You'll find that the left sidebar is dedicated to these categories and functions as the main navigation bar, while the right bar has a few dynamic lists, featuring the latest games and the popular games. Popularity is based on the ranking of the games, so I hope visitors will share their opinions both by leaving comments and by clicking the pretty stars.&lt;br/&gt;
&lt;br/&gt;
I'll add a "suggest a game" form soon (right now there's just an email link), but until then you are more than welcome to suggest games to be added, either by leaving a comment here or by &lt;a href="mailto:jseidelin@nihilogic.dk"&gt;emailing me&lt;/a&gt;. There are not a lot of criteria for what I'll add, except that it should be at least somewhat noteworthy (ie. not Tic-tac-toe or something equally trivial). Tech demos are also welcome if they're in a "presentable" state. And of course - only games based on JavaScript/DHTML/Canvas (although Flash is allowed for sound and such).&lt;br/&gt;
&lt;br/&gt;
There is of course also an &lt;a href='http://feeds2.feedburner.com/nihilogic_games' rel='alternate' target='_blank' type='application/rss+xml'&gt;RSS feed&lt;/a&gt; (in addition to the &lt;a href='http://feeds2.feedburner.com/nihilogic_games' rel='alternate' target='_blank' type='application/rss+xml'&gt;regular feed&lt;/a&gt;) with the latest games for those of you who are into that sort of thing.&lt;br/&gt;
&lt;br/&gt;
Thoughts and ideas about what you'd like to see on such a site are of course more than welcome, just leave a comment below!
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-8789370173385034590?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=OltsxPOi"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=7DMTXa4m"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=7DMTXa4m" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=g1jAUdcl"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=g1jAUdcl" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=Wfo4sQl7"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=Wfo4sQl7" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=IsC7R0AC"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?d=779" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/boP122vhcoY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/8789370173385034590/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/02/introducing-nihilogic-games-javascript.html#comment-form" title="14 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/8789370173385034590?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/8789370173385034590?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/02/introducing-nihilogic-games-javascript.html" title="Introducing Nihilogic Games - A JavaScript games portal" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_OjchJpvqFiw/SZMkZDZF1pI/AAAAAAAAAe4/g4V02k4vO-8/s72-c/nihilogic_games.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">14</thr:total></entry><entry gd:etag="W/&quot;CEEFRHc6fSp7ImA9WxVQF0U.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-8302329127595642139</id><published>2009-02-04T13:05:00.001-08:00</published><updated>2009-02-04T13:23:35.915-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-04T13:23:35.915-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="pixastic" /><category scheme="http://www.blogger.com/atom/ns#" term="ubiquity" /><title>Pixastic to power Ubiquity photo editor</title><content type="html">&lt;span class='post-summary'&gt;
&lt;img border="0" src="http://2.bp.blogspot.com/_OjchJpvqFiw/SYoEvEn1CoI/AAAAAAAAAdY/1mVuTlo5yZc/s200/ubiquity_pixastic_photo_editor.jpg" style="float:left;margin-right:10px;"/&gt;I've been talking to Mozilla's &lt;a href="http://www.azarask.in/blog/"&gt;Aza Raskin&lt;/a&gt; about a photo editor command for &lt;a href="http://labs.mozilla.com/projects/ubiquity/"&gt;Ubiquity&lt;/a&gt; based on my Pixastic library. He posted an article today explaining what such an editor might look like, &lt;a href="http://www.azarask.in/blog/post/ubiquity-photo-editor/"&gt;check it out&lt;/a&gt;! If you don't know what Ubiquity is, it's a really interesting extension to Firefox from Mozilla that lets you interact with your browser using typed commands.&lt;br/&gt;
Anyway, as the post says, I hope to begin working on the photo editor within a month so.
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-8302329127595642139?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=SFqLfEeI"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=mpAP0qQs"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=mpAP0qQs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=T9gRISuR"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=T9gRISuR" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=Ic9M8Zhh"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=Ic9M8Zhh" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=nX4VetMK"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?d=779" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/LSBZTireRcY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/8302329127595642139/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/02/pixastic-to-power-ubiquity-photo-editor.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/8302329127595642139?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/8302329127595642139?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/02/pixastic-to-power-ubiquity-photo-editor.html" title="Pixastic to power Ubiquity photo editor" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_OjchJpvqFiw/SYoEvEn1CoI/AAAAAAAAAdY/1mVuTlo5yZc/s72-c/ubiquity_pixastic_photo_editor.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total></entry><entry gd:etag="W/&quot;CUEESXo-eip7ImA9WxVaF0w.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-1411536239197290941</id><published>2009-01-22T03:05:00.000-08:00</published><updated>2009-04-14T05:53:28.452-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-14T05:53:28.452-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="pixastic" /><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="image processing" /><category scheme="http://www.blogger.com/atom/ns#" term="canvas" /><title>Photoshop blend modes with Pixastic</title><content type="html">&lt;span class="post-summary"&gt;
&lt;img border="0" src="http://1.bp.blogspot.com/_OjchJpvqFiw/SXhTkdA5RLI/AAAAAAAAAbM/-_O7c2XbYBE/s200/linearlight.png" style="float:left;margin-right:10px;height:100px;"/&gt;
I've added a new action to the &lt;a href="http://www.pixastic.com/" target="_blank"&gt;Pixastic library&lt;/a&gt; called &lt;a href="http://www.pixastic.com/lib/docs/actions/blend/" target="_blank"&gt;"blend"&lt;/a&gt;. This action lets you blend two images using different blend modes like the ones available in Photoshop (multiply, screen, exclusion, etc.).&lt;/span&gt;
&lt;span class="full-article"&gt;
&lt;br/&gt;
&lt;br/&gt;

&lt;h4&gt;Example usage&lt;/h4&gt;

&lt;pre name="code" class="javascript"&gt;
var img = new Image();
img.onload = function() {
 var blendImg = new Image();
 blendImg.onload = function() {
  Pixastic.process(img, "blend", 
   {
    amount : 1, 
    mode : "multiply", 
    image : blendImg
   }
  );
 }
 blendImg.src = "blendimage.jpg";
}
document.body.appendChild(img)
img.src = "myimage.jpg";
&lt;/pre&gt;

The image on which you apply the action will be considered the base image when blending. You can use either an &lt;code&gt;img&lt;/code&gt; element or a &lt;code&gt;canvas&lt;/code&gt; element for the "blend image". It expects the images to be the same size but will simply crop the blend image if it's too large or leave untouched areas if it's smaller then the base image.&lt;br/&gt;
&lt;br/&gt;

Check the &lt;a href="http://www.pixastic.com/lib/docs/actions/blend/" target="_blank"&gt;demo page&lt;/a&gt; to see it in action.&lt;br/&gt;
&lt;br/&gt;

Below are shown all the blend modes included. The images used are:&lt;br/&gt;

Base image:&lt;br/&gt;
&lt;a href="http://1.bp.blogspot.com/_OjchJpvqFiw/SXhXnfFFMqI/AAAAAAAAAcU/ijSugNVgNt8/s1600-h/Butterfly.jpg" imageanchor="1" target="_blank"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_OjchJpvqFiw/SXhXnfFFMqI/AAAAAAAAAcU/ijSugNVgNt8/s200/Butterfly.jpg" /&gt;&lt;/a&gt;
&lt;br/&gt;

Blend image:&lt;br/&gt;
&lt;a href="http://3.bp.blogspot.com/_OjchJpvqFiw/SXhXlhc6FGI/AAAAAAAAAcM/noHa2oyLULM/s1600-h/Flower.jpg" imageanchor="1" target="_blank"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SXhXlhc6FGI/AAAAAAAAAcM/noHa2oyLULM/s200/Flower.jpg" /&gt;&lt;/a&gt;
&lt;br/&gt;

&lt;h4&gt;Blend modes&lt;/h4&gt;

&lt;div style="width:230px;height:190px;display:inline-block;"&gt;
Normal&lt;br/&gt;
&lt;a href="http://3.bp.blogspot.com/_OjchJpvqFiw/SXhTpvAyHSI/AAAAAAAAAbc/ObFt8ZXcm5M/s1600-h/normal.png" imageanchor="1" target="_blank" style=""&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SXhTpvAyHSI/AAAAAAAAAbc/ObFt8ZXcm5M/s200/normal.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style="width:230px;height:190px;display:inline-block;"&gt;
Darken&lt;br/&gt;
&lt;a href="http://4.bp.blogspot.com/_OjchJpvqFiw/SXhTSL-1B3I/AAAAAAAAAZ8/jhJV83y4MgI/s1600-h/darken.png" imageanchor="1" target="_blank" style=""&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_OjchJpvqFiw/SXhTSL-1B3I/AAAAAAAAAZ8/jhJV83y4MgI/s200/darken.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style="width:230px;height:190px;display:inline-block;"&gt;
Multiply&lt;br/&gt;
&lt;a href="http://3.bp.blogspot.com/_OjchJpvqFiw/SXhTmZ07jDI/AAAAAAAAAbU/kCkaK-3zvSs/s1600-h/multiply.png" imageanchor="1" target="_blank" style=""&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SXhTmZ07jDI/AAAAAAAAAbU/kCkaK-3zvSs/s200/multiply.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style="width:230px;height:190px;display:inline-block;"&gt;
Color Burn&lt;br/&gt;
&lt;a href="http://2.bp.blogspot.com/_OjchJpvqFiw/SXhTMPhfz6I/AAAAAAAAAZs/0i4UVoJkXCM/s1600-h/colorburn.png" imageanchor="1" target="_blank" style=""&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_OjchJpvqFiw/SXhTMPhfz6I/AAAAAAAAAZs/0i4UVoJkXCM/s200/colorburn.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style="width:230px;height:190px;display:inline-block;"&gt;
Linear Burn&lt;br/&gt;
&lt;a href="http://4.bp.blogspot.com/_OjchJpvqFiw/SXhThN1VBSI/AAAAAAAAAa8/3Zd1KaUKkWM/s1600-h/linearburn.png" imageanchor="1" target="_blank" style=""&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_OjchJpvqFiw/SXhThN1VBSI/AAAAAAAAAa8/3Zd1KaUKkWM/s200/linearburn.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style="width:230px;height:190px;display:inline-block;"&gt;
Darker Color&lt;br/&gt;
&lt;a href="http://4.bp.blogspot.com/_OjchJpvqFiw/SXhTUUtYBZI/AAAAAAAAAaE/kFritf-gKfo/s1600-h/darkercolor.png" imageanchor="1" target="_blank" style=""&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_OjchJpvqFiw/SXhTUUtYBZI/AAAAAAAAAaE/kFritf-gKfo/s200/darkercolor.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style="width:230px;height:190px;display:inline-block;"&gt;
Lighten&lt;br/&gt;
&lt;a href="http://2.bp.blogspot.com/_OjchJpvqFiw/SXhTeDZDOFI/AAAAAAAAAas/IkSRtGEOBi0/s1600-h/lighten.png" imageanchor="1" target="_blank" style=""&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_OjchJpvqFiw/SXhTeDZDOFI/AAAAAAAAAas/IkSRtGEOBi0/s200/lighten.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style="width:230px;height:190px;display:inline-block;"&gt;
Screen&lt;br/&gt;
&lt;a href="http://4.bp.blogspot.com/_OjchJpvqFiw/SXhTwM5lZcI/AAAAAAAAAb0/DDyCFkRAjm8/s1600-h/screen.png" imageanchor="1" target="_blank" style=""&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_OjchJpvqFiw/SXhTwM5lZcI/AAAAAAAAAb0/DDyCFkRAjm8/s200/screen.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style="width:230px;height:190px;display:inline-block;"&gt;
Color Dodge&lt;br/&gt;
&lt;a href="http://3.bp.blogspot.com/_OjchJpvqFiw/SXhTOp5i_jI/AAAAAAAAAZ0/OA_igjJASJo/s1600-h/colordodge.png" imageanchor="1" target="_blank" style=""&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SXhTOp5i_jI/AAAAAAAAAZ0/OA_igjJASJo/s200/colordodge.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style="width:230px;height:190px;display:inline-block;"&gt;
Linear Dodge&lt;br/&gt;
&lt;a href="http://1.bp.blogspot.com/_OjchJpvqFiw/SXhTilMQGLI/AAAAAAAAAbE/F6Cjs1vFvGg/s1600-h/lineardodge.png" imageanchor="1" target="_blank" style=""&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_OjchJpvqFiw/SXhTilMQGLI/AAAAAAAAAbE/F6Cjs1vFvGg/s200/lineardodge.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style="width:230px;height:190px;display:inline-block;"&gt;
Lighter Color&lt;br/&gt;
&lt;a href="http://4.bp.blogspot.com/_OjchJpvqFiw/SXhTf0nGbbI/AAAAAAAAAa0/S6wQKNRvT9s/s1600-h/lightercolor.png" imageanchor="1" target="_blank" style=""&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_OjchJpvqFiw/SXhTf0nGbbI/AAAAAAAAAa0/S6wQKNRvT9s/s200/lightercolor.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style="width:230px;height:190px;display:inline-block;"&gt;
Overlay&lt;br/&gt;
&lt;a href="http://4.bp.blogspot.com/_OjchJpvqFiw/SXhTt3ZCGyI/AAAAAAAAAbs/DvZrxwzPVus/s1600-h/overlay.png" imageanchor="1" target="_blank" style=""&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_OjchJpvqFiw/SXhTt3ZCGyI/AAAAAAAAAbs/DvZrxwzPVus/s200/overlay.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style="width:230px;height:190px;display:inline-block;"&gt;
Soft Light&lt;br/&gt;
&lt;a href="http://4.bp.blogspot.com/_OjchJpvqFiw/SXhTyZKEERI/AAAAAAAAAb8/PxVOmyA9lkM/s1600-h/softlight.png" imageanchor="1" target="_blank" style=""&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_OjchJpvqFiw/SXhTyZKEERI/AAAAAAAAAb8/PxVOmyA9lkM/s200/softlight.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style="width:230px;height:190px;display:inline-block;"&gt;
Hard Light&lt;br/&gt;
&lt;a href="http://4.bp.blogspot.com/_OjchJpvqFiw/SXhTbkGnQNI/AAAAAAAAAac/URi8gT8Mb6c/s1600-h/hardlight.png" imageanchor="1" target="_blank" style=""&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_OjchJpvqFiw/SXhTbkGnQNI/AAAAAAAAAac/URi8gT8Mb6c/s200/hardlight.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style="width:230px;height:190px;display:inline-block;"&gt;
Vivid Light&lt;br/&gt;
&lt;a href="http://1.bp.blogspot.com/_OjchJpvqFiw/SXhTzm54OaI/AAAAAAAAAcE/Sa_dd_G2wgg/s1600-h/vividlight.png" imageanchor="1" target="_blank" style=""&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_OjchJpvqFiw/SXhTzm54OaI/AAAAAAAAAcE/Sa_dd_G2wgg/s200/vividlight.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style="width:230px;height:190px;display:inline-block;"&gt;
Linear Light&lt;br/&gt;
&lt;a href="http://1.bp.blogspot.com/_OjchJpvqFiw/SXhTkdA5RLI/AAAAAAAAAbM/-_O7c2XbYBE/s1600-h/linearlight.png" imageanchor="1" target="_blank" style=""&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_OjchJpvqFiw/SXhTkdA5RLI/AAAAAAAAAbM/-_O7c2XbYBE/s200/linearlight.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style="width:230px;height:190px;display:inline-block;"&gt;
Pin Light&lt;br/&gt;
&lt;a href="http://4.bp.blogspot.com/_OjchJpvqFiw/SXhTrgfvMPI/AAAAAAAAAbk/pFO7kntG8nU/s1600-h/pinlight.png" imageanchor="1" target="_blank" style=""&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_OjchJpvqFiw/SXhTrgfvMPI/AAAAAAAAAbk/pFO7kntG8nU/s200/pinlight.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style="width:230px;height:190px;display:inline-block;"&gt;
Hard Mix&lt;br/&gt;
&lt;a href="http://3.bp.blogspot.com/_OjchJpvqFiw/SXhTcH48m_I/AAAAAAAAAak/3vDC4PKSDbI/s1600-h/hardmix.png" imageanchor="1" target="_blank" style=""&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SXhTcH48m_I/AAAAAAAAAak/3vDC4PKSDbI/s200/hardmix.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style="width:230px;height:190px;display:inline-block;"&gt;
Difference&lt;br/&gt;
&lt;a href="http://1.bp.blogspot.com/_OjchJpvqFiw/SXhTXFB207I/AAAAAAAAAaM/omMdrambvQQ/s1600-h/difference.png" imageanchor="1" target="_blank" style=""&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_OjchJpvqFiw/SXhTXFB207I/AAAAAAAAAaM/omMdrambvQQ/s200/difference.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style="width:230px;height:190px;display:inline-block;"&gt;
Exclusion&lt;br/&gt;
&lt;a href="http://1.bp.blogspot.com/_OjchJpvqFiw/SXhTZSm11pI/AAAAAAAAAaU/boBvh2-0gPM/s1600-h/exclusion.png" imageanchor="1" target="_blank" style=""&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_OjchJpvqFiw/SXhTZSm11pI/AAAAAAAAAaU/boBvh2-0gPM/s200/exclusion.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;br/&gt;&lt;br/&gt;
So, basically all the Photoshop modes sans "dissolve" and the HSL based ones (which I guess I'll add at some point as well). 
&lt;br/&gt;&lt;br/&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-1411536239197290941?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=MVpRA9mZ"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=pWjEZzQo"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=pWjEZzQo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=0Ilmnuv7"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=0Ilmnuv7" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=86C3N0G9"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=86C3N0G9" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=SUpYzZl3"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?d=779" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/DAg3aDUwxbo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/1411536239197290941/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/01/photoshop-blend-modes-with-pixastic.html#comment-form" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/1411536239197290941?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/1411536239197290941?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/01/photoshop-blend-modes-with-pixastic.html" title="Photoshop blend modes with Pixastic" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_OjchJpvqFiw/SXhTkdA5RLI/AAAAAAAAAbM/-_O7c2XbYBE/s72-c/linearlight.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">6</thr:total></entry><entry gd:etag="W/&quot;CEIGRXY-fSp7ImA9WxVaF0w.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-2861869335112495418</id><published>2009-01-08T12:27:00.000-08:00</published><updated>2009-04-14T05:35:24.855-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-14T05:35:24.855-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="image" /><category scheme="http://www.blogger.com/atom/ns#" term="genetic algorithms" /><category scheme="http://www.blogger.com/atom/ns#" term="canvas" /><title>Genetic algorithms, Mona Lisa and JavaScript + Canvas</title><content type="html">&lt;span class="post-summary"&gt;&lt;a href="http://www.nihilogic.dk/labs/evolving-images/" imageanchor="1" target="_blank" style="float:left; margin-right: 10px;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SWZvN6k3MEI/AAAAAAAAAYc/jE2O78E1Gnw/s320/mona_1500s_2700000.png" /&gt;&lt;/a&gt;
About a month ago, there was an interesting article about using genetic algorithms to "evolve" images. &lt;a href="http://rogeralsing.com/2008/12/07/genetic-programming-evolution-of-mona-lisa/" target="_blank"&gt;Roger Alsing had made a small program&lt;/a&gt; and put it to the test by letting it make a very good approximation of the Mona Lisa with 50 layered, semi-transparent polygons. I figured I'd try to do &lt;a href="http://www.nihilogic.dk/labs/evolving-images/" target="_blank"&gt;something similar with JavaScript and Canvas&lt;/a&gt;.&lt;/span&gt;
&lt;span class="full-article"&gt;
&lt;br /&gt;
&lt;h4&gt;

Genetic algorithms&lt;/h4&gt;
So, the basic idea of &lt;a class="wiki-summary" href="http://en.wikipedia.org/wiki/Genetic_algorithm" target="_blank"&gt;genetic algorithms&lt;/a&gt; is that you have a population of individuals, each carrying a DNA string representing a possible solution to the problem (in this case, the polygonal likeness of Mona Lisa). The initial population is assigned random DNA and subsequent generations are then created by mixing the DNA of the fittest individuals of the current population. In order to ensure diversity in the population, there's a small chance of mutation where a DNA value is randomly changed. However, Roger Alsing's project actually uses a population of only one parent, making it more like a &lt;a class="wiki-summary" href="http://en.wikipedia.org/wiki/Hill_climbing" target="_blank"&gt;hill climbing&lt;/a&gt; algorithm where the current solution is altered slightly and if it's a better fit, the old one is discarded. 
&lt;br /&gt;
&lt;br /&gt;
I tried to go for a more proper genetic algorithm approach with an adjustable population size, selection, DNA mixing and everything. Now, Roger used just short of a million generations to get to his result (which was very accurate). It took 3 hours for his (compiled) program to generate the resulting image, and of course, even if JS engines are getting faster, it's going to take a bit more time than that to get as nice a result as his using JavaScript. Still, even after a few hundred generations/a few minutes in my demo, with the default parameters, you should see the shape of Mona Lisa starting to take form. I'm unfortunately not very patient, so I'm not sure if my experiment can even create as good an approximation, given the necessary time.
&lt;br /&gt;
&lt;br /&gt;
There are also a few other images you can play with. I've made the images pretty small (100x100) so that evolution would be as speedy as possible. The fitness function actually uses an even smaller (50%) version.
&lt;br /&gt;
&lt;h4&gt;

Options&lt;/h4&gt;
Some of the parameters can be changed before starting the evolution. They are:
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Number of polygons:&lt;/b&gt; The number of polygons used to in the image approximation.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Polygon complexity:&lt;/b&gt; The number of vertices in each polygon.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Difference squared:&lt;/b&gt; If checked, the squared differences of the RGB values are used when calculated fitness, otherwise simply the absolute difference.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Population size:&lt;/b&gt; The number of different candidates in each generation.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Succesful parents cutoff:&lt;/b&gt; The percentage of candidates selected for breeding the next generation, eg. 0.25 = the fittest 25% of the current population.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Mutation chance:&lt;/b&gt; The chance that a value will &lt;a class="wiki-summary" href="http://en.wikipedia.org/wiki/Mutation_%28genetic_algorithm%29" target="_blank"&gt;mutate&lt;/a&gt; when breeding new candidates, for example 0.02 = 2% chance of mutation.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Mutation amount:&lt;/b&gt; The amount the mutated value will be changed, for example 0.01 = 1% means a random change between -1% and 1%.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Uniform &lt;a class="wiki-summary" href="http://en.wikipedia.org/wiki/Crossover_%28genetic_algorithm%29" target="_blank"&gt;crossover&lt;/a&gt;:&lt;/b&gt; If checked, values are mixed at random one by one from each parent, otherwise a single random cut in the DNA string is made and one part from each parent is used.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Kill parents:&lt;/b&gt; If checked, the new generation will consist entirely of the children of the old generation. If not checked, the parents are left alive and will compete against their offspring.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
If the parents are not carried over to the new generation, you will notice that the best fitness value in the new generation might actually be worse than the previous one. On the other hand, that could make it easier to avoid dead ends and premature converging towards local optima.
&lt;br /&gt;
&lt;br /&gt;
Note that changing the parameters won't have any effect until the evolution is restarted.
&lt;br /&gt;
&lt;h4&gt;

A few results&lt;/h4&gt;
Here are a few quick runs, showing the results. 
&lt;br /&gt;
&lt;br /&gt;


&lt;img border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SWZv-MsO3JI/AAAAAAAAAZE/2Q6uPAdI4TQ/s320/monalisa_100x100.png" /&gt;
&lt;img border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SWZvN6k3MEI/AAAAAAAAAYc/jE2O78E1Gnw/s400/mona_1500s_2700000.png" /&gt;
&lt;br /&gt;
&lt;i&gt;Mona Lisa after 25 minutes&lt;/i&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;img border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SWZwE9wfLaI/AAAAAAAAAZM/u7pNhB6cDWY/s320/firefox_100x100.png" /&gt;
&lt;img border="0" src="http://4.bp.blogspot.com/_OjchJpvqFiw/SWZvTea-YbI/AAAAAAAAAYk/IotT4NUUP9c/s400/firefox_1400s_6700000.png" /&gt;
&lt;br /&gt;
&lt;i&gt;Firefox logo after 25 minutes&lt;/i&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;img border="0" src="http://1.bp.blogspot.com/_OjchJpvqFiw/SWZwIrEWNfI/AAAAAAAAAZU/GVA0YcmqesA/s320/opera_100x100.png" /&gt;
&lt;img border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SWZvU_jvyHI/AAAAAAAAAYs/GkaoewHZzPs/s400/opera_2400s_3200000.png" /&gt;
&lt;br /&gt;

&lt;i&gt;Opera logo after 40 minutes&lt;/i&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;img border="0" src="http://1.bp.blogspot.com/_OjchJpvqFiw/SWZwNFo0P1I/AAAAAAAAAZc/VmjoGSbkfjI/s320/mondrian_100x100.png" /&gt;
&lt;img border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SWZvWxuXiWI/AAAAAAAAAY0/gFVl-oqbAJU/s400/mondrian_850s.png" /&gt;
&lt;br /&gt;
&lt;i&gt;Mondrian after 14 minutes&lt;/i&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;img border="0" src="http://2.bp.blogspot.com/_OjchJpvqFiw/SWZwQbQ8GnI/AAAAAAAAAZk/mxcEzJDQJoY/s320/microbe_100x100.png" /&gt;
&lt;img border="0" src="http://2.bp.blogspot.com/_OjchJpvqFiw/SWZvYhMT0JI/AAAAAAAAAY8/noAltSYXcHo/s400/microbe_550s.png" /&gt;
&lt;br /&gt;
&lt;i&gt;Microbe after 9 minutes&lt;/i&gt;


&lt;br /&gt;
&lt;h4&gt;

Browsers&lt;/h4&gt;
Since we're using &lt;code&gt;canvas&lt;/code&gt; there's no support for IE. Furthermore, we're using the getImageData method, so only Firefox, Opera 9.5+ and WebKit nightlies will work. I suggest using either the latest Firefox beta/preview or a recent WebKit nightly as they seem to yield the best performance.
&lt;br /&gt;
&lt;h4&gt;

One last note&lt;/h4&gt;
Only now, after I'd been playing around with this, have I noticed that someone had &lt;a href="http://alteredqualia.com/visualization/evolve/" target="_blank"&gt;already done&lt;/a&gt; a JavaScript/canvas version of Alsing's program (where you can even use your own images) back when the original article was published, and for some reason I missed it. That version stays closer to what Alsing was doing, though, where mine differs in a lot of ways.
&lt;br /&gt;
&lt;br /&gt;
I think my approach gets to something resembling the target image faster, but it seems to have problems getting the details in place after that. I haven't had the patience to let it run for more than a couple of hours and it's quite possible that the other techniques are able to get a better approximation in the long run.
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.nihilogic.dk/labs/evolving-images/"&gt;Play with it here&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-2861869335112495418?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=WjpGJtHD"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=pz2Gxttn"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=pz2Gxttn" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=3a4HKaFv"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=3a4HKaFv" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=IBaPE6yu"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=IBaPE6yu" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=LpanzXfs"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?d=779" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/fxUTlAiniQE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/2861869335112495418/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/01/genetic-mona-lisa.html#comment-form" title="21 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/2861869335112495418?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/2861869335112495418?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/01/genetic-mona-lisa.html" title="Genetic algorithms, Mona Lisa and JavaScript + Canvas" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_OjchJpvqFiw/SWZvN6k3MEI/AAAAAAAAAYc/jE2O78E1Gnw/s72-c/mona_1500s_2700000.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">21</thr:total></entry><entry gd:etag="W/&quot;DkIMRnw9eyp7ImA9WxVVFUU.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-2499072714362619699</id><published>2009-01-02T12:51:00.000-08:00</published><updated>2009-03-09T00:43:07.263-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-09T00:43:07.263-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="misc" /><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="elsewhere" /><title>2008 - A Year of Awesome JavaScript</title><content type="html">&lt;span class="post-summary"&gt;2008 has been just great, not least because of all the great stuff people have been doing with JavaScript, the new &lt;code&gt;canvas&lt;/code&gt; element and the web in general. Browser vendors are now competing, trying to outdo each other in terms of JavaScript performance, leaving developers and end-users as winners as we now get to do cool stuff that wasn't really feasible before. Here's a summary of the neat things of the year 2008 as I saw it.
&lt;/span&gt;

&lt;span class="full-article"&gt;
&lt;br /&gt;
&lt;h4&gt;
Games&lt;/h4&gt;
&lt;a href="http://2.bp.blogspot.com/_OjchJpvqFiw/SV5-93IC2eI/AAAAAAAAAXM/xiFFcsW-5zQ/s1600-h/invaders_screenshot.png" imageanchor="1" style="float: right; margin-left: 10px;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_OjchJpvqFiw/SV5-93IC2eI/AAAAAAAAAXM/xiFFcsW-5zQ/s200/invaders_screenshot.png" /&gt;&lt;/a&gt;

It's been a great year for JavaScript games. It looks like DHTML and &lt;code&gt;canvas&lt;/code&gt;-based games are now capable of taking over some of the areas where Flash used to dominate. Many people have been building remakes of classic video games like &lt;a href="http://jsmario.com.ar/" target="_blank"&gt;Super Mario&lt;/a&gt;, &lt;a href="http://www.harryguillermo.com/" target="_blank"&gt;Pac-Man&lt;/a&gt;, &lt;a href="http://billmill.org/static/canvastutorial/" target="_blank"&gt;Breakout&lt;/a&gt;, &lt;a href="http://matthaynes.net/blog/2008/08/03/javascript-space-invaders/" target="_blank"&gt;Space Invaders&lt;/a&gt;, &lt;a href="http://www.e-forum.ro:8080/dynagame/index" target="_blank"&gt;Bomberman&lt;/a&gt; or &lt;a href="http://jonraasch.com/blog/jquery-video-game-remake-tc-surf-designs" target="_blank"&gt;T&amp;amp;C Surf Designs&lt;/a&gt;.

&lt;br /&gt;
&lt;div style="clear: both;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;a href="http://4.bp.blogspot.com/_OjchJpvqFiw/SV5_Mqv5ZHI/AAAAAAAAAYU/8mEUts5KqBw/s1600-h/spacius.png" imageanchor="1" style="float: left; margin-right: 10px;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_OjchJpvqFiw/SV5_Mqv5ZHI/AAAAAAAAAYU/8mEUts5KqBw/s200/spacius.png" /&gt;&lt;/a&gt;

Others took the old arcade traditions and applied them to their own ideas, giving us cool games like Matt Hackett's &lt;a href="http://scriptnode.com/lab/spacius/" target="_blank"&gt;Spacius&lt;/a&gt;, Mark Wilcox's &lt;a href="http://www.rebelideas.co.uk/proto/test/" target="_blank"&gt;Invaders from Mars&lt;/a&gt;, VertigoProject's &lt;a href="http://www.vertigo-project.com/projects/redline-game" target="_blank"&gt;RedLine Racing&lt;/a&gt; or a twist on the classic &lt;a href="http://www.reenigne.org/tet4/" target="_blank"&gt;Tetris game&lt;/a&gt;.

&lt;br /&gt;
&lt;div style="clear: both;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;a href="http://3.bp.blogspot.com/_OjchJpvqFiw/SV5_HnQk0DI/AAAAAAAAAYM/EgWy7kHORQ4/s1600-h/protorpg.png" imageanchor="1" style="float: right; margin-left: 10px;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SV5_HnQk0DI/AAAAAAAAAYM/EgWy7kHORQ4/s200/protorpg.png" /&gt;&lt;/a&gt;

We've even seen some roleplaying games, like the very cool &lt;a href="http://www.icculus.org/asciiroth/" target="_blank"&gt;Tombs of Asciiroth&lt;/a&gt; or the more graphical &lt;a href="http://www.andrewwooldridge.com/canvas/canvasquest/canvasquest.html" target="_blank"&gt;CanvasQuest&lt;/a&gt; by Andrew Wooldridge and the Prototype based &lt;a href="http://www.protorpg.com/" target="_blank"&gt;ProtoRPG&lt;/a&gt; by Pierre Chassaing. Although they are mostly betas or demos at the moment, they look like they could turn out to be really cool one day.

&lt;br /&gt;
&lt;div style="clear: both;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;a href="http://3.bp.blogspot.com/_OjchJpvqFiw/SV5-ouywLBI/AAAAAAAAAW0/Xuv75UZv9yo/s1600-h/gamejs-jetris.png" imageanchor="1" style="float: left; margin-right: 10px;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SV5-ouywLBI/AAAAAAAAAW0/Xuv75UZv9yo/s200/gamejs-jetris.png" /&gt;&lt;/a&gt;

2008 also saw a few libraries for JavaScript / DHTML game development pop up, most notably &lt;a href="http://www.tommysmind.com/gamejs/" target="_blank"&gt;GameJS&lt;/a&gt; (pictured to the left with its demo game, Jetris) and &lt;a href="http://gamequery.onaluf.org/" target="_blank"&gt;GameQuery&lt;/a&gt;, the latter being an extension to the popular jQuery library. 

&lt;br /&gt;
&lt;div style="clear: both;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;a href="http://4.bp.blogspot.com/_OjchJpvqFiw/SV5-nkFReBI/AAAAAAAAAWs/RSuRftyixmc/s1600-h/defender-of-the-favicon.png" imageanchor="1" style="float: right; margin-left: 10px;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_OjchJpvqFiw/SV5-nkFReBI/AAAAAAAAAWs/RSuRftyixmc/s200/defender-of-the-favicon.png" /&gt;&lt;/a&gt;

Last, a special mention to a great (but small) game, &lt;a href="http://www.p01.org/releases/DHTML_contests/files/DEFENDER_of_the_favicon/" target="_blank"&gt;DEFENDER of the favicon&lt;/a&gt;. Mathieu 'p01' Henri squeezed a version of the old Defender game into the 16x16 space of the favicon. How sweet is that?

&lt;br /&gt;
&lt;h4&gt;
Demos&lt;/h4&gt;
&lt;br /&gt;
&lt;a href="http://3.bp.blogspot.com/_OjchJpvqFiw/SV5-hzQzHsI/AAAAAAAAAWU/pg4evuP2XyI/s1600-h/antisocial.png" imageanchor="1" style="float: left; margin-right: 10px;"&gt;&lt;img alt="Antisocial Demo" border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SV5-hzQzHsI/AAAAAAAAAWU/pg4evuP2XyI/s200/antisocial.png" title="Antisocial Demo" /&gt;&lt;/a&gt;

The &lt;code&gt;canvas&lt;/code&gt; element is now supported in most browsers (that are not made by companies called Microsoft). That means we now have more options for creating dynamic graphics in the browser and people have not been shy to use it to show off their mad skills. Some have made &lt;a href="http://a1k0n.net/code/flag.html" target="_blank"&gt;small and simple demos&lt;/a&gt; showing the capabilities of the canvas, while others took it a step further, like Matt Westcott and his &lt;a href="http://antisocial.demozoo.org/" target="_blank"&gt;Antisocial demo&lt;/a&gt;, a social network satire in nice demo style complete with a demo making tool.


&lt;br /&gt;
&lt;div style="clear: both;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;a href="http://4.bp.blogspot.com/_OjchJpvqFiw/SV5_DUX66jI/AAAAAAAAAX0/yXpr_LTxYUA/s1600-h/mars.png" imageanchor="1" style="float: right; margin-left: 10px;"&gt;&lt;img alt="256 bytes Mars demo" border="0" src="http://4.bp.blogspot.com/_OjchJpvqFiw/SV5_DUX66jI/AAAAAAAAAX0/yXpr_LTxYUA/s200/mars.png" title="256 bytes Mars demo" /&gt;&lt;/a&gt;

Others who have been busy this year include the talented Mathieu 'p01' Henri who, among other things, specializes in making really tiny things, including tiny pieces of code that do cool things, examples: &lt;a href="http://www.p01.org/releases/Demoscene/files/rubber_256b_javascript.htm" target="_blank"&gt;Rubber effect&lt;/a&gt;, &lt;a href="http://www.p01.org/releases/Demoscene/files/tunnex_256b_javascript.htm" target="_blank"&gt;Tunnex&lt;/a&gt;, &lt;a href="http://www.p01.org/releases/Demoscene/files/mars_canvas_256b.htm" target="_blank"&gt;Mars&lt;/a&gt;. All in 256 bytes each, nice!

&lt;br /&gt;
&lt;div style="clear: both;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;a href="http://4.bp.blogspot.com/_OjchJpvqFiw/SV5-rl6lgMI/AAAAAAAAAXE/XVIszKUMwqU/s1600-h/hypno-trip.png" imageanchor="1" style="float: left; margin-right: 10px;"&gt;&lt;img alt="20 lines canvas demo - Hypno Trip Down the Fractal Rug" border="0" src="http://4.bp.blogspot.com/_OjchJpvqFiw/SV5-rl6lgMI/AAAAAAAAAXE/XVIszKUMwqU/s200/hypno-trip.png" title="20 lines canvas demo - Hypno Trip Down the Fractal Rug" /&gt;&lt;/a&gt;

As if that's not enough, Mathieu Henri is also a regular over at the &lt;a href="http://www.ozoneasylum.com/" target="_blank"&gt;Ozone Asylum&lt;/a&gt; where he teamed up with the &lt;code&gt;canvas&lt;/code&gt; element for the 20 lines contests to create visual goodies such as &lt;a href="http://www.p01.org/releases/DHTML_contests/files/20lines_dynamic_hypnoglow/" target="_blank"&gt;Dynamic Hypnoglow&lt;/a&gt;, &lt;a href="http://www.p01.org/releases/DHTML_contests/files/20lines_twinkle/" target="_blank"&gt;Twinkle&lt;/a&gt; and &lt;a href="http://www.p01.org/releases/DHTML_contests/files/20lines_hypno_trip_down_the_fractal_rug/" target="_blank"&gt;Hypno Trip Down the Fractal Rug&lt;/a&gt;. These contest also gave birth to other great effects like &lt;a href="http://www.kaarellumi.com/asylum/html/dyn4.htm" target="_blank"&gt;colliding balls&lt;/a&gt;, some sort of &lt;a href="http://www.kaarellumi.com/asylum/html/dyn10.htm" target="_blank"&gt;3D cube effect&lt;/a&gt; and &lt;a href="http://www.kaarellumi.com/asylum/html/dyn8.htm" target="_blank"&gt;dynamically generated BMP flames&lt;/a&gt;.

&lt;br /&gt;
&lt;div style="clear: both;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;a href="http://1.bp.blogspot.com/_OjchJpvqFiw/SV5-jIdkGZI/AAAAAAAAAWc/Im5GqiZM4R0/s1600-h/boulderdash.png" imageanchor="1" style="float: left; margin-right: 10px;"&gt;&lt;img alt="20 lines Boulder Dash clone" border="0" src="http://1.bp.blogspot.com/_OjchJpvqFiw/SV5-jIdkGZI/AAAAAAAAAWc/Im5GqiZM4R0/s200/boulderdash.png" title="20 lines Boulder Dash clone" /&gt;&lt;/a&gt;

The Asylum inmates have even created small 20-line games, ranging from &lt;a href="http://weibell.de/javascript/20lines/lunar-lander/" target="_blank"&gt;Lunar Lander&lt;/a&gt; to a &lt;a href="http://magnetiq.com/bd20/" target="_blank"&gt;Boulderdash clone&lt;/a&gt; and an impressive &lt;a href="http://www.p01.org/releases/DHTML_contests/files/20lines_castle_wolfenstein/" target="_blank"&gt;homage to Wolfenstein 3D&lt;/a&gt;

&lt;br /&gt;
&lt;div style="clear: both;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;h4&gt;
3D&lt;/h4&gt;
&lt;br /&gt;
&lt;a href="http://3.bp.blogspot.com/_OjchJpvqFiw/SV5_GHCWGJI/AAAAAAAAAYE/Vb0cpZMQakE/s1600-h/projective-transform.png" imageanchor="1" style="float: left; margin-right: 10px;"&gt;&lt;img alt="Projective transform with canvas" border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SV5_GHCWGJI/AAAAAAAAAYE/Vb0cpZMQakE/s200/projective-transform.png" title="Projective transform with canvas" /&gt;&lt;/a&gt;

At the moment, the canvas element only supports 2D graphics, although there are efforts to enable a hardware accelerated third dimension from both the Mozilla and Opera teams. That doesn't mean there's no 3D graphics being done, though. Everything from &lt;a href="http://www.pascarello.com/canvas/KeyBoard3DCube.html" target="_blank"&gt;basic 3D cubes&lt;/a&gt;, &lt;a href="http://acko.net/blog/projective-texturing-with-canvas" target="_blank"&gt;texturing experiments&lt;/a&gt; to regular &lt;a href="http://lbi.lostboys.nl/blog/artikelen/canvas-in-full-3d/" target="_blank"&gt;JavaScript/Canvas 3D engines&lt;/a&gt; have been done.

&lt;br /&gt;
&lt;br /&gt;
Also check out the stuff done by the guys over at the &lt;a href="http://wiioperasdk.com/index2.php" target="_blank"&gt;Wii Opera SDK&lt;/a&gt; (it's not just for Opera or the Wii) and of course the &lt;a href="http://blog.nihilogic.dk/search/label/3d"&gt;3D stuff here at Nihilogic&lt;/a&gt;.

&lt;br /&gt;
&lt;div style="clear: both;"&gt;
&lt;/div&gt;
&lt;h4&gt;
Emulation&lt;/h4&gt;
&lt;br /&gt;
&lt;a href="http://3.bp.blogspot.com/_OjchJpvqFiw/SV5_CCOSTvI/AAAAAAAAAXs/VbW3WLmHJNQ/s1600-h/jsspeccy.png" imageanchor="1" style="float: left; margin-right: 10px;"&gt;&lt;img alt="JavaScript ZX Spectrum Emulator" border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SV5_CCOSTvI/AAAAAAAAAXs/VbW3WLmHJNQ/s200/jsspeccy.png" title="JavaScript ZX Spectrum Emulator" /&gt;&lt;/a&gt;

That JavaScript performance is getting better and better must be true since it's now possible to emulate other systems in the browser. Matt Westcott (who also made the Antisocial demo) pulled another rabbit out of the hat, &lt;a href="http://matt.west.co.tt/spectrum/jsspeccy/" target="_blank"&gt;JSSpeccy the ZX Spectrum emulator&lt;/a&gt;. That's just way cool.

&lt;br /&gt;
&lt;br /&gt;
James Urquhart also played a bit and created a proof of concept &lt;a href="http://www.cuppadev.co.uk/oldbrew/scumm-in-javascript/" target="_blank"&gt;SCUMM interpreter&lt;/a&gt;. It won't let you play Day of the Tentacle or even Maniac Mansion, but supposedly it can at least let you see a bit of OpenQuest. 

&lt;br /&gt;
&lt;div style="clear: both;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;a href="http://2.bp.blogspot.com/_OjchJpvqFiw/SV5--0xibpI/AAAAAAAAAXU/1mAZrbuRLfk/s1600-h/javascript-agi-interpreter.png" imageanchor="1" style="float: right; margin-left: 10px;"&gt;&lt;img alt="JavaScript AGI interpreter" border="0" src="http://2.bp.blogspot.com/_OjchJpvqFiw/SV5--0xibpI/AAAAAAAAAXU/1mAZrbuRLfk/s200/javascript-agi-interpreter.png" title="JavaScript AGI interpreter" /&gt;&lt;/a&gt;

A personal favorite of mine was António Afonso's &lt;a href="http://blog.nihilogic.dk/2008/06/sierra-agi-interpreter-in-javascript.html" target="_blank"&gt;JavaScript AGI interpreter&lt;/a&gt;. AGI was the system used by Sierra in the golden days of adventure gaming and when António made this little gem with an (almost) working Leisure Suit Larry, it just totally tickled my fancy.

&lt;br /&gt;
&lt;h4&gt;
Graphics&lt;/h4&gt;
&lt;br /&gt;
&lt;a href="http://2.bp.blogspot.com/_OjchJpvqFiw/SV5_E5uC9-I/AAAAAAAAAX8/tY-yr--hO-A/s1600-h/processing.png" imageanchor="1" style="float: left; margin-right: 10px;"&gt;&lt;img alt="Processing.js" border="0" src="http://2.bp.blogspot.com/_OjchJpvqFiw/SV5_E5uC9-I/AAAAAAAAAX8/tY-yr--hO-A/s200/processing.png" title="Processing.js" /&gt;&lt;/a&gt;

One of the most impressive feats this year must be John Resig's port of the Processing language to JavaScript, &lt;a href="http://dev.jquery.com/%7Ejohn/processing.js/" target="_blank"&gt;Processing.js&lt;/a&gt;, complete with a giga-ton of cool demos. In the same vein, Aza Raskin created &lt;a href="http://azarask.in/projects/algorithm-ink/" target="_blank"&gt;Algorithm Ink&lt;/a&gt;, a JavaScript/Canvas port of the Context Free program, a method for creating images based on rules and instructions. And there's more! Eitan Suez liked Turtle, the old Pascal graphics programming tool, so much that he decided to make a JavaScript version of it, &lt;a href="http://u2d.com/turtle_js/index.html" target="_blank"&gt;TurtleJS&lt;/a&gt;.

&lt;br /&gt;
&lt;div style="clear: both;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;a href="http://3.bp.blogspot.com/_OjchJpvqFiw/SV5_BmdghaI/AAAAAAAAAXk/sl2EqPSlciM/s1600-h/jsfractal.png" imageanchor="1" style="float: right; margin-left: 10px;"&gt;&lt;img alt="JavaScript Fractal Explorer" border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SV5_BmdghaI/AAAAAAAAAXk/sl2EqPSlciM/s200/jsfractal.png" title="JavaScript Fractal Explorer" /&gt;&lt;/a&gt;


On a more mathematically nerdy note, a few people have also been tackling fractals using JavaScript. Once again, p01 decided to play and rendered the &lt;a href="http://www.ozoneasylum.com/30330" target="_blank"&gt;Mandelbrot set with 137 bytes of DHTML&lt;/a&gt; which, with a bit of &lt;a href="http://blog.nihilogic.dk/2008/09/mandelbrot-in-less-than-128-bytes-of.html" target="_blank"&gt;friendly competition&lt;/a&gt;, ended up at a tiny &lt;a href="http://www.p01.org/releases/Demoscene/files/mandelbrot_111b.htm" target="_blank"&gt;111 bytes&lt;/a&gt; (FF only). Oliver Hunt created a prettier, &lt;a href="http://www.nerget.com/mandelbrot.html" target="_blank"&gt;graphical Mandelbrot set&lt;/a&gt; (&lt;a href="http://blog.nihilogic.dk/2008/10/23-pretty-javascript-fractals.html" target="_blank"&gt;as did I&lt;/a&gt;), and Russ Hall even made a full-fledged &lt;a href="http://2tap.com/2008/12/18/jsfractal-javascript-fractal-explorer/" target="_blank"&gt;fractal explorer application&lt;/a&gt;.

&lt;br /&gt;
&lt;h4&gt;
Audio&lt;/h4&gt;
&lt;br /&gt;
&lt;a href="http://4.bp.blogspot.com/_OjchJpvqFiw/SV5_A4f4-cI/AAAAAAAAAXc/_N7gJrgl1T0/s1600-h/javascript-drum-machine.png" imageanchor="1" style="float: right; margin-left: 10px;"&gt;&lt;img alt="JavaScript drum machine" border="0" src="http://4.bp.blogspot.com/_OjchJpvqFiw/SV5_A4f4-cI/AAAAAAAAAXc/_N7gJrgl1T0/s200/javascript-drum-machine.png" title="JavaScript drum machine" /&gt;&lt;/a&gt;

While waiting for proper support for the HTML5 audio element, most people have gotten used to settling for Flash-based audio but that doesn't mean you can't make weird experiments with sound and JavaScript. For example, check out the &lt;a href="http://www.themaninblue.com/writing/perspective/2008/11/17/" target="_blank"&gt;JS-909 drum machine&lt;/a&gt; by Cameron "The Man in Blue" Adams. Admittedly, it does rely on Quicktime, but cool nonetheless.

&lt;br /&gt;
&lt;br /&gt;
Or how about dynamically generating and playing WAV files, like this &lt;a href="http://sk89q.therisenrealm.com/2008/11/dynamically-generating-a-wav-in-javascript/" target="_blank"&gt;sine waveform generator&lt;/a&gt; by sk89q, and while we're at it, have some &lt;a href="http://d.hatena.ne.jp/brazil/20071003/1191381382"&gt;generated MIDI&lt;/a&gt; as well.

&lt;br /&gt;
&lt;h4&gt;
Odds and ends&lt;/h4&gt;
&lt;br /&gt;
Not just graphics and audio files can be generated, though. How about a small JavaScript library capable of &lt;a href="http://d.hatena.ne.jp/amachang/20081130/1228029751" target="_blank"&gt;generating ZIP files on the fly&lt;/a&gt;? 

&lt;br /&gt;
&lt;div style="clear: both;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;a href="http://2.bp.blogspot.com/_OjchJpvqFiw/SV5-p7OeOII/AAAAAAAAAW8/JJtHf_m2nEs/s1600-h/homer-css.png" imageanchor="1" style="float: left; margin-right: 10px;"&gt;&lt;img alt="Homer made with CSS" border="0" src="http://2.bp.blogspot.com/_OjchJpvqFiw/SV5-p7OeOII/AAAAAAAAAW8/JJtHf_m2nEs/s200/homer-css.png" title="Homer made with CSS" /&gt;&lt;/a&gt;

How much can you really do with CSS these days? Isn't it just for styling your text and placing your divs? Apparently not. Román Cortés has at least shown that an &lt;a href="http://www.romancortes.com/blog/homer-css/" target="_blank"&gt;image of Homer Simpson&lt;/a&gt; can be created if your CSS-fu is strong enough.

&lt;br /&gt;
&lt;br /&gt;
Ernest Delgado mixed my Mario Kart demo with OpenStreetMap to create a &lt;a href="http://ernestdelgado.com/public-tests/canvas-gpsmap/" target="_blank"&gt;nice little tech demo&lt;/a&gt; resembling the GPS navigation systems found in cars.

&lt;br /&gt;
&lt;div style="clear: both;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;a href="http://1.bp.blogspot.com/_OjchJpvqFiw/SV5-mtVOWrI/AAAAAAAAAWk/YRNl1gbaQ-k/s1600-h/cubescape.png" imageanchor="1" style="float: right; margin-left: 10px;"&gt;&lt;img alt="Cubescape" border="0" src="http://1.bp.blogspot.com/_OjchJpvqFiw/SV5-mtVOWrI/AAAAAAAAAWk/YRNl1gbaQ-k/s200/cubescape.png" title="Cubescape" /&gt;&lt;/a&gt;

Finally, &lt;a href="http://www.themaninblue.com/experiment/Cubescape/new.php" target="_blank"&gt;Cubescape&lt;/a&gt; is a cute, fun toy where you simply build a cubic landscape by dropping colored cubes. Great timewaster from The Man in Blue.
&lt;br /&gt;
&lt;br /&gt;
Of course, I've also been doing a bit of tinkering here at Nihilogic myself, so be sure to check &lt;a href="http://blog.nihilogic.dk/2000/01/archive.html"&gt;the archive&lt;/a&gt; to see if there's anything you missed. I just hope 2009 will be as cool as 2008 was (and I don't see why that should not be the case!).

&lt;br /&gt;
&lt;br /&gt;
What do you think was great in 2008?
&lt;br/&gt;&lt;br/&gt;
Edit: &lt;a href="http://www.yeeyan.com/articles/view/july/23582/dz" target="_blank"&gt;Chinese translation here&lt;/a&gt;&lt;br/&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-2499072714362619699?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=SpiDeKce"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=ZKwXXZiW"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=ZKwXXZiW" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=sKZz6eEa"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=sKZz6eEa" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=5TSrnW49"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=5TSrnW49" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=xbKF1txL"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?d=779" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/2vHCZtoaX7g" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/2499072714362619699/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2009/01/2008-year-of-awesome-javascript.html#comment-form" title="19 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/2499072714362619699?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/2499072714362619699?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2009/01/2008-year-of-awesome-javascript.html" title="2008 - A Year of Awesome JavaScript" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_OjchJpvqFiw/SV5-93IC2eI/AAAAAAAAAXM/xiFFcsW-5zQ/s72-c/invaders_screenshot.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">19</thr:total></entry><entry gd:etag="W/&quot;DEcHQ3c7eSp7ImA9WxRaGEo.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-9039171200451129361</id><published>2008-12-21T08:04:00.000-08:00</published><updated>2008-12-21T08:13:52.901-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-21T08:13:52.901-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="pixastic" /><title>Alternative edge detection filter</title><content type="html">&lt;span class='post-summary'&gt;

&lt;a href="http://www.pixastic.com/lib/docs/actions/edges2/"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SU5p0mBQofI/AAAAAAAAAWM/0t-8Yjm3Pbc/s400/pixastic-edge-detection.png" style="float:left; margin-right:10px"/&gt;&lt;/a&gt;

Oliver Hunt decided to share some edge detection code (uncreatively named &lt;code&gt;edges2&lt;/code&gt; by me). The result is different from the two existing actions in Pixastic and it is also a bit faster. Nice. Thanks Oliver!&lt;br/&gt;
&lt;a href="http://www.pixastic.com/lib/docs/actions/edges2/"&gt;Demo page&lt;/a&gt;&lt;br/&gt;
&lt;br/&gt;
This is probably my last post before christmas, so happy holidays everyone!
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-9039171200451129361?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=qQBDAgKK"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=e3nbA4GI"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=e3nbA4GI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=rPCWWVGC"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=rPCWWVGC" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=8qJOFU4N"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=8qJOFU4N" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=FQYMrYML"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?d=779" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/S1MEmQrv0YI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/9039171200451129361/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2008/12/alternative-edge-detection-filter.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/9039171200451129361?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/9039171200451129361?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2008/12/alternative-edge-detection-filter.html" title="Alternative edge detection filter" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_OjchJpvqFiw/SU5p0mBQofI/AAAAAAAAAWM/0t-8Yjm3Pbc/s72-c/pixastic-edge-detection.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></entry><entry gd:etag="W/&quot;CEMMQH46eCp7ImA9WxVaF0w.&quot;"><id>tag:blogger.com,1999:blog-8877325777086061039.post-2398820895343596089</id><published>2008-12-18T11:42:00.000-08:00</published><updated>2009-04-14T05:34:41.010-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-14T05:34:41.010-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="pixastic" /><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="image processing" /><title>More Pixastic actions</title><content type="html">&lt;span class='post-summary'&gt;
A few new actions (Color Adjust, Mosaic, Pointillize and Solarize) are now available for the &lt;a href="http://www.pixastic.com/lib/"&gt;Pixastic library&lt;/a&gt; (if you didn't catch the first post about it, &lt;a href="http://blog.nihilogic.dk/2008/12/pixastic-now-javascript-image.html"&gt;go here&lt;/a&gt;), bringing the total count to 25. 
&lt;/span&gt;
&lt;span class="full-article"&gt;
&lt;br/&gt;&lt;br/&gt;
The new effects are as follows:&lt;br/&gt;
&lt;br/&gt;
&lt;b&gt;Color Adjust&lt;/b&gt;&lt;br/&gt;
This simply lets you add/subtract from each color channel (red, green and blue) of the image. &lt;a href="http://www.pixastic.com/lib/docs/actions/coloradjust/"&gt;Demo page&lt;/a&gt;.&lt;br/&gt;
&lt;br/&gt;
&lt;b&gt;Mosaic&lt;/b&gt;&lt;br/&gt;
Creates a pixellated effect. &lt;a href="http://www.pixastic.com/lib/docs/actions/mosaic/"&gt;Demo page&lt;/a&gt;.&lt;br/&gt;
&lt;img border="0" src="http://2.bp.blogspot.com/_OjchJpvqFiw/SUqqKxeCbcI/AAAAAAAAAV0/9J567_HM-q0/s400/pixastic-mosaic.png" /&gt;&lt;br/&gt;
&lt;br/&gt;
&lt;b&gt;Pointillize&lt;/b&gt;&lt;br/&gt;
Paints the pictures with circular... points. &lt;a href="http://www.pixastic.com/lib/docs/actions/pointillize/"&gt;Demo page&lt;/a&gt;.&lt;br/&gt;
&lt;img border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SUqqQHuO4lI/AAAAAAAAAV8/oVJV3eFQFC0/s400/pixastic-pointillize.png" /&gt;&lt;br/&gt;
&lt;br/&gt;
&lt;b&gt;Solarize&lt;/b&gt;&lt;br/&gt;
Creates a solarisation effect by inverting all colors that are above a certain treshold. &lt;a href="http://www.pixastic.com/lib/docs/actions/solarize/"&gt;Demo page&lt;/a&gt;.&lt;br/&gt;
&lt;img border="0" src="http://3.bp.blogspot.com/_OjchJpvqFiw/SUqqVIfaieI/AAAAAAAAAWE/wh-omQ-4_OA/s400/pixastic-solarize.png" /&gt;&lt;br/&gt;
&lt;br/&gt;
All of these need image data access, so Firefox, Opera 9.5+ and WebKit nightly only. 
Got a few more coming in the not so distant future.
&lt;br/&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8877325777086061039-2398820895343596089?l=blog.nihilogic.dk'/&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=TGjXPUix"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=3u9lmhqX"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=3u9lmhqX" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=inAa3Nzc"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=inAa3Nzc" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=BnoRGN9a"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?i=BnoRGN9a" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/nihilogic?a=dyyMlgxS"&gt;&lt;img src="http://feeds.feedburner.com/~f/nihilogic?d=779" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/nihilogic/~4/YfmlTum7e1o" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.nihilogic.dk/feeds/2398820895343596089/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.nihilogic.dk/2008/12/more-pixastic-actions.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/2398820895343596089?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8877325777086061039/posts/default/2398820895343596089?v=2" /><link rel="alternate" type="text/html" href="http://blog.nihilogic.dk/2008/12/more-pixastic-actions.html" title="More Pixastic actions" /><author><name>Jacob Seidelin</name><uri>http://www.blogger.com/profile/04783658679191587047</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="06720631030229514192" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_OjchJpvqFiw/SUqqKxeCbcI/AAAAAAAAAV0/9J567_HM-q0/s72-c/pixastic-mosaic.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total></entry></feed>
